05-13-2016 06:34 PM
Here is my dilemma,
I have many different NI 9213s (16 channel thermocouple module) that I use in my lab. I only need to use them one at a time, but I want to use the same LabVIEW code with each. I use NI MAX to create a task for the NI 9213 that I am using, but when I plug a different NI 9213 into the computer I need to delete the first task and make a second tast with the second NI 9213.
My questions is, is there a way to be able to plug in different NI 9213s into the computer and not have to reconfigure the tasks in NI MAX? If so, how?
Thanks,
Maddie
Solved! Go to Solution.
05-13-2016 06:49 PM
The short answer is yes, but you need to supply a little more info to get a better response. First, what hardware are you using with the 9213 modules? Is it in a CompactDAQ, CRIO, or USB module? Your best bet is to post your code and then I, or someone else, can offer better advice.
05-13-2016 07:05 PM
Maybe this will help you out. It will do a check to find all of the devices and then find the first of the type you want. From there, you can build up the task programmatically using that device.
05-16-2016 11:29 AM
I am using a USB module with the 9213. Thank you for the exmple code. Could you possibly give me example code on how to programatically build a task once I have the device I want. That is what I am having trouble with.
Thanks!
05-16-2016 02:19 PM - edited 05-16-2016 02:19 PM
Just use Concatinate String using the returned device name and the channel names to build of the full channel name and then DAQmx Create Channel to add that channel to your task.
05-16-2016 04:47 PM