Decode 4 to 1 of 16 (dcd) – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual
Page 190

Chapter 11
Using Data Handling Instructions
11–7
When executed, this instruction sets one bit of the destination word. The
particular bit that is turned On depends on the value of the first four bits of
the source word. See the table below.
Use this instruction to multiplex data in applications such as rotary switches,
keypads, and bank switching.
Source
Destination
Bit 15–04 03 02 01 00 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
x 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
x 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
x 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
x 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
x 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
x 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
x 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
x 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
x 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
x 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
x 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
x 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
x 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
x 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Entering Parameters
•
Source is the address that contains the information to be decoded. Only
the first four bits (0–3) are used by the DCD instruction. The remaining
bits may be used for other application specific needs.
•
Destination is the address of the word where the decoded data is to be
stored.
Updates to Arithmetic Status Bits
Unaffected.
Entering the Instruction
You enter the instruction from within the program monitor functional area.
As you enter the instruction, you can return to previously entered operands
by pressing this key:
Then if you want to edit that operand, press
DEL
or
FUN-DEL
and enter new
parameters. Press
ENT
to accept the operand and move on to the next one.
Once the entire instruction is entered, if you want to edit the instruction’s
parameters you must go into the overwrite mode. (See page 17–4.)
DCD
DECODE 4 to 1 of 16
Source
N7:11
0000
Dest
N7:12
0000000000000000
Execution Times (
µ
sec) when:
True
False
27.67
6.78
Ladder representation:
Decode 4 to 1 of 16 (DCD)