Creating an NI-DAQmx Task from an Existing Task in MAX
- Updated2023-02-17
- 1 minute(s) read
Creating an NI-DAQmx Task from an Existing Task in MAX
You can use the NI-DAQmx .NET library to load a task that you have already configured and saved in Measurement & Automation Explorer (MAX).
Complete the following steps to create a task in MAX:
- From the Start menu, select to launch MAX.
- In the left-hand pane, right-click Data Neighborhood and select Create New.
- Select NI-DAQmx Task and select Next.
- Follow the on-screen steps to create and configure the NI-DAQmx task.
The following code shows how to load a task saved in MAX using Visual C# or Visual Basic .NET:
VB.NET
Dim myTask as Task myTask = DaqSystem.Local.LoadTask("mySavedTaskName")
C#
Task myTask = DaqSystem.Local.LoadTask("mySavedTaskName");
After the task is loaded, you can begin using the task. You also can make changes to the task configuration before using the task.
Note If you redistribute a program that depends on an NI-DAQmx task that is stored in MAX, you must also redistribute that stored task information. Refer to
Deployment in the
NI-DAQmx Help for a detailed explanation of how to redistribute NI-DAQmx applications.