The following examples illustrate how to programmatically save NI-DAQmx Tasks, Channels, and Scales. This allows the creation of an application which can be deployed to an end user and when ran, it will configure their system with the tasks, channels, and scales defined.
The following example VIs perform the following functions:
Create and Save Task - Programmatically creates and saves an NI-DAQmx task.
Create and Save Global Channel - Programmatically creates and saves an NI-DAQmx Global Virtual Channel.
Create and Save Scale - Programmatically creates and saves an NI-DAQmx linear scale.
Create and Save Task, Channel, and Scale - This is the most complicated of the four examples, so it is encouraged that the user understand the first three examples before running this example. This example creates and saves a linear scale. Then a DAQmx Global Virtual Channel is created which references the linear scale. The Global Virtual Channel is then saved. Finally, a DAQmx Task is created which references the DAQmx Global Virtual Channel which was just saved. The Task is then saved. So in the end the user has a Task which references a Global Virtual Channel which references a Scale.
LabVIEW 2010 or compatible
DAQmx 9.1.5 or compatible
NI Multifunction DAQ Card
Steps to Implement or Execute Code
Download and open the LLB
Select which example you would like to use within the LLB
Configure all of the controls on the front panel of the example you selected
Run the example VI
Repeat steps 2-4 until finished
Additional Information or References
Create and Save Task Block Diagram
Create and Save Global Channel Block Diagram
Create and Save Scale Block Diagram
Create and Save Tasks Channel and Scale Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**