LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Race Condition: "Elapsed Time" and "Boolean Crossing"

Hello.

We are experiencing a pretty strange issue here and we are not sure how to solve it. The attached VI's are a simplified version of the code, but that exhibits the same behavior:

The MAIN vi controls a boolean that is an input of the SUB vi. The SUB vi analyzes this boolean, and if its state is different than the last one read, a timer is reset. While the required time (2 sec) has NOT elapsed, the SUB vi outputs the last remembered value after the time has elapsed, the SUB vi finally outputs the new value.

Now, the problem appears when depending on how we change the input boolean (for instance, if you change its state as soon as the "elapsed time pulse" is generated), the new value is NEVER sent to the SUB vi's output. In other words, depending on the moment the input is changed, the SUB vi doesn't get the change and never resets the timer.

How can we solve this issue? Is there any special configuration that needs to be done in the used functions?

Thank you very much for all help.

Daniel

0 Kudos
Message 1 of 2
(2,430 Views)
Your vi?
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 2
(2,418 Views)