Break out of a While Loop then jump back in (to re-initialize a shift register) 
Author Message
 Break out of a While Loop then jump back in (to re-initialize a shift register)

I'm initializing a shift register with default 0 when the program
fires up. The shift register indexes an array which caries out
automated functions. The user may want to stop what's happening, then
resume at some other point (such as stop at step 7 then resume later
at step 5), so I have to initialize the shift register to another
number (right?). An "easy" way (I thought) would be to break out of
the While Loop, let the program read the new scaler input to the shift
register, then jump back in the loop. I'm having trouble with this.
How do I break out and jump back in? (6.0.2)
thanks as always!


Fri, 03 Sep 2004 22:28:01 GMT  
 Break out of a While Loop then jump back in (to re-initialize a shift register)
Arrow;

That also look like a state machine. You may want to do a search on
"state machine" here at Developer Zone or at NI website. Here are some
good discussions:

<a
href="http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135...">(What
is a) state machine</a>

<a
href="http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135...">Help
with a state machine</a>

I hope this can help you with your problem.

Regards;
Enrique



Fri, 03 Sep 2004 22:49:06 GMT  
 Break out of a While Loop then jump back in (to re-initialize a shift register)
The best way to implement this, I think, would be to use a state
machinge architecture. There is an example with 6.0.2 under
Advanced>User Interface Development>User Interface Events.
Essentially, what a labview state machine is a while loop with a shift
register that is connected to the selector of a case statement. Inside
of each case statement, you can define the next state to execute. The
example uses a queue but it can also be done with enums or simple
strings. If you searched the forum's archives on state machines, you'd
find a lot of discussions on the pros and cons of the best way to
implement one. The LabVIEW Technical Resource (www.ltrpub.com) also
had an excellent article on queue driven state machines last year.
Good luck.


Fri, 03 Sep 2004 23:07:18 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. while loops and shift registers

2. adding a shift register to a while loop

3. Problem with initialization of a shift register on while loop

4. Shift register initialization and while loop

5. Urgent problem about while loop and shift register

6. Q:OUTS* instruction, which registers are used?

7. Q: OUTS* instruction, which registers are used?

8. Q: OUTS* instruction, which registers are used?

9. break one loop and skip one iteration of outer loop

10. how to jump back an input screen

11. Thumb in scrollbar jumps back to top

12. Must wire shift register through event structure

 

 
Powered by phpBB® Forum Software