LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I create two AI tasks using the same DAQ unit?

Solved!
Go to solution

Hi All,

 

Sorry for the gumby question, but I am new to all this DAQmx stuff, and I am trying to figure out how it all works.

 

I am using a USB-6229 with LabVIEW 8.6.1.

 

I would like to use 30 of the AI lines to monitor 30 remote voltage signals.

 

I would like to use the other two AI lines to perform independent voltage input tasks.

 

I tried to create and start two tasks, but I get an error message when I try to start the second task.  It tells me the resource is not available.

 

What is the cleanest way to set things up to work for me?

 

Thanks in advance.

 

- FB

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 1 of 7
(4,117 Views)
Solution
Accepted by topic author diarmaede

Hi diarmaede,

you can only create one AI task on your card. You have to read all your AI's from this card in one loop. You can split the result and send it to different loops to work on it.

 

Hope it helps.

Mike

0 Kudos
Message 2 of 7
(4,113 Views)

Thanks, Mike.

 

That's what I figured, but I was hoping I was wrong.

 

- FB

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 3 of 7
(4,109 Views)
No. You have to use a single task. There is a single A/D clock and the inputs are muxed. Was the reason for the independent tasks that you wanted to use different sample rates? If so, you would have to sample all at the higher rate and decimate the lower rate channels.
Message Edited by Dennis Knutson on 06-17-2009 10:44 AM
Message 4 of 7
(4,103 Views)

Hello,

 

My work involves having to acquire data from thermistors as well as thermocouples simultaneously using a PCI 6071E DAQ card. I'm using an AI Voltage task to acquire data from the thermistors after which I manipulate the data within the loop to get the temperatures. To acquire data from the thermocouples I'm trying to use an AI Temp TC task but I'm getting the 'specified resource reserved' error. From readin the previous posts I understand that two AI tasks cannot be run at the same time from the same card. If I acquire thermocouple data as volatges, then the manipulation is quite involved as there are a lot of equations and parameters that have to be manually programmed. I'm very new to labview and as such would prefer to use the DAQmx function for thermocouples. Is there any way that I could use the AI Voltage and AI Temp TC tasks together in the same programme?

 

Any help/advice is greatly appreciated.

0 Kudos
Message 5 of 7
(3,404 Views)

Yep, all you need to do is call the DAQmx Create Virtual Channel VI's one after the other using the same task.  Alternatively, if you are using the DAQ Assistant, you can add different channel types to the same assistant.

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 6 of 7
(3,395 Views)

Hair-splitting:

 

You do not need the DAQ Assistant to configure channels of different types.

 

You CAN create more than one task for a single DAQ device BUT only one can be active at any time. Using two tasks is handy if you have a long term process you have to moniotr and when a condition is met, stop the slow task and start the fast task.

 

Done splitting hairs.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 7
(3,390 Views)