02-08-2016 12:40 PM
I thought I understood tunnels but it turns out I don't.
Watch thise 2 small programs for elapsed time. In the first case the timer counts up to 5 and wait for 1000 sec and restart the timer. In second case the timer count up to 5 sec and don't wait but instantly restarts the timer. Why have the wait object no effect in the second case?
Solved! Go to Solution.
02-08-2016 12:58 PM
This is a question of DATA FLOW. In your first set of code, the Wait ms cannot start until the inner loop has ended. In the second, the Wait ms does not have to wait and runs in parallel of the inner loop.
02-08-2016 01:45 PM
02-08-2016 02:56 PM
@mikeporter wrote:
1. Any node with all its inputs satisfied will begin executing (as soon as it actually can :D)
2. A node will only output data when it finishes executing
Important to note is that dataflow is not a problem or necessary evil of LabVIEW, but a very powerful tool to write code that does not have race conditions, but still can take advantage of all available computing resources, such a multiple CPU cores.
It is one of the greatest features of LabVIEW compared to conventional text programming. Text is always linear, while a block diagram directly shows parallelism without the need for any complicated sytax.
02-08-2016 03:14 PM
Just to be sure that I understand.
In the second case the wait object and the inner loop will execute parallel - upper sit the first one where execution is after each other
02-08-2016 03:19 PM
Correct.
02-09-2016 04:43 AM
Norbert