EPICS Record Reference Manual
Two soft device modules--Soft Channel
and Raw Soft
Channel
--are provided to obtain input via database or channel
access links or via dbPutField
or dbPutLink
requests. The first module reads values directly into VAL. The second
reads values into RVAL. These values are then converted just like raw
values obtained from hardware device support modules. If soft device
support with a constant INP link is chosen, then the VAL field can be
modified via dbPuts.
The fields fall into the following groups of parameters:
Raw Soft Channel
device
support, the device support routines will return the value of this
device into the RVAL field. Unless the LINR conversion field specifies
NO CONVERSION, the proper conversion algorithm will be performed and the
resulting value will be placed in the VAL field.A further explanation of these fields follows.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
VAL | Value Field | DOUBLE | No | 0 | Yes | Yes | Yes | Yes |
INP | Input Link | INLINK | Yes | 0 | No | No | N/A | No |
DTYP | Device Type | DEVCHOICE | Yes | 0 | Yes | No | No | |
LINR | Type of Conversion | CVTCHOICE | Yes | 0 | Yes | Yes | No | Yes |
RVAL | Raw Value | LONG | No | 0 | Yes | Yes | Yes | Yes |
ROFF | Raw Value Offset | LONG | No | 0 | Yes | Yes | No | Yes |
EGUF | Engineering Units Full | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
EGUL | Engineering Units Low | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
AOFF | Adjustment Offset | FLOAT | Yes | 0 | Yes | Yes | No | Yes |
ASLO | Adjustment Slope | FLOAT | Yes | 1 | Yes | Yes | No | Yes |
ESLO | Slope for Linear Conversions | DOUBLE | No | 1 | Yes | No | No | No |
SMOO | Smoothing Factor | FLOAT | Yes | 0 | Yes | Yes | No | No |
dbst
utility in R3.13.The INP field can also specify a constant value, a channel access link, or a database link. When configured with a constant value, the record's VAL field is initialized with the value given to the field and the VAL field can be changed using dbPuts. See Address Specification, Chapter 1, 2, for information on database and channel access links.
When INP is a constant, a database link, or a channel access link either
one of two soft device support modules, Raw Soft Channel
or Soft Channel
, must be specified in DTYP field. See Section 10.3, Device Support For Soft Records,
in this chapter for more on how these device support modules work.
LINEAR
, NO
CONVERSION
, or the name of a breakpoint table, such as typeKdegC
.
LINEAR specifies a linear conversion; NO CONVERSION, no conversion at
all; and a breakpoint table, a breakpoint conversion. Note that the
EGUF, EGUL, and ESLO fields are not used when a breakpoint table or NO
CONVERSION is specified.
ROFF | Computed by the device
support routines It is used by all records except those that use Soft
Channel . |
EGUF | The user must calculate these fields when configuring the database. They are used to calculate the value of ESLO. See Conversion Specification, Chapter 1, 3, for more information on how to calculate these fields. The are used only if LINR specifies LINEAR. |
EGUL | |
AOFF | Configured by the user, and used for all
records but Soft Channel records. |
ASLO | |
ESLO | Computed by device support using EGUF and EGUL. Used if
LINR specifies LINEAR . |
SMOO | A value between 1 and 0 specified by the user, with 0
meaning no smoothing and 1 meaning ultimate smoothing (in fact, the data
value will never change). See Conversion
Specification, Chapter 1, 3, for more information on what this
field does. It is used for all records but Soft Channel
records. |
The record processing routine performs the following algorithm for all
records except those that use the Soft Channel
device
support routine. Be aware that step 3 is performed only when the record
specifies LINEAR:
LINEAR
, the raw value is
converted via the equation:
The next step is to apply the following smoothing algorithm:
For a complete explanation on conversion parameters, see Conversion
Specification, Chapter 1, 3. To see how Raw Soft Channel
device support uses these parameters, see Section
10.3, Device Support For Soft Records, in this chapter.
get_units
record support routine.
The HOPR and LOPR fields set the upper and lower display limits for the
VAL, HIHI, HIGH, LOW, and LOLO 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 | |
DESC | Description | STRING [29] | Yes | Null | Yes | Yes | No | No |
The limit alarms are configured by the user in the HIHI, LOLO, HIGH, and LOW fields using numerical 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. Alarm Fields, Chapter 2, 3, lists other fields related to 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 |
LOLO | Lolo 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 |
HHSV | Hihi Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
LLSV | Lolo 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 |
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 ORAW field is used to decide if monitors should be triggered for RVAL when monitors are triggered for VAL. The LALM, MLST, and ALST fields are used to implement the hysteresis factors for monitors on the VAL field.
The PBRK field contains a pointer to the breakpoint table specified in the LINR field (if any). The LBRK field indicates the name of the last breakpoint table used (if any)
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
ORAW | Old Raw Value | LONG | 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 |
INIT | Initialize | SHORT | No | 0 | Yes | No | No | No |
PBRK | Address of Breakpoint Table | NOACCESS | No | 4 | No | No | No | |
LBRK | Last Breakpoint | SHORT | No | 0 | Yes | No | No | No |
The following fields are used to operate the analog input in the simulation mode. See Chapter 3, Fields Common to Many Record Types, for more information on these 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 |
get_units
,
get_precision
, get_graphic_double
, and get_control_double
,
all of which are used for the monitor parameters.
This routine next checks to see that device support is available and a
device support read_ai()
routine is defined. If either does
not exist, an error message is issued and processing is terminated.
INIT is then set to TRUE.
If device support includes init_record
, it is called.
If the device support routine special_linconv exists, it is called.
INIT is set TRUE. This causes PBRK, LBRK, and smoothing to be re-initialized.
upper_alarm_limit = HIHI
upper_warning_limit = HIGH
lower_warning_limit = LOW
lower_alarm_limit = LOLO
Name | Summary | Description |
---|---|---|
PACT | Processing Active | See Chapter 2, Fields Common to All Record Types for an explanation of these fields. |
DPVT | Device Private | |
UDF | VAL Undefined | |
NSEV | New Alarm Severity | |
NSTA | New Alarm Status | |
VAL | Value | This field is used by device support only if it obtains a value already converted to engineering units. See RVAL below. |
INP | Input Link | This field is used by the device support routines to locate its input. |
EGUF | Engineering Units Full | These fields are used to calculate ESLO. Note that these fields correspond to the high and low hardware limits. |
EGUL | Engineering Unit Low | |
ESLO | Slope | These fields are used for linear conversions from raw to engineering units. The device support routines must calculate these fields unless they obtain values already in engineering units. |
ROFF | Raw Offset | |
RVAL | Raw Value | It is the responsibility of the device support routine to give this field a value. If the device support routine obtains a value already in engineering units, it should place the value in VAL and return a value of 2. |
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.
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.
read_ai(precord)This routine must provide a new input value. Asynchronous device support routines will return with PACT set to TRUE. If PACT is TRUE, the process routine will just return and not continue processing. When the asynchronous routine completes, it can call process which will again call read_ai.
Because PACT is still TRUE read_ai knows that this is a request to retrieve the data obtained by the previous call. When finished, read_ai should set PACT to FALSE and return one the following values:
special_linconv(precord,after)This routine is called whenever any of the fields LINR, EGUF, EGUL or ROFF is modified.
Soft Channel
and Raw
Soft Channel
are provided for input records not related to actual
hardware devices. The INP link type must be either CONSTANT, DB_LINK or
CA_LINK. If the INP link type is constant, then the constant value is stored into VAL by init_record, and UDF is set to FALSE. If the INP link type is PV_LINK, then dbCaAddInlink is called by init_record.
read_ai calls recGblGetLinkValue to read the current value of VAL. See Soft Input, Chapter 3, 2.3, for details.
If the return status of recGblGetLinkValue is zero, then read_ai sets UDF to FALSE. The status of recGblGetLinkValue is returned.
If soft support is chosen, the following fields become meaningless: LINR, EGUF, EGUL, ESLO, ROFF, AOFF, ASLO, and SMOO. The read_ai routine always returns a value of 2 which means don't convert.
If raw soft support is chosen, the fields EGUF and EGUL become meaningless. ESLO and ROFF always have their default values of 1 and 0.
Generated with Harlequin WebMaker