From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Punjab

Stacked Sequence

Status: Declined
Flat sequence structures have been proven through usability testing to be more readable and adding this functionality would encourage more people to use stacked sequence structures.

Why we should not be able to add shift registers to stacked sequences becuase it will eliminate the break of direction of data flow due to sequence locals.

We should be able to put data to shift register in 1st frame and access it in next frame.Sequence Structure.jpg

18 Comments
Rashid-Malik
Active Participant
Great idea Punjab! The same will go for case structures too. Backward wires for sequence locals makes code look awkward.
altenbach
Knight of NI

I would strongly oppose to add any new functionality to stacked seqeunces, they simply don't belong in any serious code.  Stacked sequences attract the same criticism as the goto command in text based code.

 

Sequence locals are probably the the most annoying objects found in LabVIEW code.

tst
Knight of NI Knight of NI
Knight of NI

I wouldn't equate stacked sequences to gotos. While they may not be a good solution for most large-scale code and may encourage unmodular and sometimes bad code, they do have uses and this suggestion takes care of sequence locals which are indeed their worst feature. This doesn't mean that they're perfect, but I wouldn't mind having this feature for the occasions in which I do use them.


___________________
Try to take over the world!
hfettig
Member

My suggestion would actually be to remove stacked sequence structures from the palette for good.

Support them for legacy code but don't tempt user to use them. It is by far the one element in LabVIEW that creates the most unmaintainable code imaginable.

 

If you want a sequence type structure with shift registers and the ability to stop it from every frame, put a case structure inside a while loop and and wire the index terminal to the case selector.

Message Edited by hfettig on 06-02-2009 10:01 AM
AristosQueue (NI)
NI Employee (retired)

This suggestion is discussed at length here:

http://forums.lavag.org/shift-register-in-sequence-structure-t13729.html

 

This suggestion has been explicitly rejected by LabVIEW R&D multiple times over the years because it would contribute to the ease-of-use of stacked sequence structures, thereby encouraging their use. Use flat sequence structures if you have multiple frames.

PJM_Labview
Active Participant
I would actually support Heiko suggestion to remove the stack sequence from the palette. Heiko, you should probably make that a new entry by itself.


  


vipm.io | jki.net

altenbach
Knight of NI

 

>I wouldn't equate stacked sequences to gotos. 

 

I did not equate stacked Sequences with goto's, just that they attract similar criticism. 😄

RayFarmer
Trusted Enthusiast
Don't waste time on enhancing Stacked Sequences. There's many a time I have spent trying to maintain someones monster of a Stacked Sequence. Now I can get rid of them in a couple of moves. Regards Ray
Regards
Ray Farmer
JackDunaway
Trusted Enthusiast
Good conversation... nuke the stacked sequences.
Spectre_Dave
Active Participant
I agree, Remove the Stacked Sequences from the Programming Palette.
Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA