Quick Start Guide to Using PID in Logix5000

November 5, 2017 | Author: vijaysataw | Category: Electrical Engineering, Computing, Technology, Computer Engineering, Mathematics
Share Embed Donate


Short Description

Download Quick Start Guide to Using PID in Logix5000...

Description

Page 1 of 9

Quick Start Guide to Using the PID Block in Logix 5000

© 2009 SimpleSolvers, LLC Copyrighted material! Do not copy or otherwise distribute without express written permission of SimpleSolvers, LLC

It is assumed that the reader has three important skills: a good working knowledge of PID, a good working knowledge of the Logix 5000 platform, and a good working knowledge of the process and system to which the PID block is to be applied. Note carefully that the methods used here are not universally applicable nor are they the only means of arriving at a PID solution to your control application. If you are not already familiar with PID control, we strongly recommend you read one of our Getting Started Guides to PID Control, and if you are not familiar with PLC programming, we strongly recommend you read our Getting Started Guide to Programmable Logic Controllers. Step number one in the solution of any control problem is to first assure that the process can be controlled well. If, for example, you have an industrial oven which is heated by a gas burner, can you disconnect the mechanical linkage between the servo motor and the throttle and then adequately control the temperature by physically moving the throttle? If you can’t, then maybe you have a problem that the most finely tuned PID loop can never control! Assuming that you can control your process manually, continue on… 1. Insert the PID block from the “Special” menu. Be sure to assign its tag the Data Type “PID”. Enter a tag for the Process Variable, keeping in mind the possibility of internal scaling (discussed in Step 11). Leave Tieback at zero for now (it will be discussed in Step 13). Enter a tag for the Control Variable. In most cases leave “PID Master Loop”, “Inhold Bit”, and “Inhold Value” at zero unless you really plan to use them.

Page 2 of 9

Quick Start Guide to Using the PID Block in Logix 5000

© 2009 SimpleSolvers, LLC Copyrighted material! Do not copy or otherwise distribute without express written permission of SimpleSolvers, LLC

2. There are two approaches to manipulating the data within the PID block. The simpler approach is to set control bits and write data directly in the block using RSLogix 5000. You can perform PID on a process using as little as a tag for the PID instruction and a tag for the CV, then manually keying in a value for the setpoint, and finally entering parameters in the PID block’s setup screen. The second approach is more sophisticated, where the various commands and data registers are written to from the ladder logic. All of these data locations are listed in tables at the end of this document. The vast majority of PID applications will use both approaches to some degree. The most common strategy is to write to the setpoint using data that is coming in from a touchscreen, while a more complex strategy might allow adjustment of PID parameters from a touchscreen as well. 3. Open the PID block’s setup screen and select the Configuration tab. The first selection to be made is titled “PID Equation”. When setting up the PID block, you are given the option of using either dependent or independent gains. There is no operational difference between the two: both methods work equally well in any situation. The only consequence of this choice is that the units of Reset and Rate (the “I” and “D” of PID) will have different meanings. We recommend you use dependent gains for three reasons: it is more commonly used, it is the ISA Standard, and it is what was used in the Logix 500 platform. If you should choose to use independent gains, be aware that Integral (Reset) operates as “Repeats per Second” instead of “Minutes per Repeat” (also known as time constant in minutes) and that Derivative (Rate) operates in seconds rather than in minutes. The following information assumes, however, that you will configure your PID block for dependent gains. 4. The next selection is “Control Action”. This means reverse-acting versus forward-acting control action. SP-PV is reverse-acting and PV-SP is forward-acting.

Page 3 of 9

Quick Start Guide to Using the PID Block in Logix 5000

© 2009 SimpleSolvers, LLC Copyrighted material! Do not copy or otherwise distribute without express written permission of SimpleSolvers, LLC

5. In most cases the choice for “Derivative Of” will be PV. If your process can tolerate significant overshooting and you are looking for very fast response, choose Error. 6. “Loop Update Time” will not be critical in most applications. Try a setting of 0.1 to 1.0 seconds. Keep in mind that the faster the update time is, the more overhead time burden will be imposed on the processor. 7. Leave the “CV High Limit” on 100 and the “CV Low Limit” on 0 unless you have a good reason to limit your output. 8. Leave “Deadband Value” at zero unless you have a good reason to use one, such as avoidance of short-cycling a compressor or oil burner, although our recommendation even in those cases is to use a zero deadband, but instead limit short-cycling by manipulating the discrete output of a time-proportioning routine such as the one we suggest in our sample downloads. That way you keep the actual PID tuning nice and clean. 9. We recommend the five check-options on the right side be left unchecked unless you are certain you will need any of them. 10. The Alarm tab is self-explanatory. This can be a great convenience if needed.

