LabVIEW Idea Exchange

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

Make the arrows associated with free labels able to point to sequence locals

Status: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.

The ability to add arrows from free labels to block diagram elements is great but it doesn't work on sequence locals. It's probably an oversight because they work for just about everything else (N in For loops, tunnels etc).

 

Sequence locals are a really good example of it being easy to lose the context of a wire because it comes from a previous frame (see second image). A label to remind the programmer what it is would be especially useful.  See diagram below including my workaround.

 

Label sequence local.pngLabel sequence local2.png

 

I would like to see this added in future (unless there is a way to make it work!)

12 Comments
Dennis_Knutson
Knight of NI

Personally, I would like to see the stacked sequence removed from the palette and then you would never have to worry about sequence locals again. 

altenbach
Knight of NI

> Sequence locals are a really good example of it being easy to lose the context of a wire ...

 

... that's why nobody uses them anymore. The ability to add arrows would just put lipstick on a pig. 😄

X.
Trusted Enthusiast
Trusted Enthusiast

The label arrows are still in extended beta, AFAIK...

You'd think you can attach an arrow to an in place element object (not the structure itself, but one of the primitive). But if you move the primitive (or the structure), the arrow does not follow. Bug report here.

You'd also think that you can "Delete" an arrow. Well, you can't. You have to grab one of its extremities, drag it away and release it.

I could go on and on.

ToeCutter
Active Participant

Stacked sequence structures are bad news.

JKSH
Active Participant

To elaborate on the negativity you see above: Programming using stacked sequence structures is widely considered an anti-pattern, because it often leads to unscalable and unmaintainable code. This means lots of lost productivity and frustration in the future (I know this first-hand: I've recently been asked to add a feature to an existing system that uses stacked sequence structures everywhere, and it was a painful experience). Also, it degrades the performance of LabVIEW programs.

 

Do you use stacked sequence structures regularly? How easy/hard is it for you to write code without them?

Certified LabVIEW Developer
magicbean
Member

I use only stacked sequences when it helps to keep the block diagram to a reasonable size. I have a lot of controls and indicators that I set up programatically in my application, both values and properties. I typically do all the initialisation in frame 0 including generation of queues, notifiers, ports etc., all the event handling and the whole program operation in frame 1 and anything I need to close and tidy (leaving indicators in the right state, resetting IO etc in frame 2.

 

To configure all the user interface elements at the same level as the main program flow would result in a huge diagram or many tens of references passed to subVIs; obviously possible but not graceful.

 

If I could think of a neat way of doing it without a stacked sequence, I would, and I'd like to see some positive ideas about how to do it. If I use a state machine to do init, run and stop I still have to get all my queues, notifiers, ports that I want to set up in 'init' into 'run' and maybe into 'stop' as well. (I suppose the arrows do work on shift registers so that would be a benefit).

 

Anyway, this has wandered off course; my idea was just to not exclude sequence locals from the arrows.

Dennis_Knutson
Knight of NI

I think that using a state machine is a much better way to do the init/run/stop. Easier to view, modify, etc. 

 

My point about your idea was that if it's not working with sequency locals, I would not like to see any effort to fix it and just let the stacked sequence structure die.

Darin.K
Trusted Enthusiast

Pay no attention to the hate for the Stacked Sequence Structure, it is misguided.  Sequencing is a vital syntactic ingredient in a multithreaded dataflow environment to enforce concurrency, and the SSS is a valid part of LV syntax for that role.  The use of artificial data dependencies is a hack which is not a natural part of the language.

 

The real problem is the sequence local, those are an abomination.  There are the single worst feature in LV IMO and render the SSS basically useless.  Replacing them with shift registers for example would make the SSS a first class citizen.  (Then fix the compiler so the subdiagrams can be multithreaded).

X.
Trusted Enthusiast
Trusted Enthusiast

Just noticed that you cannot attached an arrow to the "Dynamic Event" terminal of an Event structure either (the highlighted thingy, not the terminal which can be targeted)...

 

ScreenHunter_002.jpg

 

or a input or output of a Formula Node (or Mathscript Node):

 

ScreenHunter_003.jpg

 

 

PaulG.
Active Participant

What DarinK said. Stacked sequence structures are a classic example of a faulty implemention of a good idea. And no other adjective describes the sequence local better than "abomination". The SSS needs shift registers. Until they get them don't use the stacked sequence. Use a state machine.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.