beautypg.com

Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 217

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 DAC and/or digital output
channels that are synchronously updated by a clock source defined by the application.

The daqDacWaveSetMode function controls how the waveform/pattern is going to proceed and how the
waveform/pattern output will terminate.

Setting the Update Mode

The mode parameter defines the state in which the waveform/pattern is to proceed and under what conditions
it should terminate. Here, there are two basic modes that can be set with the mode parameter. The first, set by
the value DdwmNShot, will continue the waveform/pattern output until a specified update count has been
satisfied. The second, set by the value DdwmInfinite, will continue the waveform/pattern output
indefinitely until explicitly terminated by the application. The deviceType and chan parameters must
correspond with a channel that has been configured for waveform/pattern output using the
daqDacSetOutputMode

function. The mode values are defined as follows:

DdwmNShot

– Continues generating waveform/pattern output until updateCount number of samples have

been output to each channel. Upon completion of the specified amount of updates, the waveform/pattern
output will automatically terminate and disarm the waveform/pattern output for all channels. For more
information on configuring channels for waveform/pattern output operation, see daqDacSetOutputMode.
Since each output update clock initiates an output on each channel concurrently, the updateCount
parameter indicates the number of sample updates that are to occur on each channel before the
waveform/pattern output operation is terminated.

DdwmInfinite

Continues generating waveform/pattern output indefinitely. The waveform/pattern output

will continue indefinitely until the application issues a daqDacWaveDisarm function or a fatal error
condition occurs during the waveform/pattern output operation. In this mode the updateCount parameter is
ignored.

DdwmNFileIterations

– Continues generating waveform/pattern output until the the specified number of

file interations are written, then stops. This setting only works in file mode. Note that, while in this mode, the
updateCount

parameter of the daqWaveSetMode function will return values in terms of file iterations

instead of updates (an update consists of all data required to update all channels during a single output clock
pulse).

With either mode, the waveform/pattern output will not actually begin until the waveform/pattern output
operation has been properly armed (daqDacWaveArm) and triggered (daqDacWaveSetTrig)

Prototypes

C/C++

daqDacWaveSetMode(DaqHandleT handle, DaqDacDeviceType deviceType, DWORD
chan, DaqDacWaveformMode mode, DWORD updateCount);

Visual BASIC

VBdaqDacWaveSetMode&(ByVal handle&, ByVal deviceType&, ByVal chan&, ByVal
mode&, ByVal updateCount&)

Program References

DAQDACEX02.CPP, DAQDACEX03.CPP

Programmer’s Manual

908494

Daq API Command Reference 4.4-35