07-11-2017 01:55 AM
Please see Test1.vi,when i click on the button 'OK',the value of 'display1' is the same as 'source',but the value of 'display2' is the 'source' i enterd last time.For example,if i enter 1 and 2 into 'source' before and after for two times,when i click 'OK' the second time,'display1' is 2 but 'display2' is 1.
I want to know why this happen.Thanks!!
Solved! Go to Solution.
07-11-2017 02:15 AM
Hi guigui,
it's all dictated by THINK DATAFLOW!
1. The "source" control is read before entering the event structure.
2. The "source" local variable is read when the event is executed.
1 & 2 don't occur at the very same time: THINK DATAFLOW!
07-11-2017 02:22 AM
First,thank you very much!
I am not so clear about DataFlow,where can i learn more about DataFlow in Labview?
07-11-2017 02:32 AM
07-12-2017 02:11 AM
Thank you!
07-12-2017 02:54 PM - edited 07-12-2017 02:56 PM
This is my favorite description of LabVIEW and dataflow.
This is THE STATEMENT to take away from that little discussion: "Remember that a node executes only when data is available at all of its input terminals and supplies data to the output terminals only when the node finishes execution."
If you take this one sentence as literally as possible, you won't have problems figuring out how your program executes. And if you still can't, that probably means you have a race condition.