Transient Recorder Framework
|
This page describes the public PVs implemented by the Transient Recorder framework as well as internal PVs meant to be used by driver-specific database code.
For instructions for loading the correct DB files, consult the main page.
The names of all the PVs documented here can be customized (see Customizing PVs).
Most of the records in this section are provided by the database file TRBase.db
. However, channel-specific records (containing CH<N>
in their name) originate from TRChannel.db
or TRChannelWaveform.db
.
The common record prefixes are omitted in these listings. They are specified as database template parameters to the associated database files. Note that channel-specific database files may be loaded with a prefix different than CH<N>
, perhaps with a name more descriptive of the purpose of the channel.
PV name, record type | Description |
---|---|
name (stringin) | The device name or model. It is the value that the driver set using TRBaseDriver::setDigitizerName or the asyn port name if the driver did not call this function. |
These PVs should be set to the desired settings before an arm request is issued. Changing them has no immediate effect, but their values are caputed at the start of the arm procedure. The one exception is the ACHIEVABLE_SAMPLE_RATE
which must not be written but is automatically calculated from the desired clock settings.
PV name, record type | Description |
---|---|
autoRestart (bo) | Selects single-burst mode or determined by
It is possible to customize the ZNAM/ONAM fields by passing the macros |
NUM_BURSTS (longout) | When Zero or a negative value means to process an unlimited number bursts, a positive value means to process the fixed number of bursts then disarm. |
numberPTS (longout) | Number of post-trigger samples (of each channel). |
numberPPS (longout) | Total number of samples for prePostTrigger mode. This is only relevant when arming in prePostTrigger mode. In that case, it should be the total number of samples per burst (pre + post samples), and must be greater than |
_requestedSampleRate (ao) | This is an internal record designed to be written by driver-specific database code to forward the sample rate requested by the user to the framework. Writing this PV will result in the function TRBaseDriver::requestedSampleRateChanged being called, and the value written will be available through the function TRBaseDriver::getRequestedSampleRate. For an example of database code writing this record, see the implementation in the General Standards driver ( This record can be excluded by passing |
ACHIEVABLE_SAMPLE_RATE (ai) | Provides the sample rate (Hz) that would actually be achieved. This is computed based on the desired sample clock configuration ( Note that because calculation of the clock configuration may be performed asynchronously, this PV is not guaranteed to reflect the new settings immediately after the settings are changed. This record can be excluded by passing |
These records are for requesting arming or disarming and for determining the current state of the arming sequence.
PV name, record type | Description |
---|---|
arm (mbbo) | This PV both indicates the current armed state and can be used to request arming or disarming. Possible values of this PV are:
It is only allowed to write Writing If The |
set_arm (mbbo) | This PV can be used for arm or disarm requests. Writing The reason for this PV is that it does not have the special values The |
These PVs hold the settings that the device has been armed with. When the device is not armed, they contain placeholder values such as NAN
for numeric values and N/A
for choice values. These PVs must not be written.
Note that for mbbi
records, the values are not listed, and are the same as for the corresponding desired-setting PVs with the addition of N/A
.
PV name, record type | Description |
---|---|
GET_ARMED_NUM_BURSTS (ai) | Current effective number of bursts to be processed. This is based on the |
get_numberPTS (ai) | Current armed number of post-trigger samples; see numberPTS . |
get_numberPPS (ai) | Current armed total number of samples for prePostTrigger mode; see numberPPS . |
GET_ARMED_REQUESTED_SAMPLE_RATE (ai) | Current armed requested sample rate; see This record can be excluded by passing |
GET_SAMPLE_RATE (ai) | Current armed achievable sample rate; see This record can be excluded by passing |
GET_DISPLAY_SAMPLE_RATE (ai) | Current armed display sample rate. This is the value that was returned by the driver in TRBaseDriver::checkSettings via TRArmInfo::rate_for_display. It also the same sample rate that the time array ( |
These PVs provide the channel data and additional information about burst processing.
Note that the size (NELM
) of all waveform records is determined by the value of the SIZE
parameter of associated database templates (TRBase.db
and TRChannelData.db
).
The data type of the waveforms is determined by the FTVL
parameter to TRChannelData.db
and is DOUBLE
by default (if this is changed then WF_DTYP
also needs to be adjusted). However be aware that the digitizer driver determines the data type of NDArrays it submits. If the NDArray data type does not match FTVL
, the StdArrays plugin will convert the data.
PV name, record type | Description |
---|---|
perSecond (longin) | The number of bursts per second. This PV is updated each second to the number of bursts which have been processed in the previous second. It is possible to add custom fields to this record by passing the macro |
TIME_DATA (waveform) | The relative sample time waveform (unit: see This is recalculated whenever the device is armed. It will consist of time values for pre-samples (if pre-samples are enabled) and time values for post-samples. The pre-sample times will be negative, the first post-sample time will be 0 and the remaining post-sample times will be positive. The difference between subsequent sample times will be 1/ The |
TIME_UNIT_INV (ao) | The unit for The initial value is according to the Changes to this PV during operation will be reflected in new data (newly generated NDArrays). Note that changes do not affect the EGU of the data waveforms, it is your responsibility to keep these in sync if needed. |
CH<N>:DATA (waveform) | The data waveform for channel N. The timestamp of the data waveform is based on the timestamp of the associated NDArray, which is itself obtained from the Asyn updateTimeStamp function on the main port (not the channels port). While this is not reflected in this waveform record, note that the NDArrays generated by the channel ports will be tagged with an attribute It is possible to define a link to be processed after data is updated, by passing the macro |
CH<N>:DATA_SNAPSHOT (waveform) | The slow-updating data waveform for channel N. The data and timestamp will match the The update rate of slow waveforms is defined by the parameter It is possible to define a link to be processed after snapshot data is updated, by passing the macro These snapshot records can be disabled by passing the macro |
GET_BURST_ID (longin) | The identification number of the last burst. This PV will be updated for every burst with the burst ID of that burst. Burst IDs are generated by the driver, but the expectation is that the first burst ID will be zero, each subsequent ID will be incremented by one up to 231-1, after which point it will wrap back to zero. The expectation is also that the ID is not reset to zero when arming again. It is possible to specify a database link to be processed on each new burst, by passing the macro |
GET_LAST_BURST_TIME (stringin) | The time-and-date string of the last processed burst, based on the burst timestamp. The format of the timestamp is according to the |
GET_BURST_START_TO_BURST_END_TIME (ai) | The time from when the start of the burst was detected to when the end of the burst was detected, for the last processed burst.
|
GET_BURST_END_TO_READ_END_TIME (ai) | The time from when the end of the burst was detected to when the burst has been read to memory, for the last processed burst.
|
GET_READ_END_TO_DATA_PROCESSED_TIME (ai) | The time from when the burst has been read to memory to when the burst data has been processed (sent into AreaDetector).
|
These PVs are used to control the acquisition process. Changes to the values of these PVs are effective immediately (as opposed to values being captured at the start of arming).
PV name, record type | Description |
---|---|
SET_TEST_READ_SLEEP_TIME (ao) | Artificial time delay after processing a burst (in seconds). This allows inserting a time delay to the read loop each time after a burst is processed. It is useful for testing hardware buffer overflow. The default is zero. |
CH<N>:ENABLE_ARRAY_CALLBACKS (bo) | Enable AreaDetector NDArray callbacks for the channel ( If callbacks are The default is |
CH<N>:ENABLE_UPDATE_ARRAYS (bo) | Enable updating of the cached NDArray for the channel ( If this is Turning this off saves some memory as it allows each NDArray to be freed after it is processed. The default is |
CH<N>:SET_BLOCKING_CALLBACKS (bo) | Enable/disable blocking-callbacks for the StdArrays port of this channel ( Warning: disabling blocking callbacks will start the callback processing thread for this channel if it has not been started yet. If there is not enough memory, this will result in memory allocation failures likely followed by a complete failure of the IOC. The default is determined by the arguments when initializing the StdArrays ports. |
CH<N>:GET_BLOCKING_CALLBACKS (bi) | Readback value of the blocking-callbacks setting for this channels ( This is a readback only and must not be written. |