User manual

Chapter 3 Software Overview
NI-DAQ User Manual for PC Compatibles 3-44 ni.com
Basic Waveform Generation with Pauses
The application skeleton described in this section is nearly identical to
the basic waveform generation application skeleton. The difference is that
the description in this section includes the pause and resume operations.
Figure 3-16 illustrates the ordinary series of calls for a basic waveform
application with pauses.
The first step of Figure 3-16 calls
WFM_Group_Setup
.The
WFM_Group_Setup
function assigns one or more analog output channels
to a group.
The second step is to assign a buffer to the analog output channels using the
calls
WFM_Scale
and
WFM_Load
.The
WFM_Scale
function converts
floating-point voltages to integer values that produce the voltages you want.
The
WFM_Load
function assigns a waveform buffer to one or more analog
output channels.
The next step is to assign an update rate to the group of channels using the
calls
WFM_Rate
and
WFM_ClockRate
.The
WFM_Rate
function converts a
data output rate to a timebase and an update interval that generates the rate
you want. The
WFM_ClockRate
function assigns a timebase, update
interval, and delay interval to a group of analog output channels.
Notice that there are restrictions for using the
WFM_ClockRate
function to
specify delay rate. Refer to the
WFM_ClockRate
function description in the
NI-DAQ Function Reference Online Help file for further details.
Your application is now ready to start a waveform generation. Call
WFM_Group_Control
(operation=
START
) to start the waveform
generation in the background.
WFM_Group_Control
will return to your
application after the waveform generation begins.
The next step in Figure 3-16 is an application decision to pause the
waveform generation. The application uses a number of conditions for
making this decision, including status information returned by
WFM_Check
.
Pause the waveform generation by calling
WFM_Group_Control
(operation=
PAUSE
).
PAUSE
stops the waveform generation and maintains
the current waveform voltage at the channel output.