LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble converting from single-process to network-published shared variables

Hi,
 
I have 2 applications that use shared variables to communicate to each other.  One application monitors a vehicle data bus that we are connected to and basically appends messages to this shared variable array every 10 ms.  The other application references that array periodically to look for messages that are relevant to it.
 
I started by using a single-process shared variable to communicate this data between applications... and it worked great when I was running the VI's in the LabVIEW environment.  However, when I built these into applications, I had problems because each application would create its own instance of these shared variables, and so they couldn't pass data between one another (at least this is what I suspect is going on).
 
Anyway, I decided to switch my shared variable to "network-published" so that I am using TCP to share this data.  The good thing is that it does, in fact, share the data between the two applications now, even if they are built into executables.  However, it seems like I am losing data or having timing issues somewhere in the mix here because the program that references the variable (not the one that writes to it) seems to periodically "miss" a message that I know should be in the array.  I don't know if this is because I am reading the array before it has been "updated" on TCP or what.  Does anybody have any ideas or know of any issues with how quickly we can "update" these types of variables?
 
Thanks!!
0 Kudos
Message 1 of 2
(2,485 Views)
Hi
 
There is a guaranteed latency of 10 ms if the 8 KB buffer for the shared variable is not already filled up. In 8.5 there is no way to improve this latency. However, in 8.5.1 you can improve this by using Flush Shared Variable Data.vi to send the data faster if the buffer doesnt fill up. Please refer to the Network Shared Variable section of the following document for more detailed information on this:
 
 
I hope this helps!
 
 
Mehak Dinesh
Applications Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 2
(2,458 Views)