LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove the stacked sequence structure from LabVIEW.

SL vs SRs: Consider the case of blowing up a SSS to a FSS.  Its the total number of tunnels Dr K..  A SR requires tunnels on every frame complicating the synch boundrary with needless data.


"Should be" isn't "Is" -Jay
0 Kudos
Message 31 of 195
(1,534 Views)

From PNR  "Sequence locals are sometimes (for very few cases) usefull if you know how to use them properly. I like to use stacked sequences to initialize and terminate my VIs       (controls/indicators/arrays/etc..). Using stacked sequences to do tasks in a specific order without connection between each other can is OK in my opinion (saves BD space and is easy to understand)."

 

The exemples you are giving here is the opossite of a good use of stacked sequence. In both case you can make clearer, better, more modular without using them:

 

Sentence 1:

-Use a for loop with a case structure inside

-Wire a constant array of string to the for loop and the indexed value to the case structure

-Write what you are doing in each case in the array of string (INIT IHM, LAUNCH THREAD, READ INI FILE; etc...)

-Add a shift register for the error wire

You've got a nice initialisation with an auto-documented code, modular and you can transfer data from one step to another with a shift register

Sentence 2:

-Make a state machine with enum

You've got a sequential code which is auto-documented and much easier to maintain

 

Please find me a good exemple where you can't do any better than a SSS and i give you a kuddos

 

Good luck !!

 

PS: Forgive me if my english is not the best, it is not my mother tongue.

0 Kudos
Message 32 of 195
(1,579 Views)

Hello Baptiste,

 

"Sequence locals are sometimes (for very few cases) usefull if you know how to use them properly"

ok, could you explain me the way to use Sequence locals properly ? (a little tutorial would be very interesting)

 

Please find me a good exemple where you can't do any better than a SSS and i give you a kuddos.

Does the performance justify the use of everything and anything?

0 Kudos
Message 33 of 195
(1,569 Views)

Hello ouadji,

 

"Sequence locals are sometimes (for very few cases) usefull if you know how to use them properly"

This was a quote from someone, not a statement from me so I really can't explain you the way to use Sequence locals properly since I don't ever use any...

 

Sure I guess performance doesn't justify everything so if it please some people to use SSS why not !!

I don't mind.

I just find them actually useless in every single situation.

0 Kudos
Message 34 of 195
(1,559 Views)

@Baptiste : I just find them actually useless in every single situation. ... +1

 

That said, please, a little bit of courage, the thing is obvious, SSS and mainly sequence locals are really an horror.

Why keep something like that ? .. while almost everybody agrees to say that it is not a good thing. Smiley Happy

0 Kudos
Message 35 of 195
(1,532 Views)

Like altenbach's idea:

 

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.

 

Hide SSS from it from beginners but keep it to backward compatibility and special cases. Best of all, you always start with the good one, FS.

 

Please Altenbach post the idea and I will kudo it.

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
0 Kudos
Message 36 of 195
(1,515 Views)

@Manzolli:

 

Like altenbach's idea:

"The stacked sequence could be removed from the palette but still indirectly available after placing a flat sequence ....

... ... ... Hide SSS from it from beginners but keep it to backward compatibility and special cases.

Best of all, you always start with the good one, FS."

 

I agree, very good idea, it's a good trade-off.

 

pouce_levé.gif

 

 

0 Kudos
Message 37 of 195
(1,507 Views)

> Please Altenbach post the idea and I will kudo it.

 

This (similar) idea already exist. for a very long time and deserves more votes.

0 Kudos
Message 38 of 195
(1,471 Views)

For the larger, complex programs I find SSS very useful.   The alternative is creating lots of subVIs when you run out of screen real estate.  But when your code has to modify front-panel objects, I find it is more of a pain to keep creating references to your front panel items which then get passed to the subVI, which then have to be de-referenced.  On top of that, I always seem to underestimate the amount of parameters I need to pass to the subVI and I run out of connectors,  which inevitable requires rewiring (another pain) and sometimes bundling several parameters into a cluster, which then tends to lead to creating a typedef for the cluster so that the subVI will automatically update if the cluster type is modified.

 

0 Kudos
Message 39 of 195
(1,374 Views)

Patrick-

 

Please, do not take this personally.  Do learn better programming practices.  EVERY reason you gave screams for better code architecture not for the "more obfuscated code" you dream of. 

 

My defense of the Stacked Sequence Structue as "necessary" has been challenged with great examples of alternate code methods on modern LabVIEW compilers for simple examples.

 

I welcome you or anyone to join the discussion with examples of code that cannot be rewritten otherwise and meet an "XYZ" design requirement.  I really am tottering on the edge of supporting the removal of that structure after some detailed analisys.


"Should be" isn't "Is" -Jay
Message 40 of 195
(1,361 Views)