102
3 CONFIGURATION OF INSTRUCTIONS
3.3 Indexing
Cautions
■Performing indexing between the FOR and NEXT instructions
Pulses can be output between the FOR and NEXT instructions by use of the edge relay (V). However, pulse output using the
PLS/PLF/pulse (P) instruction is not allowed.
The ON/OFF data of X0Z1 is stored by the edge relay V0Z1.
For example, the ON/OFF data of X0 is stored by V0, and that of X1 by V1.
■Performing indexing with the CALL instruction
Pulses can be output with the CALL instruction by use of the edge relay (V). However, pulse output using the PLS/PLF/pulse
(P) instruction is not allowed.
When edge relay is used When edge relay is not used
M0Z1 provides normal pulse output. M0Z1 does not provide normal pulse output.
When edge relay is used When edge relay is not used
M0Z1 provides normal pulse output. M0Z1 does not provide normal pulse output.
SM400
X0Z1
Z1
M0Z1
NEXT
K0MOV
K10FOR
V0Z1
Z1INC
SM400
SM400
X0Z1
Z1
NEXT
K0MOV
K10FOR
Z1INC
SM400
M0Z1PLS
SM400
Z1
K0MOV
P0CALL
SM400
Z1K1MOV
P0
CALL
X0Z1
M0Z1
V0Z1
FEND
RET
P0
SM400
Z1
K0MOV
P0CALL
SM400
Z1K1MOV
P0
CALL
X0Z1
FEND
RET
P0
M0Z1
PLS