06-03-2010 02:09 PM
Is it possible to have multiple programs read separate analog in channels on the same DAQ at the same time. If so how can I do this. Each program has separate tasks and is using the DAQmx read.vi. I can run one at a time, but as soon as I start a another I get the error 50103 occurred at DAQmx Read (Analog DBL 1Chan 1Samp).vi:1. The specified resource is reserved. The operation could not be completed as specified.
I attempted to reserve the the DAQ before reading and unreserve after using the DAQmx control task.vi but this resulted in the same error.
I am using labview 8.6 with the usb-9162 with the ni 9213 cartridge.
06-03-2010 03:01 PM
Not that I know of.
I will generally put together a background process that offers the data updates as a service to other clients. Yes, that is not what you wanted to hear.
Ben
06-03-2010 03:12 PM
You would have to close your DAQmx reference in one vi before another vi could open one on the same DAQ device. You could have some sort of flag variable, maybe a LV style functional global, that would signal the need for DAQ use. Some sort of arbitration scheme in a separate vi would determine who gets priority over DAQ use. It would then send signals (more funtional globals) to each subvi telling them who should close and who should open. The differenct vi's would have to coninually poll the functional globals to see if they should open or close their session. This will be quite complex.
06-03-2010 03:23 PM
06-03-2010 03:45 PM
06-03-2010 03:54 PM
You could use Shared Variables. Will the different vi's all be subvi's from one main? If so, you could create a queue to pass data from one vi to another. Or you could use a LV style Functional Global. Or you could use just regular Global variables. Globals can be accessed by different vi's without having a main.
06-04-2010 09:34 AM
06-04-2010 11:58 AM