LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HELP, Acquire data in seperate loops

I am very new to LabVIEW and I have no idea how to solve my problem.

 

I want to run two completely seperate DAQ programs in the same VI. Each program will acquire 6 differential +/-5V signals from a load cell and 6 differential +10/-0V signals from transducers. I then want to save the data in seperate files. I keep getting an error that says "this task has already been reserved by a different task". I don't know how to stop this or get around it.

 

I am using LabVIEW 11, Windows XP, cDAQ-9174 chassis, NI-9205 modules.

 

My code is attached. Anything to help would be appreciated. I am trying to learn so feel free to tell me everything is wrong if you can help.

 

Thanks, ~Chris

0 Kudos
Message 1 of 6
(2,565 Views)

You can't.  All the acquisition on the same device needs to be in the same task.

 

Have one loop that does the acquisition.  Then split the data in two and send it to two different loops by way of a queue in a producer/consumer architecture.

0 Kudos
Message 2 of 6
(2,552 Views)

By device, do you mean each channel, the 9205 modules, or the chassis?

0 Kudos
Message 3 of 6
(2,536 Views)

I thought that there is only one timing mechansim in effect for the entire chassis.  That would be the source of the conflict.  You can only have one DAQ task using a given timing mechanism at once. 

 

But looking at the specs. http://sine.ni.com/nips/cds/view/p/lang/en/nid/207535, it says "Run 7 hardware-timed operations simultaneously from analog, digital, or counter/timer channels".  So perhaps it can be done, but there might be a special way to set up the timers between the different tasks to make it work.

 

I have a cDAQ-9174, but I only have one module, and when I use it, having all the channels in one task worked for my purposes just fine.  So I haven't had a reason to try to define different simultaneous tasks.

 

Perhaps someone who has tried multiple DAQ tasks with this device and succeeded can jump in and share the secret.

0 Kudos
Message 4 of 6
(2,525 Views)

I am running two modules. My goal was to use a producer/consumer loop to acquire 12 transducer 0-10V signals on 1 module. Then I added a loop to acquire -5 to 5V signals from load cells (12 channels) on another module. I need to somehow synchronize these two tasks.

 

Any help would be appreciated. I am new so bear with me.

 

~Chris

0 Kudos
Message 5 of 6
(2,522 Views)

I was able to do this successfully using simulated devices.  What is the error code and the whole error message?  

 

Also, when you say synchronize, what exactly do you mean by that?  Do you need them to start at the same time, or do you want the samples to occur at the exact same time?  Are you sampling both at the same rate?

 

Ryan

Applications Engineer

Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(2,494 Views)