Chapter 6 Instruction Details
XBC E-Type Main Unit
6-137
Ver. 1
6.24.4 DEC4, DEC4P, DEC8, DEC8P
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)
DEC4(P)
DEC8(P)
D O O O - O -
-
-
- O O - O -
-
-
2/3
-
-
-
Operand
Description
Data Type
D
Data address to perform operation.
NIBBLE/BYTE
1) DEC4 (Nibble Decrement)
(1) It saves the result of D plus 1 again in D within Nibble data size range.
(2) It performs Signed Operation.
2) DEC8 (Byte Decrement)
(1) It saves the result of D plus 1 again in D within Byte data size range.
(2) It performs Signed Operation.
3) Flag Process
(1) As for INC/DINC Instruction, no flag will be processed by operation result. Carry Flag (F112) is not
generated when Minimum value is decreased 1.
4) Program Example
(1) If Input Signal P00000 is changed On from Off status, the result of 6, from the value 7, which is saved from
No. 4 Bit in P0100 minus 1. When P00000 is repeated On from Off status the value which is saved in P1000
is decreased 1. (h0075 -> h0065 -> h0055 -> h0045 -> h0035…).
h0075
h0065
-1
b15
b0
P0100
b15
b0
P0100
DEC4P P01004
P00000
DEC4, DEC8
DEC4P, DEC8P
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...