The text of a manual · part 29 of 59
Mini-PLC-2/02, 2/16, 2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual: 16 - EAF Process Control Instructions, pages 232 to 241
Pages 232 to 241 of 490, from Mini-PLC-2/02, 2/16, 2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual
The original document is the PDF (2.4 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 Allen-Bradley 1772-LW /LWD, Allen-Bradley 1772-LWP, Allen-Bradley 1772-LX / LXP and Allen-Bradley 1772-LZP
Page 232
Chapter 16 EAF Process Control Instructions
This list identifies the function of the ladder diagram symbols. 110/00 110/01 110/02 320/04 332 115/00 340
Cascading Loops
Manual Push Button Auto Push Button Enter Push Button Set-Output bit PID Set-Output value Manual Override Output Value PID CO Value
Figure 16.7 shows how you can cascade two loops by assigning the control output (CO) of one loop as the set point (SP) of the next loop. Locate these rungs in the main program. Set the cascade bit (word 01, bit 05) of the inner loop so that it will interpret the outer loops properly. Setting the cascade bit forces the set point of the secondary loop to accept 0 to 4095 binary. This allows the output of the primary loop to be moved directly into the set point of the secondary loop.
16-21
Page 233
Chapter 16 EAF Process Control Instructions
Figure 16.7 Cascaded Loops 044
0044 TON .01 PR 150 AC 000
15
044 15
110 0575 0350 G G 07 000 000
BLOCK XFER READ 0030 DATA ADDR: 100 MODULE ADDR: 02 BLOCK LENGTH: 0350-0351 FILE:
0350 G 000
0050 EN 17 0050 DN 15
0434 PUT 000
EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 0432 DATA ADDR: 0501 RESULT ADDR:
FILE TO FILE MOVE 0051 COUNTER ADDR: 001 POSITION: 009 FILE LENGTH: 0432-0442 FILE A: 0443-0453 FILE R: 009 RATE PER SCAN
BLOCK XFER READ 0031 DATA ADDR: 101 MODULE ADDR: 01 BLOCK LENGTH: 0501-0501 FILE:
16-22
110 DN 07
EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 0400 DATA ADDR: 0500 RESULT ADDR:
FILE TO FILE MOVE 0050 COUNTER ADDR: 001 POSITION: 009 FILE LENGTH: 0400-0410 FILE A: 0411-0421 FILE R: 009 RATE PER SCAN
044 0576 0351 G G G 15 000 540
010 EN 07
0051 EN 17 0050 DN 15 010 EN 06 110 DN 16
Page 234
Chapter 16 EAF Process Control Instructions
De-Scaling Inputs
De-scaling is necessary to force the PID input range to 0 to 4095 when using an input module that does not return this range. A thermocouple input module is a good example. It returns a scaled temperature range, typically -300° to +1200° Fahrenheit. When specifying the input range for de-scaling, specify the maximum range that your process will actually see. For example, if your thermocouple input range is -300° to +1000° C but your process could only possibly experience 25° to +550° C, then use the latter range in the de-scaling equation. This improves the resolution for the PID instruction and results in better system control. Figure 16.8 De-Scaling Inputs Processor 25-550oC
Analog Signal
0-4095
Thermocouple
De-scaling Equation
Thermocouple Input
Scaling PID Instr.
Operator SP Interface PV C0
Analog Output Analog Signal
( ( (
Heater Smax2 = 550oC Smin2 = 25oC
0-4095
Smax1 = 4095 Smin1 = 0 10373-I
Example: If measuring a full scale temperature range of 25° to 550° C, enter 25 for the minimum scaling value and 550 for the maximum scaling value. M 2 + (M 1 * Smin 1)
(Smax 2 * Smin 2) (Smax 1 * Smin 1)
) Smin 2 where: M = Smin = Smax =
Measured value Minimum Scaling Value Maximum Scaling Value
16-23
Page 235
Chapter 16 EAF Process Control Instructions
Subscripts 1 2
= =
Units you are converting from Units you are converting to
Since the converted range is always 0 to 4095, the equation simplifies to: M 2 + 4095
(M 1 * Smin 1) (Smax 1 * Smin 1)
To simplify the actual programming, break the equation down into: M 2 + K (M 1 * Smin 1), where K +
4095 Smax 1 * Smin 1)
For this example: K + 4095 , K + 7.8. So K + 7.8 is 550–25 the constant for de-scaling this termperature range.
16-24
Store 2 525
Rung 1
M1 G 550
Smin 1 G 025
Rung 2A
Store 5 Store 6 G G 095 004
Store 7 G 000
Store 8 G 000
Rung 2B
Store 1 Store 2 G G 525 000
Store 3 G 000
Store 4 G 000
Rung 2C
Store 9 Store 10 G G 007 000
Store 11 Store 12 G G 800 000
Rung 3A
Store 13 G FFF
Rung 3B
Store 5 Store 6 G G 095 004
EXECUTE AUX FUNCTION FUNCTION NUMBER: 03 Store 1 DATA ADDR: Store 5 RESULT ADDR:
EXECUTE AUX FUNCTION FUNCTION NUMBER: 13 Store 5 DATA ADDR: RESULT ADDR: Store 13
Page 236
Chapter 16 EAF Process Control Instructions
The following ladder logic solution to the de-scaling equation assumes that Smax1 and Smin1 are between 0-999. For values less than 0 or greater than 999, additional math instructions would have to be programmed. Rung 1
Subtraction of Smin1 from M1. In this case, the input is at maximum, 550o C.
Rung 2
This is the EAF math multiplication instruction necessary to handle the possible 4 digit BCD answer, in this case, 4095.
Rung 2A
Display branch. Displays the product. The four locations must be stored consecutively starting with Store 5. Example: Store 5 through Store 8 = 400 through 403.
Rung 2B
Display of multiplier. You must allocate 4 consecutive words even though only one is used. The unused words must store zero.
Rung 2C
Display of floating point multiplicand. Note implied decimal point between store 10 and 11. You must include this branch. The first two branches are for display only and can be omitted. Note that 12 words must be allocated to use this instruction.
Rung 3
BCD to Binary conversion. The 2 word value to be converted is in store 5 and 6, the answer is in store 13. Store 13 will be the PV for your PID instruction.
For systems requiring more than one de-scaled input, store this program in a subroutine and call it as many times as it is needed.
PID Glossary Anti-Reset Windup This is a feature that prevents the integral output term from becoming excessive when the output reaches a limit. When the sum of the PID and bias terms in the output reaches the limit, the instruction stops calculating until the error changes sign causing the output to come back in range. Bumpless Transfer (Word 02, Bit 11) The ability to switch from manual to auto mode without causing a sudden shift or “bump” in the Control Output. When this bit is set, the Bias Term is adjusted to provide a bumpless transfer when the Integral Gain is zero (i.e., when no integral control is used).
16-25
Page 237
Chapter 16 EAF Process Control Instructions
Cascade (Word 01, Bit 05) Set/reset this bit for cascading two loops. When the bit is set, the loop is the secondary (fast) loop of the cascade. When the bit is reset, the loop is the primary (slow) loop of the cascade or not part of a cascade configuration. Control Action (Word 01, Bit 02) Set/Reset this bit to change the control action for the PID calculation. Direct Control Reverse Control
Bit Reset (0) Bit Set (1)
E = (SP – PV) E = (PV – SP)
CO (Control Output) (EAF Result Address and Parameter File Word 17) This is the result of the evaluation of the PID equation. It is expressed in two formats. In the EAF result address, it is a binary number (0-4095). In the parameter file (word 17), it is a percentage in BCD format (0-100). This number is converted to a signal that drives a control device such as a valve or heating element. Control Output Tracking It is desirable to make the CO equal to the output of the manual control station when in the manual mode. This allows a bumpless transfer between Manual and Auto modes. This is accomplished by feeding the output of the manual control station into the tieback (TB) input. The instruction sets the calculated CO equal to the TB input when in manual mode. Dead Band (Word 10) The adjustable deadband lets you select an error range above and below the setpoint over which no new output will be calculated as long as the Process Variable remains within this range. This lets you control how closely the process variable matches the setpoint without changing the output. The Dead Band operates using the zero crossing principle. Zero Crossing Dead Band control allows the instruction to use the error for computational purposes as the process variable crosses into the Dead Band until it crosses the Set Point. Once it crosses the Set Point (error crosses zero and changes sign) and as long as it remains in the Dead Band, the instruction considers the error value zero for computational purposes. Dead Band Status Bit (Bit 10 of word 01) This bit is set/reset by the PID EAF instruction indicating whether the process variable is within or out of the Dead Band. Reset (0) Set (1)
16-26
Outside of the Dead Band Within the Dead Band
Page 238
Chapter 16 EAF Process Control Instructions
Derivative Gain Constant (Word 06) When using the Independent Gain Equation, this is the derivative gain KD (sec). When using the Dependent Gains equation, this is the derivative time constant TD (min). Derivative Uses Error (Word 01, Bit 06) You can select whether the derivative term in either PID equation acts on changes in error or process variable. Consider selecting this feature if you want to accelerate the response to online changes to the setpoint. Reset (0) Set (1)
For normal response to set point changes, derivative acts on the change in PV For a faster response to set point changes, set this bit to act on the change in Error
Done Bit (Word 01, Bit 15) This bit is set/reset by the EAF instruction when new values have been calculated. Reset (0) Set (1)
New values not calculated New values calculated
Enable Bit (Word 01, Bit 17) This bit is set/reset by the EAF instruction to change the status of the PID rung. Reset (0) Set (1)
Rung is not enabled Rung is enabled
Error (E) (Word 16) The algebraic difference between PV and SP. Error Sign (Word 02, Bit 07) This bit is set/reset by the EAF instruction to indicate the polarity of the error. Reset (0) Set (1)
error is negative error is positive
Equation (Word 01, Bit 00) This bit is set/reset this bit to choose your PID equation. Reset (0) Set (1)
Independent Gain Equation Dependent Gain Equation
16-27
Page 239
Chapter 16 EAF Process Control Instructions
Feedforward or Bias (Word 07) This input is added to the calculated control output of the PID equation. It is used when a bias is needed or if feedforward control is desired. This value can be a storage constant or a calculated variable of process measurement. Proportional only control will give a steady-state offset of the process variable from setpoint. A bias value can be added into the control output using this word to bring the process variable to the set point. The feedforward value (Figure 16.9) represents a measured feed system disturbance fed into the PID equation. Its effect is to adjust the output before the disturbance has a chance to change the process variable, thereby reducing the impact of the disturbance on the system. Figure 16.9 This Is an Example of Feedforward Control Flow Transmitter FT SP PV
Σ
PID Equation
Σ CO
Level Detector
10374-I
Feedforward/Bias Sign Bit (Word 02, Bit 02) Set/reset this bit to change the sign of the feedforward value. Reset (0) Set (1)
16-28 value is positive value is negative
Page 240
Chapter 16 EAF Process Control Instructions
Input Format Bit (Word 01, Bit 07) Allows the Process Variable (PV) and Tieback (TB) to be input in Binary or BCD (series C or later). Reset (0) Set (1)
PV and TB are in Binary PV and TB are in BCD
Integral Gain (Word 05) When using the Independent Gain Equation, this value is the integral gain constant KI (rep/sec). When using the Dependent Gains Equation, this value is equal to TI (min/rep). KIx10(Word 02, Bit 00) When using the Independent Gains Equation. Set this bit to move the implied decimal point of KI to the right (for example 0.10 converts to 1.00). Reset (0) Set (1)
decimal point not moved decimal moved one place to the right
KD/10 (Word 02, Bit 01) When using the Independent Gains equation, set this bit to move the implied decimal point of KD to the left (for example, 10.0 converts to 1.00). This improves the resolution of this term. Reset (0) Set (1)
decimal point not moved decimal moved one place to the left
Manual Control Station A manual control station is a hardware device used to control the output directly and override the PID instruction’s output. The use of a manual control station is optional. Set Output mode allows the same features without this hardware device (See Set Output). When using a manual control station, feed the manually controlled output value into the PID instruction’s tieback (TB) input. The PID instruction uses this value (0 to 4095) to calculate the integral term value required to achieve a bumpless transfer when switching from manual to automatic control. Maximum Output Alarm (Word 01, Bit 11) This bit is set by the EAF instruction whenever the computed Control Output goes above the limit set by Maximum Control Output (word 12). Mode (Word 01, Bit 01) Set/reset this bit to choose either Automatic or Manual mode. A hardwired auto/manual station would manipulate this bit. Reset (0) Set (1)
Automatic Manual
16-29
Page 241
Chapter 16 EAF Process Control Instructions
Maximum Control Output (Word 12) This limits the maximum value of the Control Output. Defined as 0-100% of the 0-4095 Control Output range. This value works in conjunction with the Output Limiting feature and the Maximum Output Alarm. Maximum Scaling Value (Word 08) The scaling value which corresponds to the maximum setpoint and process variable in engineering units (such as PSI or oF). Range
0000 to 9999, the decimal point is implied by the user.
Important:When Maximum Scaling Value = Minimum Scaling Value, scaling is not performed. Maximum Scaling Sign (Word 02, Bit 03) Set/Reset this bit to change the sign of Maximum Scaling Value (see Scaling). Reset (0) Set (1)
positive negative
Minimum Control Output (Word 13) This is the minimum allowable value of the Control Output. Enter the value as 0-100% of the 0-4095 Control Output range. This value works in conjunction with the Output Limiting feature and the Maximum Output Alarm. Minimum Output Alarm (Word 01, Bit 12) This bit is set whenever the calculated control output goes below the limit set by Minimum Control Output. Minimum Scaling Value (Word 09) The scaling value which corresponds to the minimum setpoint value and process variable (see Scaling). Range
0000 to 9999, the decimal point is implied by the user.
Important:When Maximum Scaling Value = Minimum Scaling Value, scaling is not performed. Minimum Scaling Sign (Word 02, Bit 04) Set/Reset this bit to change the sign of Minimum Scaling Value. Reset (0) Set (1)
16-30 positive negative