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: 
altenbach

The "Zero Frame Flat Sequence", aka. "Synchronizer Bar"

Status: Declined

In the G Language, this is what the Flatten Sequence structure is for.  Not going to add a second way to do this.

Sometimes we have a need to do some mild synchronization between otherwise parallel tasks. Typically we would use a flat sequence (but there are also exceedingly fancy tools such as "Rendezvous"). Even a flat sequence is often overkill for the given situation: It is a 2D object with it's own diagram and input and output tunnels. We need to decide what should be inside and what should be outside.

 

I suggest to extend the idea to a 1D object: The "Synchronizer Bar". It is basically a flat sequence with zero frames, condensed to a single vertical line (Maybe we could even allow kinks in it???).

 

The function is very simple and immediately intuitive (as anything in LabVIEW should be!!) and can be described in a single sentence:

 

"No data can leave any of the tunnels until all tunnels in the structure have received data."

 

Ideally, we should be able to "free-hand draw" this structure interactively with the mouse and a tunnel will be automatically generated for each wire we cross.

 

Here is a dumb (but illustrative) example (ignore the code itself). That's how it could look like.

(At the moment I simply merged the edges of a flat sequence, but I am open for prettier suggestions ;))

 

ZFF.png

 

 

Overall, it should be closely related to the flat sequence and include certain right-click actions (e.g. Add frame before/after, which would expand it into a flat sequence).

25 Comments
hebi22
Member

Good Idea

TiTou
Trusted Enthusiast

That's a great idea!


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Knight of NI

Don't like it. It think it's too confusing. I personally didn't find it intuitive, but maybe I'm just a little groggy this morning since I forgot to change one of my clocks and woke up an hour early. It seems to place an arbitrary "wall" in your code when a wall isn't what you really want. What if the wall needs to be separated? How are the two walls synchronized. Or aren't they? The bar would need to be drawn at all different angles as well, since LabVIEW code isn't left to right, and something like this could reinforce the misconception on newbies that LabVIEW code executes left to right or top to bottom, or some other arbitrary direction.

tst
Knight of NI Knight of NI
Knight of NI

I did vote for this, but on second thought, I do think it's slightly impractical.

 

Specifically, there are cases where I want to order things which don't have a dataflow dependency, and today a flat SS is what I usually use. The problem with this suggestion is that sometimes these things don't have output wires or that an input wire is not needed or comes from somewhere else. In those cases, I don't think this new suggestion will help (although I have to admit I don't know what percentage of the times I would want to use this would be for those cases).


___________________
Try to take over the world!
Dragis
Active Participant

I like this idea for diagrams where all the nodes have inputs and outputs; like others have mentioned, however, it isn't generally applicable like other ideas that have been posted. This idea is actually very similar to a "pipeline stage" bar that I've discussed with people in the past (haven't put it on the idea exchange yet, perhaps I should do that). What I'd really like to see is a special handle that you can show on any node and wire between them to create artificial data flow dependencies. I'll try to post a screenshot at some point when I have time to fire up paint.

altenbach
Knight of NI

Let me clarify that I am not really proposing a radical new structure, it is basically just a logical extension of the flat sequence. An equivalent structure is a single frame flat sequence with all wires wired across. This one simply does not waste any space.

 

Saverio, each bar would stand on its own and can be anywhere on the diagram and be of any lenght.

 

Roman numerals did not have a "zero", even thought it probably would have been useful. Why can't there be a flat sequnce with zero frames?? 😄

PaulG.
Active Participant

I have used single frame sequence quite often in this way. This is the exact same thing without the extra real estate. Exactly what it says. Good idea.

PaulG.

LabVIEW versions 5.0 - 2020

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

Could you go underneath or above it without having to pass through the wall or would you have to go around it? Would you have an horizontal version of it? If yes, could you connect many vertical and horizontal bars so as to build amazing mazes?

JK, of course.

Broken_Arrow
Active Participant

Kudo! "Rendezvous at the Bar"

Richard






altenbach
Knight of NI

Happy Hour! 😄