12-01-2014 11:19 AM
This is another one of these Notifier questions... I would appreciate if someone could explain to me what's wrong with the attached VI (LV2012).
When moving the slider, I get different readings along a single wire which is just data flow sync'd with the output of a notifier. In particular, there is one "normal" notifier that feeds a loop that operates as expected. The "spooky" notifier is used to trigger readout of a control value indirectly. If the notification output is wired to the sequence structure, it produces non-equal results in out1 and out2 (or probes on that wire). If this wire is removed, it works as expected.
The wire from Slider to out1 and out2 seems to keep 2 different values without any obvious data flow condition or timing.
Thank you
Dirk
Solved! Go to Solution.
12-01-2014 11:29 AM - edited 12-01-2014 11:33 AM
12-01-2014 11:31 AM
Race condition.
In your second loop, the slider is being read before the Notifier is sent. So it will actually always be 1 iteration behind. By wiring up that boolean to the sequence structure, you are stating that the indicator cannot be updated until a notification is received. And since that slider value was read before the notifier was recieved, the indicator will get the "old" value.
12-01-2014 11:35 AM
Yes, I was a bit too fast. The out2 will be written once more in the next iteration when it is waiting again for the notifier.
12-01-2014 02:50 PM
Ouch! That was simple. I couldn't see the obvious.
Thanks to both of you.
D.