Is there a way to assign a value to a variable based on whether or not a specific feature is marked? This way I can avoid asking another question to set the variable
Set variable if feature is marked
Collapse
X
-
Could probably do something with an "ON ERROR" command. Test to see if the feature is present or not; skip the measurement if the feature isn't there, measure it if it is. Probably want some kind of report comment by the dimension for the feature saying the the feature was skipped. Otherwise the dimension would report the previously run dimension and no one would be the wiser.
Comment
-
Use ASSIGN variables with your Mark and Clear Mark to control the variable values.
Example Code
ASSIGN/V1=0 is Clear Mark
ASSIGN/V1=1 is Mark. IF/V1==1 is True
COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
""+V1
Code:[COLOR=#0000cc]ASSIGN/V1=0[/COLOR] [COLOR=#3498db]ASSIGN/V1=1[/COLOR] [COLOR=#9b59b6]IF/V1==0[/COLOR] [COLOR=#3498db]ASSIGN/V1=2[/COLOR] COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, ""+V1 [COLOR=#9b59b6]END_IF/ ELSE_IF/V1==1[/COLOR] [COLOR=#3498db]ASSIGN/V1=3[/COLOR] COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, ""+V1 [COLOR=#9b59b6]END_ELSEIF/[/COLOR]
ASSIGN/V1=1 is Clear Mark
ASSIGN/V1=0 is Marked. IF/V1==0 is True
COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
""+V1
Code:[COLOR=#3498db]ASSIGN/V1=0[/COLOR] [COLOR=#0000cc]ASSIGN/V1=1[/COLOR] [COLOR=#9b59b6]IF/V1==0[/COLOR] [COLOR=#3498db]ASSIGN/V1=2[/COLOR] COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, ""+V1 [COLOR=#9b59b6]END_IF/ ELSE_IF/V1==1[/COLOR] [COLOR=#3498db]ASSIGN/V1=3[/COLOR] COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, ""+V1 [COLOR=#9b59b6]END_ELSEIF/[/COLOR]
Last edited by davehocum; 02-02-2021, 04:09 PM.
Comment
-
So I may not be going about this the best way. I have several programs for very similar parts that use the same external alignment. These programs all start in DCC and stay in DCC the whole time. I currently have a seperate program that does nothing except set the external alignment with a manual and DCC alignment, then save the DCC aln as external and that's it (this gets ran maybe 2x a year when someone accidentally knocks the fixture loose). I don't really like this method though, so I'm trying to put the same manual alignment in each program. My goal is to have it set up so that if the manual alignment is not needed, it will skip over it, NOT save the manual alignment externally, recall the external alignment, then go into DCC. If the manual alignment is needed, I want it to run manual features, save this externally, recall it, then go into DCC. This way if the fixture gets moved, the alignment only needs to be ran once on any program.
This is what I tried yesterday:
Code:C1 =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, Is the fixture in a different location than it was the last time this program was ran? If you are not sure, answer "YES". FASTPROBEMODE/ON IF_GOTO/C1.INPUT=="NO",GOTO = SKIP_MAN manual alignment features here MAN_ALN SAVE/ALIGNMENT,MAN_ALN.aln,MACHINETOPA RTS SKIP_MAN =LABEL/ RECALL/ALIGNMENT,EXTERNAL,MAN_ALN MODE/DCC
Comment
-
Originally posted by Mike Ruff View PostSo I may not be going about this the best way. I have several programs for very similar parts that use the same external alignment. These programs all start in DCC and stay in DCC the whole time. I currently have a seperate program that does nothing except set the external alignment with a manual and DCC alignment, then save the DCC aln as external and that's it (this gets ran maybe 2x a year when someone accidentally knocks the fixture loose). I don't really like this method though, so I'm trying to put the same manual alignment in each program. My goal is to have it set up so that if the manual alignment is not needed, it will skip over it, NOT save the manual alignment externally, recall the external alignment, then go into DCC. If the manual alignment is needed, I want it to run manual features, save this externally, recall it, then go into DCC. This way if the fixture gets moved, the alignment only needs to be ran once on any program.
This is what I tried yesterday:
Code:C1 =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, Is the fixture in a different location than it was the last time this program was ran? If you are not sure, answer "YES". FASTPROBEMODE/ON IF_GOTO/C1.INPUT=="NO",GOTO = SKIP_MAN manual alignment features here MAN_ALN SAVE/ALIGNMENT,MAN_ALN.aln,MACHINETOPA RTS SKIP_MAN =LABEL/ RECALL/ALIGNMENT,EXTERNAL,MAN_ALN MODE/DCC
Put at top of code
Code:GROUP_SUBROUTINE_EXTERNAL_ALIGNMENT=GROUP/SHOWALLPARAMS=YES QUES_SUB_EXTALIGN =COMMENT/YESNO,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO, Do you need to reset the fixture alignment? YES--> If this is first time running prg for the day NO--> You're running with no issues CANCEL--> Cancel, I need help IF_GOTO/QUES_SUB_EXTALIGN.INPUT=="NO",GOTO = LABEL_SKIP_SUBROUTINE CS1 =CALLSUB/AG0XXXX_XXX_EXT_ALIGN,:, LABEL_SKIP_SUBROUTINE =LABEL/ ENDGROUP/ID=GROUP_SUBROUTINE_EXTERNAL_ALIGNMENT
SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker
Comment
-
Originally posted by DAN_M View Post
Mike, sounds like you need to make a subroutine for your manual alignment. You'll never have problems with marking/unmarking because the manual align is outside of the prg they'll be running.
Put at top of code
Code:GROUP_SUBROUTINE_EXTERNAL_ALIGNMENT=GROUP/SHOWALLPARAMS=YES QUES_SUB_EXTALIGN =COMMENT/YESNO,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO, Do you need to reset the fixture alignment? YES--> If this is first time running prg for the day NO--> You're running with no issues CANCEL--> Cancel, I need help IF_GOTO/QUES_SUB_EXTALIGN.INPUT=="NO",GOTO = LABEL_SKIP_SUBROUTINE CS1 =CALLSUB/AG0XXXX_XXX_EXT_ALIGN,:, LABEL_SKIP_SUBROUTINE =LABEL/ ENDGROUP/ID=GROUP_SUBROUTINE_EXTERNAL_ALIGNMENT
Comment
-
Related Topics
Collapse
-
by Thiyagu_RajHello all,
Can anyone help me that how to return the value of Maxindex & Minindex in Array so far i did,
Code:ASSIGN/W1=DIM_1A.DEV
-
Channel: PC-DMIS for CMMs
06-02-2019, 10:37 PM -
-
by M1chaelxgood afternoon
I always start my program with a headpiece to fill in the customer and drawing number and so on as below
my...-
Channel: PC-DMIS for CMMs
04-06-2018, 04:56 AM -
-
I've created an input comment above this that has the file location written in it as shown; THE C30 INPUT COMMENT IS "Q:\\CMM REPORTS\\HEXAGON\"...
-
Channel: PC-DMIS for CMMs
05-30-2019, 10:43 AM -
-
by jjewellGuys,
I can't for the life of me figure this out. I am trying to assign the calculated dia
as a variable (6mm_A1) as A1TOP
...-
Channel: PC-DMIS for CMMs
12-13-2006, 02:05 PM -
-
by joseq7If I am trying to get the run time of a program how do you "lock" an ASSIGNMENT?
If I code.................at the start of the...-
Channel: PC-DMIS for CMMs
10-17-2014, 07:21 AM -
Comment