Stacked Sequence structure: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{TOCright}} | |||
{{LabVIEW Palette Object Information|palette=Functions Palette/Programming/Structures{{!}}Structures palette|type=structure|icon=Functions Palette - Programming - Structures - Stacked Sequence Structure.png}} | |||
[[File:Stacked Sequence Structure.png|thumb|Stacked Sequence Structure]] | [[File:Stacked Sequence Structure.png|thumb|Stacked Sequence Structure]] | ||
A '''Stacked Sequence Structure''', or SSS, is a set of subdiagrams represented by numerical indices that executes in order of the indices. Since [[LabVIEW 2014]] it has been removed from the [[Functions Palette/Programming/Structures|Structures palette]] and is considered deprecated. However, due to software in older versions of LabVIEW using the structure, it has not been removed from the [[ | A '''Stacked Sequence Structure''', or SSS, is a set of subdiagrams represented by numerical indices that executes in order of the indices. Since [[LabVIEW 2014]] it has been removed from the [[Functions Palette/Programming/Structures|Structures palette]] and is considered deprecated. However, due to software in older versions of LabVIEW using the structure, it has not been removed from the [[Development Environment|development environment]] nor from the [[Run-Time Engine|run-time engine]]. Therefore, the code will still show the stacked sequence structure where used. | ||
In most cases better code organization (including [[VI|SubVIs]], proper [[Design Patterns Overview|design patterns]], and/or [[Application design and architecture|frameworks]]) will negate the need for a stacked sequence structure. In some cases where sequential code execution is still necessary, it can be handled using the [[State Machine#Sequencer Pattern|squencer pattern]] variation of the [[State Machine|state machine]] design pattern. The exact reasoning why the sequencer pattern can be argued to be better is due to its extensibility and readability over the stacked sequence structure. | In most cases better code organization (including [[VI|SubVIs]], proper [[Design Patterns Overview|design patterns]], and/or [[Application design and architecture|frameworks]]) will negate the need for a stacked sequence structure. In some cases where sequential code execution is still necessary, it can be handled using the [[State Machine#Sequencer Pattern|squencer pattern]] variation of the [[State Machine|state machine]] design pattern. The exact reasoning why the sequencer pattern can be argued to be better is due to its extensibility and readability over the stacked sequence structure. | ||
| Line 9: | Line 11: | ||
# You can see only a fraction of code at one view. While this is true for other structures (case, event), the SSS does not provide the flexibility and power of the other structures. | # You can see only a fraction of code at one view. While this is true for other structures (case, event), the SSS does not provide the flexibility and power of the other structures. | ||
# Speaking of flexibility: The SSS has a strict order of execution. If you want to swap "cases", you often have VERY much to do in the code to make it work. Adding new "cases" is also very often close to nightmare. | # Speaking of flexibility: The SSS has a strict order of execution. If you want to swap "cases", you often have VERY much to do in the code to make it work. Adding new "cases" is also very often close to nightmare. | ||
== History == | |||
{{ambox|text=History information is needed. What changes have occurred over previous versions?}} | |||
{| class="wikitable" | |||
! Version | |||
! Change(s) | |||
|- | |||
|[[File:LV2018.png|frameless|border|64x64px|LabVIEW 2018|link=LabVIEW 2018]] | |||
|More info to come. | |||
|} | |||
==See Also== | |||
*[[Sequence class]] | |||
==External Links== | ==External Links== | ||
| Line 17: | Line 32: | ||
==References== | ==References== | ||
[[Category:Structures Palette]] | |||
[[Category:Stacked Sequence Structure]] | |||
Latest revision as of 15:39, 25 June 2020
| Object information | |
|---|---|
| Owning palette(s) | Structures palette |
| Type | Structure |
| Requires | Basic Development Environment |
| Icon | |

A Stacked Sequence Structure, or SSS, is a set of subdiagrams represented by numerical indices that executes in order of the indices. Since LabVIEW 2014 it has been removed from the Structures palette and is considered deprecated. However, due to software in older versions of LabVIEW using the structure, it has not been removed from the development environment nor from the run-time engine. Therefore, the code will still show the stacked sequence structure where used.
In most cases better code organization (including SubVIs, proper design patterns, and/or frameworks) will negate the need for a stacked sequence structure. In some cases where sequential code execution is still necessary, it can be handled using the squencer pattern variation of the state machine design pattern. The exact reasoning why the sequencer pattern can be argued to be better is due to its extensibility and readability over the stacked sequence structure.
The stacked sequence structure has some severe disadvantages with the three most prominent:[1]
- Passing data from "case" to "case" requires sequence locals. These are no-gos for code design.
- You can see only a fraction of code at one view. While this is true for other structures (case, event), the SSS does not provide the flexibility and power of the other structures.
- Speaking of flexibility: The SSS has a strict order of execution. If you want to swap "cases", you often have VERY much to do in the code to make it work. Adding new "cases" is also very often close to nightmare.
History
| |
History information is needed. What changes have occurred over previous versions? |
| Version | Change(s) |
|---|---|
| More info to come. |
See Also
External Links
- Proper Use of Stacked Sequence Structure NI Forum Post
- Why structures function palette is not complete? NI Forum Post
- Is there anything wrong with sequence structures? NI Forum Post
- Sequencer Template by Chris Cilino, NI Forums
References
- ↑ "Proper use of stacked sequence structure", NI Forums. https://forums.ni.com/t5/LabVIEW/proper-use-of-stacked-sequence-structure/m-p/2844938/highlight/true?profile.language=en#M830647