Page 4 of 9

Quick Start Guide to Using the PID Block in Logix 5000

© 2009 SimpleSolvers, LLC Copyrighted material! Do not copy or otherwise distribute without express written permission of SimpleSolvers, LLC

11. Next, select the Scaling tab. There are three fields (PV, CV, and Tieback) and one checkbox (PID Initialized) on this tab. There are actually two significant issues associated with the PV field: scaling of data (if necessary), and the defining of the control range (absolutely critical to the tuning of your PID loop). When you enter min and max values for “PV Engineering Units”, you are defining the control range. This is the value upon which the percent PB (reciprocal of Gain, or Kp) is based. For example, if you chose a Kp value of 30, then set “Engineering Units Min” = 0 and “Engineering Units Max” = 500, you will have a PB of 3.3% or 16.5 engineering units. If you do not wish to use the scaling function, then your Unscaled Max and Min values will be the same as your Engineering Unit Max and Min values. 12. The “Control Variable (CV)” field allows for min and max values of the controlling variable. When the PID block calls for maximum or 100% output, the value for “Max (at 100%)” is the bit value that will be written to the output. For example, if you are controlling a gas burner that is operated by a 0 to 10 VDC signal and that signal comes from an analog output that is controlled by a bit range of 0 to 32767, you would enter 0 for the Min value and 32767 for the Max value. If, for example, you entered a value of 10000 for the Max value, the gas burner in this example would only open up less than half way when there is a call for 100% output. 13. The “Tieback” field has significance only when you put the PID block in Manual Mode. If you expect to occasionally use Manual control, “Tieback Max” and “Tieback Min” are used in the same way that the “Control Variable (CV)” field is used. These values are simply used in place of the “Control Variable (CV)” values when the PID is block is in Manual Mode. See also Step 15 for a complete discussion of Manual mode. 14. “PID Initialized” should always be checked. The only time it is ever unchecked is in the event of changing scaling parameters while on the fly (remaining in run mode).

Page 5 of 9

Quick Start Guide to Using the PID Block in Logix 5000

© 2009 SimpleSolvers, LLC Copyrighted material! Do not copy or otherwise distribute without express written permission of SimpleSolvers, LLC

15. Next, select the Tuning tab. Note that the “Manual Modes” field has two selections, Manual and Software Manual. If both are selected, Manual overrides Software Manual. The only difference between the two is that Manual mode uses the Tieback values established on the Scaling tab, while Software Manual uses the “Set Output” value which you enter here on the Tuning tab. Note that when running in Auto mode (regular PID control) the “Set Output” window displays the current CV value expressed as a percentage. 16. A setpoint value can be set here at “Setpoint (SP)”, provided that your logic is not writing a value to .SP 17. In most cases, leave “Output Bias” at zero. This feature is used in feed forward schemes where Integral action is turned off. 18. The “Tuning Constants” field is where you set the primary PID parameters, unless, of course, your logic writes to .KP, .KI, and .KD. This approach would apply if, for example, you want the end user to be able to access the P, I, and D values from perhaps a touchscreen instead of from within Logix 5000. As is the RSLogix standard, the Proportioning percent is established using its reciprocal, Gain (Kp), the Integral or Reset term is established as time constant in minutes per repeat, and the Derivative or Rate term is established as time constant in minutes. As mentioned previously in Step 3, however, the Integral and Derivative terms are established differently if you elect to use independent gains. 19. Close the PID Setup screen.

Page 6 of 9

Quick Start Guide to Using the PID Block in Logix 5000

© 2009 SimpleSolvers, LLC Copyrighted material! Do not copy or otherwise distribute without express written permission of SimpleSolvers, LLC

20. In the event you wish to control a device that is either on or off (as opposed to modulated or throttled from low to high), you will need some additional ladder logic to convert your PID block’s analog output value to a time-proportioning discrete signal. We have developed an Add-On routine that gives the user control over cycle time and minimum on and off times. See TPR.L5X in our Free Downloads section. 21. For help with tuning your loop, we suggest reading our Simplified Guide to PID Temperature Control or our Simplified Guide to PID Process Control. Additionally, read our Quick Start Guide to Tuning the PID Block in Logix 5000, a free download.

