LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Repeat Parts of a Stacked Sequence

Solved!
Go to solution

Hi does anyone know how to repeat parts of a stacked sequence?  For example, if I want to only repeat frames 7-12, how would I go about doing that?  I've been looking at state machines but still trying to understand it.  I thought there might be an easier way to do it somehow with a while loop but unsure how I would go about doing that.  Thanks!

 

Jon

0 Kudos
Message 1 of 8
(2,821 Views)
Solution
Accepted by topic author JonRod

You need to try and understand the state machine. It is used to do exactly what you are looking to do.

Tim
GHSP
Message 2 of 8
(2,818 Views)

To add to Tim's reply:

 

The stacked sequence structure can only be repeated at whole, so it will not supply the functionality you are looking for (this is only one of the many reasons why sequence structures should not be used).

The state machine on contrary enables you to select for each iteration what the next action should be. So each sequence frame is a case (state) in the state machine. The transition code defines the next case to be executed. So you can virtually "jump around" in the software steps you have currently implemented in your sequence frames.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 8
(2,807 Views)

Great, thanks for the answer and explanation guys.  I'll dig a little deeper into the state machine and get that figured out.  Thanks!

 

Jon

0 Kudos
Message 4 of 8
(2,805 Views)

Once you get some code come back and we will be happy to help you through it.

Tim
GHSP
Message 5 of 8
(2,797 Views)

If anyone is just starting to learn state machine basics there is a great website:

 

http://blog.shienandy.com/2008/12/labview-state-machine-basic-example.html

 

Does a great job with step-by-step video example! 

0 Kudos
Message 6 of 8
(2,773 Views)

Stacked sequence bad... state machine good. Cat Happy

0 Kudos
Message 7 of 8
(2,758 Views)

Thanks for your offer for help Tim but the website I previously talked about regarding state machine really helped me out.  Got my program working perfectly...so far.  Thanks!

 

Jon

0 Kudos
Message 8 of 8
(2,751 Views)