LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQmx Task

When creating a new NI-DAQmx task there are two options to choose from: Project & MAX. What are the differences and purposes ?

Thanks

0 Kudos
Message 1 of 6
(3,046 Views)
You can store the task either in MAX (meaning it's accessible to programs other than LabVIEW, or you can run it directly from MAX to test it), or you can store the task in your project (meaning it's accessible only in LabVIEW).
Message 2 of 6
(3,033 Views)

Thank you. Expend from my question, if a task is defined from a device in my development PC as "dev 2" and then when a program is compiled and run at the test PC where the same device is defined as "dev 1". Then would it be a conflict. How would I define a task to prevent such problem ?

Thanks

0 Kudos
Message 3 of 6
(3,026 Views)
I'm not sure if you can define a task in MAX or the project that will automatically update to a different device number. Obviously, you can edit the task in MAX or rename the device in MAX and fix the problem that way. Also, remember that you do not need to define a task in either the project or in MAX. You can create the entire task in LabVIEW. You can perform a query of the devices present and based on that, configure everthing.
Message 4 of 6
(3,019 Views)
Thank you. Could you show me how to create entire task in LV. How to write code to query the device present and then configure everything.
0 Kudos
Message 5 of 6
(3,009 Views)

Below is how to get a list of devices. These are all properties on Measurement I/O>DAQmx>DAQmx Advanced>DAQmx Constants and Property Nodes. Once you get a list of devices, you can do a normal array search to find a specific type and use the index of element to determine the dev number from that array.

 

Just about all of the DAQmx examples create a task in code. All or any of the DAQmx functions such as Create Channel, Timing, Create Scale, etc. could be used. There are even functions to load, modify, save a task in MAX so thats another option.

 

Get List of Devices.PNG

 

Message 6 of 6
(3,001 Views)