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-73
API Mnemonic
Operands
Function
25
D DEC P
D
Decrement
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C D E
F
D
*
*
*
*
*
*
*
*
DEC, DECP: 3 steps
DDEC, DDECP: 5 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:
D
: Destination
Description:
1.
If the instruction is not in pulse mode, “1” is subtracted from the value of destination
D
on
every execution of the instruction, which could be every scan.
2.
This instruction typically works best using pulse mode (DECP, DDECP).
3.
In 16-bit instruction, when –32,768 is reached, “1” is subtracted and it will write a value of
+32,767 to the destination. In 32-bit instruction, when -2,147,483,648 is reached, “1” is
subtracted and it will write a value of +2,147,483,647 to the destination.
4.
Flags M1020~M1022 won’t be affected by the operation result of this instruction.
5. If
operand
D
uses index register F, then only 16-bit instruction is available.
Program Example:
When X0 = OFF
→
ON, the value in D0 will be decremented by 1.
X0
DECP
D0
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...