LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Functional global variable shared between two exe files?

I have a very nice (?) functional global variable or procedure, that logs event text. At init I set it up with a path to a log file and a reference to a table where the text should be written.

Everywere in in the code where I need to log something I just put in the vi, with some descriptive text, and I get it logged. Works also in sub vi's etc. since all path + table ref is kept inside the function.

But a few times I have seen that two exe files with this vi seems to use the same copy of the functional global, so if I setup Path="A" in exe file A, also exe file B has path="A".

 

Can someone describe how this works? I am just seeing ghosts?

Ola

0 Kudos
Message 1 of 3
(2,485 Views)

Please share some code to go with your question.

 

The only way that I can imagine what you described is that you are either calling the AE via VI server or are not using actual exe's but running two top level VIs in the same context.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 3
(2,470 Views)

You are not seeing ghosts.  But, you do have something wrong in there if the two application data spaces are sharing a resource.  We call those types of undesired side effects "Bugs" (Its considered poor practice to write them but, sometimes it happens to even the best of us)

 

So lest answer the question bluntly.  No, you do not have a very nice FGV- it has a bug in it or in how it is being used.


"Should be" isn't "Is" -Jay
Message 3 of 3
(2,456 Views)