From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Same device, different channel DAQ task setup in teststand

Hi,

I'm wondering what the best way would be to initialize two DAQ tasks, which share the same device but have differernt channels on the device.  I'm trying one method, but I get a "resource already in use" error. 

I currently have a vi which does a DAQmx create daq task, then an DAQmx create channel.  I am calling this vi from two teststand steps, with unique channel names, physical channel, etc.  Later, I try to do a DAQmx Start Task, I get an error on the second task, saying resource in use.  I want to maintain a separate task because I may need to read at different times in different test cases, and also I am processing the data separately.  It seems to make more sense to have them in their own task, but I'm having difficulty in the correct method to do this.  Any insight much appreciated, thanks

 

David J.

0 Kudos
Message 1 of 2
(2,635 Views)
If you had done a search for that error, you would have seen that there is simply no way to have two separate tasks active at the same time. You will have to create a single task with both channels in it.
0 Kudos
Message 2 of 2
(2,626 Views)