LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stacked sequences

I have a few pre-built state machine templates, one of which is a 3 state Init/Run/Exit. It is much quicker to save a working copy of that .vit than create a new VI and drop a sequence structure.

_____________________________
- Cheers, Ed
0 Kudos
Message 21 of 25
(452 Views)

@P Anand wrote:

Yes if my design has Init >> Execute code >> Re-init and exit do you think it is necessary to use state machine?. Because this sequence of execution is never going to change and I feel it is unnecessary to bring a state machine into play.


A state machine would be an idea application for this.  Although the code is rather static, it may eventually scale up to something larger.  Most likely after someone else takes over the code.

Message 22 of 25
(439 Views)

@Ben wrote:

NO!Smiley Wink

 

Don't get rid of the Stacked Sequence!

 

I will use a Stacked Sequence in my very often.

 

Frame 1 - contains all of the code.

 

Frame 2 - Contains an image of the State Diagram that documents the code flow. All I have to do is flip to frame 2 to see the design.

 

Of course if NI would restore the State Diagram Editor to its former glory I would not need the stack sequence.

 

 

 

 

Ben


Ben,

 

I would agree with your use of the Stacked Sequence Structure, as you are not using it for program control.

 

Unfortunately, all code that I inherit which uses SSS, it is a bloody mess full of abuse.  (ie:  64 fames of SSS full of nested layers of SSS, sometimes 3 layers deep!  😮 )

 

Now if it was possible to have a "structure" which resembles the Stacked Sequence, but was used for the purpose you described (1st frame for code, other for documentation, only), then that would be fantastic.  I don't know if that was already proposed as an idea..  I think so, a long time ago..

0 Kudos
Message 23 of 25
(436 Views)

@Darin.K wrote:
There is absolutely nothing wrong with the Stacked Sequence Structure. All problems stem from the abomination known as the sequence local.

Then why not just use a State machine to begin with.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 24 of 25
(426 Views)

I like Ben's use of the stacked sequence as a place holder for his documentation.  A Stacked sequence may have it's uses, but it can be too easily abused which is why most people warn against it.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 25 of 25
(423 Views)