LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flat sequence and stacked sequence

this...




Message Edited by Graziano on 07-14-2008 09:59 AM
Message 11 of 52
(2,416 Views)


@JB wrote:
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.


Okay,
   we will rate you with one star only AFTER you say what are these rare circunstances Smiley Very Happy

graziano
0 Kudos
Message 12 of 52
(2,404 Views)
Well, well, for it was me who stated the lost commandment, i should perharps say something to it:
Since we are all humans (presumable i hope!), we are all sinners! 😉
Therefore, sequence structures are used. And i think every developer has encountered situations where he/she went for sequence structures.
But there is an imho quite good rule for the use of sequences:
Limit each instance of the structure "Sequence" to a single frame! Keep, if neccessary, multiple frames in order by dataflow-programming!

This is true for taking benchmarks or initializing resources.

Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 13 of 52
(2,407 Views)


JB wrote:
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.

Ooooooohhhh it's tempting.... sooooo tempting..... 😉
 
LOL!..  I wouldn't do that to you..  LOL! 
 
Sinners keep a guy like me busy...  LOL!
0 Kudos
Message 14 of 52
(2,397 Views)

Okay,
   we will rate you with one star only AFTER you say what are these rare circunstances Smiley Very Happy

graziano



OK, let's start with an example. It should not be too difficult to guess my answer !

Where do you put a long comment that would not fit on one screen beside the code ?
  1. I don't comment the code
  2. Outside the visible part of the screen
  3. In a sub-VI
  4. In the description of an element of the diagram
  5. In the description of the VI
  6. I use a state machine
  7. I use a flat sequence (should not be mentionned because it won't solve the problem of case 2)
  8. I use a stacked sequence
  9. ...



Message Edité par JB le 07-14-2008 05:30 PM
Message 15 of 52
(2,386 Views)


Norbert B wrote:
Limit each instance of the structure "Sequence" to a single frame! Keep, if neccessary, multiple frames in order by dataflow-programming!

A single fram sequence is not a stacked sequence... There's no sin in that..  It is useful to force flow when nothing is available to force dataflow, such as the error cluster.  On rare occasions I will use the flat sequence.
 
Now the stacked sequence will send you to the hot place for eternity!!!  😠
 
LOL!
0 Kudos
Message 16 of 52
(2,401 Views)


JB wrote:
Where do you put a long comment that would not fit on one screen beside the code ?

I place it outside the visible area of the screen to the right.  I also place a small comment to say where to find the larger comment. 😉
Message 17 of 52
(2,388 Views)


@JB wrote:
[...]
    9. ...

It must be:
9. I don't create complicated code which requires long stories for explanation

😉

Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 18 of 52
(2,381 Views)
I place it outside the visible area of the screen to the right.  I also place a small comment to say where to find the larger comment.


And what is faster ?
  • one click on the stacked sequence selector to switch from the code to the comment and back
  • move the horizontal scrollbar to read the comment and then reajust its position to show the code



Message Edité par JB le 07-14-2008 05:39 PM
Message 19 of 52
(2,374 Views)

It must be:
9. I don't create complicated code which requires long stories for explanation

Norbert



Too bad for you ! Complicated code makes things so interesting !

I know the Revision History in the VI Properties dialog box. But, in the main VI of an application, I use a stacked sequence to write this history. Doing so, the readability is much better, all the more so since a font like Courier will allow to align the text in spite of the fact that tabs are not supported.



Please take notice that neither of my examples lead to use variables of any type ! I spoke about rare circumstances !


Message Edité par JB le 07-14-2008 06:03 PM
Message 20 of 52
(2,372 Views)