Table of Contents Previous Chapter Chapter 3: Fields Common to Many Record Types

Chapter 3: Fields Common to Many Record Types

1. Introduction

This chapter describes input and output fields that are common to multiple record types. These fields have the same meaning whenever they are used.

2. Input Records

Common Fields

--------------------------------------------------------------------------------------
Name  Summary            Description                                                    
--------------------------------------------------------------------------------------
INP   Input Link         This field 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.                       
DTYP  Device Type        DTYP specifies the name of the device support module           
                         that will input values.  Each record type has its own set of   
                         device support routines which are specified in                 
                         devSup.ascii.  If a record type does not have any              
                         associated device support, DTYP is meaningless.                
RVAL  Raw Value          Whenever possible this field contains the raw data value       
                         exactly as it is obtained from the hardware or from the        
                         associated device driver.                                      
VAL   Value              This is the record's final value, after any needed             
                         conversions have been performed.                               
SIMM  Simulation Mode    This field 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.                          
SIML  Simulation Mode    This field can be a constant, a database link, or a channel    
      Location           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.                                            
SVAL  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.                                       
SIOL  Simulation Value   This field can be a constant, a database link, or a channel    
      Location           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.                                            
SIMS  Simulation Mode    When this record is in simulation mode, it will be put into    
      Alarm Severity     alarm with this severity and a status of SIMM.                 
--------------------------------------------------------------------------------------

Device Input

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

Soft Input

In almost all cases, two special device support modules are provided: Soft and Raw Soft. Both allow INP to be a constant, a database link, or a channel access link. The Soft support module reads input directly into the VAL field and specifies that no conversion of any type should be performed. Thus Soft support allows the record to hold values corresponding to the C data type of the VAL field. Note that for soft input, RVAL is not used. The Raw Soft support module reads input into RVAL and asks that normal conversion to VAL be performed.

The device support read routine normally calls recGblGetLinkValue which performs the following steps:

If the return status of recGblGetLinkValue is zero and the INP link type is not CONSTANT, then UDF is set to FALSE. The device support read routine normally returns the status of recGblGetLinkValue.

Simulation Mode

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 during record processing.

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

3. Output Records

Common Fields

---------------------------------------------------------------------------------------
Name  Summary              Description                                                   
---------------------------------------------------------------------------------------
OUT   Output Link          This field is used by the device support routines to decide   
                           where to send output. For soft records, it can be a           
                           constant, a database link, or a channel access link. If the   
                           link is a constant, the result is no output.                  
DTYP  Device Type          DTYP specifies the device support module that will            
                           receive values.                                               
VAL   Value                This is the desired value before any conversions to raw       
                           output have been performed.                                   
OVAL  Output Value         OVAL is used to decide when to invoke monitors. Archive       
                           and value change monitors are invoked if OVAL is not          
                           equal to VAL.  If a  record type needs to make                
                           adjustments, OVAL is used to enforce the maximum rate         
                           of change limit before converting the desired value to a      
                           raw value.                                                    
RVAL  Raw Value            Whenever possible this is the actual value sent to the        
                           hardware itself or to the associated device driver.           
RBV   Read Back Value      Whenever possible this is the actual read back value          
                           obtained from the hardware itself or from the associated      
                           device driver.                                                
DOL   Desired Output       DOL can be a constant, a database link, or a channel access   
      Location (an Input   link.  There is no device support associated with DOL.  If    
      Link)                DOL is a database or channel access link and OMSL is          
                           CLOSED_LOOP, then VAL is obtained from DOL.                   
OMSL  Output Mode Select   This field has either the value SUPERVISORY or                
                           CLOSED_LOOP.  DOL is used to determine VAL only if            
                           OMSL has the value CLOSED_LOOP.  By setting this field        
                           the record can be switched between supervisory and            
                           closed loop mode of operation. While in closed loop           
                           mode, the VAL field cannot be set via dbPuts.                 
OIF   Output Full or       This field, which is only used when input is obtained from    
      Incremental (ao      DOL, determines if the value obtained from DOL is an          
      record only)         increment to add to the current VAL or is the actual VAL      
                           desired.                                                      
SIMM  Simulation Mode      This field 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, output will      
                           be written to SIOL instead of OUT.                            
SIML  Simulation Mode      This field can be a constant, a database link, or a channel   
      Location             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.                                           
SIOL  Simulation Value     This field can be a constant, a database link, or a channel   
      Location             access link. If SIOL is a database or channel access link,    
                           then the output value is written to SIOL. If this link is a   
                           constant, the result is no output.                            
SIMS  Simulation Mode      When this record is in simulation mode, it will be put into   
      Alarm Severity       alarm with this severity and a status of SIMM_ALARM.          
IVOA  Invalid Alarm        Whenever the record is put into INVALID alarm severity        
      Output Action        IVOA specifies an action. IVOA can be one of the              
                           following actions.                                            
                            Continue normally                                            
                            Don't drive outputs                                          
                            Set output equal to IVOV                                     
IVOV  Invalid Alarm        When new severity has been set to INVALID alarm and           
      Output Value, In     IVOA is "Set output equal to IVOV",  then, VAL is set to      
      Engineering Units    IVOV and converted to RVAL before device support is           
                           called.                                                       
---------------------------------------------------------------------------------------

Soft Output

Normally two soft output device support modules are provided Soft and Raw Soft. Both allow the output link OUT to be a constant, a database link, or a channel access link. It is normally meaningless to use constant output links. The Soft support module writes output from the value associated with OVAL or VAL (if OVAL does not exist). The Raw Soft support module writes the value associated with the RVAL field after conversion has been performed.

The device support write routine normally calls recGblPutLinkValue which performs the following steps:

The device support write routine normally returns the status of recGblPutLinkValue.

Output Mode Select

The fields DOL and OMSL are used to allow the output record to be part of a closed loop control algorithm. OMSL is meaningful only if DOL refers to a database or channel access link. It can have the values SUPERVISORY or CLOSED_LOOP. If the mode is SUPERVISORY, then nothing is done to VAL. If the mode is CLOSED_LOOP and the record type does not contain an OIF field, then each time the record is processed, VAL is set equal to the value obtained from the location referenced by DOL. If the mode is CLOSED_LOOP in record types with an OIF field and OIF is Full, VAL is set equal to the value obtained from the location referenced by DOL; if OIF is Incremental VAL is incremented by the value obtained from DOL.

Simulation Mode

An output 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, output values, in engineering units, will be written to SIOL instead of OUT. Also, while the record is in simulation mode, there will be no calls to device support during record processing.

Normally output records contain a private writeValue routine which performs the following steps:

Invalid Alarm Output Action

Whenever an output record is put into INVALID alarm severity, IVOA specifies an action to take. The record support process routine for each output record contains code which performs the following steps.

 
Table of Contents Next Chapter