# Array Output (aao) The array output record type is used to write array data. The array data can contain any of the supported data types. The record is in many ways similar to the waveform record but outputs arrays instead of reading them. It also allows the device support to allocate the array storage. ## Parameter Fields The record-specific fields are described below, grouped by functionality. ### Scan Parameters The array output record has the standard fields for specifying under what circumstances the record will be processed. These fields are described in [Scan Fields](dbCommonRecord.md#scan-fields). | Field | Summary | Type | DCT | Default | Read | Write | CA PP | | ----- | -------------------------- | ------------- | --- | ------- | ---- | ----- | ----- | | SCAN | Scan Mechanism | MENU [menuScan](menuScan.md) | Yes | | Yes | Yes | No | | PHAS | Scan Phase | SHORT | Yes | | Yes | Yes | No | | EVNT | Event Name | STRING \[40\] | Yes | | Yes | Yes | No | | PRIO | Scheduling Priority | MENU [menuPriority](menuPriority.md) | Yes | | Yes | Yes | No | | PINI | Process at iocInit | MENU [menuPini](menuPini.md) | Yes | | Yes | Yes | No | ### Write Parameters These fields are configurable by the user to specify how and where to the record writes its data. The OUT field determines where the array output writes its output. It can be a hardware address, a channel access or database link, or a constant. Only in records that use soft device support can the OUT field be a channel access link, a database link, or a constant. Otherwise, the OUT field must be a hardware address. See [Address Specification](https://docs.epics-controls.org/en/latest/process-database/EPICS_Process_Database_Concepts.html#address-specification) for information on the format of hardware addresses and database links. #### Fields related to array writing The DTYP field must contain the name of the appropriate device support module. The values in the array referenced by are written to the location specified in the OUT field. (If the OUT link is a constant, no data are written.) NELM specifies the maximum number of elements that the array can hold, while FTVL specifies the data type of the elements (follow the link in the table below for a list of the available choices). | Field | Summary | Type | DCT | Default | Read | Write | CA PP | | ----- | -------------------------- | ------------- | --- | ------- | ---- | ----- | ----- | | DTYP | Device Type | DEVICE | Yes | | Yes | Yes | No | | OUT | Output Specification | OUTLINK | Yes | | Yes | Yes | No | | NELM | Number of Elements | ULONG | Yes | 1 | Yes | No | No | | FTVL | Field Type of Value | MENU [menuFtype](menuFtype.md) | Yes | | Yes | No | No | ### Operator Display Parameters These parameters are used to present meaningful data to the operator. They display the value and other parameters of the waveform either textually or graphically. #### Fields related to _Operator Display_ EGU is a string of up to 16 characters describing the units that the array data measures. It is retrieved by the `get_units` record support routine. The HOPR and LOPR fields set the upper and lower display limits for array elements referenced by the VAL field. 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 the array values. It is used whenever the `get_precision` record support routine is called. See [Fields Common to All Record Types](dbCommonRecord.md#operator-display-parameters) for more on the record name (NAME) and description (DESC) fields. | Field | Summary | Type | DCT | Default | Read | Write | CA PP | | ----- | -------------------------- | ------------- | --- | ------- | ---- | ----- | ----- | | EGU | Engineering Units | STRING \[16\] | Yes | | Yes | Yes | No | | HOPR | High Operating Range | DOUBLE | Yes | | Yes | Yes | No | | LOPR | Low Operating Range | DOUBLE | Yes | | Yes | Yes | No | | PREC | Display Precision | SHORT | Yes | | Yes | Yes | No | | NAME | Record Name | STRING \[61\] | No | | Yes | No | No | | DESC | Descriptor | STRING \[41\] | Yes | | Yes | Yes | No | ### Alarm Parameters The array output record has the alarm parameters common to all record types. ### Monitor Parameters These parameters are used to determine when to send monitors placed on the VAL field. The APST and MPST fields are a menu with choices "Always" and "On Change". The default is "Always", thus monitors will normally be sent every time the record processes. Selecting "On Change" causes a 32-bit hash of the VAL field buffer to be calculated and compared with the previous hash value every time the record processes; the monitor will only be sent if the hash is different, indicating that the buffer has changed. Note that there is a small chance that two different value buffers might result in the same hash value, so for critical systems "Always" may be a better choice, even though it re-sends duplicate data. #### Record fields related to _Monitor Parameters_ | Field | Summary | Type | DCT | Default | Read | Write | CA PP | | ----- | -------------------------- | ------------- | --- | ------- | ---- | ----- | ----- | | APST | Post Archive Monitors | MENU [aaoPOST](#menu-aaopost) | Yes | | Yes | Yes | No | | MPST | Post Value Monitors | MENU [aaoPOST](#menu-aaopost) | Yes | | Yes | Yes | No | | HASH | Hash of OnChange data. | ULONG | No | | Yes | Yes | No | #### Menu aaoPOST These are the choices available for the `APST` and `MPST` fields | Index | Identifier | Choice String | | ----- | -------------------------------------- | ---------------------- | | 0 | aaoPOST\_Always | Always | | 1 | aaoPOST\_OnChange | On Change | ### Run-time Parameters These parameters are used by the run-time code for processing the array output record. They are not configured using a configuration tool. Only the VAL field is modifiable at run-time. VAL references the array where the array output record stores its data. The BPTR field holds the address of the array. The NORD field holds a counter of the number of elements that have been written to the output, | Field | Summary | Type | DCT | Default | Read | Write | CA PP | | ----- | -------------------------- | ------------- | --- | ------- | ---- | ----- | ----- | | VAL | Value | Set by FTVL\[NELM\] | No | | Yes | Yes | Yes | | BPTR | Buffer Pointer | NOACCESS | No | | No | No | No | | NORD | Number elements read | ULONG | No | | Yes | No | No | | OMSL | Output Mode Select | MENU [menuOmsl](menuOmsl.md) | Yes | | Yes | Yes | No | | DOL | Desired Output Link | INLINK | Yes | | Yes | Yes | No | The following steps are performed in order during record processing. #### Fetch Value The OMSL menu field is used to determine whether the DOL link field should be used during processing or not: - If OMSL is `supervisory` the DOL field are not used. The new output value is taken from the VAL field, which may have been set from elsewhere. - If OMSL is `closed_loop` the DOL link field is read to obtain a value. Note: The OMSL and DOL fields were added to the aaoRecord in Base 7.0.7. ### Simulation Mode Parameters The following fields are used to operate the record in simulation mode. If SIMM (fetched through SIML) is YES, the record is put in SIMS severity and the value is written through SIOL. SSCN sets a different SCAN mechanism to use in simulation mode. SDLY sets a delay (in sec) that is used for asynchronous simulation processing. See [Output Simulation Fields](dbCommonOutput.md#output-simulation-fields) for more information on simulation mode and its fields. | Field | Summary | Type | DCT | Default | Read | Write | CA PP | | ----- | -------------------------- | ------------- | --- | ------- | ---- | ----- | ----- | | SIML | Simulation Mode Link | INLINK | Yes | | Yes | Yes | No | | SIMM | Simulation Mode | MENU [menuYesNo](menuYesNo.md) | No | | Yes | Yes | No | | SIOL | Simulation Output Link | OUTLINK | Yes | | Yes | Yes | No | | SIMS | Simulation Mode Severity | MENU [menuAlarmSevr](menuAlarmSevr.md) | Yes | | Yes | Yes | No | | SDLY | Sim. Mode Async Delay | DOUBLE | Yes | -1.0 | Yes | Yes | No | | SSCN | Sim. Mode Scan | MENU [menuScan](menuScan.md) | Yes | 65535 | Yes | Yes | No |