Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 16 of 38

DL06 Micro PLC User Manual, Volume 2 of 2, pages 150 to 159

Pages 150 to 159 of 370

The original document is the PDF (6.0 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the AutomationDirect Direct Logic DL06

Page 150

Chapter 8: PID Loop Operation

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 8–74

Note that the modules used in the PID loop example program were set up for binary format. They could have been set up for BCD format. In the later case, the BCD data would have to be converted to binary format before being stored to the setpoint and process variable, and the control output would have to be converted from BCD to binary before being stored to the analog output. By following the steps outlined in this chapter, you should be able to setup workable PID control loops. The DirectSOFT 5 Programming Software Manual provides more information for the use of PID View. For a step-by-step tutorial, go to the Technical Support section located on our website, www.automationdirect.com. Once you are at the website, click on Technical Support Home. After this page opens, find and select Guided Tutorials located under the Using Your Products column. An Animated Tutorial page will open. Under Available Tutorials, find PID Trainer and select View the Powerpoint slide show and begin viewing the tutorial. The Powerpoint Viewer can be downloaded if your computer does not have Powerpoint installed.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 151

Chapter 8: PID Loop Operation

Troubleshooting Tips

1 Q. The loop will not go into Automatic Mode. 2 A. Check the following for possible causes: • A PV alarm exists, or a PV alarm programming error exists. 3 • The loop is the major loop of a cascaded pair, and the minor loop is not in Cascade Mode. Q. The Control Output stays at zero constantly when the loop is in Automatic 4 Mode. A. Check the following for possible causes: 5 • The Control Output upper limit in loop table location V+31 is zero. • The loop is driven into saturation, because the error never goes to zero value and changes (algebraic) 6 sign. Q. The Control Output value is not zero, but it is incorrect. 7 A. Check the following for possible causes: • The gain values are entered improperly. Remember, gains are entered in the loop table in BCD, while the SP and PV are in binary. If you are using DirectSOFT 5, it displays the SP, PV, Bias and 8 Control output in decimal (BCD), converting it to binary before updating the loop table. Q. The Ramp/Soak Generator does not operate when I activate the Start bit. 9 A. Check the following for possible causes: • The Ramp/Soak enable bit is off. Check the status of bit 11 of loop parameter table location V+00. 10 It must be set =1. • The hold bit or other bits in the Ramp/Soak control are on. 11 • The beginning SP value and the first ramp ending SP value are the same, so first ramp segment has no slope and consequently has no duration. The ramp/soak generator moves quickly to the soak 12 segment, giving the illusion the first ramp is not working. • The loop is in Cascade Mode, and is trying to get the SP remotely. 13 • The SP upper limit value in the loop table location V+27 is too low. • Check your ladder program to verify it is not writing to the SP location (V+02 in the loop table). A quick way to do this is to temporarily place an end coil at the beginning of your program, then go 14 to PLC Run Mode, and manually start the ramp/soak generator. Q. The PV value in the table is constant, even though the analog module receives A the PV signal. A. Your ladder program must read the analog value from the module successfully and write it B into the loop table V+03 location. Verify the analog module is generating the value, and the ladder is working. C Q. The Derivative gain doesn’t seem to have any affect on the output. A. The derivative limit is probably enabled (see section on derivative gain limiting). D DL06 Micro PLC User Manual, 3rd Edition Rev. A

8–75

Page 152

Chapter 8: PID Loop Operation

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 8–76

Q. The loop Setpoint appears to be changing by itself. A. Check the following for possible causes: • The Ramp/Soak generator is enabled, and is generating setpoints. • If this symptom occurs on loop Manual-to-Auto Mode changes, the loop is in Bumpless Transfer 1. • Check your ladder program to verify it is not writing to the SP location (V+02 in the loop table). A quick way to do this is to temporarily place an end coil at the beginning of your program, then go to PLC Run Mode.

Q. The SP and PV values I enter with DirectSOFT 5 work okay, but these values do not work properly when the ladder program writes the data. A. The PID View in DirectSOFT 5 lets you enter SP, PV, and Bias values in decimal, and displays them in decimal for your convenience. For example, when the data format is 12 bit unipolar, the values range from 0 to 4095. However, the loop table actually requires these in hex, so DirectSOFT 5 converts them for you. The values in the table range from 0 to FFF, for 12-bit unipolar format.

Q. The loop seems unstable and impossible to tune, no matter what gains I use. A. Check the following for possible causes: • The loop sample time is set too long. Refer to the section near the front of this chapter on selecting the loop update time. • The gains are too high. Start out by reducing the derivative gain to zero. Then reduce the integral gain, and the proportional gain if necessary. • There is too much transfer lag in your process. This means the PV reacts sluggishly to control output changes. There may be too much “distance” between actuator and PV sensor, or the actuator may be weak in its ability to transfer energy into the process. • There may be a process disturbance that is over-powering the loop. Make sure the PV is relatively steady when the SP is not changing.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 153

Chapter 8: PID Loop Operation

Glossary of PID Loop Terminology

1 2 Bias Freeze A method of preserving the bias value (operating point) for a control output, by inhibiting the integrator when the output goes out-of-range. The benefit is a faster loop recovery. 3 Bias Term In the position form of the PID equation, it is the sum of the integrator and the initial control output value. 4 Bumpless Transfer A method of changing the operation mode of a loop while avoiding the usual sudden change in control output level. This consequence is avoided by artificially making the SP and PV equal, or the bias term and control output equal at the moment of mode change. 5 Cascaded Loops A cascaded loop receives its setpoint from the output of another loop. Cascaded loops have a major/minor relationship, and work together to ultimately control one PV. 6 Cascade Mode An operational mode of a loop, in which it receives its SP from another loop’s output. Continuous Control Control of a process done by delivering a smooth (analog) signal as the control 7 output. Control Output The numerical result of a PID equation which is sent by the loop with the intention of 8 nulling out the current error. Derivative Gain A constant that determines the magnitude of the PID derivative term in response to 9 the current error. Direct-Acting Loop A loop in which the PV increases in response to a control output increase. In other 10 words, the process has a positive gain. Error The difference in value between the SP and PV, Error = SP – PV 11 Error Deadband An optional feature which makes the loop insensitive to errors when they are small. You can specify the size of the deadband. 12 Error Squared An optional feature which multiplies the error by itself, but retains the original algebraic sign. It reduces the effect of small errors, while magnifying the effect of large errors. 13 Feedforward A method of optimizing the control response of a loop when a change in setpoint or disturbance offset is known and has a quantifiable effect on the bias term. 14 Integral Gain A constant that determines the magnitude of the PID integral term in response to the current error. A Major Loop In cascade control, it is the loop that generates a setpoint for the cascaded loop. Manual Mode An operational mode of a loop, it which the PID calculations are stopped. The operator must manually control the loop by writing to the control output value directly. B Minor Loop In cascade control, the minor loop is the subordinate loop that receives its SP from the major loop. C On/Off Control A simple method of controlling a process, through on/off application of energy into the system. The mass of the process averages the on/off effect for a relatively smooth PV. A simple ladder D program can convert the DL06’s continuous loop output to on/off control. Automatic Mode An operational mode of a loop, in which it makes PID calculations and updates the loop’s control output.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

8–77

Page 154

Chapter 8: PID Loop Operation

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 8–78

PID Loop A mathematical method of closed-loop control involving the sum of three terms based on proportional, integral, and derivative error values. The three terms have independent gain constants, allowing one to optimize (tune) the loop for a particular physical system. Position Algorithm The control output is calculated so it responds to the displacement (position) of the PV from the SP (error term) Process A manufacturing procedure which adds value to raw materials. Process control particularly refers to inducing chemical changes to the material in process. Process Variable (PV) A quantitative measurement of a physical property of the material in process, which affects final product quality and is important to monitor and control. Proportional Gain A constant that determines the magnitude of the PID proportional term in response to the current error. PV Absolute Alarm A programmable alarm that compares the PV value to alarm threshold values. PV Deviation Alarm A programmable alarm that compares the difference between the SP and PV values to a deviation threshold value. Ramp/Soak Profile A set of SP values called a profile, which is generated in real time upon each loop calculation. The profile consists of a series of ramp and soak segment pairs, greatly simplifying the task of programming the PLC to generate such SP sequences. Rate Also called differentiator, the rate term responds to the changes in the error term. Remote Setpoint The location where a loop reads its setpoint when it is configured as the minor loop in a cascaded loop topology. Reset Also called integrator, the reset term adds each sampled error to the previous, maintaining a running total called the bias. Reset Windup A condition created when the loop is unable to find equilibrium, and the persistent error causes the integrator (reset) sum to grow excessively (windup). Reset windup causes an extra recovery delay when the original loop fault is remedied. Reverse-Acting Loop A loop in which the PV increases in response to a control output decrease. In other words, the process has a negative gain. Sampling time The time between PID calculations. The CPU method of process control is called a sampling controller, because it samples the SP and PV only periodically. Setpoint (SP) The desired value for the process variable. The setpoint (SP) is the input command to the loop controller during closed loop operation. Soak Deviation The soak deviation is a measure of the difference between the SP and PV during a soak segment of the Ramp/Soak profile, when the Ramp/Soak generator is active. Step Response The behavior of the process variable in response to a step change in the SP (in closed loop operation), or a step change in the control output (in open loop operation) Transfer To change from one loop operational mode to another (between Manual, Auto, or Cascade). The word “transfer” probably refers to the transfer of control of the control output or the SP, depending on the particular mode change. Velocity Algorithm The control output is calculated to represent the rate of change (velocity) for the PV to become equal to the SP.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 155

Chapter 8: PID Loop Operation

Bibliography Fundamentals of Process Control Theory, Second Edition Author: Paul W. Murrill Publisher: Instrument Society of America ISBN 1–55617–297–4 PID Controllers: Theory, Design, and Tuning, 2nd Edition Author: K. Astrom and T Hagglund Publisher: Instrument Society of America ISBN 1–55617–516–7 Process / Industrial Instruments & Controls Handbook, Fourth Edition Author (Editor-in-Chief): Douglas M. Considine Publisher: McGraw-Hill, Inc ISBN 0-07-012445-0 Programmable Controllers Concepts and Applications, First Edition Authors: C.T. Jones and L.A. Bryan Publisher: International Programmable Controls ISBN 0-915425-00-9 Process Control, Third Edition Instrument Engineer’s Handbook Author (Editor-in-Chief): Bela G. Liptak Publisher: Chilton. . . . . . . ISBN 0–8019–8242–1

Application Concepts of Process Control Author: Paul W. Murrill Publisher: Instrument Society of America ISBN 1–55617–080–7 Fundamentals of Temperature, Pressure, and Flow Measurements, Third edition Author: Robert P. Benedict Publisher: John Wiley and Sons ISBN 0–471–89383–8 pH Measurement and Control, Second Edition Author: Gregory K. McMillan Publisher: Instrument Society of America ISBN 1–55617–483–7 Fundamentals of Programmable Logic Controllers, Sensors, and Communications Author: Jon Stenerson Publisher: Prentice Hall ISBN 0-13-726860-2 Process Measurement and Analysis, Third Edition Instrument Engineer’s Handbook Author (Editor-in-Chief): Bela G. Liptak Publisher: Chilton. . . . . . . ISBN 0–8019–8197–2

DL06 Micro PLC User Manual, 3rd Edition Rev. A

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

8–79

Page 156

MAINTENANCE AND TROUBLESHOOTING

CHAPTER

9

In This Chapter... Hardware System Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–2 Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–2 CPU Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–6 Communications Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–7 I/O Point Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–8 Noise Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9–10 Machine Startup and Program Troubleshooting . . . . . . . . . . . . . . .9–11

Page 157

Chapter 9: Maintenance and Troubleshooting

Hardware System Maintenance

1 Standard Maintenance No regular or preventative maintenance is required for this product (there are no internal batteries); 2 however, a routine maintenance check (about every one or two months) of your PLC and control system is good practice, and should include the following items: 3 • Air Temperature – Monitor the air temperature in the control cabinet, so the operating temperature range of any component is not exceeded. • Air Filter – If the control cabinet has an air filter, clean or replace it periodically as required. 4 • Fuses or breakers – Verify that all fuses and breakers are intact. • Cleaning the Unit – Check that all air vents are clear. If the exterior case needs cleaning, disconnect 5 the input power, and carefully wipe the case using a damp cloth. Do not let water enter the case through the air vents and do not use strong detergents because this may discolor the case. 6 Diagnostics 7 Diagnostics Your DL06 Micro PLC performs many pre-defined diagnostic routines with every CPU scan. The 8 diagnostics can detect various errors or failures in the PLC. The two primary error classes are fatal and non-fatal. 9 Fatal Errors Fatal errors are errors which may cause the system to function improperly, perhaps introducing a safety 10 problem. The CPU will automatically switch to Program Mode if it is in Run Mode. (Remember, in Program Mode all outputs are turned off.) If the fatal error is detected while the CPU is in Program 11 Mode, the CPU will not allow you to transition to Run Mode until the error has been corrected. Some examples of fatal errors are: 12 • Power supply failure • Parity error or CPU malfunction 13 • Particular programming errors Non-fatal Errors 14 Non-fatal errors are errors that need your attention, but should not cause improper operation. They do not cause or prevent any mode transitions of the CPU. The application program can use special relay A contacts to detect non-fatal errors, and even take the system to an orderly shutdown or switch the CPU to Program Mode if desired. An example of a non-fatal error is: • Particular programming errors - The programming devices will notify you of an error if one occurs B while online. • DirectSOFT 5 provides the error number and an error message. C • The handheld programmer displays error numbers and short descriptions of the error. Appendix B has a complete list of error messages in order by error number. Many error messages point D to supplemental V-memory locations which contain related information. Special relays (SP contacts) also provide error indications (refer to Appendix D).

9–2

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 158

Chapter 9: Maintenance and Troubleshooting

V-memory Error Code Locations The following table names the specific memory locations that correspond to certain types of error messages. Error Class User-Defined System Error Grammatical

CPU Scan

Diagnostic V-memory

Error Category Error code used with FAULT instruction Fatal Error code Major Error code Minor Error code Address where syntax error occurs Error Code found during syntax check Number of scans since last Program to Run Mode transition Current scan time (ms) Minimum scan time (ms) Maximum scan time (ms)

V7751 V7755 V7756 V7757 V7763 V7764 V7765 V7775 V7776 V7777

Special Relays (SP) Corresponding to Error Codes The special relay table also includes status indicators which can indicate errors. For a more detailed description of each of these special relays refer to Appendix D. CPU Status Relays SP11 SP12 SP13 SP15 SP16 SP17 SP20 SP22

Forced Run mode Terminal Run mode Test Run mode Test stop mode Terminal Program mode Forced stop STOP instruction was executed Interrupt enabled

System Monitoring Relays SP36 SP37 SP40 SP41 SP42 SP44 SP45 SP46 SP50 SP51 SP52 SP53 SP54 SP56

Override setup Scan control error Critical error Non-critical error Diagnostics error Program memory error I/O error Communications error Fault instruction was executed Watchdog timeout Syntax error Cannot solve the logic Communication error Table instruction overrun

Accumulator Status Relays SP60 SP61 SP62 SP63 SP64 SP65 SP66 SP67 SP70 SP71 SP73 SP75 SP76

Acc. is less than value Acc. is equal to value Acc. is greater than value Acc. result is zero Half borrow occurred Borrow occurred Half carry occurred Carry occurred Result is negative (sign) Pointer reference error Overflow Data is not in BCD Load zero

DL06 Micro PLC User Manual, 3rd Edition Rev. A

9–3

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

Page 159

Chapter 9: Maintenance and Troubleshooting

DL06 Micro PLC Error Codes

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

These errors can be generated by the CPU or by the Handheld Programmer, depending on the actual error. Appendix B provides a more complete description of the error codes. The errors can be detected at various times. However, most of them are detected at power-up, on entry to Run Mode, or when a Handheld Programmer key sequence results in an error or an illegal request. Error Code

Description

Error Code

E003 E004 E104 E151 E311 E312 E313 E316 E320 E321 E360 E501 E502 E503 E504 E505 E506 E520 E521 E523 E524 E525

Software time-out Invalid instruction(RAM parity error in the CPU) Write failed Invalid command Communications error 1 Communications error 2 Communications error 3 Communications error 6 Time out Communications error HP Peripheral port time-out Bad entry Bad address Bad command Bad reference / value Invalid instruction Invalid operation Bad operation – CPU in Run Bad operation – CPU in Test Run Bad operation – CPU in Test Program Bad operation – CPU in Program Mode Switch not in Term position

E526 E527 E528 E540 E541 E542 E601 E602 E604 E620 E621 E622 E624 E625 E627 E628 E640 E650 E651 E652

9–4

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Description Unit is offline Unit is online CPU mode CPU locked Wrong password Password reset Memory full Instruction missing Reference missing Out of memory EEPROM Memory not blank No Handheld Programmer EEPROM V memory only Program only Bad write operation Memory type error (should be EEPROM) Mis-compare Handheld Programmer system error Handheld Programmer ROM error Handheld Programmer RAM error