LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep updated global variables dynamically when only LV engine is available

I created an app that enables me to train an OCR (character recognition). Global variable file is used as my pattern database where I keep and update the characters that I later call to compare against a acquired image, that runs fine on my machine where I have LabVIEW 7.0 installed,

however for deploying the executables in a machine that only contains the LV engine I am not sure how to read/write the global variable that both executables the trainer and the OCR used to share in order to teach(write) or compare (read) from the Global variable vi and follow the same structure that I have on my development machine,

thanks

Vicente
0 Kudos
Message 1 of 3
(2,711 Views)
Hi Vicente,

If I understand correctly you are building two separate executables, one for each VI that you have on your development system. The issue is that when these two programs are run on the deployment system they no longer share a global variable.

The simplest solution I can come up with would be to build both of the VIs into a single executable. That is, add both the VIs as Sub VIs to a new top-level VI. This will allow the two VIs to run in the same instance of the LabVIEW runtime engine.

If this is not an option for your project, you we need to implement some type of communication between the two instances of the runtime engine. The DataSocket Overview might be a good starting point. Another alternative is using the TCP/IP functions to communicate between the two different applications.

Scott Y
NI
0 Kudos
Message 2 of 3
(2,691 Views)
Scott

Thanks for your comment,

You are right I was sharing the global variables with two different executables and I think your suggestion may work

I came up with a simple solution, instead of using global variables, what I did was to store all information on a binary file, that way the trainer updates the file when required, on the other side the OCR now calls the same file before doing the processing, I have not tried it on the machine that has only LavVIEW engine but I'm sure it will work fine,

thanks again

vicente
0 Kudos
Message 3 of 3
(2,659 Views)