LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flat sequence and stacked sequence

Apart from the look is there any functional difference between the two?
Message 1 of 52
(11,102 Views)
Hi muks!
   From LabView help:
  
"Use the Stacked Sequence structure if you want to conserve space on the block diagram. Use the Flat Sequence structure to avoid using sequence locals and to better document the block diagram."

   So, almost, no functional difference between them.

   Anyway, as it was pointed out in many places on the forum, Stacked sequence is considered by many people a bad programming habit, since makes code less readable, and harder to debug.  Stacked sequence is used to preserve space on block diagram, but you have other ways to do that, such as modularize VIs.

graziano

PS.: these are my opinions, and you can find them on "The LabVIEW Style Book", by Peter Blume.
Message 2 of 52
(11,093 Views)
Muks,

there is one functional difference: If you have output tunnels, the flat sequence is the only structure in LV which "enables" the output directly after execution of the frame where the output tunnel is located. All other structures "enable" all output tunnels only after execution of the whole structure.

hope this helps,
Norbert

[Edit]: Regardless of functional differences: You shall not use any sequence structures in your LabVIEW Code (the lost 11th commandment)
The only situation suitable is the one stated by graciano 😉


Message Edited by Norbert B on 07-14-2008 08:43 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 52
(11,089 Views)

Yes. With a stacked sequence, any data wired out of the sequence will not leave until all frames execute. With a flat sequence, the data leaves when the frame is complete. A stacked sequence will execute when the data into all frames is available. I think a flat sequence will start to exeucture when all of the data for a frame is available.

Message 4 of 52
(11,081 Views)

Regardless of functional differences: You shall not use any sequence structures in your LabVIEW Code (the lost 11th commandment)

Good one .
0 Kudos
Message 5 of 52
(11,067 Views)
Thanx dennis that is definetly a difference.
0 Kudos
Message 6 of 52
(11,064 Views)

People look at me funny when I forbid anyone coding for me to even think of using stacked sequences.

It is written in the commandment.  And I take that seriously.. 

Message 7 of 52
(11,056 Views)
See here for more details about the behaviour of the Flat Sequence Structure.


Message Edité par JB le 07-14-2008 04:23 PM
Message 8 of 52
(11,061 Views)
Hi!
   There's one case in which I use Flat sequence (usually I don't use sequences, never used a stacked sequence!!!): when I have to measure time for executing a subVI, I surround it with frames, to put "tick count".  That's almost the only case I go against 11th commandment Smiley Happy

graziano
Message 9 of 52
(11,044 Views)

JoeLabView a écrit:

People look at me funny when I forbid anyone coding for me to even think of using stacked sequences.

It is written in the commandment.  And I take that seriously.


Let me take the risk to be considered as a sinner and to be stoned or to receive some 1* ratings : IMHO stacked sequences are the best option in some rare circumstances.
Message 10 of 52
(11,026 Views)