![LS Industrial Systems XBC-DN10E User Manual Download Page 256](http://html1.mh-extra.com/html/ls-industrial-systems/xbc-dn10e/xbc-dn10e_user-manual_1943831256.webp)
Chapter 6 Instruction Details
XBC E-Type Main Unit
6-139
Ver. 1
6.24.6 DECU, DECUP, DDECU, DDECUP
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
DECU(P)
DDECU(P)
D O O O - O O O - O -
-
- O O O O 2/3
-
O
O
Operand
Description
Data Type
D
Data address to perform operation.
WORD
[Flag Set]
Flag
Description
Device Number
Zero
To be set if (D)DEC(P) is executed when D is 1.
F111
Carry
To be set when D is 0 ~ hFFFF.
F112
1) DECU (Decrement)
(1) Saves the result of D minus 1 and it save in D again.
(2) D is processed as Unsigned operation.
(3) If DECU(P) is executed when D is 0(h0000), 65,535(hFFFF) will be output, and Carry Flag will be set.
(4) If (D)DECU(P) is executed when D is 1, 0 will be output, and Zero Flag will be set.
2) DDECU (Double Decrement)
(1) It saves the result of D, D+1 minus 1 again in D, D+1.
(2) D is processed as Unsigned operation.
(3) If (D)DECU(P) is executed when D, D+1 is 1, 0 will be output and Zero Flag will be set.
(4) If DDECU(P) is executed when D, D+1 is 0(h00000000), 4,294,967,295(hFFFFFFFF) will be output and
Carry Flag will be set.
3) Program Example
(1) If P1000=100, when Input Signal P00000 is repeated changing to On from Off status, the saved value in
P1000 is decreased 1.
DECUP P1000
P00000
DECU,
DDECU
DECPU, DDECUP
D
means
P D
Command
Command
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...