Hi,
To reduce the program size, I want to use a While loop to Loop through my program and change the Z value every time.
The following code (only relevant lines) is wrong, I cant use the variable Zax in my positions, how to fix this?
____________________________
DEF JIHAAA3()
DECL INT Zax
Zax=2
LIN {X 400.000,Y 850.000,Z 207.000,A -90.001,B 0.000,C 0.000,S 6,T 27,E1 0.000,E2 0.000,E3 0.000,E4 0.000,E5 0.000,E6 0.000} C_DIS
LIN {X 500.000,Y 850.000,Z 8.000,A -90.001,B 0.000,C 0.000,S 6,T 27,E1 0.000,E2 0.000,E3 0.000,E4 0.000,E5 0.000,E6 0.000} C_DIS
$VEL.CP=0.0099
WHILE Zax < 200
LIN {X 500.000,Y 850.000,Z Zax, A -90.001,B 0.000,C 0.000,S 6,T 27,E1 0.000,E2 0.000,E3 0.000,E4 0.000,E5 0.000,E6 0.000} C_DIS
LIN {X 499.881,Y 845.131,Z Zax ,A -90.001,B 0.000,C 0.000,S 6,T 27,E1 0.000,E2 0.000,E3 0.000,E4 0.000,E5 0.000,E6 0.000} C_DIS
LIN {X 499.526,Y 840.274,Z Zax ,A -90.001,B 0.000,C 0.000,S 6,T 27,E1 0.000,E2 0.000,E3 0.000,E4 0.000,E5 0.000,E6 0.000} C_DIS
LIN {X 498.934,Y 835.440,Z Zax ,A -90.001,B 0.000,C 0.000,S 6,T 27,E1 0.000,E2 0.000,E3 0.000,E4 0.000,E5 0.000,E6 0.000} C_DIS
LIN {X 498.108,Y 830.640,Z Zax, A -90.001,B 0.000,C 0.000,S 6,T 27,E1 0.000,E2 0.000,E3 0.000,E4 0.000,E5 0.000,E6 0.000} C_DIS
LIN {X 497.049,Y 825.887,Z Zax, A -90.001,B 0.000,C 0.000,S 6,T 27,E1 0.000,E2 0.000,E3 0.000,E4 0.000,E5 0.000,E6 0.000} C_DIS
LIN {X 495.760,Y 821.190,Z Zax, A -90.001,B 0.000,C 0.000,S 6,T 27,E1 0.000,E2 0.000,E3 0.000,E4 0.000,E5 0.000,E6 0.000} C_DIS
LIN {X 494.244,Y 816.562,Z Zax, A -90.001,B 0.000,C 0.000,S 6,T 27,E1 0.000,E2 0.000,E3 0.000,E4 0.000,E5 0.000,E6 0.000} C_DIS
ENDWHILE
END
Thanks!