Usually (and I am not sure if there is any other situation) in C++ you use a "break" statement in a 'while' or 'for' loop when certain condition occur and you want the execution of the loop to end, and this condition is tested with an 'if' statement. (Some compilers will give you an error if some portion of the code can not be reached due to a 'break' statement) One way to do something similar in LabVIEW is to test the condition for the break. To avoid any other execution of the code after the condition of "break", use the "Case" structure to enclose the different parts of the code. The attached vi demonstrate this. The vi is written in LabVIEW 5. The 'while' loop 'breaks' when the user input the number 5 (or when the stop button is pressed).
In most cases, 'for'
loops can be easily substituted by 'while' loops.
Certainly, with a little of creativity, the same 'break' effect can be done in LabVIEW
www.vartortech.com