Fields Common to Input Record Types

This section describes fields that are found in many input record types. These fields usually have the same meaning whenever they are used.

See also Fields Common to All Record Types and Fields Common to Output Record Types.

Input and Value Fields

The INP field specifies an input link. It is used by the device support routines to obtain input. For soft analog records it can be a constant, a database link, or a channel access link.

The DTYP field specifies the name of the device support module that will input values. Each record type has its own set of device support routines. If a record type does not have any associated device support, DTYP is meaningless.

The RVAL field contains - whenever possible - the raw data value exactly as it is obtained from the hardware or from the associated device driver and before it undergoes any conversions. The Soft Channel device support module reads values directly into VAL, bypassing this field.

The VAL field contains the record's final value, after any needed conversions have been performed.

Device Input

A device input routine normally returns one of the following values to its associated record support routine:

Device Support for Soft Records

In most cases, two soft output device support modules are provided: Soft Channel and Raw Soft Channel. Both allow INP to be a constant, a database link, or a channel access link. The Soft Channel device support module reads input directly into the VAL field and specifies that no value conversion should be performed. This allows the record to store values in the data type of its VAL field. Note that for Soft Channel input, the RVAL field is not used. The Raw Soft Channel support module reads input into RVAL and indicates that any specified unit conversions be performed.

The device support read routine normally calls dbGetLink() which fetches a value from the link.

If a value was returned by the link the UDF field is set to FALSE. The device support read routine normally returns the status from dbGetLink().

Input Simulation Fields

The SIMM field controls simulation mode. It has either the value YES or NO. By setting this field to YES, the record can be switched into simulation mode of operation. While in simulation mode, input will be obtained from SIOL instead of INP.

Ths SIML specifies the simulation mode location. This field can be a constant, a database link, or a channel access link. If SIML is a database or channel access link, then SIMM is read from SIML. If SIML is a constant link then SIMM is initialized with the constant value but can be changed via dbPuts.

Ths SVAL field contains the simulation value. This is the record's input value, in engineering units, when the record is switched into simulation mode, i.e. when SIMM is set to YES.

The SIOL field is a link that can be used to fetch the simulation value. The link can be a constant, a database link, or a channel access link. If SIOL is a database or channel access link, then SVAL is read from SIOL. If SIOL is a constant link then SVAL is initialized with the constant value but can be changed via dbPuts.

The SIMS field specifies the simulation mode alarm severity. When this field is set to a value other than NO_ALARM and the record is in simulation mode, it will be put into alarm with this severity and a status of SIMM.

Simulation Mode for Input Records

An input record can be switched into simulation mode of operation by setting the value of SIMM to YES or RAW. During simulation, the record will be put into alarm with a severity of SIMS and a status of SIMM_ALARM. While in simulation mode, input values will be read from SIOL instead of INP:

           -- (SIMM = NO?) INP (if supported and directed by device support, -> RVAL -- convert -> VAL), (else -> VAL)
         /

 SIML -> SIMM

         \
          -- (SIMM = YES?) SIOL -> SVAL -> VAL
           \
             -- (SIMM = RAW?) SIOL -> SVAL -> RVAL -- convert -> VAL

A record can be switched into simulation mode of operation by setting the value of SIMM to YES. During simulation, the record will be put into alarm with a severity of SIMS and a status of SIMM_ALARM. While in simulation mode, input values, in engineering units, will be obtained from SIOL instead of INP. Also, while the record is in simulation mode, there will be no raw value conversion and no calls to device support when the record is processed.

Normally input records contain a private readValue() routine which performs the following steps: