DAQ Assistant Express VI

DAQmx - Data Acquisition VIs and Functions

Edition Date: January 2019

Part Number: 370469AP-01

»View Product Info
Download Help (Windows Only)

Creates, edits, and runs tasks using NI-DAQmx. Refer to the NI-DAQmx Readme for a complete listing of devices NI-DAQmx supports.

Details

Block Diagram Inputs

ParameterDescription
dataContains samples to write to the task. data is an output for measurement tasks and an input for analog and digital output tasks. data does not appear for counter output tasks.
error inDescribes error conditions that occur before this Express VI runs.
number of samples

Specifies the number of samples to acquire or generate for each channel in a finite task. For finite tasks, this VI ignores all settings for this input other than the initial input. For example, if you use this VI in a loop, specifying a new value in each iteration, NI-DAQmx ignores all values other than the one specified in the first loop iteration. If you want to to run multiple finite operations in a loop, such as to generate multiple pulse trains, each with a varying number of pulses, generate code for this VI.

For continuous tasks, NI-DAQmx uses this value to determine the buffer size and the number of samples to read from the buffer.

This input does not appear for all channel types and sample timing types.

rate Specifies the sampling rate in samples per channel per second. This input does not appear for some channel types and sample timing types. If you use an external source for the Sample Clock, set this input to the maximum expected rate of that clock.
stopSpecifies to stop the task and release device resources when this Express VI completes execution. For continuous tasks, this input is FALSE by default, meaning the task continues to run until the application stops. To stop the task so you can use the device again in the same application, wire this input to the same stop control you wire to the conditional terminal of the while loop. For single-point and finite tasks, this input is TRUE by default, meaning the task stops after all samples are acquired. To optimize single-point performance when using this Express VI in a loop, wire this input to the same stop control you wire to the conditional terminal of the while loop.
timeout Specifies the amount of time in seconds to wait for the VI to read or write all samples. This VI returns an error if the time elapses. For input operations, the VI also returns any samples read before the time elapses. The default timeout is 10 seconds. If you set timeout to -1, the VI waits indefinitely. If you set timeout to 0, the VI tries once to read or write the samples and returns an error if unsuccessful. NI-DAQmx performs a timeout check only if the VI must wait to read or write samples. This input does not appear for all channel types and sample timing types.

Block Diagram Outputs

ParameterDescription
dataContains samples read from the task. data is an output for measurement tasks and an input for analog and digital output tasks. data does not appear for counter output tasks.
error outContains error information. If error in indicates that an error occurred before this Express VI ran, error out contains the same error information. Otherwise, it describes the error status that this Express VI produces.
stoppedIndicates whether the task stopped. The task stops if the stop input is set to TRUE or an error occurs. This output appears for continuous or hardware-timed single-point tasks only.
task outContains a reference to the task after this VI completes execution. Wire this output to other NI-DAQmx VIs to perform other operations with this task.

Details

When you place this Express VI on the block diagram, the DAQ Assistant launches to create a new task. After you create a task, you can double-click the DAQ Assistant Express VI to edit that task. For continuous measurement or generation, place a while loop around the DAQ Assistant Express VI.

Using the DAQ Assistant Express VI creates a task accessible only to the Express VI. To make the task globally accessible from any application, you must convert the Express VI to an NI-DAQmx task saved in MAX.

You can generate NI-DAQmx API code from a DAQ Assistant Express VI. Right-click the DAQ Assistant Express VI and select Generate NI-DAQmx Code from the shortcut menu to generate both configuration and example code for the task.

For continuous single-point input or output, the DAQ Assistant Express VI might not provide optimal performance. Refer to the Cont Acq&Graph Voltage-Single Point Optimization VI in examples\DAQmx\Analog In\Measure Voltage.llb for an example of techniques to create higher-performance, single-point I/O applications.

WAS THIS ARTICLE HELPFUL?

Not Helpful