취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

Can't read global variable value

해결 완료!
솔루션으로 이동

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 포인트
1/5 메시지
3,455 조회수

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 포인트
2/5 메시지
3,413 조회수

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

0 포인트
3/5 메시지
3,396 조회수
솔루션
승인자 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

4/5 메시지
3,362 조회수
솔루션
승인자 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.



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
5/5 메시지
3,325 조회수