103
Steps
FOR instruction
1. Select the upper line of the command line to be inserted.
2. Select instruction
→
loop instruction
→
FOR.
3. Set values such as: FOR R[1] = 0 TO 3 BY 1.
4. Click the "OK" button.
5. Select instruction
→
loop instruction
→
END FOR
→
option.
6. Click the "Confirm" button to add the FOR cycle instruction to complete.
Program example
FOR R[1]= 0 TO 3 BY 1
J P[1] VEL=50
J P[2] VEL=50
END FOR
19.6 IO instructions
The IO instruction is divided into three parts: IO operation, Wait condition waiting, and WAIT
TIME sleep instruction.
The example above: when R[1]=0, P[1] and P[2] are running, and when R[1]
≠
0, the motion program of the loop body is not executed;
When R[1]=0, when the condition is met, when the BREAK comment is
cancelled, P[1] and P[2] will exit the loop after executing only once.
The above example: set the initial value of R[1] to 0, increase from 0 to 3,
step value is 1, P[1] and P[2] cyclically move 4 times.
IO instructions
Operation IO
Example:
DO[1]=ON
DO[1]=DI[2]
Wait condition
’
Wait for the condition to
be met, then execute.
Example:
WAIT R[1]=1
WAIT DI[1]=ON
WAIT DI[1]=DO[1]
WAIT TIME =
Millisecond
unit
Example:
WAIT TIME = 1000