LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove the stacked sequence structure from LabVIEW.

I use the stacked sequence structure all the time, but only a single frame of it and without sequence locals.  I think it is more efficient for data flow coercion (e.g. synchronization of setup or cleanup steps) than a single flat sequence. The classic error wire through a single frame stacked sequence containing a wait is a good case in point.  I should probably start using the In Place structure instead.  I shoul benchmark it to see if it makes a difference...

0 Kudos
Message 21 of 195
(2,506 Views)

Hmmm... Stephen is onto something here.  Hey, maybe you could stick "Create SSS" in Tools>>Advanced right under "Create or edit Xvi" OR, Tools>>Advanced>>Create>>Are you sure>>REALLY did you think>>SSS|Xvi

 

There could even be top options on each level to launch help or examples

 

@ Damien-  Single Frame SSS and Single frame FSS benchmark differently????  is that what I heard?


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

> I use the stacked sequence structure all the time, but only a single frame of it and without sequence locals. 

 

How do you even tell the difference between a single-frame stacked sequence and a single frame flat sequence? 😄

 

(I would have thought they would generate the same code under the hood.)

0 Kudos
Message 23 of 195
(2,575 Views)

How do you even tell the difference between a single-frame stacked sequence and a single frame flat sequence? 😄

Right-click>>Visible items>>Label


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

AristosQueue:

if we remove Stacked Sequence Structures from the palettes,

how will we recognize the bad programmers on our teams at 20 paces?

 

                                 Smiley-mort-de-rire.gif

0 Kudos
Message 25 of 195
(2,559 Views)

... but the label can be changed!

 

Actually, the tip strip when hovering over the structure tells you what it is, independent of label.

(the other difference is the "replace with ..." right-click menu entry). Not much else...

 

So, why is there a potential performance difference? (Since the flat sequence is more modern, you would think it is contains better code implementation).

0 Kudos
Message 26 of 195
(2,551 Views)

> @ Damien-  Single Frame SSS and Single frame FSS benchmark differently????  is that what I heard?

 

Please benchmark that before you spread wild rumors. I see nothing in a quick glance at the code that would lead me to believe they generate anything different.

0 Kudos
Message 27 of 195
(2,543 Views)

While there are subtle yet important distinctions between the SSS and FSS, execution time is not one of them.  DFGray was referring to the IPES versus FSS/SSS, and as he probably suspected by mentioning it, the IPES is significantly slower (2 sigma on my machine).

 

And for those keeping score, I benchmarked the SSS with sequence locals versus a fixed iteration for loop with shift registers and the SSS was almost a factor of 3 faster.  Some of us do care about that.

 

And to be honest, more often than not when I wondered how a VI in the math or signal processing palette worked, it usually had a SSS.  When I wondered why one did not work, it usually had very clean code.  Go figure.

 

I am convinced that Shift registers not only provide a familiar syntax, but they enable most of what you need sequencing for.  Most importantly, they provide a natural mapping to convert to a For Loop + Case Structure when the time comes.  It is not going anywhere, at least make it suck as little as possible.

 

I think that it is time to brush up on the history of C++ development (the language itself), and their philosopy of the (limited) role of the language provider in prescribing how the language will be used.  As much as they wanted type safety, void * is still allowed.  The introduction of artificial data dependencies advocated by NI is not really an elegant solution in my book.

0 Kudos
Message 28 of 195
(2,530 Views)

Darin: "DFGray was referring to the IPES versus FSS/SSS,..."

 

Reads quite differently though:

 

DFGray: "I use the stacked sequence structure all the time, but only a single frame of it and without sequence locals.  I think it is more efficient for data flow coercion (e.g. synchronization of setup or cleanup steps) than a single flat sequence." 

 

I doubt that any of these structures add any significant overhead to a typical program, because everything else on the diagram is probably slower. If couse over-sequencializing (sic) prevents parallel optimizations, but that's a different discussion.

 

Shift registers for SSS have their implementation problem too, because they only start carrying data in frame X, and well known code elements such as SR initialization cannot be the same as with loops. I cannot see an easy 1:1 SR mapping when converting between structures, but I haven't really thought about it.

 

 

 

 

 

0 Kudos
Message 29 of 195
(2,521 Views)

The more I read it, the less I understand.  I usually use a single-element-queue, when he says benchmark it, I map 'it' to the last thing he mentions which is the IPES....

 

I won't waste time providing details for something NI has no intention of ever fixing.  All you have to do is invert the mapping.  Write your SSS as a For Loop + Case structure driven by the index.  Simply suck the SR from the For Loop onto the Case Structure, blow up the For Loop and call it the SSS.  It is slightly more restrictive than the sequence local, but the restrictions are reasonable in the context of cohesion and allows you to easily map one to the other.  It gives you an explicitly unrolled loop with no comparisons, that is why it is so much faster. 

0 Kudos
Message 30 of 195
(2,511 Views)