Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

network bound variable to daqmx

Hi all,
 
I have a VI that runs fine reading data through Daqmx.
I also have a 2nd vi running on another pc that has network shared variables bound to some digital in daqmx channels on the 1st PC.
 
The problem is if i run this at the same time as my 1st vi,my 1st vi no longer processes the digital inputs (i.e.i switch to on and off and nothing happens), do i need to create network shared variables that i populate from the daqmx ones on the first pc and read those across?, im just wondering if its because you cant read the daqmx channels through the daqmx vis and also try to read them through network bound variables?
 
hope that makes sense
 
Mike
 
0 Kudos
Message 1 of 2
(2,874 Views)
Hi Mike

Like we discussed on the phone earlier, this is expected behaviour. The DAQmx OPC server which is performing the network communication is continuously running and when you perform a network read it runs a task to read the data on your Global Channels. This will cause the read on  your host machine to error saying the resource is already reserved. The way to get around this is to write your channel data to a library of shared variable on your host machine and read in these variable on the client.

You mentioned how you were not sure if this behavour is correct as you did not see the same issue when perform writes in the same way. The reason it works with the digital writes is due to a difference in the way the driver operates between the reads and writes. If you look at the DAQmxWrite(Digital).vi you will see an auto start input, this will determine if the VI automatically starts the task if it has not already been explicitly started.

I hope this information helps

Rich
NI | UK
0 Kudos
Message 2 of 2
(2,840 Views)