[Next] [Previous] [Top] [Contents] [Index]

EPICS Record Reference Manual

Chapter 26: pulseDelay

1. Introduction


The normal use for the pulseDelay record type is to generate pulses to be written to a device. Its fields fall into the following categories:

scan parameters

trigger parameters

pulse parameters

output parameters

operator display parameters

run-time parameters

2. Scan Parameters


The pulse delay record has the standard fields for specifying under what circumstances it will be processed. These fields are listed in Scan Fields, Chapter 2, 2. In addition, Scanning Specification, Chapter 1, 1, explains how these fields are used. Note that I/O event scanning is only supported for those card types that interrupt.

3. Trigger Parameters


These fields determine the source for the pulse triggers. Since the pulse delay record is a kind of output record, these fields resemble the desired output parameters of, for example, the analog output record.

The trigger type (TTYP) field determines whether the pulse trigger comes from an external or internal source. Or, differently put, from a hardware source or from a soft trigger source. When TTYP is set to Hardware, the HTS field becomes the trigger source for the record. The hard device support sets the HTS. When hardware is chosen, the OUT output link must specify a hardware address, and the DTYP field must specify the appropriate device support module.

When software is specified in the TTYP field, the record uses the SGV field to generate pulses. The SGV field generates a pulse when its value is Active, and generates no pulse when Inactive. It's value can be manipulated by dbPuts at run-time, or else a value for STV can be retrieved from the soft trigger location (STL) field, an input link which must be a database link if STV is used.

The GATE field can either enable or disable the generation of pulses. When GATE is 0, no pulses are triggered. When GATE is 1, pulses are triggered according to the record's configuration. A value for GATE can be read from the GLNK field, an input link which can be a constant, database link, or a channel access link. When a constant, GATE is initialized to the constant value. Otherwise, a value for GATE is fetched from the location specified in GLNK each time the record is processed.

The CEDG, CTYP, ECS, and ECR field may not have significance for all device support modules. For the modules they apply to, they control the timing of pulses. The CEDG field determines whether clock timing occurs on the rising edge or falling edge of a signal. It has two choices: Rising Edge or Falling Edge. The CTYP field determines whether the timing is controlled externally or internally and has two choices: Internal and External. The ECS and ECR fields have significance only if CTYP specifies External.
FieldSummaryTypeDCTInitialAccessModifyRec Proc MonitorPP
TTYPTrigger Type (hardware/Software) RECCHOICEYes0YesYesNoNo
HTS Hardware Trigger ENUMYes0YesYesNoYes
STLSoft Trigger Location (input link)INLINKYes0NoNoN/ANo
STV Soft Trigger Value RECCHOICEYes0YesYesNoYes
GATE Gate for enable/disable of Pulse GenerationRECCHOICEYes1YesYesNoYes
GLNKGate LocationINLINKYes0YesNoN/ANo
CTYPClock TypeRECCHOICEYes0YesYesNoNo
CEDGClock Signal Edge RECCHOICEYes0YesYesNoNo
ECS External Clock SourceSHORTYes0YesYesNoNo
ECRExternal Clock Rate, in HzDOUBLEYes0YesYesNoNo

4. Pulse Parameters


These fields determine the characteristics of the pulse that is generated by the record. The pulse delay (DLY) field is the most important of these fields. In it, the user specifies the time delay, from the trigger edge until the generation of the pulse. In the time units (UNIT) field, the user specifies the units of time that the delay should be in. The UNIT field can specify Seconds, Milliseconds, Microseconds, Nanoseconds, or Picoseconds.

The user specifies the time duration of the pulse in the pulse width (WIDE) field, which also uses the UNIT field for its time units.
FieldSummaryTypeDCTInitialAccessModifyRec Proc MonitorPP
UNITTime units RECCHOICEYes0YesYesNoNo
DLYPulse Delay, in UNITS of timeDOUBLEYes0YesYesYesYes
WIDEPulse Width, in UNITS of timeDOUBLEYes0YesYesYesYes

5. Operator Display Parameters


These parameters are used to display the delay value (DLY)and other parameters of the pulse delay either textually or graphically.

The HOPR and LOPR fields set the upper and lower display limits for the VAL, DLY, ODLY, WIDE, and OWID 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 DLY only. 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.
FieldSummaryTypeDCTInitialAccessModifyRec Proc MonitorPP
HOPRHigh Operating RangeFLOATYes0YesYesNoNo
LOPRLow Operating RangeFLOATYes0YesYesNoNo
PRECDisplay PrecisionSHORTYes0YesYesNoNo
NAMERecord NameSTRING [29]Yes0YesNoNo 
DESCDescriptionSTRING [29]YesNullYesYesNoNo

6. Alarm Parameters


The pulse delay record has the alarm parameters common to all record types. Alarm Fields, Chapter 2, 3, lists other fields related to a alarms that are common to all record types.

7. Run-time Parameters


These fields are used by the record for processing and to implement monitors for some of the pulse fields.

