The text of a manual · part 31 of 39
Series 90-30/20/Micro PLC CPU Instruction Set Reference Manual: Chapter 12 - Control Functions, pages 269 to 278
Pages 269 to 278 of 337, from Series 90-30/20/Micro PLC CPU Instruction Set Reference Manual
The original document is the PDF (4.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 GE Fanuc IC692CPU211D / IC692MDR541C, Fanuc IC692CPU211D / IC692MDR541C, GE IC692CPU211D / IC692MDR541C and GE Fanuc IC693CPU311X
Page 269
12
Parameters Parameter
Description enable
When enabled through a contact, the PID function is performed.
SP
SP is the control loop or process set point. Set using PV Counts, the PID adjusts the output CV so that PV matches SP (zero error).
PV
Process Variable input from the process being controlled, often a %AI input.
MAN
When energized to 1 (through a contact), the PID block is in MANUAL mode. If this parameter is not energized (0), the PID block is in automatic mode.
UP
If energized along with MAN, it adjusts the CV up by 1 CV per solution.*
DN
If energized along with MAN, it adjusts the CV down by 1 CV per solution.*
RefArray Address
Address is the location of the PID control block information (user and internal parameters). Uses 40 %R words that cannot be shared.
ok
The ok output is energized when the function is performed without error. It is off if error(s) exist.
CV
CV is the control variable output to the process, often a %AQ analog output.
*Increments (UP parameter) or decremented (DN parameter) by 1 per access of the PID function.
Valid Memory Types Parameter flow enable
•
SP PV MAN
•
UP
•
DN
•
%I
%Q
%M
%T
•
•
•
•
•
•
%S
%G
%R
%AI
%AQ const
•
•
•
•
•
•
•
•
•
•
•
•
• address ok CV •
GFK-0467M none
• •
• •
•
•
•
•
•
Valid reference or place where power can flow through the function.
Chapter 12 Control Functions
12-81
Page 270
12
PID Parameter Block Besides the 2 input words and the 3 Manual control contacts, the PID block uses 13 of the parameters in the RefArray. These parameters must be set before calling the block. The other parameters are used by the PLC and are non-configurable. The %Ref shown in the table below is the same RefArray Address at the bottom of the PID block. The number after the plus sign is the offset in the array. For example, if the RefArray starts at %R100, the %R113 will contain the Manual Command used to set the Control Variable and the integrator in Manual mode. Table 12-13. PID Parameters Overview
12-82
Register
Parameter
Low Bit Units
Range of Values
%Ref+0000
Loop Number
Integer
%Ref+0001
Algorithm
%Ref+0002
Sample Period
10 milliseconds
%Ref+0003
Dead Band +
PV Counts
0 (every sweep) to 65535 (10.9 Min). Use at least 10 for 90-30 PLCs (see Note on page 12-80). 0 to 32000 (never negative)
%Ref+0004
Dead Band, PV Counts
–32000 to 0 (never positive)
%Ref+0005
Proportional Gain –Kp
0.01 CV%/PV%
0 to 327.67 %/%
%Ref+0006
Derivative Gain–Kd
0.01 seconds
0 to 327.67 sec
%Ref+0007
Integral Rate–Ki
Repeat/1000 Sec
0 to 32.767 repeat/sec
%Ref+0008
CV Bias/Output Offset
CV Counts
–32000 to 32000 (add to integrator output)
%Ref+0009
Upper Clamp
CV Counts
–32000 to 32000 (>%Ref+10) output limit
%Ref+0010
Lower Clamp
CV Counts
–32000 to 32000 (<%Ref+09) output limit
%Ref+0011
Minimum Slew Time
Second/Full Travel
0 (none) to 32000 sec to move 32000 CV
%Ref+0012
Config Word
Low 5 bits used
%Ref+0013
Manual Command
Bit 0 to 2 for Error +/–, OutPolarity, Deriv. Tracks CV in Auto or Sets CV in Manual
%Ref+0014
Control Word
%Ref+0015
Internal SP
%Ref+0016
Internal CV
N/A; set and Non-configurable maintained by the PLC
%Ref+0017
Internal PV
N/A; set and Non-configurable maintained by the PLC
%Ref+0018
Output
N/A; set and Non-configurable maintained by the PLC
0 to 255 (for user display only)
N/A; set and maintained by the Non-configurable PLC
CV Counts
Maintained by the PLC maintained unless set otherwise: low PLC, unless Bit 1 bit sets Override if 1 (see description in is set. the “PID Parameter Details” table on page 12-85) N/A; set and Non-configurable maintained by the PLC
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 271
12 Table 12-13. PID Parameters Overview - Continued Register
Parameter
%Ref+0019
Diff Term Storage
N/A; set and Non-configurable maintained by the PLC
%Ref+0020 and %Ref+0021
Int Term Storage
N/A; set and Non-configurable maintained by the PLC
%Ref+0022
Slew Term Storage
N/A; set and Non-configurable maintained by the PLC
%Ref+0023
Clock
N/A; set and
%Ref+0025
(time last executed)
maintained by the PLC
%Ref+0026
Y Remainder Storage
%Ref+0027
Lower Range for SP, PV PV Counts
%Ref+0028
Upper Range for SP, PV PV Counts
%Ref+0024
Low Bit Units
Range of Values
Non-configurable
N/A; set and maintained by the Non-configurable PLC –32000 to 32000 (>%Ref+28) for display –32000 to 32000 (<%Ref+27) for display
%Ref+0029 +•
Reserved for internal use N/A
Non-configurable
Reserved for external use N/A
Non-configurable
%Ref+0034 %Ref+0035 • %Ref+0039
The RefArray array must consist of %R registers on the 90-30 PLC. Note that every PID block call must use a different 40-word array even if all 13 user parameters are the same because other words in the array are used for internal PID data storage. Make sure the array does not extend beyond the end of memory. To configure operating parameters, select the PID function and press F10 to zoom in to a screen displaying User Parameters; then use arrow keys to select fields and type in desired values. You can use 0 for most default values, except the CV Upper Clamp, which must be greater than the CV Lower Clamp for the PID block to operate. Note that the PID block does not pass power if there is an error in User Parameters, so monitor with a temporary coil while modifying data. Once suitable PID values have been chosen, they should be defined as constants in the BLKMOV so that they can be used to reload default PID user parameters if needed.
GFK-0467M
Chapter 12 Control Functions
12-83
Page 272
12
Operation of the PID Instruction Normal Automatic operation is to call the PID block every sweep with power flow to Enable and no power flow to Manual input contacts. The block compares the current PLC elapsed time clock with the last PID solution time stored in the internal RefArray. If the time difference is greater than the sample period defined in the third word (%Ref+2) of the RefArray, the PID algorithm is solved using the time difference and both the last solution time and Control Variable output are updated. In Automatic mode, the output Control Variable is placed in the Manual Command parameter %Ref+13. If power flow is provided to both Enable and Manual input contacts, the PID block is placed in Manual mode and the output Control Variable is set from the Manual Command parameter %Ref+13. If either the UP or DN inputs have power flow, the Manual Command word is incremented or decremented by one CV count every PID solution. For faster manual changes of the output Control Variable, it is also possible to add or subtract any CV count value directly to/from the Manual Command word. The PID block uses the CV Upper and CV Lower Clamp parameters to limit the CV output. If a positive Minimum Slew Time is defined, it is used to limit the rate of change of the CV output. If either the CV amplitude or rate limit is exceeded, the value stored in the integrator is adjusted so that CV is at the limit. This anti-reset windup feature (defined on page 12-87) means that even if the error tried to drive CV above (or below) the clamps for a long period of time, the CV output will move off the clamp as soon as the error term changes sign. This operation, with the Manual Command tracking CV in Automatic mode and setting CV in Manual mode, provides a bumpless transfer between Automatic and Manual modes. The CV Upper and Lower Clamps and the Minimum Slew Time still apply to the CV output in Manual mode and the internal value stored in the integrator is updated. This means that if you were to step the Manual Command in Manual mode, the CV output will not change any faster that the Minimum Slew Time (Inverse) rate limit and will not go above or below the CV Upper or CV Lower Clamp limits.
Note A specific PID function should not be called more than once per sweep. The following table provides more details about the parameters discussed briefly in Table 12-3. The number in parentheses after each parameter name is the offset in the RefArray.
12-84
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 273
12
Table 12-14. PID Parameter Details Data Item Loop Number
(00)
Description This is an optional parameter available to identify a PID block. It is an unsigned integer that provides a common identification in the PLC with the loop number defined by an operator interface device. The loop number is displayed under the block address when logic is monitored from the Logicmaster 90-30/20/Micro software.
Algorithm (01)
An unsigned integer that is set by the PLC to identify what algorithm is being used by the function block. The ISA algorithm is defined as algorithm 1, and the independent algorithm is identified as algorithm 2.
Sample Period
The shortest time, in 10 millisecond increments, between solutions of the PID algorithm. For example, use a 10 for a 100 millisecond sample period. If it is 0, the algorithm is solved every time the block is called (see section below on PID block scheduling).
(02)
The PID algorithm is solved only if the current PLC elapsed time clock is at or later than the last PID solution time plus this Sample Period. Remember, that the 90-30 will not use a solution time less than 10 milliseconds (see Note on page 12-80); so sweeps will be skipped for smaller sweep times. This function compensates for the actual time elapsed since the last execution, within 100 microseconds. If this value is set to 0, the function is executed each time it is enabled; however, it is restricted to a minimum of 10 milliseconds as noted above. Dead Band (+/ - )
(03/04)
Proportional Gain–Kp
(05) Derivative Gain–Kd
(06)
Integral Rate Gain–Ki
INT values defining the upper (+) and lower (–) Dead Band limits in PV Counts. If no Dead Band is required, these values must be 0. If the PID Error (SP – PV) or (PV – SP) is above the (–) value and below the (+) value, the PID calculations are solved with an Error of 0. If non-zero, the (+) value must be greater than 0 and the (–) value less than 0 or the PID block will not function. You should leave these at 0 until the PID loop gains are setup or tuned. After that, you might want to add Dead Band to avoid small CV output changes due to small variations in error, perhaps to reduce mechanical wear. This INT number, called the Controller gain, Kc, in the ISA version, determines the change in CV in CV Counts for a 100 PV Count change in the Error term. It is displayed as 0.00 %/% with an implied decimal point of 2 . For example, a Kp entered as 450 will be displayed as 4.50 and will result in a Kp*Error/100 or 450*Error/100 contribution to the PID Output. Kp is generally the first gain set when adjusting a PID loop. This INT number determines the change in CV in CV Counts if the Error or PV changes 1 PV Count every 10 milliseconds. Entered as a time with the low bit indicating 10 milliseconds, it is displayed as 0.00 Seconds with an implied decimal point of 2. For example, a Kd entered as 120 will be displayed as 1.20 Sec and will result in a Kd * delta Error/delta time or 120*4/3 contribution to the PID Output if Error was changing by 4 PV Counts every 30 milliseconds. Kd can be used to speed up a slow loop response, but is very sensitive to PV input noise.
(07)
This INT number determines the change in CV in CV Counts if the Error were a constant 1 PV Count. It is displayed as 0.000 Repeats/Sec with an implied decimal point of 3. For example, a Ki entered as 1400 will be displayed as 1.400 Repeats/Sec and will result in a Ki * Error *dt or 1400 * 20 * 50/1000 contribution to PID Output for an Error of 20 PV Counts and a 50 millisecond PLC sweep time (Sample Period of 0). Ki is usually the second gain set after Kp.
CV Bias/Output Offset (08)
An INT value in CV Counts added to the PID Output before the rate and amplitude clamps. It can be used to set non-zero CV values if only Kp Proportional gains are used, or for feed forward control of this PID loop output from another control loop.
GFK-0467M
Chapter 12 Control Functions
12-85
Page 274
12
Table 12-14. PID Parameter Details - Continued Data Item
Description
CV Upper and Lower Clamps (09/10)
INT values in CV Counts that define the highest and lowest value for CV. These values are required and the Upper Clamp must have a more positive value than the Lower Clamp, or the PID block will not work. These are usually used to define limits based on physical limits for a CV output. They are also used to scale the Bar Graph display for CV for the LM90 or ADS PID display. The block has anti-reset windup to modify the integrator value when a CV clamp is reached.
Minimum Slew Time (11)
A positive value to define the minimum number of seconds for the CV output to move from 0 to full travel of 100% or 32000 CV Counts. It is an inverse rate limit on how fast the CV output can be changed. If positive, CV can not change more than 32000 CV Counts times Delta Time (seconds) divided by Minimum Slew Time. For example, if the Sample Period was 2.5 seconds and the Minimum Slew Time is 500 seconds, CV can not change more than 32000*2.5/500 or 160 CV Counts per PID solution. As with the CV Clamps, there is an anti-windup feature that adjusts the integrator value if the CV rate limit is exceeded. If Minimum Slew Time is 0, there is no CV rate limit. Make sure you set Minimum Slew Time to 0 while you are tuning or adjusting PID loop gains.
Config Word
The low 5 bits of this word are used to modify three standard PID settings. The other bits should be set to 0. Set the low bit to 1 to modify the standard PID Error Term from the normal (SP – PV) to (PV – SP), reversing the sign of the feedback term. This is for Reverse Acting controls where the CV must go down when the PV goes up. Set the second bit to a 1 to invert the Output Polarity so that CV is the negative of the PID output rather than the normal positive value. Set the fourth bit to 1 to modify the Derivative Action from using the normal change in the Error term to the change in the PV feedback term. The low 5 bits in the Config Word are defined in detail below: Bit 0 =
Error Term. When this bit is set to 0, the error term is SP, PV. When this bit is set to 1, the error term is PV, SP.
Bit 1 =
Output Polarity. When this bit is set to 0, the CV output represents the output of the PID calculation. When it is set to 1, the CV output represents the negative of the output of the PID calculation.
Bit 2 =
Derivative action on PV. When this bit is set to 0, the derivative action is applied to the error term. When it is set to 1, the derivative action is applied to PV. All remaining bits should be zero. Bit 3 = Deadband action. When the Deadband action bit is set to zero, then no deadband action is chosen. If the error is within the deadband limits, then the error is forced to be zero. Otherwise the error is not affected by the deadband limits. If the Deadband action bit is set to one, then deadband action is chosen. If the error is within the deadband limits, then the error is forced to be zero. If, however, the error is outside the deadband limits, then the error is reduced by the deadband limit (error = error – deadband limit). Bit 4 =Anti-reset windup action. When this bit is set to zero, the anti-reset windup action uses a reset back calculation. When the output is clamped, this replaces the accumulated Y remainder value (defined on page 12-87) with whatever value is necessary to produce the clamped output exactly. When the bit is set to one, this replaces the accumulated Y term with the value of the Y term at the start of the calculation. In this way, the pre-clamp Y value is held as long as the output is clamped. NOTE: The anti-reset windup action bit is only available on release 6.50 or later 90-30 CPUs. Remember that the bits are set in powers of 2. For example, to set Config Word to 0 for default PID configuration, you would add 1 to change the Error Term from SP–PV to PV–SP, or add 2 to change the Output Polarity from CV = PID Output to CV = – PID Output, or add 4 to change Derivative Action from Error rate of change to PV rate of change, etc.
12-86
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 275
12
Table 12-14. PID Parameter Details - Continued Data Item
Description
Manual Command (13)
This is an INT value set to the current CV output while the PID block is in Automatic mode. When the block is switched to Manual mode, this value is used to set the CV output and the internal value of the integrator within the Upper and Lower Clamp and Slew Time limits.
Control Word (14)
This is an internal parameter that is normally left at 0. If the Override low bit is set to 1, this word and other internal SP, PV and CV parameters must be used for remote operation of this PID block (see below). This allows remote operator interface devices, such as a computer, to take control away from the PLC program. Caution: if you do not want this to happen, make use the Control Word is set to 0. If the low bit is 0, the next 4 bits can be read to track the status of the PID input contacts as long as the PID Enable contact has power. A discrete data structure with the first five bit positions in the following format: Bit: Word Value: Function: Status or External Action if Override bit set to 1: 0 1 Override If 0, monitor block contacts below. If 1, set them externally. 1 2 Manual/ If 1, block is in Manual mode; other numbers Auto it is in Automatic mode. 2 4 Enable Should normally be 1; otherwise block is never called. 3 8 UP/Raise If 1 and Manual (Bit 1) is 1, CV is being incremented every solution. 4 16 DN/LowerIf 1 and Manual (Bit 1) is 1, CV is being incremented every solution.
SP (15)
(Non-configurable–set and maintained by the PLC) Tracks SP in; must be set externally if Override = 1.
CV (16)
(Non-configurable–set and maintained by the PLC) Tracks CV out.
PV (17)
(Non-configurable–set and maintained by the PLC) Tracks PV in; must be set externally if Override bit = 1.
Output (18)
(Non-configurable–set and maintained by the PLC) This is a signed word value representing the output of the function block before the application of the optional inversion. If no output inversion is configured and the output polarity bit in the control word is set to 0, this value will equal the CV output. If inversion is selected and the output polarity bit is set to 1, this value will equal the negative of the CV output.
Diff Term Storage (19)
Used internally for storage of intermediate values. Do not write to this location.
Int Term Storage (20/21)
Used internally for storage of intermediate values. Do not write to this location.
Slew Term Storage (22)
Used internally for storage of intermediate values. Do not write to this location.
Clock (23–25)
Internal elapsed time storage (time last PID executed). Do not write to these locations.
Y Remainder (26) Holds remainder for integrator division scaling for 0 steady state error. Lower and Upper Range (27/28)
Optional INT values in PV Counts that define the highest and lowest display value for the SP and PV Logicmaster Zoom key horizontal bar graph and ADS PID faceplate display.
Reserved (29–34 29–34 are reserved for internal use; 35–39 are reserved for external use. They are reserved for GE Fanuc and 35–39) use, and cannot be used for other purposes.
GFK-0467M
Chapter 12 Control Functions
12-87
Page 276
12
Internal Parameters in RefArray As described in Table 12-3 on the previous pages, the PID block reads 13 user parameters and uses the rest of the 40 word RefArray for internal PID storage. Normally you would not need to change any of these values. If you are calling the PID block in Auto mode after a long delay, you might want to use SVC_REQ #16 to load the current PLC elapsed time clock into %Ref+23 to update the last PID solution time to avoid a step change on the integrator. If you have set the Override low bit of the Control Word (%Ref+14) to 1, the next four bits of the Control Word must be set to control the PID block input contacts (as described in Table 12-3 on the previous pages), and the Internal SP and PV must be set as you have taken control of the PID block away from the ladder logic.
PID Algorithm Selection (PIDISA or PIDIND) and Gains The PID block can be programmed selecting either the Independent (PID_IND) term or standard ISA (PID_ISA) versions of the PID algorithm. The only difference in the algorithms is how the Integral and Derivative gains are defined. To understand the difference, you need to understand the following: Both PID types calculate the Error term as SP – PV (Reverse Acting), which can be changed to Direct Acting mode (PV – SP) by setting the Error Term to 1. The Error Term is the low bit (0bit) in the Config. Word (%Ref+0012). In a Direct Acting proportional (P) loop, an increase in the Process Variable (PV) causes an increase in the output (CV). In a Reverse Acting proportional (P) loop, an increase in the Process Variable (PV) causes a decrease in the output (CV). Introducing the integral term (I) changes the behavior. In a Direct Acting PI loop, the output (CV) will increase when the process variable (PV) is greater than the setpoint (SP). In a Reverse Acting PI loop, the output (CV) will decrease when the Process Variable (PV) is greater than the Setpoint (SP). Direct Acting: Error = measurement – setpoint (PV-SP), Error Term = 1 Reverse Acting: Error = setpoint – measurement (SP-PV), Error Term = 0 Note. Direct Acting is sometimes referred to as Forward Acting. The Derivative is normally based on the change of the Error term since the last PID solution, which may cause a large change in the output if the SP value is changed. If this is not desired, the third bit of the Config Word can be set to 1 to calculate the Derivative based on the change of the PV. The dt (or Delta Time) is determined by subtracting the last PID solution clock time for this block from the current PLC elapsed time clock. dt = Current PLC Elapsed Time clock – PLC Elapsed Time Clock at Last PID solution Derivative = (Error – previous Error)/dt or (PV – previous PV)/dt if 3rd bit of Config Word set to 1
The Independent term PID (PID_IND) algorithm calculates the output as: PID Output = Kp * Error + Ki * Error * dt + Kd * Derivative + CV Bias The standard ISA (PID_ISA) algorithm has a different form: PID Output = Kc * (Error + Error * dt/Ti + Td * Derivative) + CV Bias
12-88
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 277
12 where Kc is the controller gain, and Ti is the Integral time and Td is the Derivative time. The advantage of ISA is that adjusting the Kc changes the contribution for the integral and derivative terms as well as the proportional one, which may make loop tuning easier. If you have PID gains in terms or Ti and Td, use Kp = Kc
Ki = Kc/Ti and
Kd = Kc/Td to convert them to use as PID User Parameter inputs. The CV Bias term above is an additive term separate from the PID components. It may be required if you are using only Proportional Kp gain and you want the CV to be a non-zero value when the PV equals the SP and the Error is 0. In this case, set the CV Bias to the desired CV when the PV is at the SP. CV Bias can also be used for feed forward control where another PID loop or control algorithm is used to adjust the CV output of this PID loop. If an Integral Ki gain is used, the CV Bias would normally be 0 as the integrator acts as an automatic bias. Just start up in Manual mode and use the Manual Command word (%Ref+13) to set the integrator to the desired CV, then switch to Automatic mode. This also works if Ki is 0, except the integrator will not be adjusted based on the Error after going into Automatic mode. The following diagram shows how the PID algorithms work: a43646
SP
PV
PROPORTIONAL TERM - Kp
Error Sign
DEAD BAND
INTEGRAL - Ki TIME
VALUE TIME
DERIVATIVE TERM - Kd
BIAS
SLEW LIMIT
UPPER/LOWER CLAMP
POLARITY
CV
Deriv Action
Figure 12-4. Independent Term Algorithm (PIDIND) The ISA Algorithm (PIDISA) is similar except the Kp gain is factored out of Ki and Kd so that the integral gain is Kp * Ki and derivative gain is Kp * Kd. The Error sign, DerivAction and Polarity are set by bits in the Config Word user parameter.
CV Amplitude and Rate Limits The block does not send the calculated PID Output directly to CV. Both PID algorithms can impose amplitude and rate of change limits on the output Control Variable. The maximum rate of change is determined by dividing the maximum 100% CV value (32000) by the Minimum Slew Time, if specified as greater than 0. For example, if the Minimum Slew Time is 100 seconds, the rate limit will be 320 CV counts per second. If the dt solution time was 50 milliseconds, the new CV output can not change more than 320*50/1000 or 16 CV counts from the previous CV output. The CV output is then compared to the CV Upper and CV Lower Clamp values. If either limit is exceeded, the CV output is set to the clamped value. If either rate or amplitude limits are exceeded modifying CV, the internal integrator value is adjusted to match the limited value to avoid reset windup. Finally, the block checks the Output Polarity (2nd bit of the Config Word %Ref+12) and changes the sign of the output if the bit is 1. CV = Clamped PID Output
GFK-0467M
Chapter 12 Control Functions or – Clamped PID Output if Output Polarity bit set
12-89
Page 278
12 If the block is in Automatic mode, the final CV is placed in the Manual Command %Ref+13. If the block is in Manual mode, the PID equation is skipped as CV is set by the Manual Command, but all the rate and amplitude limits are still checked. That means that the Manual Command can not change the output above the CV Upper Clamp or below the CV Lower Clamps and the output can not change faster than the Minimum Slew Time allowed.
Sample Period and PID Block Scheduling The PID block is a digital implementation of an analog control function, so the dt sample time in the PID Output equation is not the infinitesimally small sample time available with analog controls. The majority of processes being controlled can be approximated as a gain with a first or second order lag, possibly with a pure time delay. The PID block sets a CV output to the process and uses the process feedback PV to determine an Error to adjust the next CV output. A key process parameter is the total time constant, which is how fast does the PV respond when the CV is changed. As discussed in the Setting Loop Gains section below, the total time constant, Tp+Tc, for a first order system is the time required for PV to reach 63% of its final value when CV is stepped. The PID block will not be able to control a process unless its Sample Period is well under half the total time constant. Larger Sample Periods will make it unstable. The Sample Period should be no bigger than the total time constant divided by 10 (or down to 5 worst case). For example, if PV seems to reach about 2/3 of its final value in 2 seconds, the Sample Period should be less than 0.2 seconds, or 0.4 seconds worst case. On the other hand, the Sample Period should not be too small, such as less than the total time constant divided by 1000, or the Ki * Error * dt term for the PID integrator will round down to 0. For example, a very slow process that takes 10 hours or 36000 seconds to reach the 63% level should have a Sample Period of 40 seconds or longer. Unless the process is very fast, it is not usually necessary to use a Sample Period of 0 to solve the PID algorithm every PID sweep. If many PID loops are used with a Sample Period greater than the sweep time, there may be wide variations in PLC sweep time if many loops end up solving the algorithm at the same time. The simple solution is to sequence a one or more 1 bits through an array of bits set to 0 that is being used to enable power flow to individual PID blocks.
12-90
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M