BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequences, locals and globals - oh my!

After 25 years of LabVIEW, I still get that "threw up in my mouth a little bit" feeling when opening production code and finding endless nested stacked sequence structures, locals and globals everywhere with property nodes in every other frame to update the front panel.

 

sequences.jpg

 

 

Message 1 of 5
(308 Views)

Even worse are "sequence locals"!

 

SeqStackedA.gif

 

(Locals are sometime needed for UI related tasks and much better that value property nodes. Globals have their purpose too even though I typically use action engines instead so they can have more logic)

Message 2 of 5
(287 Views)

It has those too! 👀

0 Kudos
Message 3 of 5
(250 Views)

@PhillipDBrooks wrote:

It has those too! 👀


Fun fact about those sequence locals:  they appear to be extremely fast (no thread switch like true Locals)  until you actually unwind the SSS to a FSS and realize that they are instituted like wires in parallel to the sequence frames.  CA and I went back and forth on the topic once upon a time.  I don't think we ever got straight down to the nuts and bolts .  I suspect (that means try it!) That "replace SSS with FSS" forces the sequence locals to be wired through each frame rather than exiting the structure and reentering as needed. In extremely rare conditions that could cause an extra synchronization unneeded by pure dataflow.  Eliminating the FSS too would restore the original dataflow intent of the sequence local.  

 

Moral:  sometimes better is not as good but, best is always better. 

 

Probably a corollary to Thornby's Law which states "Should be isn't is!"


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 5
(168 Views)

@JÞB wrote:
Fun fact about those sequence locals: 

They are basically vias that start in one layer and are wired across all following layers of the stack. 😄

 

altenbach_0-1766936968783.png

 

0 Kudos
Message 5 of 5
(99 Views)