EPICS Record Reference Manual
scan parameters
read parameters
subroutine connection parameters
operator display parameters
alarm parameters
monitor parameters
run-time parameters.
The input links can be either channel access or database links, or constants. When constants, the corresponding value field for the link is initialized with the constant value and the field's value can be changed at run-time via dbPuts. Otherwise, the values for (A-F) are fetched from the input links when the record is processed. See Address Specification, Chapter 1, 2, for information on specifying links.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
INPA | Input A | INLINK | Yes | 0 | No | No | N/A | No |
INPB | Input B | INLINK | Yes | 0 | No | No | N/A | No |
INPC | Input C | INLINK | Yes | 0 | No | No | N/A | No |
INPD | Input D | INLINK | Yes | 0 | No | No | N/A | No |
INPE | Input E | INLINK | Yes | 0 | No | No | N/A | No |
INPF | Input F | INLINK | Yes | 0 | No | No | N/A | No |
INPG | Input G | INLINK | Yes | 0 | No | No | N/A | No |
INPH | Input H | INLINK | Yes | 0 | No | No | N/A | No |
INPI | Input F | INLINK | Yes | 0 | No | No | N/A | No |
INPJ | Input H | INLINK | Yes | 0 | No | No | N/A | No |
INPK | Input K | INLINK | Yes | 0 | No | No | N/A | No |
INPL | Input L | INLINK | Yes | 0 | No | No | N/A | No |
A | Value for A | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
B | B Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
C | C Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
D | D Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
E | E Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
F | F Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
G | G Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
H | H Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
I | I Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
J | J Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
K | K Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
L | L Value | DOUBLE | No | 0 | Yes | Yes/No | Yes | Yes |
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
INAM | Initialization Name | STRING [16] | Yes | Null | Yes | No | No | No |
SNAM | Subroutine Name | STRING [16] | Yes | Null | Yes | No | No | No |
EGU is a string of up to 16 characters that could describe any units
used by the subroutine record. It is retrieved by the get_units
record support routine.
The HOPR and LOPR fields set the upper and lower display limits for the
VAL, A-L, LA-LL, HIHI, LOLO, LOW, and HIGH fields. Both the get_graphic_double
and get_control_double
record support routines retrieve
these fields.
The PREC field determines the floating point precision with which to
display VAL. 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 BRSV field is where the user can set the alarm severity in case the subroutine returns a negative value. 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 | Hihi Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
HSV | High Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
LSV | Low Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
LLSV | Lolo Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
BRSV | Severity for a subroutine return value less than 0. | 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 |
VAL should be set by the subroutine. SADR holds the subroutine address and is set by the record processing routine. STYP, the subroutine symbol type, is also set by the record processing routine.
The rest of these fields--LALM, ALST, MLST, and the LA-LL fields--are used to implement the monitors. For example, when LA is not equal to A, the value-change monitors are called for that field.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
VAL | Value Field | DOUBLE | No | 0 | Yes | Yes | Yes | Yes |
SADR | Subroutine Address | NOACCESS | No | 0 | No | No | No | |
STYP | Subroutine Symbol Type | SHORT | No | 0 | Yes | No | No | No |
LALM | Last Alarm Monitor Trigger Value | DOUBLE | No | 0 | Yes | No | No | No |
ALST | Last Archiver Monitor Trigger Value | DOUBLE | No | 0 | Yes | No | No | No |
MLST | Last Value Change Monitor Trigger Value | DOUBLE | No | 0 | Yes | No | No | No |
LA | Last A Value | DOUBLE | No | 0 | Yes | No | No | No |
LB | Last B Value | DOUBLE | No | 0 | Yes | No | No | No |
LC | Last C Value | DOUBLE | No | 0 | Yes | No | No | No |
LD | Last D Value | DOUBLE | No | 0 | Yes | No | No | No |
LE | Last E Value | DOUBLE | No | 0 | Yes | No | No | No |
LF | Last F Value | DOUBLE | No | 0 | Yes | No | No | No |
LG | Last G Value | DOUBLE | No | 0 | Yes | No | No | No |
LH | Last H Value | DOUBLE | No | 0 | Yes | No | No | No |
LI | Last I Value | DOUBLE | No | 0 | Yes | No | No | No |
LJ | Last J Value | DOUBLE | No | 0 | Yes | No | No | No |
LK | Last K Value | DOUBLE | No | 0 | Yes | No | No | No |
LL | Last L Value | DOUBLE | No | 0 | Yes | No | No | No |
If an initialization subroutine is defined, it is located and called.
The processing subroutine is located and its address and type stored in SADR and STYP.
recGblGetPrec()
.upper_alarm_limit = HIHI
upper_warning_limit = HIGH
lower_warning_limit = LOW
lower_alarm_limit = LOLO
#include <vxWorks.h> #include <types.h> #include <stdioLib.h> #include <dbDefs.h> #include <subRecord.h> #include <dbCommon.h> #include <recSup.h> long subInit(psub) struct subRecord *psub; { printf("subInit was called\n"); return(0); } long subProcess(psub) struct subRecord *psub; { psub->val++; return(0); }
#include <vxWorks.h> #include <types.h> #include <stdioLib.h> #include <wdLib.h> #include <callback.h> #include <dbDefs.h> #include <dbAccess.h> #include <subRecord.h> /* control block for callback*/ struct callback { CALLBACK callback; struct dbCommon *precord; WDOG_ID wd_id; }; void myCallback(pcallback) struct callback *pcallback; { struct dbCommon *precord=pcallback->precord; struct rset *prset=(struct rset *)(precord->rset); dbScanLock(precord); (*prset->process)(precord); dbScanUnlock(precord); } long subInit(psub) struct subRecord *psub; { struct callback *pcallback; pcallback = (struct callback *)(calloc(1,sizeof(struct callback))); psub->dpvt = (void *)pcallback; callbackSetCallback(myCallback,pcallback); pcallback->precord = (struct dbCommon *)psub; pcallback->wd_id = wdCreate(); printf("subInit was called\n"); return(0); } long subProcess(psub) struct subRecord *psub; { struct callback *pcallback=(struct callback *)(psub->dpvt); int wait_time; /* sub.inp must be a CONSTANT*/ if(psub->pact) { psub->val++; if(psub->b) printf("%s subProcess Completed\n",psub->name); return(0); } else { wait_time = (long)(psub->a * vxTicksPerSecond); if(wait_time<=0){ if (psub->b) printf("%s subProcess synchronous processing\n",psub->name); psub->pact = TRUE; return(0); } if (psub->b){ callbackSetPriority(psub->prio,pcallback); printf("%s Starting asynchronous processing\n",psub->name); wdStart(pcallback->wd_id,wait_time,callbackRequest,(int)pcallback); return(1); } } return(0); }
Generated with Harlequin WebMaker