03-24-2005 11:29 AM
03-24-2005 11:35 AM
03-24-2005 03:26 PM
06-18-2012 05:24 PM
I too would like to find a way to mimic a "goto" function.
In my program, I have a VI that determines if temperature (T1) is stable to within a certain limit for a certain amount of time. After I've found that it's stable, I need to check if another temperature (T2) is within a certain range of a set temp. If it's not, I need to raise T1 so that T2 will also rise to be within range. Then I need to use the aforementioned VI again to check when T1 is stable again. I wish I could just do something like loop the error cluster wire back on itself, making a sort of "goto" command. Otherwise I need to make a very complicated nested While Loop structure. Perhaps I can figure something out with an Event List. Anyone got any suggestions?
06-18-2012 05:33 PM
06-18-2012 05:35 PM
Have you considered a state machine? The states could be something like T1 Unstable, T1 Stable, Check T2, T1 and T2 OK. You would also have Initialize, Idle, Wait, and Shutdown states and possibly others well as. There are Design Patterns which come with LV and many, many posst on the Forum about state machines.
In LabVIEW a state machin is usually implemented as a while loop around a case structure. The "state" is passed from one iteration to the next via a shift register.
Lynn
06-18-2012 05:38 PM
Thanks, RiversDaddy and johnsold! I'll definitely look into that.
06-18-2012 06:05 PM
@VariableRange wrote:
Thanks, RiversDaddy and johnsold! I'll definitely look into that.
OR, of course you can enable a conditional for loop. Right click the for loop and "show conditional terminal" It will even directly accept the error wire and will exit when true (Error) by default