ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI is a very simple bit of example code that uses a task created in Measurement & Automation Explorer (MAX) and acquires data.
Description
Tasks in MAX can be used in LabVIEW very simply. You can either drag a task from MAX straight into your block diagram or you can place a Task Constant from the functions palette. The Task Constant can be found under Measurement I/O»NI-DAQmx. From here all you need to do for an acquisition task is connect the task to a DAQmx Start VI and then to a DAQmx Read VI followed by a DAQmx Stop VI.
Performing a continuous read would require the use of a while loop with a stop condition around the DAQmx Read VI.
There are benefits of using a task from MAX instead of using a DAQ Assistant
Requirements to Run
Software
Hardware
Steps to Implement or Execute Code
To create a Task in MAX:

To implement your task in your LabVIEW code:

**This document has been updated to meet the current required format for the NI Code Exchange.**
Regards,
Dan King
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
谢谢
What do I have to do to use a task in CANoe? Is that possible?