6 -4 P L C I NSTRUCTIONS FOR D ISCRETE I NPUTS

6 -4 P L C I NSTRUCTIONS FOR D ISCRETE I NPUTS

The most common class of input interfaces is digital (or discrete). Discrete input interfaces connect digital field input devices (those that send noncon- tinuous, fixed-variable signals) to input modules and, consequently, to the programmable controller. The discrete, noncontinuous characteristic of digi- tal input interfaces limits them to sensing signals that have only two states (i.e., ON/OFF, OPEN/CLOSED, TRUE/FALSE, etc.). To an input interface circuit, discrete input devices are essentially switches that are either open or closed, signifying either 1 (ON) or 0 (OFF). Table 6-2 shows several examples of discrete input field devices.

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

Table 6-2. Discrete input devices.

Many instructions are designed to manipulate discrete inputs. These instruc- tions handle either single bits, which control one field input connection, or multibits, which control many input connections. Regardless of whether the instruction controls one discrete input or multiple inputs, the information provided by the field device is the same—either ON or OFF.

During our discussion of input modules, keep in mind the relationship between interface signals (ON/OFF), rack and module locations (where the input device is inserted), and I/O table mapping and addressing (used in the control program). Remember that each PLC manufacturer determines the addressing and mapping scheme used with its systems. Manufacturers may use a 1 for an input and a 0 for an output, or they may simply assign an I/O address for the input or output module inserted in a particular slot of a rack. Figure 6-12 illustrates a simplified 8-bit image table where limit switch LS1 is connected to a discrete input module in rack 0, which can connect 8 field inputs (0–7). Note that LS1 is known as input 014, which stands for rack 0, slot 1, connection 4.

When an input signal is energized (ON), the input interface senses the field device’s supplied voltage and converts it to a logic-level signal (either

1 or 0), which indicates the status of that device. A logic 1 in the input table indicates an ON or CLOSED condition, and a logic 0 indicates an OFF or OPEN condition. PLC symbolic instructions, which include the normally open ( ) and normally closed ( ) instructions, transfer this field status information into the input table.

For multibit modules that receive multiple inputs, such as thumbwheel switches used in register (BCD) interfaces, block transfer or get data instruc- tions place input values into the data table (see Figure 6-13). Chapter 9 explains single-bit and multibit instructions in more detail.

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

Address 014 7 6 5 4 3 2 1 0 Word

01 Status transferred to table Status transferred to table via single bit instruction via single-bit instruction

Open = Logic 0 014

L1 LS1

L2

Closed = Logic 1 014

Figure 6-12. An 8-bit input image table.

Block transfer

Multibit

Multibit

or get data

Device 1716151413121110 7 6 5 4 3 2 1 0 Module (16 Bits)

(16 Bits) Stores 16 bits

of information in a register

Figure 6-13. Block transfer and get data instructions transferring multibit input values

into the data table.

E X AM PLE 6 -1

For the rack configuration shown in Figure 6-14, determine the address for each field device wired to each input connection in the 8- bit discrete input module. Assume that the first four slots of this 64 I/O micro-PLC are filled with outputs and that the second four slots are filled with inputs. Also, assume that the addresses follow a rack-slot- connection scheme and start at I/O address 000. Note that the number system is octal.

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

Rack 0

Outputs Inputs

oooo L2

Figure 6-14. Rack configuration for Example 6-1.

S OLU T I ON

The discrete input module (where the input devices are connected) will have addresses 070 through 077, because it is located in rack 0, slot number 7. Therefore, each of the field input devices will have addresses as shown in Figure 6-15; LS1 will be known as input 070, PB1 as input 071, and LS2 as input 072. The control program will reference the field devices by these addresses. If LS1 is rewired to another connection in another discrete input, its address reference will change. Consequently, the address must be changed in the control program because there can only be one address per discrete field input device connection.

76543210 Word 07

LS1 (070) PB1 (071) LS2 (072)

Figure 6-15. Field device addresses for the rack configuration in Example 6-1.