Page 7 of 9

Quick Start Guide to Using the PID Block in Logix 5000

© 2009 SimpleSolvers, LLC Copyrighted material! Do not copy or otherwise distribute without express written permission of SimpleSolvers, LLC

PID DATA MAP Note that all of the discrete (boolean) commands and signals are contained in the first word (Word .CTL) of the PID block. This word is Data Type DINT. The remaining words all contain analog data, and are all Data Type REAL. The final word (.DATA) is itself a 17 word REAL array. .CTL WORD (BOOLEAN PID SIGNALS) Bit Mnemonic Description 07 .PVHA PV Alarmed High 08 .PVLA PV Alarmed Low 09 .DVPA Dev Alarmed High 10 .DVNA Dev Alarmed Low 11 .EWD Error Within Deadband 12 .OLH CV Above Max Limit 13 .OLL CV Below Min Limit 14 .SPOR SP Out of Range 15 .INI PID Initialized 20 .NOZC No Zero Crossing DB 21 .NOBC No Bias Back Calc 22 .NDF No Derivative Smooth 23 .PE PID Equation 24 .MO Station Mode 25 .CA Control Action 26 .SWM Software Station Mode 27 .DOE Derivative Of 28 .PVT Process Variable Track 29 .CL Cascade Loop 30 .CT Cascade Type 31 .EN Enabled Bit

Responses NO, YES (read only) NO, YES (read only) NO, YES (read only) NO, YES (read only) NO, YES (read only) NO, YES (read only) NO, YES (read only) NO, YES (read only) NO, YES (read only) Zero Cross, Not Zero Cross Enabled, Disabled Enabled, Disabled Independent, Dependent Automatic, Manual Reverse, Forward Acting Independent, Dependent PV, Error NO, YES NO, YES Slave, Master NO, YES

Page 8 of 9

Quick Start Guide to Using the PID Block in Logix 5000

© 2009 SimpleSolvers, LLC Copyrighted material! Do not copy or otherwise distribute without express written permission of SimpleSolvers, LLC

PID DATA MAP (continued) THE WORDS OF THE PID BLOCK Word Description .CTL See the preceding table .SP Setpoint .KP Gain (inverse of Proportioning) .KI Reset (Integral) .KD Rate (Derivative) .BIAS Feed Forward Bias .MAXS Engineering Units, Scaled, Max .MINS Engineering Units, Scaled, Min .DB Deadband .SO Set Output Percent .MAXO Output Max Limit(% of CV) .MINO Output Min Limit(% of CV) .UPD Loop Update Time (seconds) .PV Scaled Process Variable .ERR Scaled Error .OUT Output CV as percent .PVH PV High Alarm Limit .PVL PV Low Alarm Limit .DVP Pos Deviation Alarm Limit .DVN Neg Deviation Alarm Limit .PVDB PV Alarm Deadband .DVDB Deviation Alarm Deadband .MAXI PV Unscaled Input Max .MINI PV Unscaled Input Min .TIE Tieback Value .MAXCV Max CV Value (at 100%) .MINCV Min CV Value (at 0%) .MINTIE Min Tieback Value (at 0%) .MAXTIE Max Tieback Value (at 100%)

Page 9 of 9

Quick Start Guide to Using the PID Block in Logix 5000

© 2009 SimpleSolvers, LLC Copyrighted material! Do not copy or otherwise distribute without express written permission of SimpleSolvers, LLC

PID DATA MAP (continued) .DATA .DATA[0] .DATA[1] .DATA[2] .DATA[3] .DATA[4] .DATA[5] .DATA[6] .DATA[7] .DATA[8] .DATA[9] .DATA[10] .DATA[11] .DATA[12] .DATA[13] .DATA[14] .DATA[15] .DATA[16]

A 17 Word REAL array containing the following data: Integral accumulation Derivative smoothing temporary value Previous .PV value Previous .ERR value Previous valid .SP value Percent scaling constant .PV scaling constant Derivative scaling constant Previous .KP value Previous .KI value Previous .KD value Dependent gain .KP Dependent gain .KI Dependent gain .KD Previous .CV value .CV descaling constant Tieback descaling constant

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF