beautypg.com

Decode 4 to 1 of 16 (dcd), Decode 4 to 1 of 16 dcd output instruction – Rockwell Automation 1747-PT1, D1747NP002 Hand-Held Terminal User Manual

Page 295

background image

Chapter 20
Math Instructions

20–19

Decode 4 to 1 of 16

DCD

Output Instruction

(DCD)

DCD

DECODE 4 to 1 of 16
Source

N7:0
11A7

Dest

N7:1

0000000010000000

F1

F2

F3

F4

F5

ZOOM on DCD –(DCD)– 2.3.0.0.2
NAME: DECODE 4 TO 1 OF 16
SOURCE: N7:0 4519 (decimal)
DEST: N7:1 128 (decimal)

EDT_DAT

HHT Ladder Display:

HHT Zoom Display:

Ladder Diagrams and APS Displays:

(online monitor mode)

Hex

Binary

When the rung is true, this output instruction turns on 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. This instruction
can be used to multiplex data. It could be used for applications such as
rotary switches, keypads, bank switching, etc.

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

Decode 4 to 1 of 16 (DCD)