R EGISTER /B C D I NPUTS

R EGISTER /B C D I NPUTS

Multibit register/BCD input modules enhance input interfacing methods with the programmable controller through the use of standard thumbwheel switches. This register, or BCD, configuration allows groups of bits to be input as a unit to accommodate devices requiring that bits be in parallel form.

Register/BCD interfaces are used to input control program parameters to specific register or word locations in memory (see Figure 6-25). Typical input parameters include timer and counter presets and set-point values. The operation of register input modules is almost identical to that of TTL and DC input modules; however, unlike TTL input modules, register/BCD interfaces accept voltages ranging from 5 VDC (TTL) to 24 VDC. They are also grouped in modules containing 16 or 32 inputs, corresponding to one or two I/O registers (mapped in the I/O table), respectively. Data manipulation instruc- tions, such as get or block transfer in, are used to access the data from the register input interface. Figure 6-26 illustrates a typical device connection for

a register input.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION Components The Discrete C HAPTER 2 and Systems

Input/Output System 6

TWS

Data

Block transfer or C get data instruction

16 M

D Memory

UL

Word/Register Storage

Figure 6-25. BCD interface inputting parameters into register/word locations

in memory.

Thumbwheel

Least Significant Bit

1s Units

10s Units

05 8 Each input 0

1 06 controls 07 one bit

0 10 location 1 in an input

100s Units

12 register

1000s Units

17 +V

Most Significant Bit

COM

Figure 6-26. Register or BCD input module connection diagram.

Some manufacturers provide multiplexing capabilities that allow more than one input line to be connected to each terminal in a register module (see Figure 6-27). This kind of multiplexed register input requires thumbwheel switches that have an enable line (see Figure 6-28). When this line is selected, the TWS provides a BCD output at its terminals; when it is not selected, the TWS does not provide an output. If the TWS set provides four digits with one enable line (see Figure 6-29), then the enable line will make all of the outputs available

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION Components The Discrete C HAPTER 2 and Systems

Input/Output System 6

Multiplex E

TWS1 TWS2 TWS3 TWS4

Block transfer or get data instruction

Figure 6-27. Multiplexing input module connection diagram.

Enable

Enable

Not Selected

5 Selected 5

Figure 6-28. Single-digit TWS with enable line.

Enable

Output available when enable is

selected

Figure 6-29.

A 4-digit TWS with one common enable line.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION Components The Discrete C HAPTER 2 and Systems

Input/Output System 6

when it is selected. This multiplexing technique minimizes the number of input modules required to read several sets of four-digit TWS. For instance,

a 16-bit input module capable of multiplexing 6 input devices (6 × 16 = 96 total inputs) could receive information from six 4-digit thumbwheel switches. The user would not need to decode each of the six sets of 16 input groups, since the multiplexed module enables each group of 16 inputs to be

read one scan at a time. However, the user may have to specify the register or word addresses where the 16-bit data will be stored through an instruction that specifies the storage location, along with the length or number of registers to

be stored. Figure 6-30 illustrates a block diagram connection for a module capable of multiplexing four 4-digit TWS (four 16-bit input lines).

TWS4 TWS3 TWS2 TWS1

4 01 Ones (1s)

Tens (10s) 06 07 10 4 11

Hundreds (100s) 12 13 14 4 15

Thousands (1000s) 16 17

Figure 6-30. Block diagram of a multiplexed input module connected to four 4-digit TWS.

E X AM PLE 6 -2

Referencing Figure 6-30, determine the values of the registers (in BCD) after an input transfer is made (in this case via a block transfer input of data). The input has a starting destination register of 4000 and

a length of 4 registers (i.e., from registers 4000 to 4003). Assume that TWS set 1 is read first, TWS set 2 is read second, etc.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION Components The Discrete C HAPTER 2 and Systems

Input/Output System 6

S OLU T I ON

The contents of register 4000 in BCD will be the BCD code equivalent of the first set of thumbwheel switches connected to the PLC register input module, and likewise for registers 4001, 4002, and 4003. Figure 6-31 shows the register contents. Note that the contents of each register does not represent the decimal equivalent of the binary pattern stored in that location, but rather the BCD equivalent. To change this number to decimal, you must convert the BCD pattern to its decimal equivalent using other instructions. For instance, the decimal equivalent of the binary (BCD) pattern stored in register 4000 is 13,699, not 3,583, as the TWS (BCD number) indicates.

Word or

Contents

Register

in BCD 4000 0011010110000011 3583 Value of 1st Set

4001 0010010101111000 2578 Value of 2nd Set 4002 0011100000010000 3810 Value of 3rd Set 4003 0100100100010111 4917 Value of 4th Set

Storage Table

Figure 6-31. Register contents for Example 6-2.