LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sharing variables between concurrent executables

I want to sanity check this approach with other developers.

I have an executable that runs a manufacturing machine, the PC is quad core, 4GB memory, processor and memory are loaded around 50% most of the time it's manufacturing.  We deploy new builds frequently as the software development is not fully complete.

I have a concurrent executable that logs temperature of 4 machine probes via a serial port and some digital IO via DAQmx, logs every 30 seconds sometimes more frequently during certain experiments.  Temperature logger is a concurrent executable because the main executable is frequently stopped for various reasons and I don't want the temperature log interrupted.

I would now like the main executable to take actions based on certain temperature limits.  What is the best method to share variables between the 2 executables and is this whole approach of 2 concurrent executables wise?

0 Kudos
Message 1 of 2
(2,644 Views)

Simplest method would probably be to use a Network Shared Variable.

 

You could also use UDP to broadcast the temperature, TCP/IP (probably not worth it), Web Services etc.

 

If all you want to do is to read the temperatures from the second application, I would probably just go for Network Shared Variables or UDP broadcast. If I wanted to do something more advanced like command/response - then TCP/IP is the way I'd go (and how I've done it before).

 

You might also want to think about if you want non-LabVIEW applications to be able to access the data and how you would retrieve the data in this case (e.g. sending strings can be easily converted into native data types for the language of the other applications). You also need to think about version changes - if you're using a cluster and variants/xml and the cluster changes in one of the applications, how do you decode it on the other side if the type-def is different (because you've added something to it).

 

It's very common to have multiple applications talking to each other - the only thing you really have to think about is what do you do if communication stops for some reason - what happens if the logger stops running for some reason (e.g. crash, shutdown).


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 2
(2,630 Views)