01-03-2014 08:13 AM
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.
01-07-2014 03:54 AM
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.
01-07-2014 06:09 AM - edited 01-07-2014 06:10 AM
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?
01-07-2014 07:55 AM
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.
01-07-2014 10:01 AM - edited 01-07-2014 10:03 AM
@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.
01-07-2014 11:07 AM
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.
01-07-2014 11:46 AM - edited 01-07-2014 11:49 AM
@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.
01-08-2014 09:52 AM - edited 01-08-2014 09:54 AM
> Please Altenbach post the idea and I will kudo it.
This (similar) idea already exist. for a very long time and deserves more votes.
01-16-2014 06:46 PM - edited 01-16-2014 06:48 PM
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.
01-16-2014 07:36 PM
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.