The old delay (ODLY) and old width (OWID) fields are used to implement monitors for the DLY and WIDE fields, respectively. If, for instance, the current value of the DLY field differs from the value held in ODLY, monitors are triggered for the DLY field.

The PFLD indicates which of the following fields have changes since the record was last processed: DLY, WIDE, STV, GATE, or HTS. Some devices use PFLD so that adjustments can be made when any of these fields are changed.

The VAl field indicates whether a pulse has been generated since the last time the record was processed. It is ACTIVE if YES, INACTIVE if NO.
FieldSummaryTypeDCTInitialAccessModifyRec Proc MonitorPP
ODLY Old DelayDOUBLENo0YesNoNoNo
OWIDOld WidthDOUBLENo0YesNoNoNo
PFLD Processing FieldUSHORTNo0YesNoNoNo
VALValue RECCHOICENo0YesYesYesNo
LLOWLow Logic LevelRECCHOICEYes0YesYesNoNo

8. Record Support Routines


init_record

This routine first checks that device support is available. Device support is then checked to see if write_pd is defined.

Next this routine initializes STV with the value of STL if STL type is CONSTANT link or creates a channel access link if STL type is PV_LINK.

GATE is likewise initialized if GLNK is CONSTANT or PV_LINK.

If device support includes init_record, it is called.

process

See next section.

special

Sets the PFLD field to indicate if write to DLY, STV, GATE or HTS field caused processing of the record.

get_value

Fills in the values of struct valueDes so that they refer to VAL.

get_precision

Retrieves PREC.

get_graphic_double

Sets the upper display and lower display limits for a field. If the field is VAL, DLY, ODLY, WIDE or OWID the limits are set to HOPR and LOPR, else if the field has upper and lower limits defined they will be used, else the upper and lower maximum values for the field type will be used.

get_control_double

Sets the upper control and the lower control limits for a field. If the field is VAL, DLY, ODLY, WIDE or OWID the limits are set to HOPR and LOPR, else if the field has upper and lower limits defined they will be used, else the upper and lower maximum values for the field type will be used.

9. Record Processing


Routine process implements the following algorithm:

Check to see that the appropriate device support module exists. If it doesn't, an error message is issued and processing is terminated with the PACT field still set to TRUE. This ensures that processes will no longer be called for this record. Thus error storms will not occur.

1. The values for STV and GATE are then fetched.

2. Call write_pd routine.

3. PFLD is reset to zero.

4. If device support set PACT to TRUE, then return.

5. Set UDF to FALSE.

6. Check to see if monitors should be invoked.

7. Scan forward link if necessary, set PACT FALSE, and return.

10. Device Support


10.1. Fields Of Interest To Device Support

Each record must have an associated set of device support routines. The primary responsibility of the device support routines is to issue commands to the output device. The device support routines are primarily interested in the following fields:

Name Summary Description
OUT Output LinkThis field is used by the device support routines to locate its output.
WIDEPulse Width Device support must use WIDE for pulse width
DLYPulse Delay Device support must use DLY for the delay after trigger edge until beginning of pulse.
LLOW Low Logic Level Device support must use to determine logic low level.
UNITTime Units All values that refer to time measure will be in this time unit.
VAL Value This field will contain a 1 if a trigger occurred since the last time the record was processed if the device supports it.
PFLD Processing Field This field is used by some devices to indicate if the record was scanned to adjust certain fields such as delay or trigger source. If the device has a destructive read, then changes to these types of fields could write to the device instead of a read and a write.
TTYP Trigger Type This field is used by the device support routines to force triggering on leading or falling edge of signal if the specified device supports it.
HTS Hardware Trigger SourceThis field will be used to set the hardware trigger source if the device supports it.
STV Soft Trigger Source This field will be used for software to trigger an output delayed pulse if the device supports it.
CEDGClock Signal EdgeThis field is used by the device support routines to force clock timing on leading or falling edge of signal.
CTYPClock Type If CTYP is external, device support is responsible for using ECR for the clock rate and if CTYP is internal, ECS is the clock source.
ECS External Clock Source
ECR External Clock Rate

10.2. Device Support Routines

Device support consists of the following routines:

report

report()
This routine is optional. If provided, it prints a report of all device modules.

init

init()
This routine is called once during IOC initialization.

init_record

init_record(precord)
This routine is optional. If provided, it is called by the record support init_record routine.

get_ioint_info

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_pd

write_pd(precord)
This routine issues commands to the output device.

1. - Introduction
2. - Scan Parameters
3. - Trigger Parameters
4. - Pulse Parameters
5. - Operator Display Parameters
6. - Alarm Parameters
7. - Run-time Parameters
8. - Record Support Routines
init_record
process
special
get_value
get_precision
get_graphic_double
get_control_double
9. - Record Processing
10. - Device Support
10.1. - Fields Of Interest To Device Support
10.2. - Device Support Routines
report
init
init_record
get_ioint_info
write_pd

EPICS Record Reference Manual - 19 MAY 1998
[Next] [Previous] [Top] [Contents] [Index]

Generated with Harlequin WebMaker