3 . I n s t r u c t i o n S e t
M N050 03003E F or mo re infor ma tio n vi sit:
w w w. e a t o n . c o m
3-49
API Mnemonic
Operands
Function
08
FOR
S
Loop Begin
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C D E
F
S
*
*
*
*
*
*
*
*
*
*
*
FOR: 3 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P 32 16 P 32 16
P
Operands:
S
: The number of times the loop will be executed
API Mnemonic
Function
09
NEXT Loop
End
OP Range
Program
Steps
N/A
NEXT: 1 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P 32 16 P 32 16
P
Description:
1.
The FOR and NEXT instructions are used when FOR/NEXT loops are needed.
2.
“N” (the number of times the loop is executed – this is the operand S for the FOR instruction)
must be within the range of K1 to K32767. If the range N
≦
K1, N will always be K1.
3.
An error will occur in the following conditions:
•
The NEXT instruction is before the FOR instruction.
•
A FOR instruction doesn’t have a NEXT instruction.
•
There is a NEXT instruction after the FEND or END instruction.
•
A different number of FOR and NEXT instructions.
4.
The FOR to NEXT loop can be nested to five levels. If the execution time of the loops is too
long, the ELC scan time will increase and it may cause the watchdog timer to be activated and
result in an error. The WDT instruction can be used to prevent watchdog faults..
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...