LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove the stacked sequence structure from LabVIEW.


@billko wrote:

(Even with my limited knowledge of text-based programming, I always thought that "goto" was a bit of a cop-out, reserved for when you couldn't figure out how to do it the "right" way.)


In VB and C, yes.  In the really old languages (I'm thinking way back to my GW-Basic and Q-Basic days), they were needed.  I would argue the same fate has been made of the Stacked Sequence Structure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 171 of 195
(2,902 Views)

@billko wrote:

These latest arguments for the stacked sequence reminds me of the old "goto" battles. 


Obligatory Goto XKCD

 

https://xkcd.com/292/

0 Kudos
Message 172 of 195
(2,884 Views)

Thank you, I do greatly appreciate everyone’s insight.  I was just making a figurative point of “being limited by the size of the screen” since code can be written outside the screens visible area. Still the Stack Sequence allows users to go beyond the limit of extra cases and functions to write code. Clearly Stack Sequence is not popular for good reason.  I am the lone supporter that the Stack Sequence can have some value.  Perhaps C and VB should limit the number of lines of code in a if or case statement to make it easier to read.

0 Kudos
Message 173 of 195
(2,877 Views)

@ff377 wrote:

I am the lone supporter that the Stack Sequence can have some value.


We did not say they have no value.  We are just saying that they tend to cause problems that are fixed by using a proper State Machine or subVI.  I think I possibly have legitametly used a Stacked Sequence Structure once in 11 years of coding in LabVIEW.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 174 of 195
(2,870 Views)

@DrStel wrote:

I just think there is no reason why a tool should be removed from the LabView pallette to be kept in the library in any case - just purile inconvenience.


Not really meant as an inconvienience. SEE HERE

 

Once we opened the hood on the SSS we found its performance to be no better than other options.  Moreover, when we looked at how it was used, the structure was "Abused" 99% of all cases.  There are a few valid reasons to use the SSS so, its still available to those who know the IDE well.

 

Essentially, the discision to remove it from the structures pallatte is an effort to "Save you from yourself."


"Should be" isn't "Is" -Jay
0 Kudos
Message 175 of 195
(2,863 Views)

I love the stacked sequence - it is a way to arrange a complex function into bite sized pieces without splitting it into subVI's. I often build them up with one line of text in each before starting coding so that I have a plan. I agree, if a function meaningfully splits into many VI's that's the way to go but this isn't always the case, and this approach can still benefit from a SSS one level up. For me, I split a function if they meaningfully could be used alone. In a complex chain of events that's not always true. The worst I can say is that you have to be careful with the sequence locals, perhaps someone can propose a better idea? I read this whole thread and no one really said what it is that they dislike. Please do not remove the SSS, and please stop this campaign. If you don't want to use it, don't. Personally I find the flat sequence structure of limited use, since it is so easy to control sequential operation with an error thread.

Rob-W

PS, I'm not the only one supporting there being a place in the world for the SSS- check out this eloquent and reasoned case:

http://www.themoehrings.com/index.php/2014/09/ode-to-stacked-sequence-structures

0 Kudos
Message 176 of 195
(2,663 Views)

The SSS is not gone from LabVIEW, it's just not on the structure pallete anymore.  If you want to use it drop down a Flat Sequence Structure, right-click the border and select "Replace with Stacked Sequence".  Like pretty much everyone else in the LabVIEW community though I suggest you choose better programming practices.  Especially if you're working with fellow coders (who will most likely need to re-write that part of your code as soon as they open it. Smiley Mad)

 

EDIT:  BTW, there has been a better way than sequence locals proposed, adding shift registers!  But, I doubt you'll convince NI to waste time developing upgrades to a feature 99.99% of their users don't want.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 177 of 195
(2,632 Views)

@Rob-W wrote:

Personally I find the flat sequence structure of limited use, since it is so easy to control sequential operation with an error thread.


That is actually one of the main arguments against the SSS.  Personally, I find a good state machine is the perfect alternative to the SSS as it allows a lot more flexibility including repeating states as necessary and aborting the sequence.  If a sequence goes more than 2 or 3 cases, it is usually a sign of a bad design.  There are few exceptions I have seen, and bench marking is the only one that readily comes to mind.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 178 of 195
(2,612 Views)

@Rob-W wrote:

I love the stacked sequence ... Personally I find the flat sequence structure of limited use, since it is so easy to control sequential operation with an error thread.

 


never use Stacked Sequences.  I do on rare occasions use Flat sequences ("Frames"), but almost always it is to surround a Timing function that does not have an Error Thread to control sequential operation.

 

Bob Schor

Message 179 of 195
(2,584 Views)

This is a thread from a while back.

I understand that the FSS can be easily replaced with a SSS ... and that is the point I was making.  It seems somewhat petty for NI to try and hide a feature, especially one that had been available on the palette at least since LV version 4.0  

Coding practice is up to the person coding and their professionalism; with the use of a function or class being dependent on the circumstance.  Good practice is fine, but under certain conditions it can become inefficient practice also.

I use the SSS occasionally when it best suits the situation as it forms part of the LV toolkit.  In my experience using the SSS has never given fellow programmers any problems in maintaining my code since the documentation is clear and precise.

 

 

0 Kudos
Message 180 of 195
(2,556 Views)