LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

In a flat sequence how do I put in a control to go to a specific frame?

I am trying to build a flat sequence with several frames (3 to 5).  Each frame will conduct a unique activity.  As the program is running I would like to be able to return to a specific frame and start the sequence over again.  How do I put in a control that will allow the user to return to the wanted frame and start the sequence over again?
0 Kudos
Message 1 of 7
(3,468 Views)
You can't. The sequence structure is not designed to do this and there's seldom any reason to use a sequence structure in the first place. What you need to do is implement a state machine architecture. Basically a case statement inside a while loop with the case selector wired to a number, queue, or enum that determines the next state to execute. There are a couple of shipping examples and additional ones to be found if you do a search of NI Dev. Zone.
0 Kudos
Message 2 of 7
(3,464 Views)
I agree with Dennis in that a state machine is the best way to do this.  Alternatively, a dirty way of doing it is to use a For or While loop to enclose just those cases you want repeated.
0 Kudos
Message 3 of 7
(3,458 Views)
Here is a simple example of a state machine that repeats certain states (like repeating frames) until a certain condition happens, then it exits.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 7
(3,446 Views)
Grretings every body,
 tbob  .. Would you please give me a VI example of state machine in LabView 7 (not 7.1)
 
Thanks
-----------------------------
Ayman Mohammad Metwally
Automation Engineer
Egypt - Cairo
0 Kudos
Message 5 of 7
(3,408 Views)
Here is tbob's vi in LV 7.0


Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 6 of 7
(3,406 Views)
Many thanks LV_Pro.
-----------------------------
Ayman Mohammad Metwally
Automation Engineer
Egypt - Cairo
0 Kudos
Message 7 of 7
(3,377 Views)