|
14.5 Ladder Diagrams |
|
245 |
|
M1 |
R1 |
|
|
Motor |
Lamp (red) |
SOL1 |
|
Solenoid |
|
|
|
|
ALARM1 |
HTR1 |
FUSE1 |
|
Alarm |
Heater |
Fuse |
Figure 14.13 Symbols for output devices.
14.5.4Ladder Logic
The verticals forming the sides of the ladder represent the supply lines. The elements are connected serially between the supply lines, as in a normal electrical schematic, to form the rungs of the ladder. Each ladder rung or step is numbered using the hexadecimal numbering system, with a note describing the function of the rung. The notes are required for debugging and for assisting in future faultfinding, upgrading, and modification. Figure 14.14 shows an electrical component wiring diagram and the equivalent ladder diagram. The components are represented using the open and closed contact symbols in the ladder diagram [11].
14.5.5Ladder Gate Equivalent
Ladder diagrams can be made from logic diagrams, Boolean expressions, or component electrical wiring diagrams, as shown in Figure 14.14. When using more complex logic diagrams, the logic can be optimized for component count using Boolean
−ve |
|
Supply |
+ ve |
−ve |
|
Supply |
+ ve |
L1 |
|
|
L2 |
L1 |
|
|
L2 |
|
PB1 |
PB2 |
|
|
PB1 |
PB2 |
|
|
|
|
|
|
|
|
|
Step 1 |
|
|
|
|
|
CR1 |
|
|
|
CR1 |
|
CR1 |
CR2 |
|
|
|
CR2 |
|
|
|
|
|
CR1 |
|
|
|
|
|
|
|
|
|
|
|
CR1 |
|
Step 2 |
|
CR1 |
G1 |
|
|
G1 |
|
|
|
|
|
SOL1 |
|
|
|
|
SOL1 |
|
|
CR1 |
|
Step 3 |
CR1 |
|
|
|
|
|
|
|
|
|
|
PB3 |
|
|
|
PB3 |
|
|
|
|
|
|
|
|
|
|
CR2 |
|
Step 4 |
|
|
CR2 |
|
PS1 |
|
|
PS1 |
|
|
|
|
CR2 |
|
|
CR2 |
|
|
|
M1 |
|
Step 5 |
|
|
M1 |
|
|
CR2 |
|
|
CR2 |
|
|
|
|
|
|
|
|
|
Electrical wiring diagram |
|
|
Ladder logic diagram |
|
Figure 14.14 Comparison of component electrical wiring diagram and ladder logic diagram.
246 |
Programmable Logic Controllers |
algebra to minimize the switch count and the number of operations required by the PLC. Figure 14.15 shows how the switch contacts in the ladder diagram are arranged to give the same function as the gate logic. The ladder equivalent of the inverter, AND, NAND, OR, and NOR gate logic are shown.
14.5.6Ladder Diagram Example
The concept of making a ladder diagram using sequential logic can be best understood by an example, such as by using Figure 16.1 from Example 16.1. The switches and actuators have been assigned numbers, as shown in Figure 14.16.
Example 14.1
A jar-filling system is shown in Figure 14.16. The reservoir contains a mixture of two liquids that must be heated to a preset temperature before the jars can be filled. When the liquid is below a preset level, the heater must be Off. The incoming liquids must be turned Off when the reservoir is full, and not turned On until the liquid level reaches the low-level sensor. The filling of the jars cannot proceed until the liquid reaches a set temperature and above the lower set level in the reservoir. The conveyor belt moves the jars into a filling position that is sensed by a limit switch. When in position, the filling starts. When the jar is full, a level sensor senses the level, and the liquid to the jar turned off. The conveyor belt is then started, and the next jar is moved into position for filling. Design a ladder diagram for a PLC to perform the above control function.
Figure 14.17 shows a possible solution to Example 14.1. The input and output devices are shown down the left-hand side of the ladder. The ladder rungs are
|
|
|
|
|
Load |
|
A |
B = A |
|
|
|
|
|
NOT |
A |
|
B |
|
|
|
|
|
|
A |
|
|
|
Load |
|
C = A·B |
|
|
|
|
B |
|
|
|
|
|
A |
B |
C |
|
|
AND |
|
|
|
|
|
|
A |
C = A·B = A + B |
A |
B |
x |
|
B |
|
|
|
|
|
|
|
NAND |
x |
|
C |
|
|
|
|
|
A |
C = A + B |
A |
|
C |
|
B |
|
|
|
|
|
|
|
|
OR |
B |
|
|
|
|
|
|
|
|
A |
|
A |
|
x |
|
C = A + B = A·B |
|
|
|
|
B |
|
|
|
|
|
B |
|
|
|
|
NOR |
|
|
|
|
|
|
|
|
|
|
x |
|
C |
|
|
Gate logic symbols |
Ladder equivalent |
Figure 14.15 Logic ladder equivalent of electronic logic gates.
14.5 Ladder Diagrams |
|
|
247 |
|
|
|
SOL1 |
On/off temperature sensor |
|
SOL2 |
|
|
|
|
FS1 |
|
|
|
TS1 |
On/off full |
Silo fill |
|
level sensor |
control |
|
LLS1 |
|
|
|
Fuel |
|
On/off low |
Controller |
|
|
|
|
sensor |
|
|
|
SOL3 |
SOL4 |
|
|
|
Fuel control |
|
|
|
LS1 |
|
|
|
|
|
M1 |
|
LS2 |
|
M |
|
|
|
Motor control |
On/off level sensor
On/off position sensor
Figure 14.16 On/Off controls used in filling jars.
numbered using hexadecimal numbers, with the rung comments on the right-hand side of the ladder. The first five rungs control the filling of the reservoir, the seventh rung controls the fuel to the heater, and the remaining rungs control the filling and placement of the jars on the conveyor belt. The operation of the system is as follows:
1.Ladder rung S01, the NO contacts of the temperature sensor TS1, controls relay CR1 when the set temperature is reached the relay is energized.
2.Ladder rung S02, the NO contacts of the lower limit level sensor, will energize relay CR2 when the liquid level reaches the set minimum level.
3.Ladder rung S03, the NC relay contacts of CR1, are in series with the NC contacts of the full sensor FS1, whose contacts open when the reservoir is full. CR3 is energized, and opens valves SOL 1 and 2 in rungs S04 and S05 to fill the reservoir. A set of NO contacts of CR3 is in parallel with the NC set of contacts of CR1. CR3 contacts are closed as it is energized, so that when the liquid level reaches the lower limit and LLS1 contacts close, CR1 is energized and its NC contacts in rung S03 will open. CR3 will remain energized until the FS1 contacts open, which deenergizes CR3 and stops the filling. CR3 will not be reenergized until the liquid drops to the lower set limit.
4.Ladder rung S06, the NO contacts from CR1 and CR2, are connected in series, so that CR4 only will be energized when the temperature and liquid levels are above the set minimums, which will prevent filling of the jars until the contacts are energized.
5.Ladder rung S07 prevents fuel to the heater from being turned On via solenoid SOL3 when the liquid level is low, and turns Off the fuel when the set temperature is reached.
248 |
Programmable Logic Controllers |
|
- ve |
|
|
Inputs/outputs |
|
|
|
|
|
TS1 |
|
TS1 |
|
|
|
|
|
LLS1 |
|
LLS1 |
|
|
|
|
CR2 |
|
FS1 |
FS1 |
CR3 |
|
|
SOL1 |
|
CR3 |
|
|
|
|
SOL2 |
|
|
|
|
CR1 |
CR2 |
|
|
CR1 |
CR2 |
|
SOL3 |
|
LS1 |
|
|
|
|
LS1 |
|
|
|
|
|
LS2 |
|
LS2 |
CR4 |
CR5 |
CR6 |
|
SOL4 |
|
|
|
|
CR5 |
|
CR6 |
|
CR7 |
|
|
|
CR7 |
|
CR4 |
M1 |
|
|
|
|
|
CR6 |
|
+ ve
CR1
S01
CR2
S02
CR3
S03
S04
SOL1
S05
SOL2
CR4
S06
S07
SOL3
CR5
S08
CR6
S09
S0A
SOL4
CR7
S0B
Temperature sensor
Lower liquid level
Tank fill sensing
Liquid low; fill tank
Liquid, & temperature low Stop filling jars Temperature low; fuel on If level not low
Jar full sensor
Jar position sensor
Fill jar solenoid control
Jar full ready for next jar
Conveyer motor control
Figure 14.17 Complete ladder diagram for Example 14.1.
6.Ladder rung S08, the NO contacts of the jar full limit switch LS1, energizes relay CR5 when the jar is full.
7.Ladder rung S09, the NO contacts of the jar position limit switch LS2, energizes relay CR6 when the jar is in a filling position.
8.Ladder rung S0A, SOL4, is energized to fill the jar when CR4 is energized, the position limit switch is closed, and the jar is not full.
9.Ladder rung S0B, CR7, is energized when the jar is full. A set of contacts from CR7 are across the full contacts CR5 to keep CR7 energized until CR6 is deenergized, which prevents CR7 from deenergizing, due to the liquid level dropping due to motion.
10.Ladder rung S0C, the conveyor motor M1, is energized when CR4 and CR7 are energized. When CR7 is deenergized by CR6, a set of contacts on CR6 will supply power to the motor until the next jar is in position.
14.6Summary
This chapter introduced the PLC, and described how it is used for sequential logic control and continuous control. The modular design of the PLC allows expansion from small to large systems as the need arises, and the use of only the required types of plug-in units. The PLC has the ability to interface to sensors, memory devices, printers, alarms, networks, and the Fieldbus. Interface modules, which are used for discrete and analog inputs and outputs, and intelligent modules, which are used for specific functions, are described. The intelligent modules are used for PID, network interface, coprocessors, position and motion control, injection molding, and artificial intelligence functions.
Programming of the PLC using ladder diagrams was discussed. Other forms of programming are instruction lists, Boolean logic, and sequential or high-level languages. The equivalent logic and conversion to ladder functions are shown, as well as the symbols used in ladder diagrams. A comparison between ladder symbols and ladder layout was shown, and an example of sequential control was given with the resulting ladder diagram.
References
[1]Sondermann, D., “Getting Control of the Process,” Sensors Magazine, Vol. 15, No. 10, October 1998.
[2]Humphries, J. T., and L. P. Sheets, Industrial Electronics, 4th ed., Delmar, 1993, pp. 572–590.
[3]Caro, R. H., “Fieldbuses in Process Control,” Proceedings Sensor Expo, September 1994,
pp.369–374.
[4]Cushing, M., “Redundancy and Self-Diagnostics Enhance Process Safety Systems,” Sensors Magazine, Vol. 21, No. 10, October 2004.
[5]Dunning, G., Introduction to Programmable Logic Controllers, 2nd ed., Delmar, 2002, pp. 275–285.
[6]Jones, C. T., Programmable Logic Controllers, 1st ed., Patrick-Turner Publishing Co., 1996, pp. 174–200.
[7]Rinaldi, J. S., “Industrial Automation Networking 2004 and Beyond,” Sensors Magazine, Vol. 21, No. 1, January 2004.
[8]Carrell, B., “Trends in Electronic Flow Computers,” Sensors Magazine, Vol. 16, No. 10, October 1999.
[9]Moldoveanu, A., “Trends in Automation,” Sensors Magazine, Vol. 18, No. 3, March 2001.
[10]Johnson, C. D., Process Control Instrumentation Technology, 7th ed., Prentice Hall, 2003,
pp.399–414.
[11]Battikha, N. E., The Condensed Handbook of Measurement and Control, 2nd ed., ISA, 2004, pp. 261–265.
C H A P T E R 1 5
Signal Conditioning and Transmission
15.1Introduction
The amplitude of physical variables are converted into measurable parameters by sensors. The measurable parameters can be a visual indication, or an electrical signal which can be used as an actuator control signal or as a signal to a controller. Many sensors do not have a linear relationship between physical variable and output signal, and are temperature-sensitive. The output signals need to be corrected for the nonlinearity in their characteristics or conditioned for transmission, so that the necessary valves or actuators can accurately corrected for variations in the measured variable in a process control system. Signal conditioning refers to modifications or changes necessary to correct for variations in a sensor’s input/output characteristics.
In the case of process control, the accuracy of transmission of the value of the variable is very important. Any errors introduced during transmission will be acted upon by the controller, and degrade the accuracy of the signal. Control signals can be transmitted pneumatically or electrically. Electrical or optical transmission are now the preferred methods, due to the following characteristics of pneumatic transmission: inflexible pluming, high cost, slow reaction time, limited range of transmission, lower reliability, lower accuracy, and increased requirements of the control systems. Electrical signals can be transmitted in the form of voltages or currents, as digital signals, and as wireless signals. Electrical signals can be converted to light signals and transmitted optically. Unfortunately, the terms transducer, converter, and transmitter are often confused and used interchangeably.
15.2General Sensor Conditioning
The choice of a sensor for a specific application can be determinded by its transfer characteristics. However, in many cases the choice of sensors is limited. Sensor transfer characteristics are normally nonlinear, temperature-sensitive, have high noise levels, requires span adjustment, and are offset from zero. The situation is aggravated when precise measurements and a fast correction time are required. A linear relationship is required between process variables and the output signal for actuator control. In analog circuits, linearization is very hard to achieve and requires the use of specialized networks.
252 |
Signal Conditioning and Transmission |
15.2.1Conditioning for Offset and Span
Offset and span are the adjustments of the output level of the sensor, corresponding to the minimum variable value to the zero signal value of the range used, and the system sensitivity. These adjustments assure that the sensor output corresponding to the maximum variable value gives the maximum signal value of the range being used.
Figure 15.1(a) shows the output of a sensor when measuring a variable, and Figure 15.1(b) shows the idealized current output obtained from a conditioning circuit after adjustment of the gain and bias (zero level), as required on most types of sensor outputs.
The accuracy of the sensor signal is not only dependent on the sensor characteristics, but is mainly dependent on the applied conditioning. Many processes require variables to be measured to an accuracy of less than 1% over the full range, which requires not only very accurate sensing, but also temperature compensation, linearization, zero set, and span adjustment. Op-amp offset and amplification are affected by supply voltages, so that these will have to be regulated, and care must be taken with the grounding of the system, in order to minimize ground noise and zero offset. Careful selection is needed in the choice of components. The use of close tolerance components and impedance matching devices is required to prevent the introduction of errors in conditioning networks.
Example 15.1
The output voltage from a sensor varies from 0.7V to 0.35V, as the process variable varies from low to high over its measurement range. However, the sensor output goes to equipment that requires a voltage from 0V to 10V for the range of the variable. Design a circuit to meet these requirements.
The circuit required for changing the output levels is shown in Figure 15.2. The +ve input to the reference buffer is set by the 2 kΩ potentiometer to 0.7V to offset the sensor signal level for the minimum level of the process variable. This will give 0V output when the input to the signal buffer is 0.7V. The gain of the amplifier then can be set to 28.6, giving 10V output with 0.35V input [i.e., 10/(0.7 − 0.35) = 28.6]. Note the use of impedance matching buffers that would be used in instrumentation, and the signal inversion to accommodate the negative signal. This circuit
Sensor output (s)
Min Max
Measured variable
Figure 15.1 (a) Input and ideal output of an ideal linearization circuit, and (b) instrument circuit used for zero and span adjustments, as used in Example 15.1.
15.2 General Sensor Conditioning |
253 |
|
− |
R = 142.86 kΩ |
|
|
Vin |
|
|
|
+ |
5 kΩ |
|
|
|
|
2 kΩ |
|
− |
|
+15 V |
|
+ |
Vout |
|
|
10 kΩ |
5 kΩ |
|
|
|
5.6 V |
− |
|
|
Zener |
+ |
|
|
|
R = 142.86 kΩ |
|
|
|
|
|
0.7 V |
2 k Ω |
|
|
|
|
Figure 15.2 Instrument sensor compensation circuit.
does not correct for temperature sensitivity of the sensor, physical variable. The amplifier gain is given by:
R = 28.6 × 5 kΩ = 142.86 kΩ
15.2.2Linearization in Analog Circuits
Example 15.1 shows how to correct for offset and span. Another problem is the nonlinearity in the relation between the measured variable and the sensor output. The approach in analog systems and digital systems will be different. Linearization is difficult unless there is a relatively simple equation to describe the sensor’s characteristics. In some applications, a much more expensive linear transducer may have to be used, due to the difficulties in analog circuits to linearize the signal conversion and the possibility of introducting a linearity circuit that is temperature sensitive. Figure 15.3(a) shows the circuit of a logarithmic amplifier. Figure 15.3(b) shows the variations in characteristics obtained with various resistor values that can be used in signal linearization. When R2 = ∞ and R3 = 0, the amplifier has a logarithmic relation between input and output, as shown. When the value of R3 is larger than zero, the gain is higher at the upper end of the scale, and the curve is shown in the lower shaded portion. If R2 is a high value resistor less than ∞, then the effect is to reduce the gain at the lower end of the scale, so that the curve is in the upper shaded portion, and its position will depend upon the value of R2. Multiple feedback paths can be used with nonlinear elements and resistors to approximately match the amplifier characteristics to those of the sensor. Similarly, R1 can be replaced by a nonlinear element to obtain an antilogarithmic function, or a mix of each can be used to obtain any number of complex transfer functions. The logarithmic and antilogarithmic circuits were discussed in Section 4.3.5.
15.2.3Temperature Correction
Sensors are notoriously temperature sensitive. That is, their output zero as well as span will change with temperature, and in some cases, the change is nonlinear.
254 |
Signal Conditioning and Transmission |
|
|
|
R2 |
|
|
|
|
|
|
|
|
|
R3 |
|
|
|
|
R |
4 |
|
|
|
|
|
|
|
|
|
|
|
|
- |
|
|
R4 |
|
|
|
Vin |
R1 |
|
+ |
|
|
|
|
− |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ |
Vout |
|
|
|
|
|
|
|
|
|
|
|
R1 |
|
|
+ ve |
|
|
−ve |
|
|
|
|
|
|
|
R5 |
|
|
|
|
|
|
|
|
|
(a) |
|
|
|
|
|
|
|
|
R2 = ∞ |
|
|
|
|
|
|
10 |
R2 < ∞ |
R3 = 0 |
|
|
|
|
|
|
10 |
R3 = 0 |
|
|
|
|
|
|
|
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Vin |
106 |
|
|
|
|
|
|
|
|
log |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scale |
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
R2 = ∞ |
|
|
|
10 |
|
|
|
|
R3 > 0 |
|
|
|
|
|
|
|
|
|
|
|
0 |
|
|
|
|
|
|
|
|
|
0 |
2 |
4 |
6 |
8 |
10 |
|
|
|
|
|
|
Vout |
|
|
|
|
|
|
|
|
|
(b) |
|
|
|
Figure 15.3 (a) Nonlinear amplifier circuit, and (b) characteristics of nonlinear circuit with different feedback values.
Physical variables are also temperature-sensitive and require correction. Correction of temperature effects requires a temperature-sensitive element to monitor the temperature of the variable and the sensor. Correction voltages then can be generated to correct the set zero and span. In Figure 15.2, the 10 kΩ resistor in the biasing network can be placed at the same temperature as the sensor, and can be designed to have the same temperature coefficient as the zero offset of the sensor, in order to compensate for zero drift. A temperature-sensitive resistor in the amplifier feedback (R) can compensate sensor span drift or gain drift with temperature. This feedback resistor also will need to be at the same temperature as the sensor, and track the changes in the sensitivity of the sensor. The temperature compensation in analog circuits will depend on the characteristics of the sensor used, as noted in Example 15.1. Because the characteristics of the sensors vary, the correction for each type of sensor may take a different form.
Temperature compensation is achieved in many sensors by using them in bridge circuits, as shown in Section 4.3.6. Further compensation may be needed to correct for changes in the physical variable due to temperature. Sensor temperature correction requirements can be obtained from the sensor manufacturer application notes and sensor datasheets.