You are on page 1of 60
Analog PLC Operation OUTLINE 21 Introduction O 22-2 Types of PLC Analog Modules and Systems 9 22-3 PLC Analog Signal Processing © 22-4 BCD or Multibit Data Processing 0 22-§ PLC Analog Output Application Examples OBJECTIVES ‘At the end of this chapter, you will be able to Differentiate between discrete and analog operation of a PLC. List and define the various major types of PLC analog inputs and outputs. Describe the data flow and number conversions involved in PLC analog operation. Convert input signals to a form usable by input modules. Convert output module signals to usable values for output devices. Describe the internal PLC operation for analog V/O operation. Program a PLC for use with both BCD and binary analog systems. Apply the analog PLC function's operation to industrial problems. 22-1 22-2 ‘TION . and output statuses have be, INTRODUC LC operation; input an en ve have dealt with disereteP 1. operat on, Analog PLC contol canbe y m So far we fe consider analog PET OP sideration. Many medium-size a control per sr off, In this chal i i n er control any process WitN VEO) signals as having discrete functions. For ana fare PLCs are able (© oot ignal is sensed by an analog input module. In adi, operation the level F874 variable value sent 0 the process from an analog oup, area the utp ca Be a bles yu to monitor ste Jevices ashen nodule. The PLC analog in T potentiometers, and many other data inp i ansducers, electrical * iver i ening Sigal ues. Output PLC analog control devices eA be positioned devices with varyi . many intermediate positions. This output contro} contrasts W ith discrete control, iny intermediat Aremes. a Te cup val anges ate divide it 9 number fs, BCD analog input devices include thumbwheels, encoders, and the like. Analog ‘outpu, mt T hambers, seven-segment displays, and steppe, devices control such devices as digital motors. «tei ; ror LC analog capabilities allow many different actions for one single input, depen | on the input’s value. For example, a process in which 20 lights are used to indicate how full ds only one analog input and one sensor; a diseree a tank is in 5 percent increments nee : system needs 20 on-off sensors and 20 inputs. Analog output Programs have similar vantages; for example, a single analog output can position a valve in many differen positions. ‘Analog capability enables you to control continuous processes in such industries chemical and petroleum. Any number of variable input signals can be received by a PLC module and then processed mathematically by the CPU. The resulting analog value or values are then sent to an output module. The analog output module signal then controls variable process or processes. TYPES OF PLC ANALOG MODULES AND SYSTEMS Analog PI Analog PLC systems are of two general ypes: BCD and straight numerical The BCD ts g PLC system is sometimes called the multibit t BoD numbering system in detail.) Fi Se aoe system nae .) Figure 22-1 shows the operation of a thumbwheel input (0 Sen a ie ED cosa are fed into the PLC input module from the thumbwhe® mrad a apeible BCD-type inputs are barcode readers and encoders. A BCD O¥f module tonometer et® 22-1 In this case, BCD codes are fed from the out caabestoaa ing device. BCD output devices include such things s di ; cluators, and stepper motors, al pe \\ TYPES OF PLC ANALOG MODULES AND SYSTEM: S | (LRT GG ———— vf2]4]6 Coe Beo Display a Lola] Module Output I <3 o Conversion * | * To CPU/From CPU —+ { ‘ ‘ ‘ locos cO~co+~cooumS % joa +co4+scocccco- FIGURE 22-1 ‘Analog BCD Input and Output Systems temperature, pressure, distance, position, or electrical values. Other inputs include thermo- couplers, strain gauges, and straight electrical signals. The more complicated analog system, the Proportional Integral-Derivative (PID) output system, will be discussed in chapter 23. Note that the PLC handles continuous analog systems in discrete steps. The continu- ously varying input signal is not strictly continuous when it reaches the PLC CPU. As we divide up the input signal into more steps, it more nearly approaches the exact duplication of the input signal. Figure 22-3 shows how the input signal is divided into more parts for increased accuracy. As the number of input divisions goes up from 8 to 16, the digital signal more nearly describes the actual input signal. Some normally used PLC divisions are 1024 and 4096. As the number of divisions goes up, the PLC system cost also goes up. You must have enough steps to control your process with precision, but not so many that cost becomes prohibitive. FIGURE 22-2 oo Typical Analog VO Module Ranges. cong Oto +5 Volts DC Oto + 10 Volts DC +2.5 Volts DC +5 Volts DC £10 Volts DC 22-3 Digital olde Number ‘Number 4 16 a, 120 is 120 48 M4 20V e 4 ' 105 5 7 7 7 75 5 3 | 4 Volts & , volts 60 ; voits | 7 3 30 2 # i 15 2 7 >» 7 i ° 2 O+ Digital + 100% «- + 100% Oo = Dial Setting-> 100% 0 Oat aia True Analog 8 Steps 16 Steps Signal FIGURE 22-3 Analog Signal Conversion to Digital Steps PLC ANALOG SIGNAL PROCESSING The sensor or signaling device that feeds the input module does not usually have the same electrical range as the input module. Its lower-limit electrical value must be matched to the lower-limit electrical value of the input module. The input’s upper-limit signal value must also be matched to the upper-limit electrical value of the input module by using an intermediate signal conversion. Similarly, the output module and the outputs must have their signals appropriately matched by a converter. Intermediate values must also be linearly matched by the converters for both input and output. ‘The input signals available have to be converted and scaled to match an available ‘module. For example, you have a signal that varies from 0V it presenti . ; is to 78 VAC, with 78 V representing 100 OTR Ae ee, You decide to use a 0-5 VDC input module. Therefore, you must ftom teens’ VAC to a linear 0-S VDC, as shown in figure 22-4, The DC voltage fed ae come int the module is then converted to a digital number. This digital ear i ister i ‘ fee nalog module to an input register in the CPU, as shown in the How d . aralyies the Ea ite me mersion work? For illustration, trace 31 VAC. The converter design and supply, puts out a Dee eS: This is 0.397. The converter, which you mus! 1,987 V, is sent to the it ies yoltase that is this Proportion of § VDC. This BC value, lule, A: j a i seg end # value up t0-256 in decimal “The inpuce the input module is an 8-bit base, which module then takes thi ion of ’ CPU input ogienn ue then takes this same proportion on the seting of DIP switches cule gee hich register receives the data, 102 PLC ANALOG SIGNAL PROCESS Mee ee ML 7aVAC Required fr _» | — | conversion | —— Input ue Module To cru - terminals — input ov register Fo Be os 73 9997 X SV = 1.987 V > 1.987 5.9 70.397 x 256 = 192 ——+ To 24 aot il Signal Path and Values whe Note that the input is st . receives data. The acoriey ofits yuenntasee is not perfectly linear when the CPU smore:sbclfa; iapiit modules of-10 and‘ 1d bia ony b 0.0039, or about 0.4 percent. Other, in your application. These would have Iz4and.40%¢eeme noneceey, needed How doesthe: i steps, respectively. output signal get from the CPU to an output analog device? Figure 22-5 shows an output system. For illustration it is assumed that the signal in figure 2-4 was an 2 i - iw The output ratio is then 0.794, as shown in figure 22-5. This 2 203 -step scale. Assume that there is an output module feeding an op amp device with a range of —10 Y, to +10 ¥. The math shown indicates that the output would have a value of 5.9 VDC. To illustrate how an analog system might be used, an ADD application is shown in figure 22-6. An output meter is to indicate the sum of two analog inputs. The two input values go through conversion and then through the input module. The digital values end up in IROJ and IRO2, as shown. An ‘ADD function adds the two values when the ADD function is enabled, The sum can be updated very quickly by rapid enabling of the ADD function. The sum is put into OROI. ‘The sum is then sent to an output module and then to the indicating meter. For illustration, 17 V ‘and 42 VAC are added and converted, giving an output of 7.8 V to the meter. ‘The meter full scale could be set at 2 times 78, or 156 VAG, to match input and output scales. i 7 Figure 22-1 shows a block diagram of the co Dei eae numerical examples. This module has 1024 steps, but iteould vel , 4096, other power of 2. These are typical values for the module’s divisions. +10VDC ook Ws 256 Vi? ™PUt Signal Path and Output module terminals m2 ANALOG PLC OPERATION __— ov TeVAC ov 7 = 1.09V —* 56 2 ~o2axsv=1.09V — 5 7% 7° 2 0508 x5V=269V — 138 78 FIGURE 22-6 ‘Analog ADD Application Output modulo 0-10 10V —| Moter 0-10 ov 0.78 —* 0.78 x 10=7.8V Suppose you need to compare the input values with a fixed value, or with another input value for action. Say, for example, that if the sensor signal exceeds 0.5 ampere, you ‘must turn on output 6, Further, if the sensor signal is between 0.8 and 1.1 amperes, you mist tum on output 7. In this case you have an analog input and a discrete output. The signal-leve Processing of these electrical values is shown in figure 22~7, ‘A more typical situation is analog in and analog out. Figure 22-8 shows an example of an analog output system (input not shown). The upper and lower limits are shown for ‘ach block. Sixty-two percent of the total is traced through the analog output system. 4 input input Discrete Signal | > Conversion + ua Output Module CPU F (could be L____| analog) 1.1 Amp— 100 — | r “ ry Lexy Output 7 — Conversion —» ; utpu ote — oe wersion | Biary —> Anaya | a ow 3 — outputs 1.1 Amp 100% oo ae _— } OB Amp 72.796 A0.0v 266) | OSAmp 45.4% -—* Conversion —+97.27V 186| 358 >>~ it betwoon, OAmp 0% 4.54V 116 116 _ ‘output #7-ON f a) Oo tt over, output #6-ON | FIGURE 22-7 No Action ‘Analog Input System = OR MULIIBIT DATA PROCESSING 343 —| cpu ~ Output Device ee —_ (Value) 256 + 8Vt00% — *S0V 100% —>x1o — : = — 50V Tope a = 0% +12V Valve 62% Open 62% x 90° = 55.8° 2% —? 159 —> + 1.2V—+ 62% ——> x qs FIGURE 22-8 ‘Analog Output System Py BCD OR MULTIBIT DATA PROCESSING BCD data is handled like analog data. Figure 22-9 shows a block diagram of how BCD devices and data are used by the PLC. The input and output devices are mathematically matched directly by the input and output modules. No conversion of values is required because the input and output devices are built to match the modules directly. In this Input Thumbwheel 7368 16 Wires BCD 7368 ort oott 0110 BCD to Binary Conv. | 4100 1100 a = Binary 7368 0001 1 3 ‘Multiply by 0.5 sie : 4110 t inary 3684 0000 \ SI Binary to BCD Conv. M 0., 1000 ° = BCD 3684 oot o110, 4 i CPU Operations e FIGURE 22-9 BCD (Multibit) Input and Output or is entered dires ly from. thumb wee ea data is iystraion, the HAP Taput indicator, The resulting half value is 5 Pu doin seated hal Forte OTT nce the CPU does math in DRY tom yey caried OU Tustration in figure 22-9 shows my. jons are citernatively, you could divi 1d obtain the same result, as shown, The il ide by 2.ani 22-5 PLC ANALOG OUTPUT APPLICATION EXAMPLES ‘The inputs and outputs of analog systems can DE straight analog er BCD, We have shown, or they can be other types such as thermocouple, load cells, humidity transducer, and electric motor drive input and feedback signals. In addition, discrete modules maybe used in combination with analog modules. Furthermore, multiple inputs and outputs cay aanaie ved To illustrate all ofthese combinations would require many examples, “This section presents six examples, four of which have mul tiple inputs or outputs, as representative of analog PLC operations. These examples are Example 22-1 Analog in/discrete out Example 22-2 BCD in/discrete out Example 22-3 Analog in/analog or BCD out Example 22-4 BCD in/BCD or analog out Example 22-5 Two analog in/two analog out Example 22-6 Two BCD in/two analog out E in @ EXAMPLE The example given in igure eal was analog in and discrete out, The figure’s valve ANALOG evel, 0.5 ampere, is crample - The problem is to have one output go on when a cert INAND and 1.1 ampetes. To accomplish this, use th output on when the amperage is berweent™ DISCRETE comparison functions are covered in chapter i ‘values with comparison functions (ME For the first out = needs two comparison fait 2 GE Fancton, Since the second condition has two limits. illustrates how to program the PLC to aces nie ham and less than. Figure nel Appropriate outputs, \ccomplish the required comparisons and enetei#* EXAMPLE ; 222: ena Anllae to example 22-1 is ilk BCD IN the Inpeta nst Counts up to 9999, IF th lustrated in figure 22-11. The input is 2 BC AND Me inputs between 6200 and 8542, outpag ye 0 OF above, output 6 is to £0%? DISCRETE fon’ Bister ROOOG in the CPU. Acetate 2 Om: Assume that the input datas = {Ot You must first convert the TROOOS sna Previously, the CPU works i erted value. Thereafter, th, [RO006 value to bin: works in binary: ter, the ary. Register HROO45 will rece comparison function i S are rogramming for this BCD car fi ree same as in example parison problem. a ANALOG OUTPUT APPLICATION TRAM a si ——— Data trom Enable Input Module Nooas PUlsod) et008 t+ Yor On (Ro103 Amps 2 0.5 op2 116 'Noos3 1 OPT On for 'RO103 Amps & 0.8 op2 186 'Noos3 Sie OPt J 'Ro103 Amps = 1-1 op2 256 GEOIN GEON2 ‘On for Amps Between 08 and 1.1 FIGURE 22-11 Example 22-2: BCD In/Discrete Out ‘Converted Input Data from Thumbwheel via Input Module ew BCD to Binary ‘On it Count 5 3750 ‘On it Count 5 6200 (On if Count 5 8542 | Output 4 Binary/BCD 9999 + Value BCD Display _t | ‘A Data Flow Diagram Data from Input Module Dvoot1 INOO16 4 oP.1 HY Divide by 5 \ 1R0017 OP.2 Enables - 3 may have to be pulsed Destination J ‘oR0024 INO016 DB0012 1 oR0024 Binary to BCD BPLC Program Sent FIGURE 22-12 Example 22-3: Analog In/Analog or BCD Out EXAMPLE For this example an analog signal of 0 to 10 volts comes in through a converter to an inpt! module. The signal is to be scaled to 1/5 of its value by the CPU and then sent out throu ANALOG an out i CI Fi a 'put module. The output is also to be sent toa BCD isplay. Figure 22-!2 INAND 7 Se a output display. Fi; ANALOG illustrates how the PLC can be programmed internally to accomplish one or both outpit conditions, The analog signal goes out directly. The " ee /. The output ol ORBCD OUT. frst convened io BCD and then sent othe BCD dicelay eno ne analog lay. EXAMPLE i i a in hb camp a = BCD input, 0 to 9999, is received by an input module, which places t® oan received, and the seat 10004. A fixed value of 180 is to be subtracted from the val? ‘ved, and the result is to be sent AND BCD OR is Out to a 0-9999 BCD i tionally, ANALOG iste the Log Placed in a 0- to 20-milliampere teaiog ingot 3 our Programming necessary to accomplish the transfer of the original in? PLC ANALOG OUTPUT APPLICATION EXAMPLES 347 1024 024 Fan] 208 \Goo04 M [Output Device 9999) } 2 Ola Input BCD/BIN ¢ Conversion it M + 1 needed Bcd ° ~ 180 ol Input a 4 ° q weve Fon | Outrut ° 9999 o | BINe M eo ° _| Boo 4 a Display u i ‘AData Flow Diagram ol_@ BCD Data INo037 Opoi7e Pulsed [Ab] OR BCD to Binary IRODO4 Dest. HR0207 1No037 880173 t+ }-———_ OP. Value Minus 118 HRO27 oP.2 118 Dest. ‘OR0067 BD0174 1No037 |_4 }- 00067 Binary to BCD 0G0007 BPLC Program FIGURE 22-13 Example 22-4: BCD In/BCD or Analog Out Examples 22-5 and 22-6 both have multiple inputs and outputs. They could have had more than two inputs and a single output, but in this illustration both examples use two inputs and two outputs. ‘The example shown in figure 22~14 has two analog inputs whose values are manip- ulated in the CPU. For illustration, the values are both added and subtracted. The sum is output to one analog output, ‘and the difference is sent out to another. The ‘internal, programming to perform the mathematical manipulations is also shown. ANALOG PLC OPERATION 4 8 Output | 14 s M ° d u 1 e Add 20 mA \— Output Subtract \ | | | | | @-cace 4mA od A Data Flow Diagram Input Data INO051 pon yp Pulse Te oi01 Adds Values of | 1R0101 and | iRo102 IRO102 oroto7 |__| Sum | wNoost suB0208 I t—1 HK—— ro101 HOH Subtracts Value of 1R0102 trom IRO102 Value of IRO101 B PLC Program oRot08 | ~___| Difference | FIGURE 22-14 Example 22-5: Two Analog In, Add and Subtract, Two Analog Out | EXAMPLE 5, | xampl A os + ani 2~6TWo ae ee. shown in figure 22-15, is similar to example 22-5, It has two BCD int BeD IN, and outpute aaa ntO8 outputs, You could also mix and match analog and BCD it? | MATHE inputs and he it ficult. In example 22-6, the fie ee is the product Oy | MATICAL the sum. nie Output is the sum, minus 155, The oducts, read on readout te | ANIPULA. | + On readout Y, Agai | TION, re is shown. ‘gain, the PLC program to perform the math fu! i ANALOG “5 our —|_IRo00s ‘999 "yooa] Low | M Output ° cPU d M q 2 [| Readout é 4 1ROG06 —* Binary A u x 10007 —> Bi 9999 Input ye e M (ax 8) — ‘Output Thumbwheet M aveee " . ¢ . © |_,| Readout er i c-155=0 u = 1 2 e A Data Flow Diagram INOO72 DBO031 (Pulsed) [Rone KY AConverted Input__| __. HRO081 BCD to Binary Baie WNo072 B0032 pie ero Legian HRO082 BCD to Binary Noo72 MP0033 | } ——— HRoos1 LH (ax B) HROOB2 ‘Allin Binary HROO91 S03 U———" Bp00* §NO072 0 4 -—— Broo LC) 4x8) comer 0G0001 Outputted to X in BCD ‘D035 iNoo72 | tg } J woos | Ana e 7 Allin Binary HR0082 HR0092 $8036 §Noo72 aoe eee ;-—_— Hro082 = 155 = 4 Allin Binary 185 93 , HR0093 | 559997 INoo72 ro | L( )H vconvertes [7 aot? Outputted to ¥ in BCD B PLC Program Ue FIGURE 22-15 i i Out Example 22-6: Two BCD in, ‘Multiplication, Addition, Subtraction, Two Amok PID Control of Continuous Processes OUTLINE . 23-1 Introduction 0 23-2 PID Principles 0 23-3 7) Yypical Continuous Process Control Curves 10 2344 PID Modules 9 23-5 PID Tuning O 23-6 Typical PID Functions OBJECTIVES At the end of this chapter, you will be able to Briefly describe proportional, integral and derivative control. Describe how the above three control systems are combined for effective process control. reves of ineffective process control. List and sketch the response cut Show and sketch the response curve of a g00d Process control system. Explain the characteristics of a PID module. Describe PID Tuning function and methods. Generally describe the PID function. oooo0og0a0 23-1 eS CTION ; INTRODU! wn in the book so far have not been of the continuous type, 4 ofthe processes sho Hn or off, oF travel linearly between two poing at | these process examples cilNO! 21° 4, he output is a continuous flow. Examples! | w | continvot achemical process, 8 : sutput of paper onto Pol s orp ‘enough by PLC rs process, we meal OT for gasoline, oF a paper machine with contin rocess control for these continuous processes cana ae ‘on-off control. Furthermore, analog PLC conta accomplishes est er fast enough. The control system most often used in continy s also not effects oportional-integral-derivative) control. PID control can be ~ Aree by mechanical pneumatic, hydraulic, or electronic control systems a5 well ssp, PLCS any medium-size PLCS and all large PLCs have PID control functions, which able to accomplish process contol effectively. In this chapter, we discuss the basic pina, an iD control. We then explain the effectiveness of PID control by using typical proces, response curves and show some typical loop control and PID functions. Loop and PID control are designations used interchangeably by different manu turers. Actually, some loop controls are not strictly the PID type. However, assume they ae the same. PID PRINCIPLES PID (proportional-integral-derivative) is an effective control system for continuows Processes that Performs two control tasks. First, PID control keeps the output at a set level even though varying process parameters may tend to cause the output to vary from the g sired Set point. Second, PID promptly and accurately changes the process lev! is se set point fevel to another set point level. For background, we briefly discuss icteristics of each of. tional, i nee of the PID control components: proportional, integral, and ie spent control, also known as ratio control, is a control system that correcis proportion 7 Process from the set level back toward the set point. The correctionis Lot shoe he oun of sro For example, suppose that we have a set poiat 0 bic fe ) in an airflow system. If the flow rises to 580 CFM.# 9 , to the original set int, integral control, also known ag T Control eannot be used by itself. Remember ™ Put error from our original set point. We endl # ae hivvative + fate conth hyd intearal > reset control Propofitional > ratio conta PID PRINCIPLES Process variable —+| Proporionar | block Tere, Lj [eset]: [rina Contrter 7 L__Bock — amplifier output Set-point Derivative block FIGURE 23-1 Block Diagram of a Typical PID Controller at 576.5 CFM, not 575 CFM. Integral control senses the product of the error, 1.5 CFM, and the time the error has persisted. A signal is developed from this product. Integral control then uses this product signal to return to the’original set point. An integral con- trol signal can be used in conjunction with the proportional corrective signal. In the con- troller, the added integral signal reduces the error signal that caused the output deviation from the set point. Therefore, over a period of time, the process deviation from our orig- inal 575 CFM is reduced to minimum. However, this correction takes a relatively long period of time. To speed up the return to the process control, point, derivative control is added to the proportional-integral system. Derivative control, also known as rate control, produces a corrective signal based on the rate of change of the signal. The faster the change from the set point, the larger the corrective signal. The derivative Signal 7s added to the propor-~ “Tonal integral Syston THIS"gives US faster action than the proportional—integral system signal alone. A typical PID control system is shown in block diagram form in figure 23-1. This configuration is the commonly used parallel type. The controller output signal of figure 23-1 is utilized through a control system to return the process variable to the set point. ‘An illustration of a system using PID control is shown in figure 23-2. In this system, we need a precise oil output flow rate. The flow rate is controlled by pump motor speed. The pump motor speed is controlled through ‘control panel consisting of a variable-speed drive. In tum, the drive's speed control output is controlled by an electronic controller. The onic con ip! ive i actors. The first factor 1s the clectranié Controller output to the drive.is.de by two factors. The first Factor is the ting (or equivalent device). Second, a flow sensor feed ‘the electronic controller. The controller compares the set soit motor eee ing the voltage applied Set point, a signal to speed up the ‘motor is sent hake the correction promptly and accurately to changed to’ new setting, the fe function of the PID system is quickly and accurately as possible. Flow control sorvo-molor Control pane! Control devices Control diagrams Motor control = Electronic controller ' ' Solid-state devices f OP amps: ' \ ' ' coring Rector Programmable controller FIGURE 23-2 General Control System Diagram—Hydraulic Pump 3. By response curves. w : Tat a Output position versud-time. The curves to be shown are for Va types of control, including PID. Figure 23-3 shows a con - st rol system wi i a a aon ngs eh ibn, which an “ICAL CO! TP NTINUOUS PROCESS CONTROL CURVES, x 355 Electrical Powar to Rotate \ Output Daviee sol wet — Output Dovico ing "oF Signal Detector and Amplifier Output [+—Signal Ditterence Position Error (any) Indicator / Detector x Electrical Signal ee hace Indicating Output Indicating Input Position Position FIGURE 23-3 Position Indicator with PID Control Another. Furthermore, the output position should not drift out of position over a period of ‘time. Another factor is that the indicator can have two different weights, depending on application. These are 5 pounds and 20 pounds. Obviously, the output drive will tend to operate more slowly for 20 pounds than for 5 pounds, unless a proper PID control is set up to compensate for weight differences. For illustration we very quickly turn the dial from 0 degrees to 108 degrees at 3 sec nds after time base 0. Ideally, the position indicator should instantaneously reach 108 degrees, as shown in figure 23-4. Obviously this does not happen in actual practice. Figure 23-5 shows five possible curves for different types of control. Figure 23-Sais an idealized movement but takes 4 seconds. Figure 23-5b undershoots of overshoots the mark, Figure 23-Se shows cyclic response and reaches an angular point near the set posi- tion but oscillates for a few seconds before reaching the proper position. Figtire 23-Sd shows damped response and reaches the new postion exponentially but takes a long time. Figure 23-Se reaches the new position but continually oscillates about the final setting. None of these curves shows an acceptable control characteristic for accurate and prompt ey ‘comparison, PID control obtains the most ideal response posible perfect, ‘A curve for this control is shown in figure 23-6. but the best we can do. FIGURE 23-4 108° Ideal Position Control Position = pggition Curve in Degrees or 7 8 i 5 PROCESSES. Pid CONTR [OF CONTINUOUS Ip CONTRE 6 108° Position in Degrees o 71239 4 & 6 78> Elapsed Time in Seconds (a) OVERSHOOT Desired Final — UNDERSHOOT Position Position | Initial Position —” Desired Final —+ Position Position | Initia Position ——” Desired Final —+ Position Position | Initial Position I” Desired Final —» Position Position | Initial Position FIGURE 23-5 Typical Response Curves oes Position } Initial atoll t Position 3 sec. Time —> PID MODULES q PLCs often come equipped with PID modules, used to process data obtained by feedback circuitry. Most such modules contain their own microprocessor. Since the algorithms needed to generate the PID functions are rather complex, the PID microprocessor relieves the CPU of having to carry out these time-consuming operations. "To understand the PID module, refer to figure 23-7. The PLC sends a portional. integral, to the PID module. The module is made up of three elements: the proy nd derivative circuits. The proportional circuit creates 2” ‘output signal proportional to the. set-point signal Process Being Input Transducer Controlled Proportional Gircult Setpoint integral PLC Fiom Circult PLC FIGURE 23-7 Block diagram of PID Module 23-6 CONTINUOUS PROCESSES ment taken and the set point entered in the PL, een the Mens portional to the length and amount of time they joes an out Prt creates an Output Signal p jonal t i tional to the derivative circuit CF = = y 3s being control ates an output signal from.the process i. ducer generates an 0 l : c, The difference between the set point cos xd va to the PID module. The = ae dl Poi measured V ing input trai Tis the errors Jue coming from the inpu the rors , or amplifier, akes ts Pi CONTROL OF difference betw' integral circuit i produ PA feeds the measures jthe PLC and the measure of correcting device, ‘al and uses it to control sucky asa motor control, Valve cor -ction sent to the process being controlled. | the corres ess being controlled. ars PID TUNING PID tuning refers to the adjustment of the systems modes. Such tuning must be dom ‘online, that i, while the process is can Three nun mea eines a ssponse, ultimate cycle, and fret sponse. s itial setting, | ae re entre systom are estimated and then the three modes are “fine-tuned,” the pups of which is to reach the optimum control settings. Gn the open-loop method, control parameters are determined while the system is inthe | manual mode of operation. First, the process control loop is opened so that no feedback occu Second, the tuning is begun by operating the process on manual control until the measured variable stays constant, Third, a step change in the manipulating device is introduced and the | response of the controlled variable is recorded. Fourth, the controlled variable responds totte manipulated variable change. As a result, parameters used in the tuning equations are deter mined. Finally, the resulting parameters will include the process lag and process rate. With the ultimate cycle method, a loop is adjusted until steady oscillations oc | ‘Two measurements obtained from this method are known as the minimum controller guit and the period of the oscillation. The former is the amount of gain required to cause te System to oscillate. The latter, also known as the ultimate period, represents the period these oscillations. approxi einen banaiid method, Bode plots are used to obtain a straight-line otieed B of the magnitude and phase angle response to frequency. The Bode plots y ws the loop and providing a variable frequency disturbance of tht controlling variable. TYPICAL PID FUNCTIONS A typical ; PLCS combine te ann ef eemetinn complexity is shown in figure 23-9- % xampleis forthe PID function alone OP COMA! function with the PID funcio™ PICAL PID FUNCTION: mm s 359 FIGURE 23-8 th Typical Loop Control Function we =4j— The functions of the inputs, outputs, and functional descriptions are Inputs EN: the usual function Enable line MANUAL/AUTO: manual or automatic mode HOLD: used for “clamping” and for logic transition control Outputs P: the coil number assigned Q: an output limit coil used in the logic FIGURE 23-9 ‘Typical PID Function 300 of =e PID CONTROL oF CONTINUOUS PROCESS! 1D CON’ : | Low Alarm = Alarm High Alarm Limit Low Deviation High Deviation OP Code 94, Defines te (U7) function as ake” controller (LC) function, ‘Set Point. This valve is the ‘desired valve of the process variable. This can be a constant value or be a specified: oa + Holding Register (HR) + Input Register (IR) + Output Register (OR) + Input Group (IG) + Output Group (OG) Process Variable. This is the ‘measured value of the independent variable involved in the process under control. This can be stored ina Reference Number — Typ2 —, 4 KX uo oP Code 9a — Set Point Cascade _| Process Variable t Output Caloulate Loop Table End To activate manuaVautomatic cascade modes, it is necessary to close the appropriate contact {or at least one scan. specified: + Holding Register (HR) + Input Register (IR) + Output Register (OR) + Input Group (IG) + Output Group (0G) Output. This is the output ofthe process controller used to ve the final correcting device to adjust the process under control. This can be stored in a specified: + Holding Register (HR) + Output Register (OR) + Output Group (06) Loop Table End. This the last holding register in the table containing data requ ae for loop control operations may not be less than RO? or greater than the hi holding register avall The calculate input must be closed to cause the loop to operate. table in the This table 15 yor always 32 holding are 4 FIGURE 23.19 (In figure 21-10, H P is the bogining of he et ) "D PLC uneton HAXXXx is the end ofthe wo! =~ ee —eeeeeeeeee 2a PLC Instruction Set oe] eat 8 fT Be 0 Integral Term (32-7691 a stuerHemares rs xe Derivative Term (32,767) c [roe 28 [| SPa= Set Point This Sample C| [io 27 | PVa— Process Variable Thi Cc. (aoe | Time Counter = Elapsed See c res 26. SP, Elapsed Sample Time Bc Sn — Sot Poi! Previous Sample i. [Becxax4| E¥a= 1= Process Variable Previous Sample = y i -1 — Etfor Previous Sample ple € Bias (0 to Maximum Output) £ RESERVED c Cor FUTURE — DO Ni Gortiguralion Input Word (See Below) u ss RESERVED FUTURE — D0 NOT USE Integral Sum (232,767) é FUTURE — DO NOT USE, Eq — Error This Sample v Tg— Derivative Time (0 — 327.67 Min) —_U ‘Ti = Integral Time (0 — 327.67 Min.) U Ts — Sample Time (0 — 3276.7 Sec.) U Ke — Proportional Gain (.01 — 99.99) vu Inner Loop Pointer (Loop Table End) U Outer Loop Pointer (Loop Table End) v ‘Alarm Deadband (0 — Max PV) uU Batch Unit Preload (0 — Max Output) U Batch Unit Hi Limit (0 — Max Output) U Neg, Slew Limit (Max — 8 OutpuvSample) _U. Pos. Slew Limit (Max + 4 ‘OutputSample) uU ‘Low Deviation Alarm Limit (Q—Max PV) uu High Deviation Alarm Limit (0— Max PV) _U Low Alarm Limit (0 — Max PV) U High Alarm Limit (0— Max PV) U ‘Output Status Word c C= Calculated by Processor = Callahod ty 46151413 12 1 8 ae 5s 4 eh Configuration Input Word (HRXXXX-20) L. a C1 Bit Status | Number Definition Status Definition @ | T= Darwvalve on PV Selected 1 = Proportional Mode Selected 0 = Derivative on Error Selected = ch Unit Selected {= Integral Mode Selected re Ea "t RESERVED FOR 1 = Derivative Mode Selected CONTROLLER USE a] O= Ant Reset Windup Wher 1 = Deviation Alarms Selected Slow Limit Occurs 72 | RESERVED FOR FUTURE USE 1 = Error Deadband Selected qa | RESERVED FOR FUTURE USE 4+ = Error Squared Control Setected - 76 | RESERVED FOR FUTURE USE 1 = Slow Lining Seed FUTURE USE T= Reverse Action Selected 16 | RESERVED FOR 0 = Direct Action Selected | 362, ESSES. ~~ PID CONTROL OF. CONTINUOUS PROC! Values lock identification number ber: the PID bloc} tion nu INPUT. The register in which the process variable is st OUTPU ‘acer in which the output algorithm i stored * the regi 3 out register in which the set point is stored SE’ ch the value of ERROR = (SETPT ~ INPUT) i siggy ERROR: the register in whi : alue - the register for the deadband val ; DB: the repister OF in which the maximum allowable rate of change is stored CHGMX: the regi 4 in i PGAIN: the register in which proportional gain is stored GAIN: the register in which the integral term is stored DGAIN: the register in which the proportional term is stored ‘Most of the functions in the block are written as a percentage of the set point. The block values may be programmed as constants or moved in from other registers, f effectively the tolerance you can live with for the process (in percent). The last three function “Block inputs are adjusted Tor tuning the system in operation for optimum process conto, ‘A more complex PID function is shown in figure 2310. A worksheet (instruction ss) for this function is shown in figure 23-11. The PID function is designated Loop control in this format. This function, when properly enabled by input contacts, performs PID analysis and control. The enabled function compares the set point with the process variable. If they differ by more than a preset value, an appropriate correcting signal is sent from the function output to the controlling device’s controller. The input parameters are put into 32 consecu- tive registers ending with the register specified as “loop table end.” The number of registers required will vary by model and manufacturer. On the worksheet, not all register functions are used for all processes. Key registers at ! 3 trough 16 for system tuning, 27 and 28 for set point and allowable variance, and 29 and 30 ime sets. Register 20 is for “configuration word,” as specified in detail in the lower table 1 Descriptions and Functional PID bl

You might also like