LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you share a global between two programs over a LAN

I want to share a global variable which 2 programs can use but each program resides on different computers on my LAN. I have tried by placing the global in each program in the normal way but if I open the global on each computer they do not correspond.It is as if the 2 programs open a different copy of the same global in their respective memories.Are there settings in labview I have to change?Can anyone give me a tip? I want to share data in this way as opposed to my 2 programs accessing a networked  fieldpoint module simultaneously.
0 Kudos
Message 1 of 3
(2,833 Views)
Hi.
 
One way is to implement software interface to the common data. For example two processes are running on both computers and "talking" to each other using DataSocket. Theese processes produce Read and  Write methods.
 
As for your question I don't know how to configure direct global variable sharing.
 
Regards,
Jack

Jack
Win XP
LabVIEW 6.1, 7.0, 7.1, LabWindows/ CVI 7.1
Let us speek Russian 🙂
Message 2 of 3
(2,830 Views)

Globals are specific per-LV-application. This means if you run two EXEs that you built in LV, even on the same computer, the globals won't be shared.

The easiest option is probably using DS, as suggested by Jack. You right click the control in one PC and select to publish it as a certain address and right click the other control and choose to subscribe to that address and they will be synched.

Another option is using VI server to open a connection to the remote LV app and get the value of the specific control. Search for VI server in the documentation for more information.

Yet another option is implementing your own TCP messaging protocol. You can search the example finder for TCP and this site for TCP message protocol to find some examples.

What I don't understand, however, is why not get the data directly from the FP? There shouldn't be any problem with 2 computers reading the data from the FP.


___________________
Try to take over the world!
Message 3 of 3
(2,817 Views)