Follow the DAQ Assistant
or NI MAX
sections of Create Tasks for NI-DAQmx Devices in LabVIEW
before beginning these steps.
Starting with DAQ Assistant:
When you configure a task using the DAQ Assistant Express VI, the task is local to the application, and you cannot use it in other applications. You can convert a DAQ Assistant Express VI to a DAQmx Task Name control if you want to save the task to MAX and use it in other applications or to generate code.
Right-click the DAQ Assistant
and choose either Converting To NI-DAQmx Task
or Generate NI-DAQmx Code.
- Converting to NI-DAQmx Task
- Once this option is clicked, the configuration window will re-open to confirm any configuration changes. Update anything you need.
- Click OK
- This will create a Task Constant and populate the task in NI MAX under My System >> Data Neighborhood >> NI-DAQmx Tasks
- Follow the Task Constant section below
- Generate NI-DAQmx Code
- Once this option is clicked, it will create code using LabVIEW API similar to the Configuration and Example option through the Generate Code option. It was at least include:
- Any configuration information as constants
- DAQmx Read VI or DAQmx Write VI
- DAQmx Stop VI
Note: This option will not save the task in NI MAX
- Use this to create the rest of your application.
DAQmx Task Name Constant:
Once you have a DAQmx Task Name (Task Constant)
, right-click the Task Constant
and hover over Generate Code
. You have the following options: Example, Configuration, Example and Configuration,
and Convert to Express VI.