Chapter 6: Instructions
143
Example
Program Expression
Operation Results
Initial condition:
W0 = 10
M0 = 0
Operation results: W0 = 0
M0 = 10
When the R0.0 contact changes from Off
On, execution
of the FOR/NEXT loop occurs. At the FOR instruction,
the value of W0 is evaluated. If W0 is not 0, then the
instructions between the FOR and NEXT (INC D = M0)
is performed. At the NEXT instruction, 1 is subtracted
from the value of W0, and execution returns to the FOR
instruction. This is repeated 10 times, until the value of
W0 is 0. When this occurs, execution goes directly the
instruction following the NEXT instruction.
FOR
D = W0
INC
D = M0
NEXT
R0.0
R
Содержание D320 PLC
Страница 1: ...D320 PLC User s Manual...
Страница 18: ...6 D320 PLC User s Manual...
Страница 28: ...16 D320 PLC User s Manual...
Страница 34: ...22 D320 PLC User s Manual...
Страница 78: ...66 D320 PLC User s Manual...
Страница 176: ...164 D320 PLC User s Manual...
Страница 210: ...198 D320 PLC User s Manual...
Страница 258: ...246 D320 PLC User s Manual...