View Full Version : Aborting a Flat Sequence
Hi everyone, I'm J.R., the programmer from rookie team 4918. I wanted to know if it's possible to abort a flat sequence mid-execution in labview. Thanks for the help!
plnyyanks
15-02-2014, 15:04
No, there is generally not a good way to stop a structure mid-execution. If you find the the pressing need to do this, it may be better to implement your code as a state machine (http://en.wikipedia.org/wiki/State_machine) instead. This way, you can manually change the states yourself.
Greg McKaskle
15-02-2014, 21:50
Aborting or jumping out of structures in procedural languages is convenient, but tends to cause bugs caused by uninitialized variables. In a data flow language, that is even less of a good idea. So the structures are required to identify a value for all ways to exit. The exit is generally quite controlled., no break or continue statements except. The solution is to make the downstream code be conditional.
Greg McKaskle
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.