10-02-2009 02:58 AM
Hey guys, a newbie here.
I have a .vi with a stacked sequence. The first few frames are hardware initialization and settings (LIN master node) and the data the hardware should transmit (frame response table). In the next frame there's a loop in which the hardware sends and recieves data (LIN monitor). If I want to change the initialization, settings or data values, I have to stop the .vi and restart it. I was wondering if there is a simple way of doing this with a single click (a button on the front panel).
An alternative would be to put another loop outiside the whole stacked sequence and then run it a single time with a push of a button (the inner loop should let the outer one restart), is that possible?
I hope I made any sense. Thanks for any suggestions.
Tomaz
Solved! Go to Solution.
10-02-2009 03:34 AM
Hi,
Can you post your vi?
10-02-2009 04:51 AM
It has about 100 custom subVIs, I don't think posting it would be of much use. Basically, the vi goes like this:
stacked sequence: do A -> do B -> do loop until "stop".
I'd like a way to start again from the beginning of the sequence ("do A") without stopping and restarting the VI (or doing this with a single button).
10-02-2009 05:18 AM
10-02-2009 06:29 AM
10-02-2009 07:50 AM
Tomaz79 wrote:
I'd like a way to start again from the beginning of the sequence ....
Take the great advice given. Think of a State Machine as LabVIEW's only way to do a GoTo statement, or even a GoSub statement with a Return.
10-02-2009 07:56 AM
10-02-2009 09:25 AM
Thanks for the suggestions, I'll try it and report back.
Tomaž
10-07-2009 01:37 AM
It turned out that wrapping everything in a while loop was all I needed for this case. I also learned how to use a state machine so thanks to all of you guys for the help!
Tomaž
01-16-2020 03:27 AM
hi guys this my vi file how should i stop and restart the program