NB: This manual documents a 20+ year old version of EPICS, see here for the EPICS 7 Record Reference documentation.
EPICS Record Reference Manual
scan parameters
read parameters
expression parameters
output parameters
operator display parameters
alarm parameters
monitor parameters
run-time parameters
I/O Intr
.dbPuts
. These fields cannot be hardware addresses. In addition, the Calcout record contains the INAV, INBV, . . . INLV fields which indicate the status of the link fields, for example, whether or not the specified PV was found and a link to it established. See Section 6, Operator Display Parameters for an explanation of these fields.See Address Specification, Chapter 1, 2, for information on how to specify database links.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor |
---|---|---|---|---|---|---|---|
INPA | Input Link A | INLINK | Yes | 0 | No | No | N/A |
INPB | Input Link B | INLINK | Yes | 0 | No | No | N/A |
INPC | Input Link C | INLINK | Yes | 0 | No | No | N/A |
INPD | Input Link D | INLINK | Yes | 0 | No | No | N/A |
INPE | Input Link E | INLINK | Yes | 0 | No | No | N/A |
INPF | Input Link F | INLINK | Yes | 0 | No | No | N/A |
INPG | Input Link G | INLINK | Yes | 0 | No | No | N/A |
INPH | Input Link H | INLINK | Yes | 0 | No | No | N/A |
INPI | Input Link I | INLINK | Yes | 0 | No | No | N/A |
INPJ | Input Link J | INLINK | Yes | 0 | No | No | N/A |
INPK | Input Link K | INLINK | Yes | 0 | No | No | N/A |
INPL | Input Link L | INLINK | Yes | 0 | No | No | N/A |
The range of expressions supported by the calculation record are separated into operands, algebraic operators, trigonometric operators, relational operators, logical operators, parentheses and commas, and the conditional '?:' operator. The expression can consist of any of these operators, as well as any of the values from the input links which are the operands.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
CALC | Calculation | STRING[36] | Yes | 0 | Yes | Yes | Yes | No |
VAL | Value | DOUBLE | No | 0 | Yes | Yes | Yes | No |
RPCL | Reverse Polish | NOACCESS | No | 0 | No | No | N/A | No |
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
A | Input Value A | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
B | Input Value B | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
C | Input Value C | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
D | Input Value D | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
E | Input Value E | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
F | Input Value F | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
G | Input Value G | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
H | Input Value H | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
I | Input Value I | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
J | Input Value J | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
K | Input Value K | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
L | Input Value L | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
The comma is supported when used to separate the arguments of a binary function.
(condition)? True result : False result
A + B + 10
(A + B) < (C + D)
(A+B)<(C+D)?E:F+L+10
(A+B)<(C+D)?E
A&B
Every Time
-- write output every time record is processed.
On Change
-- write output every time VAL changes, i.e., every time the result of the expression changes.
When Zero
-- when record is processed, write output if VAL is zero.
When Non-zero
-- when record is processed, write output if VAL is non-zero.
Transition to Zero
-- when record is processed, write output only if VAL is zero and last value was non-zero.
Transition to Non-zero
-- when record is processed, write output only if VAL is non-zero and last value was zero.
Use CALC
or Use OCAL
. If Use CALC
is specified, when the record writes its output it will write the result of the expression in the CALC record, that is, it will write the value of the VAL field. If Use OCAL
is specified, the record will instead write the result of the expression in the OCAL field, which is contained in the OVAL field. The OCAL field is exactly like the CALC field and has the same functionality: it can contain the string representation of an expression which is evaluated at run-time. Thus, if necessary, the record can use the result of the CALC expression to determine if data should be written and can use the result of the OCAL expression as the data to write.
If the OEVT field specifies a non-zero integer and the condition in the OOPT field is met, the record will post a corresponding event. If the ODLY field is non-zero, the record pauses for the specified number of seconds before executing the OUT link or posting the output event. During this waiting period the record is "active" and will not be processed again until the wait is over. The field DLYA is equal to 1 during the delay period. The resolution of the delay entry is 1/60 of a second (it uses the VxWorks tickLib
).
The IVOA field specifies what action to take with the OUT link if the Calcout record enters an INVALID alarm status. The options are Continue normally
, Don't drive outputs
, and Set output to IVOV
. If the IVOA field is Set output to IVOV
, the data entered into the IVOV field is written to the OUT link if the record alarm severity is INVALID.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
OUT | Output Specification | OUTLINK | Yes | 0 | Yes | Yes | N/A | No |
OOPT | Output Execute Option | RECCHOICE | Yes | 0 | Yes | Yes | No | No |
DOPT | Output Data Option | RECCHOICE | Yes | 0 | Yes | Yes | No | No |
OCAL | Output Calculation | STRING[36] | Yes | Null | Yes | Yes | No | No |
OVAL | Output Value | DOUBLE | No | 0 | Yes | Yes | Yes | Yes |
OEVT | Event To Issue | SHORT | Yes | 0 | Yes | Yes | No | No |
ODLY | Output Execution Delay | FLOAT | Yes | 0 | Yes | Yes | No | No |
IVOV | Invalid Output Action | GBLCHOICE | Yes | 0 | Yes | Yes | No | No |
IVOA | Invalid Output Value | DOUBLE | Yes | 0 | Yes | Yes | No | No |
The EGU field contains a string of up to 16 characters which is supplied by the user and which describes the values being operated upon. The string is retrieved whenever the routine get_units
is called. The EGU string is solely for an operator's sake and does not have to be used.
The HOPR and LOPR fields only refer to the limits of the VAL, HIHI, HIGH, LOW, and LOLO fields. PREC controls the precision of the VAL field.
The INAV-INLV fields indicate the status of the link to the PVs specified in the INPA-INPL fields, respectively. The field can have three possible values:
Ext PV NC
-- the PV wasn't found on this IOC and a Channel Access link hasn't been established.
Ext PV OK
-- the PV wasn't found on this IOC and a Channel Access link has been established.
Local PV
-- the PV was found on this IOC.
Constant
-- the corresponding link field is a constant.
The CLCV and OLCV fields indicate the validity of the expression in the CALC and OCAL fields, respectively. If the expression is invalid, the field is set to one.
The DLYA field is set to one during the delay interval specified in ODLY.
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 |
PREC | Display Precision | SHORT | Yes | 0 | 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 |
INAV | Link Status of INPA | RECCHOICE | No | 1 | Yes | No | No | No |
INBV | Link Status of INPB | RECCHOICE | No | 1 | Yes | No | No | No |
INCV | Link Status of INPC | RECCHOICE | No | 1 | Yes | No | No | No |
INDV | Link Status of INPD | RECCHOICE | No | 1 | Yes | No | No | No |
INEV | Link Status of INPE | RECCHOICE | No | 1 | Yes | No | No | No |
INFV | Link Status of INPF | RECCHOICE | No | 1 | Yes | No | No | No |
INGV | Link Status of INPG | RECCHOICE | No | 1 | Yes | No | No | No |
INHV | Link Status of INPH | RECCHOICE | No | 1 | Yes | No | No | No |
INIV | Link Status of INPI | RECCHOICE | No | 1 | Yes | No | No | No |
INJV | Link Status of INPJ | RECCHOICE | No | 1 | Yes | No | No | No |
INKV | Link Status of INPK | RECCHOICE | No | 1 | Yes | No | No | No |
INLV | Link Status of INPL | RECCHOICE | No | 1 | Yes | No | No | No |
OUTV | OUT PV Status | RECCHOICE | No | 0 | Yes | No | No | No |
CLCV | CALC Valid | LONG | No | 0 | Yes | Yes | No | No |
OCLV | OCAL Valid | LONG | No | 0 | Yes | Yes | No | No |
DLYA | Output Delay Active | USHORT | No | 0 | Yes | No | No | No |
NAME | Record Name | STRING [29] | Yes | 0 | Yes | No | No | No |
DESC | Description | STRING [29] | Yes | Null | Yes | Yes | No | No |
The following alarm parameters which are configured by the user define the limit alarms for the VAL field and the severity corresponding to those conditions.
The HYST field defines an alarm deadband for each limit. See Alarm Specification, Chapter 1, 4, for a complete explanation of alarms and these fields. Alarm Fields, Chapter 2, 3, lists other fields related to a alarms that are common to all record types.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
HIHI | Hihi Alarm Limit | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
HIGH | High Alarm Limit | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
LOW | Low Alarm Limit | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
LOLO | Lolo Alarm Limit | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
HHSV | Severity for a Hihi Alarm | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
HSV | Severity for a High Alarm | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
LSV | Severity for a Low Alarm | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
LLSV | Severity for a Lolo Alarm | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
HYST | Alarm Deadband | DOUBLE | Yes | 0 | Yes | Yes | No | No |
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 |
The LALM field is used to implement the hysteresis factor for the alarm limits.
The LA-LL fields are used to decide when to trigger monitors for the corresponding fields. For instance, if LA does not equal the value for A, monitors for A are triggered. The MLST and MLST fields are used in the same manner for the VAL field.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
LALM | Last Alarmed Value | DOUBLE | No | 0 | Yes | No | No | No |
ALST | Archive Last Value | DOUBLE | No | 0 | Yes | No | No | No |
MLST | Monitor Last Value | DOUBLE | No | 0 | Yes | No | No | No |
LA | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LB | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LC | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LD | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LE | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LF | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LG | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LH | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LI | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LJ | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LK | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
LL | Previous Input Value for A | DOUBLE | No | 0 | Yes | No | No | No |
A routine postfix is called to convert the infix expression in CALC and OCAL to reverse polish notation. The result is stored in RPCL and ORPC, respectively.
upper_alarm_limit = HIHI
upper_warning_limit = HIGH
lower_warning_limit = LOW
lower_alarm_limit = LOLO
process()
routine implements the following algorithm:
execOutput()
routine below.
Generated with Harlequin WebMaker