From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand and LabVIEW share functional global variables

I build a functional global variables in a LabVIEW project, and I use it both in VIs and TS sequence files correctly.  However, when I generate a EXE from VIs, the functional global variables don't work well in the TS sequence. How can I deal with it?

Message 1 of 4
(2,474 Views)

@GrayJoker wrote:

[...]  However, when I generate a EXE from VIs, the functional global variables don't work well in the TS sequence. How can I deal with it?


Brutal answer: Do not use global data storage.

The reason is that the global variable you are using from TS is (presumably) still a "stand-alone" global while the EXE uses an internal one. More details can be found when digging into the topic "Application Instance" in LabVIEW.

I strongly recommend to use parameters to pass data between TS, code modules and the UI and NOT using global data structures.

 

(The alternative to rewriting stuff would be configuration of the LV adapter in TS to use your EXE as runtime environment for LV which requires your EXE to provide an ActiveX interface. This is presumably equal amount of work compared to implement a proper solution.)

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(2,454 Views)

@Norbert_B wrote:

(The alternative to rewriting stuff would be configuration of the LV adapter in TS to use your EXE as runtime environment for LV which requires your EXE to provide an ActiveX interface. This is presumably equal amount of work compared to implement a proper solution.)


Or compile the globals into a Packed Project Library and make sure you are only calling the PPL globals.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(2,451 Views)

@crossrulz wrote:

@Norbert_B wrote:

(The alternative to rewriting stuff would be configuration of the LV adapter in TS to use your EXE as runtime environment for LV which requires your EXE to provide an ActiveX interface. This is presumably equal amount of work compared to implement a proper solution.)


Or compile the globals into a Packed Project Library and make sure you are only calling the PPL globals.


Did you test this? It still can lead to two different global VIs in memory in different application instances.... (i assume at least)

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(2,447 Views)