LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between several applications on the same computer

I have several applications running on the same computer. They are three separate programs written in LabVIEW 8.0, and then made executable. At most it can be three applications (this far), and all three applications are controlling the same test equipments, but there is no connection between the programs. To make sure that not several applications wants to use the equipments at the same time I need some sort of connection between the programs, which tells each application whether it is OK to use the equipment or not. I tried to use global variables for this, but the engineer at NI told me that global variables used in different applications are using different parts of the memory so it is not possible to use a global variable to sommunicate between applications.
 
How do I solve my problem? Do I have to use datasockets?
 
/Viktor
0 Kudos
Message 1 of 2
(2,573 Views)

Using Datasocket would be one easy way of handling this. If you want to, you could also go a bit lower and use the TCP functions (that's what DS uses) to do this yourself (assign each program a port to listen at and communicate between those programs). Search the example finder for "TCP" to see some examples. You will then just need to come up with a way to determine which program is the one using equipment. You could probably run another program which would decide (any of the programs can check if it's running when it starts and if not run it).

The program would always listen on a specific port and another program would only have access to the device if it managed to open a connection to the listener and get the answer that it is allowed.


___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,551 Views)