Quantcast
Channel: All LabVIEW posts
Viewing all articles
Browse latest Browse all 202710

Re: stop a while loop in subvi

$
0
0

As a general rule of thumb, you should avoid using Sequence Structures.  The reason being that they break data flow.  If you can control the flow of data with wires, that is the most efficient way to make your program work.  So the suggestion to get rid of your sequence structures is to make another subVI for your wait that also has an Error In and Error Out.  Then you can use the error cluster to force the execution.

 

And having While loops inside of subVIs is a common beginner problem.  If you are controlling when the loop ends based on a front panel control from the mainVI, then the loop really needs to be in the main VI.

 

I hope that was a good summary of what has been said.


Viewing all articles
Browse latest Browse all 202710

Trending Articles