EPICS Record Reference Manual
The multi-bit binary output fields fall into the following categories:
closed_loop
,
the desired output is retrieved from the link specified in the desired
output (DOL) field--which can specify either a database or channel
access link--and placed into the VAL field. When set to supervisory
,
the DOL field is ignored and the current value of VAL is simply
written. VAL can be changed via dpPuts at run-time when OMSL is supervisory
.
The DOL field can also be a constant, in which case the VAL field is
initialized to the constant value. If DOL is a constant, OMSL cannot be
set to closed_loop
.
The VAL field itself usually consists of an index that specifies one of
the states. The actual output written is the value of RVAL, which is
converted from VAL following the routine explained in the next section.
However, records that use the Soft Channel
device support
module write the VAL field's value without any conversion.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
OMSL | Output Mode Select | GBLCHOICE | Yes | 0 | Yes | Yes | No | No |
DOL | Desired Output Location (an Input Link) | INLINK | Yes | 0 | No | No | N/A | No |
VAL | Value Field | ENUM | No | 0 | Yes | Yes | Yes | Yes |
For records that write their values to hardware devices, the OUT output
link must specify the address of the I/O card, and the DTYP field must
specify the corresponding device support module. Be aware that the
address format differs according to the I/O bus used. See Address
Specification, Chapter 1, 2, for information on the format of
hardware addresses. The user can see a list of the device support
modules currently supported at the user's local site by using the dbst
utility in R3.13.
For mbbo records that write to hardware, the value written to the output location is the value contained in RVAL, which is converted from VAL, VAL containing an index of one of the 16 states (0-15). RVAL is then set to the corresponding state value, the value in one of the fields ZRVL through FFVL. Then this value is shifted left according to the number in the SHFT field so that the value is in the correct position for the bits being used (the SHFT value is set by device support and is not configurable by the user).
The state value fields ZRVL through FFVL must be configured by the user before run-time. When the state values are not defined, the states defined (SDEF) field is set to FALSE at initialization time by the record routines. When SDEF is FALSE, then the record processing routine does not try to find a match, RVAL is set equal to VAL, the bits are shifted using the number in SHFT, and the value is written thus.
If the OUT output link specifies a database link, channel access link,
or constant, then the DTYP field must specify either one of the two soft
device support modules--Soft Channel
or Raw
Soft
Channel
. Soft
Channel
writes the value
of VAL to the output link, without any conversion, while Raw Soft
Channel
writes the value from RVAL after it has undergone the
above conversion. See Address
Specification, Chapter 1, 2, for information on specifying
links.
Note also that when a string is retrieved as the desired output, a
record support routine is provided (put_enum_str
) that will
set check to see if the string matches one of the strings in the ZRST
through FFST fields. If a match is found, RVAL is set equal to the
corresponding state value of that string.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
OUT | Output Link | OUTLINK | Yes | 0 | No | No | N/A | No |
DTYP | Device Type | DEVCHOICE | Yes | 0 | Yes | No | No | |
RVAL | Raw Data Value | ULONG | No | 0 | Yes | Yes | Yes | Yes |
SHFT | Shift | USHORT | No | 0 | Yes | No | No | No |
SDEF | States Defined? | SHORT | No | 0 | Yes | No | No | No |
ZRVL | Zero Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
ONVL | One value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
TWVL | Two Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
THVL | Three Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
FRVL | Four Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
FVVL | Five Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
SXVL | Six Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
SVVL | Seven Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
EIVL | Eight value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
NIVL | Nine Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
TEVL | Ten Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
ELVL | Eleven Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
TVVL | Twelve Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
TTVL | Thirteen Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
FTVL | Fourteen Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
FFVL | Fifteen Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
ZRST | Zero String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
ONST | One String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
TWST | Two String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
THST | Three String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
FRST | Four String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
FVST | Five String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
SXST | Six String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
SVST | Seven String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
EIST | Eight String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
NIST | Nine String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
TEST | Ten String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
ELST | Eleven String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
TVST | Twelve String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
TTST | Thirteen String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
FTST | Fourteen String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
FFST | Fifteen String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
get_enum_str
and get_enum_strs
record routines retrieve these strings
for the operator. Get_enum_str
gets the string
corresponding to the value set in VAL, and get_enum_strs
retrieves all the strings.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 |
---|---|---|---|---|---|---|---|---|
ZRST,...,FFST | Zero String, One String, ... | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
NAME | Record Name | STRING [29] | Yes | 0 | Yes | No | No | |
DESC | Description | STRING [29] | Yes | Null | Yes | Yes | No | No |
The IVOA field specifies an action to take from a number of possible
choices when the INVALID alarm is triggered. The IVOV field contains a
value to be written once the INVALID alarm has been triggered if Set
output to IVOV
has been chosen in the IVOA field. The severity
of the INVALID alarm is not configurable by the user.
The state alarms are configured in the below severity fields. These fields have the usual possible values for severity fields: NO ALARM, MINOR, and MAJOR.
The unknown state severity field (UNSV), if set to MINOR or MAJOR, triggers an alarm when the record support routine cannot find a matching value in the state value fields for VAL or when VAL is out of range.
The change of state severity field (COSV) triggers an alarm when the record's state changes, if set to MAJOR or MINOR.
The state severity (ZRSV-FFSV) fields, when set to MAJOR or MINOR, trigger an alarm when VAL equals the corresponding field.
See Alarm Specification, Chapter 1, 4, for a complete explanation of discrete alarms and these fields. See Invalid Alarm Output Action, Chapter 3, 3.5, for an explanation of the IVOA and IVOV 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 |
---|---|---|---|---|---|---|---|---|
UNSV | Unknown State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
COSV | Change of State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
IVOA | Invalid Alarm Output Action | GBLCHOICE | Yes | 0 | Yes | Yes | No | No |
IVOV | Invalid Alarm Output Value, in eng. units | DOUBLE | Yes | 0 | Yes | Yes | No | No |
ZRSV | 0 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
ONSV | 1 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
TWSV | 2 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
THSV | 3 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
FRSV | 4 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
FVSV | 5 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
SXSV | 6 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
SVSV | 7 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
EISV | 8 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
NISV | 9 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
TESV | 10 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
ELSV | 11 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
TVSV | 12 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
TTSV | 13 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
FTSV | 14 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
FFSV | 15 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
MASK is used by device support routine to read the hardware register. Record support sets low order of MASK the number of bits specified in NOBT. Device support can shift this value.
The LALM field implements the change of state alarm severity by holding the value of VAL when the previous change of state alarm was issued.
MLST holds the value when the last monitor for value change was triggered.
SDEF is used by record support to save time if no states are defined; it is used for converting VAL to RVAL.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
NOBT | Number of Bits | SHORT | Yes | 0 | Yes | No | No | |
ORAW | Old Raw Data | ULONG | No | 0 | Yes | No | No | No |
MASK | Mask | ULONG | No | 0 | Yes | No | No | No |
LALM | Last Alarmed | USHORT | No | 0 | Yes | No | No | No |
MLST | Monitor Last | USHORT | No | 0 | Yes | No | No | No |
SDEF | States Defined? | SHORT | No | 0 | Yes | No | No | No |
The following fields are used to operate the mbbo record in the simulation mode. See Chapter 3, Fields Common to Many Record Types, for more information on the simulation mode fields.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
SIOL | Simulation Value Location | INLINK | Yes | 0 | No | No | N/A | No |
SVAL | Simulation Value | DOUBLE | No | 0 | Yes | Yes | No | No |
SIML | Simulation Mode Location | INLINK | Yes | 0 | No | No | N/A | No |
SIMM | Simulation Mode | GBLCHOICE | No | 0 | Yes | Yes | No | No |
SIMS | Simulation Mode Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | No |
This routine next checks to see that device support is available. The routine next checks to see if the device support write routine is defined. If either device support or the device support write routine does not exist, an error message is issued and processing is terminated.
If DOL is a constant, then VAL is initialized to its value and UDF is set to FALSE.
MASK is cleared and then the NOBT low order bits are set.
If device support includes init_record, it is called.
init_common is then called to determine if any states are defined. If states are defined, SDEF is set to TRUE.
If device support returns success, VAL is then set from RVAL and UDF is set to FALSE.
Name | Summary | Description |
---|---|---|
PACT | Processing Active | See Chapter 2, Fields Common to All Record Types for an explanation of these fields. |
DPVT | Device Private | |
NSEV | New Alarm Severity | |
NSTA | New Alarm Status | |
NOBT | Number of Bits | Number of hardware bits accessed. They must be consecutive. |
OUT | Output Link | This field is used by the device support routines to locate its output. |
RVAL | Raw data value. | This is the value to be written to OUT. |
RBV | Read Back Value | It is the responsibility of the device support modules to set this field. |
MASK | Mask | This is a mask used to read the hardware. Record support sets the low order NOBT bits. The device support routine can shift the bits. The device support routine should perform the shift in init_record. |
SHFT | Shift | This can be set by the device support module at init_record time. |
report(FILE fp, paddr)Not currently used.
init()This routine is called once during IOC initialization.
init_record(precord)This routine is optional. If provided, it is called by the record support init_record routine. If MASK is used, it should be shifted if necessary and SHFT given a value.
get_ioint_info(int cmd,struct dbCommon *precord,IOSCANPVT *ppvt)This routine is called by the ioEventScan system each time the record is added or deleted from an I/O event scan list. cmd has the value (0,1) if the record is being (added to, deleted from) an I/O event list. It must be provided for any device type that can use the ioEvent scanner.
write_mbbo(precord)This routine must output a new value. It returns the following values:
Soft Channel
module writes the current value of VAL.If the OUT link type is PV_LINK, then dbCaAddInlink is called by init_record.
write_mbbo calls recGblPutLinkValue to write the current value of VAL. See Soft Output, Chapter 3, 3.2, for more information.
Generated with Harlequin WebMaker