ISSUE SOLVED
Please see comment #6. Thanks to all who weighed in, I really appreciate it.
bfire85
louisd
__________________________________________________ __________________________________________________ ________________________________
I have a program that measures ONE part. Now, I would like to loop that program to measure multiple parts.
My method works for the part in position #1...I keep getting burned when I get to part position 2 and forwards. All works well until I recall an alignment. PC DMIS recalls A9 (for example) from the ORIGINAL part position, not A9[2] like it should be doing (to keep up with the loop). I try and type the bracket extension on there to make it A9[2] and PC DMIS just deletes it.
The "A9" thing is just an example. I have numerous points in this program where this will be a problem.
Is there a way I should be doing this or can you not make programs with looped alignments (which would just be downright f*cking insane IMO...)? Below is a small part of my program.
Please advise.
Thanks!
Looping code
It will try to go to rad_44_1 at pallet position 1 because it recalls A9...NOT A9[2]
Please see comment #6. Thanks to all who weighed in, I really appreciate it.
bfire85
louisd
__________________________________________________ __________________________________________________ ________________________________
I have a program that measures ONE part. Now, I would like to loop that program to measure multiple parts.
My method works for the part in position #1...I keep getting burned when I get to part position 2 and forwards. All works well until I recall an alignment. PC DMIS recalls A9 (for example) from the ORIGINAL part position, not A9[2] like it should be doing (to keep up with the loop). I try and type the bracket extension on there to make it A9[2] and PC DMIS just deletes it.
The "A9" thing is just an example. I have numerous points in this program where this will be a problem.
Is there a way I should be doing this or can you not make programs with looped alignments (which would just be downright f*cking insane IMO...)? Below is a small part of my program.
Please advise.
Thanks!
Looping code
Code:
GROUP_COUNTPROMPT_AND_SERIALNUMBER=GROUP/SHOWALLPARAMS=YES COUNT_PROMPT =COMMENT/INPUT,NO,FULL SCREEN=NO, How many parts are you inspecting? ASSIGN/TOTAL_PARTS=COUNT_PROMPT.INPUT ASSIGN/SER=0 WHILE/SER<TOTAL_PARTS ASSIGN/SER=SER+1 SER_PROMPT =COMMENT/INPUT,NO,FULL SCREEN=NO, Please enter the Serial Number of the "part at FIXTURE POSITION# "+SER+"." $$ NO, ~ ~ ~ ADD STUFF RIGHT HERE TO LOCK DOWN THE NUMBER THEY'RE ALLOWED TO TYPE IN FOR THE "SER_PROMPT" (ABOVE). LOOP BACK TO "SER_PROMPT" IF THEY MESS UP. ~ ~ ~ ASSIGN/SER_NUM[SER]=SER_PROMPT.INPUT END_WHILE/ ENDGROUP/ID=GROUP_COUNTPROMPT_AND_SERIALNUMBER RECALL/ALIGNMENT,EXTERNAL,FIXT_ALN_FAKE ASSIGN/PALLET_POS[1]=MPOINT(0,0,0) ASSIGN/PALLET_POS[2]=MPOINT(6,0,0) ASSIGN/PALLET_POS[3]=MPOINT(12,0,0) ASSIGN/PALLET_POS[4]=MPOINT(0,6,0) ASSIGN/PALLET_POS[5]=MPOINT(6,6,0) ASSIGN/PALLET_POS[6]=MPOINT(12,6,0) ASSIGN/PALLET_POS[7]=MPOINT(0,12,0) ASSIGN/PALLET_POS[8]=MPOINT(6,12,0) ASSIGN/PALLET_POS[9]=MPOINT(12,12,0) LOOP_X_AXIS=LOOP/START,ID=YES,NUMBER=TOTAL_PARTS,START=1,SKIP=, OFFSET:XAXIS=6,YAXIS=0,ZAXIS=0,ANGLE=0 ASSIGN/CURR_POS=0 ASSIGN/CURR_POS=CURR_POS+1 COMMENT/REPT, "Serial Number: "+SER_NUM[CURR_POS] ASSIGN/PO=PALLET_POS[CURR_POS] PO_PNT =GENERIC/POINT,DEPENDENT,CARTESIAN,$ NOM/XYZ,<0*1,0*1,0*1>,$ MEAS/XYZ,<PO.X,PO.Y,PO.Z>,$ NOM/IJK,<0*1,0*1,1*1>,$ MEAS/IJK,<0*1,0*1,1*1> A1_INIT_ALN =ALIGNMENT/START,RECALL:FIXT_ALN_FAKE,LIST=YES ALIGNMENT/TRANS,XAXIS,PO_PNT ALIGNMENT/TRANS,YAXIS,PO_PNT ALIGNMENT/TRANS,ZAXIS,PO_PNT ALIGNMENT/END
Code:
PNT8 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN THEO/<0,1.0325,-0.68>,<0,-1,0> ACTL/<0,1.0325,-0.68>,<0,-1,0> TARG/<0,1.0325,-0.68>,<0,-1,0> SNAP=NO SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=NO LIN8 =FEAT/LINE,CARTESIAN,UNBOUNDED,NO THEO/<0,1.0325,-0.65>,<0,0,-1> ACTL/<0,1.0325,-0.65>,<0,0,-1> CONSTR/LINE,BF,2D,PNT7,PNT8,, OUTLIER_REMOVAL/OFF,3 FILTER/OFF,WAVELENGTH=0 WORKPLANE/ZPLUS RECALL/ALIGNMENT,INTERNAL,A9 RAD_44_1 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR THEO/<0,0,-0.815>,<0,0,1>,2.27 ACTL/<0,0,-0.815>,<0,0,1>,2.27 TARG/<0,0,-0.815>,<0,0,1> START ANG=60.0003,END ANG=120.0003 ANGLE VEC=<1,0,0> DIRECTION=CCW SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=NO
Comment