LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shared variable change its value with delay

Hello. My shared variable shows an old value during some time after writing a new one. What is the reason?
0 Kudos
Message 1 of 6
(2,604 Views)
Hello Err,
      Can you please give us more information about your application and the behavior of the shared variable?  How are you writing to the shared variable?  How long does the shared variable take to update?  What is the most simple example of this behavior.  Please post a screenshot of your VI.  What version of LabVIEW are you using?

Thanks,

NathanT
0 Kudos
Message 2 of 6
(2,589 Views)

Hello, Nathan

I have 2 independent VI's on the same PC. The one writes shared variable (double) inside while loop, and the other reads it inside own while loop. The new value may didn't pass through shared var at all, or it may take a few seconds (1-3) to change the value. I use LV8 

0 Kudos
Message 3 of 6
(2,575 Views)
Do you have buffering enabled on your shared variable? If yes, then try disabling it and see if it makes a difference.
Also, if possible then please post your code for us to fully understand what might be happening.
 
Regards,
Chetan K
Application Engineering
National Instruments
0 Kudos
Message 4 of 6
(2,560 Views)

CKap,

how to check buffering enabling for shared variables? I've attached pics of block diagrams: VirtualSpectrometer writes shared variable dLambda, and Camera reads it. And sometimes, even when VirtualSpectrometer attemp to write 0 to dLambda for the number of loop's periods, dLambda stay non-zero (to be exact +/-5.55) for a couple of seconds.

Download All
0 Kudos
Message 5 of 6
(2,527 Views)
I've checked buffering enabling: for all shared variables buffering disabled.
0 Kudos
Message 6 of 6
(2,503 Views)