NB: This manual documents a 20+ year old version of EPICS, see here for the EPICS 7 Record Reference documentation.
EPICS Record Reference Manual
There are three terms of the PID expression: the proportional, the integral, and the derivative. Using the gain that exists for each of these terms, the user can weight each contribution according to the characteristics of the controlled variable.
The fields in this record fall into several categories:
scan parameters
controlled variable
setpoint parameters
expression parameters
operator display parameters
alarm parameters
monitor parameters
run-time parameters
These fields are listed in Scan Fields, Chapter 2, 2. In addition, Scanning Specification, Chapter 1, 1, explains how these fields are used.
The minimum delta time field (MDT) is a processing field particular to the PID record. It can be configured by the user or modified at run-time. It contains a floating point value which represents the minimum amount of time between record processing. If the amount of time between the last time the record was processed an the current time is less than MDT, than the record is not processed. If MDT is left at its default value (0), the minimum delta will be equal to one clock tick.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
MDT | Minimum Delta Time | FLOAT | Yes | 0 | Yes | Yes | No | No |
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
CVL | Controlled Value Location (an input link) | INLINK | Yes | 0 | No | No | N/A | No |
CVAL | Value of controlled variable | FLOAT | No | 0 | Yes | YesNo | No | No |
The SMSL field has two choices: supervisory
and closed_loop
. When supervisory
, the setpoint, i.e., VAL, can be set via database access. When closed_loop
, the setpoint value is retrieved from the link specified in STPL, which must be a database link. See Address Specification, Chapter 1, 2, for information on how to specify database links. STML can also be a constant in which case VAL is set equal to the constant value when the record is initialized.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
STPL | Setpoint Location (an input link) | INLINK | Yes | 0 | No | No | N/A | No |
SMSL | Setpoint Mode select. | GBLCHOICE | Yes | 0 | Yes | Yes | No | No |
VAL | Setpoint value | FLOAT | No | 0 | Yes | Yes | Yes | Yes |
where
The terms KP, KI, and KD are the only terms configured by the user. These terms represent the gain for the proportional (KP), integral (KI) and the derivative (KD). A field exists for each of these terms (the KP, KI, and KD fields). KP should be configured according to the characteristics of the controlled variable; KI should be set equal to the number of times that the integral contribution repeats the proportional contribution; and KD should equal the number of minutes until the derivative contribution repeats the proportional contribution.
The PID record calculates the other terms of the expression:
n
delM(n)
and the other parts of the expression are held in several different run-time fields, which are not configurable prior to run-time, nor modifiable at run-time, but can be accessed so that their values can be used. See Section 9, Run-time Parameters, in this chapter for more information on those fields.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
KP | Proportional Gain | FLOAT | Yes | 0 | Yes | Yes | No | No |
KI | Integral Gain, in repeats per minute. | FLOAT | Yes | 0 | Yes | Yes | No | No |
KD | Derivative Gain, in repeats per minute | FLOAT | Yes | 0 | Yes | Yes | No | No |
EGU is a string of up to 16 characters describing the units of PID's manipulated values measures. It is retrieved by the get_units
record support routine. It must be configured by the user if at all.
The HOPR and LOPR fields set the upper and lower display limits for the VAL, HIHI, HIGH, LOW, LOLO, VAL, and CVAL fields.
The PREC field determines the floating point precision with which to display VAL and CVAL. It is used whenever the get_precision
record support routine is called.
See Chapter 2, Fields Common to All Record Types, for more on the record name (NAME) and description (DESC) fields.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
EGU | Engineering Units | STRING [16] | Yes | null | Yes | Yes | No | No |
HOPR | High Operating Range | FLOAT | Yes | 0 | Yes | Yes | No | No |
LOPR | Low Operating Range | FLOAT | Yes | 0 | Yes | Yes | No | No |
PREC | Display Precision | SHORT | Yes | 0 | Yes | Yes | No | No |
NAME | Record Name | STRING [29] | Yes | 0 | Yes | No | No | No |
DESC | Description | STRING [29] | Yes | Null | Yes | Yes | No | No |
The limit alarms trigger alarms on the VAL field. They are configured by the user in the HIHI, LOLO, HIGH, and LOW fields using floating point values. For each of these fields, there is a corresponding severity field which can be either NO ALARM, MINOR, or MAJOR. See Alarm Specification, Chapter 1, 4, for a complete explanation of alarms and these fields.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
HIHI | Hihi Alarm Limit | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
LOLO | High Alarm Limit | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
HIGH | Low Alarm Limit | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
LOW | Lolo Alarm Limit | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
HHSV | Hihi Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
LLSV | High Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
HSV | Low Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
LSV | Lolo Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
HYST | Alarm Deadband | DOUBLE | Yes | 0 | Yes | Yes | No | No |
The ODEL field specifies the hysteresis factor for the DM field, the field which holds the manipulated value. Unless the current value of DM is greater than the amount which the user specifies in this field, no monitors will be invoked. If zero, anytime DM is greater than zero, a monitor is triggered. If -1, each time the record is processed, a monitor is triggered. Note that when monitors are called for DM, they are also called for the following fields which comprise the PID expression: P, I, D, CT, DT, ERR, and DERR.
See Monitor Specification, Chapter 1, 5, for a complete explanation of monitors.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
ADEL | Archive Deadband | DOUBLE | Yes | 0 | Yes | Yes | No | No |
MDEL | Monitor, i.e. value change, Deadband | DOUBLE | Yes | 0 | Yes | Yes | No | No |
ODEL | Output deadband | FLOAT | Yes | 0 | Yes | Yes | No | No |
The DM field contains the change in manipulated value, the result of the PID expression (delM(n)). It is an increment which will usually be accessed by the desired output link (DOL) of an analog output record. Since its value represents an increment, the OIF field of the analog output record should be set to Incremental
. There is no output field with which the PID record can itself send output.
The P, I, D, CT, DT, ERR, and DERR fields are used to calculate the PID expression. They are not configurable prior to, nor modifiable during, run-time, but may be of interest when fine tuning the gains of each contribution (KP, KI, KD). The following lists the fields as they relate to the expression:
En
Error at current sampling (VAL-CVAL).
En - En-1
Difference between current error and error at last sampling.
KP * (En - (En-1))
En * dTn * KI
Kp * Kd * (err/dt(n) - derr/dt(n-1))
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
DM | Change in Manipulated Value | FLOAT | No | 0 | Yes | No | Yes | No |
ODM | Old DM. | FLOAT | No | 0 | Yes | No | Yes | No |
P | Proportional contribution to DM. | FLOAT | No | 0 | Yes | No | Yes | No |
I | Integral contribution to DM. | FLOAT | No | 0 | Yes | No | Yes | No |
D | Derivative contribution to DM. | FLOAT | No | 0 | Yes | No | Yes | No |
CT | Clock ticks when previous process occurred. | ULONG | No | 0 | Yes | No | Yes | No |
DT | Time difference in seconds between processing steps. | FLOAT | No | 0 | Yes | No | Yes | No |
ERR | Current error (VAL - CVAL). | FLOAT | No | 0 | Yes | No | Yes | No |
DERR | Delta Error | FLOAT | No | 0 | Yes | No | Yes | No |
LALM | Value when last monitors for alarm were triggered | FLOAT | No | 0 | Yes | No | No | No |
ALST | Value when last monitors for archiver were triggered | FLOAT | No | 0 | Yes | No | No | No |
MLST | Value when last monitors for value changes were triggered | FLOAT | No | 0 | Yes | No | No | No |
upper_disp_limit = hopr
lower_disp_limit = lopr
upper_ctrl_limit = hopr
lower_ctrl_limit = lopr
upper_alarm_limit = hihi
upper_warning_limit = high
lower_warning_limit = low
lower_alarm_limit = lolo
Generated with Harlequin WebMaker