Showing results for 
Search instead for 
Did you mean: 

Remove the stacked sequence structure from LabVIEW.

@ouadji wrote:


@PaulG: If shift registers were added to the SSS ...

an interesting idea ...this could restore my faith in the sss 😉

This has been suggested before and explicitly rejected. Apparently LV R&D really don't like stacked sequence structures and they don't want to make any modifications to them, regardless of what others think.

Try to take over the world!
0 Kudos
Message 11 of 195

tst :Apparently LV R&D really don't like stacked sequence structures and ...


smart people in the LV R&D team. 😉

0 Kudos
Message 12 of 195

Putting SRs on a SSS is like putting a onesie that says "Shake me" on a baby.  It just begs people to abuse them.  Sequence Locals are terrible only because you need to know so many different things about how to care and feed for them and they make your SSR cost you a lot of sleep.  But, like babies, SSS's are necessary.

"Should be" isn't "Is" -Jay
Message 13 of 195

Jeff : Sequence Locals are terrible only because you need to know so many different things about how to care and feed for them ...


ok Jeff !


in this case, what would be really interesting ... would be a tutorial on the good practices for using Sequence Locals.

0 Kudos
Message 14 of 195

good practice for using sequence locals:  DON'T USE THEM!!!


If you are passing around sequence locals, you are a lot better off using the Flat Sequence Structure and therefore tunnels.

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 15 of 195

> what would be really interesting ... would be a tutorial on the good practices for using Sequence Locals.


Jeff said SSS are necessary, nothing about SL being necessary. 😉


Anyway... Here is probably the best tutorial on how to deal with sequence locals. 😄

Message 16 of 195

OK you'll sucker me back in.

First, I have not used a SSS in real code in the last decade. (I think there might be an example on Breakpoint where I satarized the SSS with intentionally overlapping SL's all on one side) Why?  I write code for automated functional tests.  These applications seldom need to be as highly optomized as possible and a QMH works more than well enough (the readability is a nice asset too when you integrate with the hardware)  However, there are application areas where code optimization is of much greater concern.  {No, No, No you'll not catch me spouting theoretical examples of such uses on a discussion Altenbach is engaged in unless you want me to point out annual coding challenges}  The fact that such challenges exist is enough proof to me that tossing out the SSS is not a good idea.


SL's  I did not say they were bad.  some frame to frame data transfer mechanisim, local only to the structure, that does not use the UI thread, is needed.  The SL provides one without slowing the structure needlessly.  I submit replacing them with SRs would although, who can tell what the optomizer could do at the cost of longer compile times and tons of R&D effort for a use case that is rare.  Replacing the SL with a Seq SR also would encourage the mis-use of SSS's where less obfuscated constructs are prefered (a VERY HIGH percentage use case for LabVIEW code)


SL's DO obfuscate code but, do not overtax the performance of the SSS.


All this becomes moot as soon as the first 3D holographic version of LabVIEW becomes available anyway-  I hope to encourage the wide spread adoption of better programming practice before then! (What would you call spaghetti code you could walk through?)


Perhaps we should move this thread to a discussion forum.

"Should be" isn't "Is" -Jay
0 Kudos
Message 17 of 195

A prime example is a stacked sequence with 18 frames (!!), 18 sequence local (!!), and 48 local variables(!!) (discussed here. Yes, somebody actually wrote this to solve a 3x3 system of linear equations!):


I don't even want to see the code for the 10x10 solution. ;D It can be rewritten with simple flat code as follows:



There are always better alternatives!

0 Kudos
Message 18 of 195

If we remove Stacked Sequence Structures from the palettes, how will we recognize the bad programmers on our teams at 20 paces? We'll actually have to get close to their code (and risk infection) if they don't have the SSS to use as a biohazard marker.


Just kidding.


I happen to like the SSS in some very select situations. If nothing else, it is a lot easier to work with when scripting than the FSS. I could support a compromise position where the SSS is not in the palette initially but appears in your palette after, say, 1000 hours of total development time. "Now that you know how to use LabVIEW, here's something you'll almost never use." 😉

0 Kudos
Message 19 of 195

The stacked sequence could be removed from the palette but still indirectly available after placing a flat sequence, followed by "right-click ... replace with stacked sequence".


The flat sequence structure left in the palette could simply be named "sequence structure" (no "flat"), with a right-clock menu: change to stacked/change to flat.


Message 20 of 195