C T I/O P: Hapter Hree Rocessing
C T I/O P: Hapter Hree Rocessing
I/O PROCESSING
This chapter continues the discussion of inputs and outputs from Chapter 2
and is a brief consideration of the processing of the signals from input and
output devices.
Input/Output Units
The input/output (I/O) unit provides the interface between the PLC
controller and the outside world and must therefore provide the necessary
signal conditioning to get the signal to the required level and also to
isolate it from possible electrical hazards such as high voltages.
Input signals from sensors and outputs required for actuating devices can
be:
• Analog. A signal for which the size is related to the size of the quantity
being sensed.
• Discrete. Essentially just an on/off signal.
• Digital. A sequence of pulses.
The CPU, however, must have an input of digital signals of a particular
size, normally 0 to 5 V. The output from the CPU is digital, normally 0 to 5
V. Thus there is generally a need to manipulate input and output signals
so that they are in the required form.
A- Input Units
When analog signals are inputted to a PLC, the input channel needs to
convert the signal to a digital signal using an analog-to-digital
converter.
A single analog input signal
gives rise to on/off output
signals along perhaps eight
separate wires. The eight
signals then constitute the
so-termed digital word
corresponding to the analog
input signal level.
With such an 8-bit converter there are 28 =256 different digital values
possible; these are 0000 0000 to 1111 1111, that is, 0 to 255.
The term resolution is used for the smallest change in analog voltage
that will give rise to a change in 1 bit in the digital output. With an 8-bit
ADC, if, say, the full-scale analog input signal varies between 0 and 10 V,
a step of one digital bit involves an analog input change of 10/255 V or
about 0.04 V. This means that a change of 0.03 V in the input will produce
no change in the digital output. The number of bits in the output from an
analog-to-digital converter thus determines the resolution.
Example:
When the output unit provides the current for the output device it is said to
be sourcing, and when the output device provides the current to the output
unit it is said to be sinking.
2- Basic output unit circuits
With the relay type, the signal from the PLC output is used to operate
a relay and is able to switch currents of the order of a few amperes in
an external circuit.
The relay not only allows small currents to switch much larger currents
but also isolates the PLC from the external circuit.
Relays are, however, relatively slow to operate
Relay outputs are suitable for AC and DC switching.
The transistor type of output uses a transistor to switch current
through the external circuit.
It gives a considerably faster switching action.
It is strictly for DC switching
It can be destroyed by overcurrent and high reverse voltage. For
protection, either a fuse or built-in electronic protection is used.
The Triac outputs, with optoisolators for isolation, can be used to control
external loads that are connected to the AC power supply.
It is strictly for AC operation.
It is very easily destroyed by overcurrent. Fuses are virtually always
included to protect such outputs.
3- Analog output
Analog outputs are frequently required and can be provided by digital-to-
analog converters (DACs) at the output channel.
When the digital input changes, the analog output changes in a stepped
manner. For example, if we have an 8-bit converter, the output is made
up of voltage values of 28 = 256 analog steps. Suppose the output range
is set to 10 V DC. One bit then gives a change of 10/255 V or about
0.04 V.
Analog output modules are usually provided in a number of outputs, such
as 4 to 20 mA, 0 to +5 V DC, and 0 to +10 V DC, and the appropriate
output is selected by switches on the module.
Analog modules generally have outputs in two forms, one for which all
the outputs from that module have a common voltage supply and one that
drives outputs with their own individual voltage supplies.
Signal Conditioning
External signal conditioning is often used to bring analog signals to a
common range and so allow a standard form of analog input channel to be
used.
Amplifiers can be used to increase the voltage level. The figure shows
the basic form of the circuits that might be used with a 741 operational
amplifier with (a) being an inverting amplifier and (b) a noninverting
amplifier.
4- Amplify voltage difference
Example:
Consider a PLC with a cycle time of 40 ms. What is the maximum
frequency of digital impulses that can be detected?
- The maximum frequency will be if one pulse occurs every 40 ms, that is,
a frequency of 1/0.04 = 25 Hz.
The cycle or scanning time for a PLC, i.e. its response speed, is determined
by:
1. The CPU used.
2. The size of the program to be scanned.
3. The number of inputs/outputs to be read.
4. The system functions that are in use; the greater the number, the
slower the scanning time.
I/O Addresses
The PLC has to be able to identify each particular input and output. It
does this by allocating addresses to each input and output.
With a small PLC this is likely to be just a number, prefixed by a letter to
indicate whether it is an input or an output. Thus for the Mitsubishi PLC
we might have inputs with addresses X400, X401, X402, and so on and
outputs with addresses Y430, Y431, Y432, and so on.
With larger PLCs that have several racks of input and output channels.
Each rack can have a number of modules, and each one deals with a number
of inputs and/or outputs. For example, we might have an input with address
I:012/03. This would indicate an input, rack 01, module 2, and terminal 03.
With the Siemens, the inputs and outputs are arranged in groups of
eight. Each such group is termed a byte, and each input or output within
a group of eight is termed a bit. Thus I0.1 is an input at bit 1 in byte 0,
and Q2.0 is an output at bit 0 in byte 2.