LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resource allocation for different tasks

I have been trying to use the example code: "Gen 0-20Ma Current.vi" to operate a series of 8 Mass Flow Controllers, which respond either to a voltage or current load (I have them set for voltage).  The code works fine for a single MFC but as soon as I duplicate the code to try and simultaneously control a second MFC, which is wired onto a second analog channel I receive the error: "Resource Requested by another task".  I though I had this fixed by giving each of the tasks a unique name as opposed to "unnamed" but alas the error still pops up.  Strangely the code runs fine when I am in the "highlight execution" mode. 

 

I am using LabView 2010 and an NI 9264 mounted on a NI DAQ-9178.  I was essentially using the example code as is, so I did not post it in this message.  

 

Thanks so much!

0 Kudos
Message 1 of 3
(2,065 Views)

It's easier to help if you post some code so we understand what's not working.

0 Kudos
Message 2 of 3
(2,054 Views)

Hi maxb_colo,

 

Basically, you have 8 MFCs each connected on their own channel of your cDAQ 9264 (so MFC1 on ai0, MFC2 on ai1, MFC3 on ai2, etc.) and can only use one at a time?

 

When using DAQmx, you need to keep all analog input tasks for a single device as one task. You can have one analog input task that addresses multiple channels of a device. Here is a short article that shows how to configure multiple channels for one task. Scroll down for how to do it in LabVIEW.

 

If you try this and still run into problems, feel free to reply with a screenshot of your block diagram and the error message and I will be happy to help you get it working. Best of luck!

Micah M.
National Instruments
NIC AE Specialist - Test
0 Kudos
Message 3 of 3
(2,041 Views)