The text of a manual · part 51 of 68
DL405 User Manual: Chapter 8: PID Loop Operation (DL450 only), pages 449 to 458
Pages 449 to 458 of 608, from DL405 User Manual
The original document is the PDF (8.2 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 D4-08B-1, AutomationDirect D4-08ND3S, AutomationDirect D4-16TA, PLC Direct D4-16TD2, AutomationDirect D4-32ND3-1, Konnect-It D4-08B-1, Koyo D4-08B-1, Konnect-It D4-08ND3S, and 6 more models
Page 449
8--21
PID Loop Operation (DL450 only) Loop Table Word Definitions
Word #
The parameters associated with each loop are listed in the following table. The address offset is in octal, to help you locate specific parameters in a loop table. For example, if a table begins at V2000, then the location of the reset (integral) term is Addr+11, or V2011. Do not use the word# to calculate addresses.
Address+Offset Description
Format
Read onthe-fly***
PID Loop Mode Setting 1 bits
Yes
2
Addr + 1
PID Loop Mode Setting 2 bits
Yes
3
Addr + 2
Setpoint Value (SP)
word/binary
Yes
4
Addr + 3
Process Variable (PV)
word/binary
Yes
5
Addr + 4
Bias (Integrator) Value word/binary
Yes
6
Addr + 5
Control Output Value word/binary
Yes
7
Addr + 6
Loop Mode and Alarm Status bits
--
8
Addr + 7
Sample Rate Setting word/BCD
Yes
9
Addr + 10
Gain (Proportional) Setting word/BCD
Yes
10
Addr + 11
Reset (Integral) Time Setting word/BCD
Yes
11
Addr + 12
Rate (Derivative) Time Setting word/BCD
Yes
12
Addr + 13
PV Value, Low-low Alarm word/binary
No*
13
Addr + 14
PV Value, Low Alarm word/binary
No*
14
Addr + 15
PV Value, High Alarm word/binary
No*
15
Addr + 16
PV Value, High-high Alarm word/binary
No*
16
Addr + 17
PV Value, deviation alarm (YELLOW)
word/binary
No*
17
Addr + 20
PV Value, deviation alarm (RED)
word/binary
No*
18
Addr + 21
PV Value, rate-of-change alarm word/binary
No*
19
Addr + 22
PV Value, alarm hysteresis setting word/binary
No*
20
Addr + 23
PV Value, error deadband setting word/binary
Yes
21
Addr + 24 reserved for future use
--
--
22
Addr + 25
Loop derivative gain limiting factor setting word/BCD
No**
23
Addr + 26
SP value lower limit setting word/binary
Yes
24
Addr + 27
SP value upper limit setting word/binary
Yes
25
Addr + 30
Control output value lower limit setting word/binary
No**
26
Addr + 31
Control output value upper limit setting word/binary
No**
27
Addr + 32
Remote SP Value V-Memory Address Pointer word/hex
Yes
28
Addr + 33
Ramp/Soak Setting Flag bit
Yes
29
Addr + 34
Ramp/Soak Programming Table Starting Address word/hex
No**
30
Addr + 35
Ramp/Soak Programming Table Error Flags bits
No**
31
Addr + 36 reserved for future use
--
--
32
Addr + 37 reserved for future use
--
--
* Read data only when alarm enable bit transitions 0 to1,
** Read data only on PLC Mode change, *** Read on--the--fly means that the content of V--memory can be changed while the PID loop is in operation.
DL405 User Manual, 4th Edition
Maintenance
Addr + 0
PID Loop Operation (DL450 Only)
1
Page 450
8--22
PID Loop Operation (DL450 only)
Bit
PID Mode Setting 1 Description
Read/Write
Bit=0
Bit=1
0
Manual Mode Loop Operation request write
--
0¤1 request
1
Automatic Mode Loop Operation request write
--
0¤1 request
2
Cascade Mode Loop Operation request write
--
0¤1 request
3
Bumpless Transfer select write
Mode I
Mode II
4
Direct or Reverse-Acting Loop select write
Direct
Reverse
5
Position/Velocity Algorithm select write
Position
Velocity
6
PV Linear/Square Root Extract select write
Linear
Sq. root
7
Error Term Linear/Squared select write
Linear
Squared
8
Error Deadband enable write
Disable
Enable
9
Derivative Gain Limit select write
Off
On
10
Bias (Integrator) Freeze select write
Off
On
11
Ramp/Soak Operation select write
Off
On
12
PV Alarm Monitor select write
Off
On
13
PV Deviation alarm select write
Off
On
14
PV rate-of-change alarm select write
Off
On
15 reserved for future use
--
--
--
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
PID Mode Setting 1 The individual bit definitions of PID Mode Setting 1 word (Addr+00) are listed in the following table. Bit Descriptions (Addr + 00)
DL405 User Manual, 4th Edition
Page 451
8--23
PID Loop Operation (DL450 only)
PID Mode Setting 2 The bit definitions for PID Mode Setting 2 word (Addr+01) are listed in the following table. More information about the use of this word is available later in this chapter. Descriptions (Addr + 01) Bit
PID Mode Setting 2 Description
Bit=1
0
Input (PV) and Control Output Range Unipolar/Bipolar select (See Notes 1 and 2)
write unipolar bipolar
1
Input/Output Data Format select (See Notes 1 and 2)
write
12 bit
15 bit
2 reserved for future use
--
--
--
3
SP Input limit enable write disable enable
4
Integral Gain (Reset) units select write seconds minutes
5
Select Autotune PID algorithm write closed loop open loop
6
Autotune selection write
PID
PI only (rate = 0)
7
Autotune start read/write autotune done force start
8
PID Scan Clock (internal use)
read
--
--
9
Input/Output Data Format 16-bit select (See Notes 1 and 2)
write not 16 bit select 16 bit
10
Select separate data format for input and output (See Notes 2 and 3)
write same format separate formats
11
Control Output Range Unipolar/Bipolar select (See Notes 2 and 3)
write unipolar bipolar
12
Output Data Format select (See Notes 2 and 3)
write
12 bit
15 bit
13
Output data format 16-bit select (See Notes 2 and 3)
write not 16 bit select 16 bit
--
--
--
14--15
Reserved for future use
NOTE 1: If the value in bit 9 is 0, then the values in bits 0 and 1 are read. If the value in bit 9 is 1, then the values in bits 0 and 1 are not read, and bit 9 defines the data format (the range is automatically unipolar). NOTE 2: If the value in bit 10 is 0, then the values in bits 0, 1, and 9 define the input and output ranges and data formats (the values in bits 11, 12, and 13 are not read). If the value in bit 10 is 1, then the values in bits 0, 1, and 9 define only the input range and data format, and bits 11, 12, and 13 are read and define the output range and data format.. NOTE 3: If bit 10 has a value of 1 and bit 13 has a value of 0, then bits 11 and 12 are read and define the output range and data format. If bit 10 and bit 13 each have a value of 1, then bits 11 and 12 are not read, and bit 13 defines the data format, (the output range is automatically unipolar).
DL405 User Manual, 4th Edition
Maintenance
Bit=0
PID Loop Operation (DL450 Only)
Read/Write
Page 452
8--24
PID Loop Operation (DL450 only)
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
Mode/Alarm Monitoring Word (Addr + 06)
The individual bit definitions of the Mode/Alarm monitoring word (Addr+06) are listed in the following table. Bit
Mode / Alarm Bit Description
Read/Write
Bit=0
Bit=1
0
Manual Mode Indication read
--
Manual
1
Automatic Mode Indication read
--
Auto
2
Cascade Mode Indication read
--
Cascade
3
PV Input LOW--LOW Alarm read
Off
On
4
PV Input LOW Alarm read
Off
On
5
PV Input HIGH Alarm read
Off
On
6
PV Input HIGH--HIGH Alarm read
Off
On
7
PV Input YELLOW Deviation Alarm read
Off
On
8
PV Input RED Deviation Alarm read
Off
On
9
PV Input Rate-of-Change Alarm read
Off
On
10
Alarm Value Programming Error read
--
Error
11
Loop Calculation Overflow/Underflow read
--
Error
--
--
--
12--15
Ramp/Soak Table Flags (Addr + 33)
Reserved for Future Use
The individual bit definitions of the Ramp/Soak Table Flag word (Addr+33) are listed in the following table. Bit
Ramp/Soak Flag Bit Description
Read/Write
Bit=0
Bit=1
0
Start Ramp/Soak Profile write
--
0¤1 Start
1
Hold Ramp/Soak Profile write
--
0¤1 Hold
2
Resume Ramp/soak Profile write
--
0¤1 Resume
3
Jog Ramp/Soak Profile write
--
0¤1 Jog
4
Ramp/Soak Profile Complete read
--
Complete
5
PV Input Ramp/Soak Deviation read
Off
On
6
Ramp/Soak Profile in Hold read
Off
On
7
Reserved read
Off
On
Current Step in R/S Profile read
8--15 decode as byte (hex)
Bits 8--15 must be read as a byte to indicate the current segment number of the Ramp/Soak generator in the profile. This byte will have the values 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, and 10. which represent segments 1 to 16 respectively. If the byte=0. then the Ramp/Soak table is not active.
DL405 User Manual, 4th Edition
Page 453
8--25
PID Loop Operation (DL450 only) Ramp/Soak Table Location (Addr + 34)
V2000 V2037
Each loop that you configure has the option of using a built-in Ramp/Soak generator dedicated to that loop. This feature generates SP values in a continuous stream, called a profile. To use the Ramp/Soak feature, you must program a separate table of 32 words with appropriate values. A DirectSOFT dialog box makes this easy to do. In the basic loop table, the Ramp/Soak Table Pointer at Addr + 34 must point to the start of the ramp/soak data for that loop. This may be anywhere in user memory, and does not have to be adjoining to the Loop Parameter table, as shown to the left. Each R/S table requires 32 words, regardless of the number of segments programmed. The ramp/soak table parameters are defined in the table below. Further details are in the section on Ramp/Soak Generator section in this chapter.
V--Memory Space
Addr Offset
Step
User Data
+ 00
Description
Addr Offset
Step
1
Ramp End SP Value
+ 20
9
Ramp End SP Value
+ 01
1
Ramp Slope
+ 21
9
Ramp Slope
32 words
+ 02
2
Soak Duration
+ 22
10
Soak Duration
LOOP #2
+ 03
2
Soak PV Deviation
+ 23
10
Soak PV Deviation
+ 04
3
Ramp End SP Value
+ 24
11
Ramp End SP Value
+ 05
3
Ramp Slope
+ 25
11
Ramp Slope
+ 06
4
Soak Duration
+ 26
12
Soak Duration
+ 07
4
Soak PV Deviation
+ 27
12
Soak PV Deviation
+ 10
5
Ramp End SP Value
+ 30
13
Ramp End SP Value
+ 11
5
Ramp Slope
+ 31
13
Ramp Slope
+ 12
6
Soak Duration
+ 32
14
Soak Duration
+ 13
6
Soak PV Deviation
+ 33
14
Soak PV Deviation
+ 14
7
Ramp End SP Value
+ 34
15
Ramp End SP Value
+ 15
7
Ramp Slope
+ 35
15
Ramp Slope
+ 16
8
Soak Duration
+ 36
16
Soak Duration
+ 17
8
Soak PV Deviation
+ 37
16
Soak PV Deviation
LOOP #1
32 words
Ramp/Soak #1 32 words
V2034 = 3000 octal Pointer to R/S table
Write
0
Starting Addr out of lower V-memory range read
--
Error
1
Starting Addr out of upper V-memory range read
--
Error
2--3
Reserved for future Use
--
--
--
4
Starting Addr out of System Parameter V-memory Range
5--15
Reserved for future Use read --
---
Error --
DL405 User Manual, 4th Edition
Maintenance
Ramp/Soak Table The individual bit definitions of the Ramp/Soak Table Programming Error Flags Programming Error (Addr + 35) word are listed in the following table. Flags Read/ (Addr + 35) Bit R/S Error Flag Bit Description Bit=0 Bit=1
PID Loop Operation (DL450 Only)
V3000
Description
Page 454
8--26
PID Loop Operation (DL450 only)
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
Configure the PID Loop
Once the PID table is established in V--memory, configuring the PID loop continues with the DirectSOFT PID setup configuration dialog. You will need to check and fill in the data required to control the PID loop. Select Configure and the following dialog will appear for this process.
Select the Algorithm Type Chose either Position or Velocity. The default algorithm is Position. This is the choice for most applications which include heating and cooling loops as well as most position and level control loops. A typical velocity control will consist of a process variable such as a flow totalizer in a flow control loop. Enter the Sample Rate The main tasks of the CPU fall into categories as shown to the right. The list represents the tasks done when the CPU is in Run Mode, on each PLC scan. Note that PID loop calculations occur after the ladder logic task. The sample rate of a control loop is simply the frequency of the PID calculation. Each calculation generates a new control output value. With the DL450 CPU, you can set the sample rate of a loop from 50 mS to 99.99 seconds. Most loops do not require a fresh PID calculation on every PLC scan. Some loops may need calculating only once in 1000 scans. Enter 0.05 sec., or the sample rate of your choice, for each loop, and the CPU automatically schedules and executes PID calculations on the appropriate scans.
Read Inputs Service Peripherals
PLC Scan
Ladder Program
Calculate PID Loops Internal Diagnostics
Write Outputs
NOTE: If more than 4 loops are programmed, enter a minimum of 0.1 second.
DL405 User Manual, 4th Edition
Page 455
PID Loop Operation (DL450 only)
8--27
Select Forward/Reverse It is important to know which direction the control output will respond to the error (SP--PV), either forward or reverse. A forward (direct) acting control loop means that whenever the control output increases, the process variable will also increase. The control output of most PID loops are forward acting, such as a heating control loop. An increase in heat applied will increase the PV (temperature). A reverse acting control loop is one where an increase in the control output results in a decrease in the PV. A common example of this would be a refrigeration system, where an increase in the cooling input causes a decrease in the PV (temperature). The Transfer Mode Choose either Bumpless I or Bumpless II to provide a smooth transition of the control output from Manual Mode to Auto Mode. Choosing Bumpless I will set the SP equal to the PV when the control output is switched from Manual to Auto. If this is not desired, choose Bumpless II. The characteristics of Bumpless I and II transfer types are listed in the chart below. Note that their operation also depends on which PID algorithm you are using, the position or velocity form of the PID equation. Note that you must use Bumpless Transfer type I when using the velocity form of the PID algorithm. Transfer Select Bit
Bumpless Transfer I
0
Bumpless Transfer II
1
PID Algorithm
Manual-to-Auto Transfer Action
Auto-to-Cascade Transfer Action
Position
Forces Bias = Control Output Forces SP = PV
Forces Major Loop Output = Minor Loop PV
Velocity
Forces SP = PV
Forces Major Loop Output = Minor Loop PV
Position
Forces Bias = Control Output none
Velocity none none
PID Loop Operation (DL450 Only)
Transfer Type
The transfer type can also be selected in a RLL program by setting bit 3 of PID Mode 1, V+00 setting as shown. Bumpless Transfer I / II select
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SP/PV & Output Format This block allows you to select either Common format or Independent format. Common format is the default and is most commonly used. With this format both SP/PV and Output will have the same data structure. Both will have the same number of bits and either bipolar or unipolar. If Independent format is selected, the data structure selections will be grayed out. The reason for this is that they become independently selectable in the SP/PV and the Output dialogs. Common Data Format Select either Unipolar data format (which is positive data only) in 12 bit (0 to 4095), 15 bit (0 to 32767), or 16 bit (0 to 65535) format, or Bipolar data format, which ranges from negative to positive (--4095 to 4095 or --32767 to 32767) and requires a sign bit. Bipolar selection displays input/output as magnitude plus sign, not two’s complement. The bipolar selection is not available when 16--bit data format is selected.
DL405 User Manual, 4th Edition
Maintenance
PID Mode 1 Setting V+00
Page 456
8--28
PID Loop Operation (DL450 only)
Setpoint V+02
Σ +
--
Control Output V+05
Loop Calculation
Process Variable V+03
PID Mode 2 Setting V+01 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Data formats 00 Select data format using bits 0 and 1.
LSB
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
12 bit unipolar
0 to 0FFF (0 to 4095)
01
12 bit bipolar
0 to 0FFF, 8FFF to 8001 (0 to 4095, --4095 to --1)
10
15 bit unipolar
0 to 32767
11
15 bit bipolar
0 to 7FFF, FFF to 8001 (0 to 32767, --32767 to --1)
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
= sign bit
The data format determines the numerical interface between the PID loop and the PV sensor and the control output device. This selects the data format for both the SP and the PV. Loop Mode The feature called Independent of CPU mode in the dialog is not available in the DL450. However, the DL450 does provide the three standard control modes: Manual, Automatic, and Cascade. The sources of the three basic variables SP, PV and control output are different for each mode. In Manual Mode, the loop is not executing PID calculations (however, loop alarms are still active). With regard to the loop table, the CPU stops writing values to location V+05 (control output) for that loop. It is expected that an operator or other intelligent source is manually controlling the output by observing the PV and writing data to the control output as necessary to keep the process under control. The drawing below shows the equivalent schematic diagram of manual mode operation. Input from Operator
Manual Control Output V+05
Loop Calculation
Auto
In Automatic Mode, the loop operates normally and generates new control output values. It calculates the PID equation and writes the result in location V+05 every sample period of that loop. The equivalent schematic diagram is shown below. Input from Operator
Manual Control Output V+05
Loop Calculation
DL405 User Manual, 4th Edition
Auto
Page 457
PID Loop Operation (DL450 only)
8--29
In Cascade Mode, the loop operates just as in Automatic Mode, with one important change. The data source for the SP changes from its normal location at V+02, using the control output value from another loop (the purpose of cascading loops is covered later in this chapter). So in Auto or Manual modes, the loop calculation uses the data at V+02. In Cascade Mode, the loop calculation reads the control output from another loop’s parameter table. Another loop
Cascaded loop
Control Output V+05 Loop Calculation
Cascade Setpoint +
Normal SP V+02 Auto/Manual
Σ --
Loop Calculation
Control Output
Process Variable
As pictured below, a loop can change from one mode to another, but cannot go from Manual Mode to Cascade. This mode change is prohibited because a loop would be changing two data sources at the same time, and could cause a loss of control. Manual
Automatic
Cascade
PID Loop Operation (DL450 Only)
When the CPU is operating in the Run Mode, the normal operation of the PID loop controller is to read the loop data and perform calculations on each scan of the RLL program. When the CPU is placed in the Program Mode, the RLL program halts operation and all PID loops are automatically put into the Manual Mode. The PID parameters can then be changed if desired. Similarly, by placing the CPU in the Run mode, the PID loops are returned to the operational mode which they were previously in, i.e., Manual, Automatic and Cascade. With this selection you automatically affect the modes by changing the CPU mode.
Maintenance DL405 User Manual, 4th Edition
Page 458
8--30
PID Loop Operation (DL450 only)
Maintenance and Troubleshooting
PID Loop Operation (DL450 Only)
SP/PV Addresses An SP/PV dialog will be made available to setup how the setpoint (SP) and the process variable (PV) will be used in the loop. If this loop is the minor loop of a cascaded pair, enter that control output address in the Remote SP from Cascaded Loop Output area. It is sometimes desirable to limit the range of setpoint values allowed to be entered. To activate this feature, check the box next to Enable Limiting. This will activate the Upper and Lower fields for the values to be entered. Set the limits around the SP value to prevent an operator from entering a setpoint value outside of a safe range. The Square root box is only checked for certain PID loops, such as a flow control loop. The Auto Transfer From I/O module will be grayed out and not available for use by the DL450.
NOTE: Auto Transfer From I/O module is not available in the DL450 PLC at this time, but will be available in the future. If the Auto Transfer From I/O module is selected, an error message (shown below) will appear.
NOTE: The SP/PV dialog can be left as it first appears for basic PID operations.
DL405 User Manual, 4th Edition