LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Local Variables in Labview NXG?

Solved!
Go to solution

Gentleman -

 

I am failing at the simplest LV thing: getting a global Boolean variable to be set inside one VI's loop and read inside another VI's loop. I can get the Boolean global to work as a local variable just fine within a single VI, but the communication between VIs does not work. Here are the two VIs and the global.

 

I am using LV 2013. Is there some setting in LV that I have to adjust to allow globals to work from one VI to another? 

 

Thanks for your help, pk

0 Kudos
Message 1 of 4
(2,357 Views)
Solution
Accepted by topic author pkNOAA

Your problem is actually the Timed Loops.  They have the same ID, so only one of them can run at a time.  Since you are just using Windows, Timed Loops are kind of worthless.  Just use a normal While loop with a Wait inside of it.


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
Message 2 of 4
(2,352 Views)

Thanks! I changed the Loop ID in one VI and it worked. That is funny, cause my other question was why can't I get two VIs to run in the IDE. What is weird is that even the global does not work with the complied executables when they have the same loop ID.

 

Sweet! 

0 Kudos
Message 3 of 4
(2,344 Views)

@pkNOAA wrote:

What is weird is that even the global does not work with the complied executables when they have the same loop ID.


Nothing weird about that.  You have a fundamental issue where a loop cannot run because the loop ID is already used.  Your issues actually has nothing to do with the global variable.


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 4 of 4
(2,333 Views)