Difference between revisions of "RRM 3-14 Sequence"
(Link fields are modifyable) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 34: | Line 34: | ||
<TABLE BORDER="1"> | <TABLE BORDER="1"> | ||
<TH>Field<TH>Summary<TH>Type<TH>DCT<TH>Initial<TH>Access<TH>Modify<TH>Rec Proc Monitor<TH>PP<TR> | <TH>Field<TH>Summary<TH>Type<TH>DCT<TH>Initial<TH>Access<TH>Modify<TH>Rec Proc Monitor<TH>PP<TR> | ||
<TD>DOL1<TD>Desired Output Link 1<TD>INLINK<TD>Yes<TD>0<TD> | <TD>DOL1<TD>Desired Output Link 1<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DOL2<TD>Desired Output Link 2<TD>INLINK<TD>Yes<TD>0<TD> | <TD>DOL2<TD>Desired Output Link 2<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DOL3<TD>Desired Output Link 3<TD>INLINK<TD>Yes<TD>0<TD> | <TD>DOL3<TD>Desired Output Link 3<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DOL4<TD>Desired Output Link 4<TD>INLINK<TD>Yes<TD>0<TD> | <TD>DOL4<TD>Desired Output Link 4<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DOL5<TD>Desired Output Link 5<TD>INLINK<TD>Yes<TD>0<TD> | <TD>DOL5<TD>Desired Output Link 5<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DOL6<TD>Desired Output Link 6<TD>INLINK<TD>Yes<TD>0<TD> | <TD>DOL6<TD>Desired Output Link 6<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DOL7<TD>Desired Output Link | <TD>DOL7<TD>Desired Output Link 7<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DOL8<TD>Desired Output Link 8<TD>INLINK<TD>Yes<TD>0<TD> | <TD>DOL8<TD>Desired Output Link 8<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DOL9<TD>Desired Output Link 9<TD>INLINK<TD>Yes<TD>0<TD> | <TD>DOL9<TD>Desired Output Link 9<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DOLA<TD>Desired Output Link 10<TD>INLINK<TD>Yes<TD>0<TD> | <TD>DOLA<TD>Desired Output Link 10<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DO1<TD>Desired Output Value, Link 1<TD>DOUBLE<TD>No<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | <TD>DO1<TD>Desired Output Value, Link 1<TD>DOUBLE<TD>No<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DO2<TD>Desired Output Value, Link 2<TD>DOUBLE<TD>No<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | <TD>DO2<TD>Desired Output Value, Link 2<TD>DOUBLE<TD>No<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
Line 55: | Line 55: | ||
<TD>DOA<TD>Desired Output Value, Link 10 <TD>DOUBLE<TD>No<TD>0<TD>Yes<TD>Yes<TD>No<TD>No | <TD>DOA<TD>Desired Output Value, Link 10 <TD>DOUBLE<TD>No<TD>0<TD>Yes<TD>Yes<TD>No<TD>No | ||
</TABLE> | </TABLE> | ||
=== Output Parameters === | === Output Parameters === | ||
Line 64: | Line 63: | ||
<TABLE BORDER="1"> | <TABLE BORDER="1"> | ||
<TH>Field<TH>Summary<TH>Type<TH>DCT<TH>Initial<TH>Access<TH>Modify<TH>Rec Proc Monitor<TH>PP<TR> | <TH>Field<TH>Summary<TH>Type<TH>DCT<TH>Initial<TH>Access<TH>Modify<TH>Rec Proc Monitor<TH>PP<TR> | ||
<TD>LNK1<TD>Output link 1<TD>OUTLINK<TD>Yes<TD>0<TD> | <TD>LNK1<TD>Output link 1<TD>OUTLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>LNK2<TD>Output link 2<TD>OUTLINK<TD>Yes<TD>0<TD> | <TD>LNK2<TD>Output link 2<TD>OUTLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>LNK3<TD>Output link 3<TD>OUTLINK<TD>Yes<TD>0<TD> | <TD>LNK3<TD>Output link 3<TD>OUTLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>LNK4<TD>Output link 4<TD>OUTLINK<TD>Yes<TD>0<TD> | <TD>LNK4<TD>Output link 4<TD>OUTLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>LNK5<TD>Output link 5<TD>OUTLINK<TD>Yes<TD>0<TD> | <TD>LNK5<TD>Output link 5<TD>OUTLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>LNK6<TD>Output link 6<TD>OUTLINK<TD>Yes<TD>0<TD> | <TD>LNK6<TD>Output link 6<TD>OUTLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>LNK7<TD>Output link 7<TD>OUTLINK<TD>Yes<TD>0<TD> | <TD>LNK7<TD>Output link 7<TD>OUTLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>LNK8<TD>Output link 8<TD>OUTLINK<TD>Yes<TD>0<TD> | <TD>LNK8<TD>Output link 8<TD>OUTLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>LNK9<TD>Output link 9<TD>OUTLINK<TD>Yes<TD>0<TD> | <TD>LNK9<TD>Output link 9<TD>OUTLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>LNKA<TD>Output link | <TD>LNKA<TD>Output link 10<TD>OUTLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No | ||
</TABLE> | </TABLE> | ||
=== Selection Algorithm Parameters === | === Selection Algorithm Parameters === | ||
When the sequence record is processed, it uses a selection algorithm similar to that of the selection record to decide which links to process.The select mechanism field (SELM) has | When the sequence record is processed, it uses a selection algorithm similar to that of the selection record to decide which links to process.The select mechanism field (SELM) has three algorithms to choose from: <CODE>All</CODE>, <CODE>Specified</CODE> or <CODE>Mask</CODE>. | ||
The <CODE>All</CODE> algorithm causes the record to process each input and output link each time the record is processed, in order from 1 to 10. So when SELM is <CODE>All</CODE>, the desired output value from DOL1 will fetched and sent to LNK1, then the desired output value from DOL2 will be fetched and sent to the location in LNK2, and so on until the last input and output link DOA and LNKA. (Note that undefined links are not used.) If DOL''x'' is a constant, the current value field is simply used and the desired output link is ignored. The SELN field is not used when <CODE>All</CODE> is the algorithm. | The <CODE>All</CODE> algorithm causes the record to process each input and output link each time the record is processed, in order from 1 to 10. So when SELM is <CODE>All</CODE>, the desired output value from DOL1 will fetched and sent to LNK1, then the desired output value from DOL2 will be fetched and sent to the location in LNK2, and so on until the last input and output link DOA and LNKA. (Note that undefined links are not used.) If DOL''x'' is a constant, the current value field is simply used and the desired output link is ignored. The SELN field is not used when <CODE>All</CODE> is the algorithm. | ||
Line 92: | Line 90: | ||
<TD>SELM<TD>Select Mechanism<TD>[[RRM 3-14 Menu Choices|RECCHOICE]]<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | <TD>SELM<TD>Select Mechanism<TD>[[RRM 3-14 Menu Choices|RECCHOICE]]<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>SELN <TD>Link Selection <TD>USHORT<TD>No<TD>1<TD>Yes<TD>Yes<TD>No<TD>No<TR> | <TD>SELN <TD>Link Selection <TD>USHORT<TD>No<TD>1<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>SELL<TD>Link Selection Location <TD>INLINK<TD>Yes<TD>0<TD> | <TD>SELL<TD>Link Selection Location <TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No | ||
</TABLE> | </TABLE> | ||
=== Delay Parameters === | === Delay Parameters === |
Latest revision as of 19:40, 22 March 2016
seq - Sequence
The Sequence record is used to trigger the processing of up to ten other records and send values to those records. It is similar to the fanout record, except that it will fetch an input value and write an output value instead of simply processing a collection of forward links. It can also specify one of several selection algorithms that determine which values to write. It has no associated device support.
Parameter Fields
The fields fall into the following categories:
- scan parameters
- desired output parameters
- output parameters
- selection algorithm parameters
- delay parameters
- operator display parameters
- run-time parameters
Scan Parameters
The sequence record has the standard fields for specifying under what circumstances it will be processed. These fields are listed in Scan Fields. In addition, Scanning Specification explains how these fields are used.
Desired Output Parameters
These fields determine where the record retrieves the values it is to write to other records. All of these values are not necessarily used, depending on the selection algorithm.
The sequence record can retrieve up to 10 values from 10 locations. The user specifies the locations in the Desired Output Link fields (DOL1-DOLA), which can be either constants, database links, or channel access links. If a Desired Output Link is a constant, the corresponding value field for that link is initialized to the constant value and cannot be changed via dbputs. Otherwise, if the Desired Output Link is a database or channel access link, a value is fetched from the link each time the record is processed (provided that the output link is part of the record's selection algorithm). See Address Specification for information on how to specify database links.
The value fetched from the Desired Output Links are stored in the corresponding Desired Output Value fields (DO1-DOA). These fields can be initialized to a constant value, but they cannot be changed via dbPuts.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
DOL1 | Desired Output Link 1 | INLINK | Yes | 0 | Yes | Yes | No | No |
DOL2 | Desired Output Link 2 | INLINK | Yes | 0 | Yes | Yes | No | No |
DOL3 | Desired Output Link 3 | INLINK | Yes | 0 | Yes | Yes | No | No |
DOL4 | Desired Output Link 4 | INLINK | Yes | 0 | Yes | Yes | No | No |
DOL5 | Desired Output Link 5 | INLINK | Yes | 0 | Yes | Yes | No | No |
DOL6 | Desired Output Link 6 | INLINK | Yes | 0 | Yes | Yes | No | No |
DOL7 | Desired Output Link 7 | INLINK | Yes | 0 | Yes | Yes | No | No |
DOL8 | Desired Output Link 8 | INLINK | Yes | 0 | Yes | Yes | No | No |
DOL9 | Desired Output Link 9 | INLINK | Yes | 0 | Yes | Yes | No | No |
DOLA | Desired Output Link 10 | INLINK | Yes | 0 | Yes | Yes | No | No |
DO1 | Desired Output Value, Link 1 | DOUBLE | No | 0 | Yes | Yes | No | No |
DO2 | Desired Output Value, Link 2 | DOUBLE | No | 0 | Yes | Yes | No | No |
DO3 | Desired Output Value, Link 3 | DOUBLE | No | 0 | Yes | Yes | No | No |
DO4 | Desired Output Value, Link 4 | DOUBLE | No | 0 | Yes | Yes | No | No |
DO5 | Desired Output Value, Link 5 | DOUBLE | No | 0 | Yes | Yes | No | No |
DO6 | Desired Output Value, Link 6 | DOUBLE | No | 0 | Yes | Yes | No | No |
DO7 | Desired Output Value, Link 7 | DOUBLE | No | 0 | Yes | Yes | No | No |
DO8 | Desired Output Value, Link 8 | DOUBLE | No | 0 | Yes | Yes | No | No |
DO9 | Desired Output Value, Link 9 | DOUBLE | No | 0 | Yes | Yes | No | No |
DOA | Desired Output Value, Link 10 | DOUBLE | No | 0 | Yes | Yes | No | No |
Output Parameters
When the record is processed, the desired output values are retrieved for the links in the record's selection algorithm and are written to the corresponding output link (LNK1-LNKA). These output links can be database links or channel access links; they cannot be device addresses. There are ten output links, one for each desired output link. Only those that are defined are used.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
LNK1 | Output link 1 | OUTLINK | Yes | 0 | Yes | Yes | No | No |
LNK2 | Output link 2 | OUTLINK | Yes | 0 | Yes | Yes | No | No |
LNK3 | Output link 3 | OUTLINK | Yes | 0 | Yes | Yes | No | No |
LNK4 | Output link 4 | OUTLINK | Yes | 0 | Yes | Yes | No | No |
LNK5 | Output link 5 | OUTLINK | Yes | 0 | Yes | Yes | No | No |
LNK6 | Output link 6 | OUTLINK | Yes | 0 | Yes | Yes | No | No |
LNK7 | Output link 7 | OUTLINK | Yes | 0 | Yes | Yes | No | No |
LNK8 | Output link 8 | OUTLINK | Yes | 0 | Yes | Yes | No | No |
LNK9 | Output link 9 | OUTLINK | Yes | 0 | Yes | Yes | No | No |
LNKA | Output link 10 | OUTLINK | Yes | 0 | Yes | Yes | No | No |
Selection Algorithm Parameters
When the sequence record is processed, it uses a selection algorithm similar to that of the selection record to decide which links to process.The select mechanism field (SELM) has three algorithms to choose from: All
, Specified
or Mask
.
The All
algorithm causes the record to process each input and output link each time the record is processed, in order from 1 to 10. So when SELM is All
, the desired output value from DOL1 will fetched and sent to LNK1, then the desired output value from DOL2 will be fetched and sent to the location in LNK2, and so on until the last input and output link DOA and LNKA. (Note that undefined links are not used.) If DOLx is a constant, the current value field is simply used and the desired output link is ignored. The SELN field is not used when All
is the algorithm.
When the Specified
algorithm is chosen, each time the record is processed it gets the integer value in the Link Selection (SELN) field and uses that as the index of the link to process. For instance, if SELN is 4, the desired output value from DO4 will be retrieved and sent to LNK4. If DOLx is a constant, DOx is simply used without the value being fetched from the input link.
When Mask
is chosen, the record uses the individual bits of the SELN field to determine the links to process. When bit 0 of SELN is set, the value from DO1 will be written to the location in LNK1; when bit 1 is set, the valud from DO2 will be written to the location in LNK2 etc. Thus for example if SELN is 3, the record will retrieve the values from DO1 and DO2 and write them to the locations in LNK1 and LNK2, respectively. If SELN is 63, DO1...DO6 will be written to LNK1...LNK6.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
SELM | Select Mechanism | RECCHOICE | Yes | 0 | Yes | Yes | No | No |
SELN | Link Selection | USHORT | No | 1 | Yes | Yes | No | No |
SELL | Link Selection Location | INLINK | Yes | 0 | Yes | Yes | No | No |
Delay Parameters
The delay parameters consist of 10 fields, one for each I/O link discussed above. These fields can be configured to cause the record to delay processing the link. For instance, if the user gives the DLY1 field a value of 3.0, each time the record is processed at run-time, the record will delay processing the DOL1, DOV1, and LNK1 fields for three seconds. That is, the desired output value will not be fetched and written to the output link until three seconds have lapsed.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
DLY1 | Delay time | DOUBLE | Yes | 0 | Yes | Yes | No | No |
DLY2 | Delay time | DOUBLE | Yes | 0 | Yes | Yes | No | No |
DLY3 | Delay time | DOUBLE | Yes | 0 | Yes | Yes | No | No |
DLY4 | Delay time | DOUBLE | Yes | 0 | Yes | Yes | No | No |
DLY5 | Delay time | DOUBLE | Yes | 0 | Yes | Yes | No | No |
DLY6 | Delay time | DOUBLE | Yes | 0 | Yes | Yes | No | No |
DLY7 | Delay time | DOUBLE | Yes | 0 | Yes | Yes | No | No |
DLY8 | Delay time | DOUBLE | Yes | 0 | Yes | Yes | No | No |
DLY9 | Delay time | DOUBLE | Yes | 0 | Yes | Yes | No | No |
DLYA | Delay time | DOUBLE | Yes | 0 | Yes | Yes | No | No |
Operator Display Parameters
These parameters are used to present meaningful data to the operator. The Precision field (PREC) determines the decimal precision for the VAL field when it is displayed. It is used when the get_precision
record routine is called.
See 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 |
---|---|---|---|---|---|---|---|---|
PREC | Display Precision | SHORT | Yes | 0 | Yes | Yes | No | No |
NAME | Record Name | STRING [29] | Yes | 0 | Yes | No | No | No |
DESC | Description | STRING [29] | Yes | Null | Yes | Yes | No | No |
Alarm Parameters
The sequence record has the alarm parameters common to all record types. Alarm Fields lists other fields related to a alarms that are common to all record types.
Record Support
Record Processing
Routine process implements the following algorithm:
- First, PACT is set to TRUE, and the link selection is fetched. Depending on the selection mechanism, the link selection output links are processed in order from LNK1 to LNKA. When LNKn is processed, the corresponding DLYn value is used to generate a delay via watchdog timer.
- After DLYn seconds have expired, the input value is fetched from DOn (if DOLn is constant) or DOLn (if DOLn is a database link or channel access link) and written to LNKn.
- When all links are completed, an asynchronous completion call back to dbProcess is made (see the Application Developer's Guide for more information on asynchronous processing.)
- Then UDF is set to FALSE.
- Monitors are checked.
- The forward link is scanned, PACT is set FALSE, and the process routine returns.
For the delay mechanism to operate properly, the record is processed asynchronously. The only time the record will not be processed asynchronously is when there are no non-NULL output links selected (i.e. when it has nothing to do.) The processing of the links is done via callback tasks at the priority set in the PRIO field in dbCommon (see the Application Developer's Guide for more information on call
EPICS Record Reference Manual - 19 MAY 1998