LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shared variable bug

Hello all:

With the attached project, run the shared variable bug.vi and press the button labeled Press me First.  Then press the button labeled Press me Second.  On both string indicators there shoud be text that say Hi There! in both string indicators.  However, sometimes I only get only a Hi OR There! (did I say OR Smiley Wink) and sometimes and empty string for both itring indicator outputs.

Note this only happens when you FIRST run the VI.  To repeat the bug, you will have to stop the VI and unload it from memory.

Can somebody else confirm this behavior?  If confirmed, this is obviously a bug.

Robert
0 Kudos
Message 1 of 5
(2,967 Views)
Excuse my typos & I forgot to mention I'm using LV8.5

Robert
0 Kudos
Message 2 of 5
(2,966 Views)
I get the same behavior which doesn't seem correct to me either but I'm not that familiar with shared variables.

The variables are outputting a no value warning when they mess up. So you could that to make a work around. Also adding front panel controls that are data bound to the variables seems to make the problem go away.

Matt W
0 Kudos
Message 3 of 5
(2,924 Views)
There seems to be some sort of latency when you read the value of the shared variable.   I took your example, but I moved the read of the shared var. outside of the loop.  After the first boolean is pressed, it took two loop iterations ~100 mS for the shared variable value (read) to update.


>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 4 of 5
(2,912 Views)
Thanks for the reply.  But the problem is I have two separate apps.  Each loop in my original attachment can be viewed as a separate app.  Thus, changing the architecture would be a major pain.  I must add this did not occur in LV 8.2.
My argument is it's a bug in LV 8.5

Robert


Message Edited by rberger on 01-29-2008 10:19 AM
0 Kudos
Message 5 of 5
(2,906 Views)