LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

break points or restarting a program

I was wondering if there is a way to restart a LabView program.  I found vi's for Stop and Exit, but nothing to restart.  Or, is there anything equivalent to a breakpoint, so that I could go back to an earlier state of my program.  I have an error polling loop and when I find an error I want to display an error message and then go back to the start up state of my program.  I don't want to have to exit the program and open it up...I'd like it to happen automatically.

Thanks,
Kasey



0 Kudos
Message 1 of 3
(2,643 Views)
It's called a state machine architecture. Simply put, a state machine is a while loop around a case statement. You can have a shift register in the while loop wired to the case selector and in each case, write a value to the shift register to determine which case to execute next. Another way is to use a queue. In each case, you enqueue an new value and a dequeue function is wired to the case selector. There are shipping examples of both (State Machine Test Sequencer, Queued Message Handler, Old Event Handler).
0 Kudos
Message 2 of 3
(2,639 Views)
You could put the whole thing in a while loop and wire the error to the stop/continue control.  A lot of people use while loops when they want a breakpoint of some sort.

*Edit: Dennis described it much better than I could.*

Message Edited by jasonhill on 11-21-2005 04:00 PM

0 Kudos
Message 3 of 3
(2,637 Views)