beautypg.com

Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 210

background image

Function Usage

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.

The daqDacWaveSetDiskFile function has two prerequisites: first, the appropriate channels have been
configured for waveform/pattern output using dynamic output mode (see the daqDacSetOutputMode
function) and second, the daqDacWaveSetBuffer function must be set to DdtmDriverBuffer.
Generally, the waveform/pattern should be configured in the same manner as a standard transfer from a PC
memory-based buffer, with the exception that no transfer buffer needs to be allocated. The driver will
automatically transfer all data from the specified file to the internal output FIFO on the device while the output
transfer is active.

File Location

The filename parameter specifies the location of the waveform/pattern output file. This is a string variable
that contains the path and file name to open. The path may be any valid local or network path name.
However, it should be noted, that a path to a network file may have intrinsic file I/O delays associated with it
that would hinder the output process under high throughput configurations. Care should be exercised when
specifying a file that is not local to the PC controlling the waveform/pattern output operation.

File Organization

The following sections describe the layout and format of the source file for the waveform/pattern output
operation from file. This function supports a number of different data formats for the source file, as well as
providing mechanisms to output any contiguous block of update output data within the file.

File Layout

The offsetBytes and the offsetUpdateCycles parameters allow the start of the update data to be
offset from the beginning of the file. The offsetBytes parameter indicates that a certain number of bytes
appear at the beginning of the file that should be ignored. These bytes may be file header information or other
data but are not valid output samples. If there is no file header information or non-output data, then
offsetBytes

should be set to 0. The offsetUpdateCycles parameter indicates that a certain amount

of output update cycle data should be ignored. The value of this parameter specifies the number of output
cycles that should be ignored at the beginning of the file. If the offsetBytes is non-zero, then these output
update cycles may follow the header or other information in the file. An output cycle consists of an update data
block which consists of all channel data necessary for one update clock output for all configured channels. The
numUpdateCycles

parameter indicates the number of output update cycles to output from the file after the

offset data. This value does not indicate the number of total output cycles to perform during the output from
file operation, it simply indicates the number of cycles in the file that should be output for each iteration of the
file.

The following table shows how the entire file is organized. The arrows indicate the iterations of the valid
output cycle data within the file when the file is being output to the device.

In the following table, the shaded areas indicate the portion of the file that is to be ignored for the
waveform/pattern output from file operation.

If the

numUpdateCycles

value is set to 0, then all the data after the offset data and before the

end of the file will be used during the output operation.

The following table represents a file that has sample data for DAC0, DAC1, DAC2, DAC3 and P3
Digital Output channels. A file with data for a different channel configuration will change
accordingly. The number of cycles to ignore will be based upon the waveform/pattern output
channels that are currently configured(see

daqDacSetOutputMode

function).

4.4-28 Daq API Command Reference

908494

Programmer’s

Manual