02-22-2016 01:13 PM
@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.
02-22-2016 01:54 PM
@billko wrote:These latest arguments for the stacked sequence reminds me of the old "goto" battles.
Obligatory Goto XKCD
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-22-2016 01:59 PM
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.
02-22-2016 02:09 PM
@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.
02-22-2016 02:10 PM
@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."
07-31-2017 04:39 AM
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
07-31-2017 10:16 AM - edited 07-31-2017 10:20 AM
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. )
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.
07-31-2017 12:15 PM
@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.
07-31-2017 03:09 PM
@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.
I 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
08-01-2017 03:26 AM
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.