Input and Output modules Devices in the ‘real world’ such as switches, relays, sensors etc require a physical connection to the PLC. Each discrete input or output is dedicated to a set of input or output terminals situated on either, the main module (for integrated I/O, as on compact units) or on dedicated input or output cards. PLC I/O cards fall into four main types:
Digital input, e.g. 24 volt input signal from a push button
Digital output, e.g. a 24 volt output signal to a relay or contactor
Analogue input, e.g. a variable current or voltage input from a temperature transmitter
Analogue output, e.g. a variable current or voltage signal to a VSD
These four card types make up 90% of the I/O used in industry. Other voltages are used for digital I/O from time to time such as 230Vac, 110Vac and 12Vdc but within NZ industry, these have largely been replaced with a standard 24Vdc across all digital I/O. This has the double advantage of requiring one standard supply voltage to all cards and added safety in keeping operation on the PLC rack t ELV levels.
Some PLCs offer a combination of inputs and outputs on one card however digital and analogue I/O are almost never present on the same module.
Fig 1-9. A PLC rack loaded with a variety of digital and analogue modules.
Digital input modules A digital input module is designed to interface with multiple field devices that can indicate two states such as:
Open or closed
Up or down
On or off
True or False etc
Hence the name ‘digital’ input. Each discrete input on a module is hard-wired to a device in the field such as a limit switch, proximity sensor, push button or contact. Most cards can accommodate 8 or 16 inputs. There are two standard ways of wiring inputs to a digital input module:
0V common (current sinking) and
24V common (current sourcing).
Current sinking is the most common method which simply means that each twoterminal input is provided with a common GND or 0V connection and the other terminal receives (sinks or draws current) a 24Vdc signal that is delivered by the 24Vdc supplied field device. For an 8 input module that would mean 16 terminals are required however, to save space and extra wiring, most I/O cards employ a single common terminal which requires only NINPUTS + 1 pin terminals, or 9 terminals in the case of an 8 input card. Fig 1-10 (left) shows a typical 16-input PLC module with two common terminals per bank. Many input modules allow for either sink (positive logic) or source (negative logic) wiring.
Fig 1-11 (right) shows how the first eight inputs of the module would be wired in ‘sink’ mode. Note that the battery symbol can represent a 24Vdc supply. The negative terminal (0V) is connected to common and all field switches and contacts are fed from the positive (24V) terminal. If the switch connected to input 4 is closed, 24 volts is supplied to I4 and current then flows (or is sunk) into the input.
The internal circuit for one channel of a typical input module is shown below.
Fig 1-12. Digital input circuit
R1 and R2 form a voltage divider which reduces the input voltage to a suitable value for the Opto-isolator LED (approx. 2 volts). The LED is bi-polar which enables either current-sink or current-source wiring. Opto-isolators, also called opto-couplers, perform two main functions in the input circuit. First, they provide galvanic isolation i.e. there is no circuit completed between the input interface and the internal circuit of the PLC, This adds protection against spikes and transients that may be imposed on an input connection. Second, the voltage level of the opto-isolator output (switched by the transistor junction) is independent of the input voltage level(s). The opto-isolator output (typically 5V) is where the input state is represented in the logic circuitry. This output would be one ‘bit’ of an 8 or 16 bit word representing the status of all inputs on the module, read during the Scan cycle.
Fig 1-13. Opto-isolator IC in a DIP-8 package. Only 6 pins are used normally. (Image from Wikimedia)
Note: Some cards have high-speed counter inputs capable of signals up to 20kHz or greater. These inputs have a slightly different input circuit that has less propagation delay. The delay of a normal input can be up to 10mSec for an OFF-ON transition. This delay would allow for a pulsed input of 50Hz maximum only. 3
Digital output modules A digital output module is required to ‘turn on’ field equipment such as motors, valves, contactors and indicator lights. Due to the current limitations of each card output circuit, the digital outputs of a PLC usually control intermediate relays that in turn, control the load contactor or solenoid. Digital outputs come in three main types:
Transistor (sink) output and
Fig 1-14. (left) An 8-output module
Fig 1-15. (right) Output module wiring in source mode. When the output is at a logic ‘1’, 24Vdc will appear at the output relevant output terminal. Current is supplied (sourced) to the load ‘L’. Note that each output and common require protection by a fuse with a suitable rating.
Relay output These are an electromagnetic relays with a single set of normally-open contacts. One side of the contact is connected to common. Relays have the advantage of a higher current rating (1-3A) than transistors but with less speed due to mechanical delay.
Fig 1-16. A typical module relay-output circuit.
Transistor output These output types use either transistors (NPN or PNP) or FETs (P-channel or Nchannel) depending on sink or source mode. A transistor output is only capable of sinking or sourcing 100-300mA but can switch on and off at much higher speeds than a relay. Some PLCs enable them to provide a pulse-width modulated (PWM) output.
Fig 1-17. Current-source transistor output circuit
Fig 1-18 Current-sink transistor output circuit
When wiring a PLC, the manufacturer data and instructions should always be referred to, ensuring the correct mode and connection to the power supply and field devices. Incorrect wiring may result in reversed logic or even damage to an I/O module.
Analogue input modules Field devices such as temperature transmitters, flow sensors and position indicators produce an infinitely variable voltage or current within a working range. PLCs operate using digital logic and binary code, therefore an analogue signal must be converted within the module into a binary word that can be scanned and stored. The two most common types of analogue signal are:
0-10 V and
A common source of a 4-20mA signal is a temperature transmitter. These devices convert the temperature sensed by a probe (e.g. a PT-100 resistive element) and convert it to a 4-20mA current source where, 4mA may represent 0˚C and 20mA represents 100˚C. The analogue signal, entering a module channel, is usually conditioned or filtered before being sampled by an analogue to digital convertor (ADC). An ADC typically only sample a voltage value so a 4-20mA signal is terminated through a 250 ohm resistor to produce 1-5Vdc. The full circuit comprising of the field device, voltage supply and input channel is referred to as a ‘loop’.
More electronic components are required in an analogue module for conditioning and conversion of the signal. Galvanic isolation is also required between the interface and the processor as well as between input channels. For these reasons, less physical inputs and outputs are available than digital I/O on a module of the same dimensions and series.
Fig 1-19. A two channel analogue input module.
Analogue output modules Field devices that require controlling over a variable range can be controlled from a PLC analogue output using a standard signal such as 4-20mA or 0-10V. Examples of analogue output controlled devices are:
Remote frequency control of VSDs – to control motor speeds
Position of control-valve actuators – to control flow, pressure or temperature
Using a pneumatic control-valve as an example, a 4-20mA signal loop varies a current-to-pressure transducer (I-P) which in-turn provides a variable 3-15psi control output to the actuator where, 3psi = fully closed and 15psi = fully open.
Fig 1-20. A single channel analogue output module
Making sense of the bits Analogue inputs and outputs are represented in a PLC program as words of a specific length according to the number of bits produced at conversion. 12 bits is commonly used which provides a decimal range of 0 to 4095. In this case a 16 bit word would still be used, which leaves 4 bits for module status data. High performance PLCs may provide greater resolution with word lengths of up to 32 bits.
Shielding and Earthing In order to avoid stray currents or voltages and ground loops from interfering with the input channel, it is vital that correct module, loop and cable shield grounding methods are used. Field loops are typically connected using shielded, twisted pair cable. The cable shield or screen should only be connected to earth or ground at one end, normally the module end, to avoid the formation of earth loop currents. Each PLC manufacturer will specify the correct cabling, wiring and grounding method for analogue input modules. These instructions should be followed to achieve the cleanest possible signal and channel isolation for reliable loop operation.
Special installations such as hazardous areas and explosive atmosphere will wiring systems to meet approved standards and protocols.
Fig 1-21. Grounding system for a PLC connecting each module, CPU and backplane to a common bar. The shields of each analogue I/O cable should also be connected to this ‘star’ point.
Analogue module wiring The diagram below shows how control loops are connected to a typical analogue module, a combination input/output model in this case. Note that the cable shielding is also connected to a common ground.
Fig 1-22. Analog input/output wiring
The block diagram below shows the complex circuitry in a typical Analogue I/O module.
Fig 1-23. Block diagram for an analogue I/O module containing 4 inputs and 2 outputs.