
99
Figure 19-4 Process Instruction-1
3. Click “OK” in the operation column to insert the LBL instruction
4.Select the instruction line to which needs to be skipped.
5.Select instruction→Process instruction→GOTO
,
enter the Label number.
Figure 19-5 Process instruction-2
6.Click “OK” to add the GOTO instruction.
19.5 Loop instruction
19.5.1 FOR Loop instruction
The FOR loop instruction defines the initial value and final value of a variable, as well as the step
value (that is, the size of each increment). It determines whether the loop variable value is less than
or equal to the final value. If it is less than or equal to the final value, execute the loop, if it is false,
then Exit the loop and form a loop at the end of the nearest END FOR.
Use GOTO LBL[]
、
LBL[] can make the program run cyclically.
FOR R[1]=0 TO 3 BY 1
’Program content
END FOR
Example
:
FOR R[1]=0 TO 3 BY 1
J P[1] VEL=50
J P[2] VEL=50 ‘Cyclic movement between two points,
END FOR