LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't read global variable value

Solved!
Go to solution

Hello All,

 

This is very odd, but I have a subVI that reads in data from a dstp URL. I have stored the URL address in a global variable, but everytime I run it in debug mode the URL address doesn't show. The indictor shows a blank string. I have even changed the indictor to display hex and it still shows blank.

 

However, what I run this same subVI in a different project it works just fine and I can see the URL address some out of the global variable.

 

Any help will be greatly appricated.

0 Kudos
Message 1 of 5
(2,736 Views)

I think it could be that rats have chewed through your power cable.  It's about as specific as I can get without seeing some code.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 5
(2,694 Views)

What is "debug mode"? Where is the "indicator" located and how does it get written?

0 Kudos
Message 3 of 5
(2,677 Views)
Solution
Accepted by topic author champ065

debug mode? (highlight execution??)...global variable ... work fine in another project ...

 

My Ouija board just spelled "race condition" but everybody knows Ouija boards can be wrong.

 

Ben64

Message 4 of 5
(2,643 Views)
Solution
Accepted by topic author champ065

This does scream "Race Condition".  Make sure the global variable(s) is/are initialized before any real code runs.  In debug mode, you may be slowing down the thread that initializes the variable while the thread that reads it is running fast still, causing the reader to read bad/old data.


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 5 of 5
(2,606 Views)