Active, Returns, Function usage – Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 188

active
Definition Description
DdafWaveformActive
A waveform/pattern output is active. The trigger may or may not yet have occurred, but the
waveform/pattern output has at least been armed.
DdafWaveformTriggered
The waveform/pattern output has been triggered. Data is now being streamed from the
specified channels of the devices DAC channel(s) and/or P3 16-bit digital port.
DdafTransferActive
A transfer from PC-based buffers/files to the output FIFO on the device is currently active.
Returns
DerrNoError
No error
Function Usage
The daqDacTransferGetStat function will get the current status of a dynamic waveform/pattern output
transfer for the specified DAC or digital output channel.
The term waveform/pattern output is used extensively throughout the entries for the
functions of the form daqDac…. This refers to an analog waveform output modes and/or
digital pattern output modes. These terms describe output to digital-to-analog converter
(DAC) channels and/or digital input/output (DIO) channels that are synchronously
updated by a clock source defined by the application.
Waveform/Pattern Output Progress
In the subsequent discussion, these three terms are used as follows:
• A sample refers to the data for a single output channel.
• An update refers to data for all channels that are configured for waveform/pattern output. An update
consists of all data required to update all channels during a single output clock pulse.
• The write position of the buffer described below is a pointer to the next update block to be written to
the internal FIFO on the device. If using a circular buffer, then the data that has already been written
but not yet updated by the application may then be updated by the application. When using a circular
buffer, it is left to the application to maintain the pointer(s) to the data that it has updated.
The retCount parameter can be defined in two manners, depending on the output mode. If the output is set
to dynamic mode with the DdwmNShot or DdwmInfinite values set (using the daqDacWaveSetMode
function), retCount is equal to the number of updates read in from the dynamic buffer. However, if either
the output is set to either static mode, or dynamic mode with the DdwmNFileIterations value set (using
the daqDacWaveSetMode function), retCount is equal to the number of DAC updates since triggered.
See the daqDacWaveSetBuffer function on for more information on buffer allocation modes.
The current write position within the buffer (measured in updates) is equal to
retCount
mod scanCount
where mod is defined as the integer remainder of dividing retCount by scanCount (as defined by the
daqDacWaveSetBuffer
function). Since all channels in the waveform/pattern output are updated
concurrently, this number represents the number of updates performed for all channels.
The current write position within the buffer (measured in total samples) is equal to
(retCount mod scanCount) * (total output channels)
where the value of (total output channels) is the total number of channels that are configured for
waveform/pattern output (channels whose output mode is set to DdomStaticWave or
DdomDynamicWave
). Since each sample is a 2-byte word, this number can be multiplied by 2 to get the
current write position within the buffer in bytes.
4.4-6 Daq API Command Reference
908494
Programmer’s
Manual