LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use of Global Variable in VI

Solved!
Go to solution

Christian is correct. In the code I posted the part that "reads then writes" the global has a classic race condition.

 

Race scenario:
VI_1 - Reads Global but hasn't written a new value yet
VI_2 - Writes global with update
VI_1 - Writes global with old global value -> VI_2 update is lost

 

I had intended to make that code section into a non-reentrant subvi, but got distracted.
Testing seemed to work but that is because data was being updated continually
which masked the issue.

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 11 of 11
(236 Views)