beautypg.com

Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 201

background image

DerrNoError

No error

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 daqDacWaveSetBuffer function allows you to configure a waveform/pattern output transfer buffer
for the specified device and channel. This function may be used to configure a user-supplied buffer for
transferring user supplied data to any of the output channels capable of performing waveform or streamed
output.

Buffer Location, Length, and Settings

The buf parameter is the address of the waveform/pattern output transfer buffer allocated by the application.
If the application is supplying the buffer, then this value must be an address to an adequately allocated buffer

The scanCount parameter is the total length of the output transfer buffer in updates per channel. The
number of channels configured for waveform/pattern output determines the total number of samples required
for each update. Therefore the buffer size to be allocated (in bytes):

scanCount *

(number of output channels configured for waveform/pattern output)

* (the sample size: 2 bytes)

Buffer Management

Buffer management for waveform/pattern output depends upon the output mode setting, described as follows:

Static Waveform/Pattern Mode

If the waveform/pattern output mode has been defined to be static (see daqDacSetOutputMode, then the
following steps must be performed to complete the static waveform/pattern output operation:

Specify the output transfer buffer location and details with the daqDacWaveSetBuffer function.
The specified buf parameter must point to memory which has already been allocated by the
application prior to calling this function. The allocated buffer must be large enough to hold all of the
output updates required for each channel to complete the entire static waveform/pattern output, as
determined by the current waveform/pattern output channel configuration. The output data must fit
entirely within the internal waveform/pattern output FIFO on the device.

Configure any waveform/pattern settings (such as update mode, trigger sources, frequency settings
that need to be configured.

Call the daqDacTransferStart function to download the output transfer buffer into the internal
waveform/pattern output FIFO on the device.

DacWaveSetTrig

function.

Arm the waveform/pattern output by issuing the daq

Trigger the waveform/pattern output (if necessary).

The status of the static waveform/pattern o

utput can be monitored by calling the

daqDacTransferGetStat

function.

Programmer’s Manual

908494

Daq API Command Reference 4.4-19