LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

build stand-alone application with Global variable

Question:

   how to build a VI access a global variable into a standalone EXE file?

 

 

there are multiple VIs access to one Global variable, one of the VIs need to run in background to update the Global variable, whick i built into EXE file.

the rest VI will be called in from Teststand to retrieve the Global variable.

 

the global variable is updated if i run the background VI in labview, but after i build it into EXE file, it seems the global is not updated even the EXE running OK.

 

0 Kudos
Message 1 of 3
(3,474 Views)

An executable has its own memory space, so it can't share a global variable with a VI.

To exchange data between a VI and an exe you need other techniques, e.g.:

- shared variables

- TCP/IP

- database

- file

- VI Server

 

Hope this helps

 

Message 2 of 3
(3,464 Views)

Hi,

 

Do you actually need to have an executable.

 

If you can call your global variable updater VI as a VI form, then your other VI's will still beable to see the Global variable.

 

You can launch you global variable updater VI in a new thread or execution so that it runs in the background and returns back to TestStand sequence so you can continue on with the rest of your tests.

 

Remember to close your global updater VI before you complete your test sequence run.

 

 

 

 

Regards
Ray Farmer
0 Kudos
Message 3 of 3
(3,457 Views)