06-10-2015 03:53 AM
Hi all,
I am trying to acquire to Accerometer sensor data using cDAQ-9174 chassies thro NI 9234 module (Channel 0). I am using the same channel across different VI's to view the waveform graph. I get an error saying the resource is reserved by another task. How do i get over this.
06-10-2015 04:04 AM
hi, i dont think you can access the same channel concurrently from multiple vis, but you could pass the reference around, and have to take care that two vis dont block each other, each vi would have its own part of the whole data then.
best would be to aquire the data in one loop and pass/access the data to/from another loop which controls your UI.
06-10-2015 05:16 AM - edited 06-10-2015 05:16 AM
You want a single acquisition loop and then send the data to your other loops via a Queue or User Event. Note that if you use the queue, you need different queues for each loop that will want to read it.
06-10-2015 05:23 AM
Hi all,
Thanks for your time, sorry if i was not clear about my problem.
I have two different VI's. I am trying to read the accelerometer sensor signal from Ch0 of Module 9234 across this 2 diff VI's at the same time.
Basically i am calling this two VI's in the SubPanel. This is a problem since both the VI's are sharing the same resource, it throws an error.
06-10-2015 05:29 AM
Perhaps you did not understand the solution.
You cannot have two DAQmx tasks using the same resource. In this case, CH0 of your 9234. You what you want to do if have 1 task to read it and then send that data to whoever needs it. You have an architecture issue. Break the reading of the DAQ into a seperate module (parallel VI) that does nothing but read the DAQ and send the data to your two VIs that need the data via Queues or a User Event.