76 D50 PLC User's Manual
Instruction
Mnemonic Decrement Range
Bit
■ Byte
DEC
DDEC
DECB
DDECB
Decrement (DEC, DDEC)
BCD decrement (DECB, DDECB)
■ Word
Ladder
D = D - 1: Decimal decrement
D = D - 1: BCD decrement
Description
1. DEC and DDEC decrease D by 1 down to 0 when the input is On.
2. DECB and DDECB decrease D by 1 in BCD to 0 when the input is On.
3. Byte instructions (DEC, DECB) process 8 bit data, word instructions(DDEC, DDECB)
process 16 bit data.
Example
Program Expression Time Chart
DEC
D =
R
R
DECB
D =
LET
D = M10
S = $11
LET
D = M12
S = $11
R000.1
R
DEC
D = M10
DECB
D = M12
R000.2
R
R0.1 R0.2 M10 (decimal) M12 (BCD)
...... 0 0 0 0 0 0 0 0
...... 0 0 0 0 0 0 0 0
...... 0 0 0 1 0 0 0 1
...... 0 0 0 1 0 0 0 0
...... 0 0 0 0 1 1 1 1
...... 0 0 0 0 1 1 1 0
...... 0 0 0 1 0 0 0 1
...... 0 0 0 1 0 0 0 0
...... 0 0 0 0 1 0 0 1
...... 0 0 0 0 1 0 0 0
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com