hexagon logo

If/go to help

This is probably very simple to those of you who need, or find the need to use code on a regular basis...but I am very rusty and need some guidance.

So, I have 2 dims, X and Z and a tolerance to each of those....I have created assignments to each deviation, so far so good. I have created 2 labels, "restart", and "continue"....

Ok, so what I am looking to do....after the measurement, I want the code to say, yes, this is in tolerance, jump to the "continue" label, if its not in tolerance, I want an operator prompt to pop up and say, "re adjust and try again" and obviously jumping back to the "restart label as well.....

I know what I need to do, but the syntax gets me every time....

Here is what I have so far...


RESTART =LABEL/
_B_ LOCATOR=FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<621.234,802.112,688.115>,<0,-1,0>,10
ACTL/<621.262,802.161,688.074>,<0,-1,0>,10.085
TARG/<621.234,802.112,688.115>,<0,-1,0>
START ANG=0,END ANG=360
ANGLE VEC=<-1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=4,DEPTH=1,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=1,SPACER=2
AVOIDANCE MOVE=NO,DISTANCE=10
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
DIM D4= LOCATION OF CIRCLE _B_ LOCATOR
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
X 621.234 0.075 0.075 621.262 0.028 0.000
Z 688.115 0.075 0.075 688.074 -0.041 0.000
END OF DIMENSION D4
MOVE/CLEARPLANE
_C_ LOCATOR=FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<1428.069,605.06,1100.772>,<0,-1,0>,8
ACTL/<1428.057,605.06,1100.703>,<0,-1,0>,8.087
TARG/<1428.069,605.06,1100.772>,<0,-1,0>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=4,DEPTH=0,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=3
AVOIDANCE MOVE=AFTER,DISTANCE=5
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
DIM D5= LOCATION OF CIRCLE _C_ LOCATOR
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
X 1428.069 0.075 0.075 1428.057 -0.012 0.000
Z 1100.772 0.075 0.075 1100.703 -0.069 0.000
END OF DIMENSION D5
ASSIGN/V1=D4.X.DEV
ASSIGN/V2=D4.Z.DEV
ASSIGN/V3=D5.X.DEV
ASSIGN/V4=D5.Z.DEV
ASSIGN/V5=0
CONTINUE =LABEL/
Parents
  • Don't have the exact syntax either but I think the simplest method would be to test for an out of tolerance value greater than zero. That way you only have to test for one condition for each dimension instead of two. Something along the lines of IF D4.X.OUTTol greater or less than zero then goto RESTART.
Reply
  • Don't have the exact syntax either but I think the simplest method would be to test for an out of tolerance value greater than zero. That way you only have to test for one condition for each dimension instead of two. Something along the lines of IF D4.X.OUTTol greater or less than zero then goto RESTART.
Children
No Data