LabVIEW Idea Exchange

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

How about a Front Panel Cleanup?

Status: Completed

Available in LabVIEW 2019 and later. Press Ctrl-U on the front panel to clean it up to match the arrangement of controls on the connector pane. All controls not on the connector pane are arranged below the controls that are on the connector pane.

We (most of us) have come to find benefit in the Block Diagram cleanup - especially with the fresh upgrades that 2009 provides. How about a Front Panel Cleanup?

 

Our group has adopted the following standard (see below) in response to the otherwise neglected organization of SubVI front panels, and all of our SubVI's have this logical layout of FP objects.

 

So, here's the idea: have a button on the toolbar that "cleans up" a SubVI by organizing it into a "template" based on inputs and outputs as defined by the connector pane. If a FP object is not in the connector pane, place it in Local Data.

 

This idea could automatically be applied when using the Edit>Create SubVI menu item. The spirit of this idea resides in the fact that I think SubVI FP's should have a logical layout, and such a tool would reduce development time for this repetitive task that I perform on each SubVI I create. (Note that UI FP's do not conform to this standard!)

 

Please, vote on this idea based on it's merit and your ability to utilize such a tool, not on the template we use. If you like the idea but have a better template, post a picture! (You might even influence the way we make FP's!)

 

BEFORE FRONT PANEL CLEANUP:

BeforeFPCleanup.png

 

AFTER FRONT PANEL CLEANUP:

AfterFPCleanup.png

19 Comments
RavensFan
Knight of NI

As you also stated, I don't think there would be a good use for this for creating a top level VI that the user would see.  But for the front panels of subVI's, I can see a use for it.

 

I would add that the positioning of the controls and indicators would be based on where in the connector pane that control is attached.  If I have an Error In at the lower left of the connector pane, I put the control to the lower left of the FP.  A reference Out at the upper left corner of the connector would be to the upper left of the FP.  A top center input (I would use for enums of an action engine) go to the top center of the FP.

JackDunaway
Trusted Enthusiast

Absolutely! The positioning on the FP is based purely on the connector pane! See below how the connector pane matches the layout of the FP Controls above.

 

ConnectorPane.png

 

In response to Ravens: I also am a fan of the 5x3x3x5 for AE's in order to perfectly center the Action on top of the VI - typically, I place these at the top of the "Input Data" section, above all the other inputs on the left side of the icon.

tst
Knight of NI Knight of NI
Knight of NI

I'm glad to see you've come around to my way of thinking, after you were basically against the idea here.

 

You may also wish to check out Mark Balla's subVI fixer, which does basically what you want (cleans up the FP and wires the connector pane). The attachments don't seem to be available there, though. The moderators on LAVA need to be informed of that so they can restore them.


___________________
Try to take over the world!
JackDunaway
Trusted Enthusiast

tst, you are partially correct! Two months ago, I really did have zero use for the BD cleanup, but since then (and since the 2009 improvement of partial BD cleanup) I have found that there is definitely a time and a place where it's really going to save you time. When you're starting VI's from a template and then hit BD cleanup, it completely nixes the notion of "template" or "standard". Now, the tool accounts for this.

 

That being said, my participation on this board in the past two months has shaped many new programming standards.

 

I am closer to "on the fence" about your original idea of a smarter "create SubVI" idea, and honestly did not even think about it when I posted this idea. But you're right... this idea is "that other matter" you mention at the end of your post that finally made it's way into a new idea.

MathieuSteiner
Active Participant

Would actually be great for all subVIs FPs that are only visible during developpement time.

Matching the connector pane placement on the BD is always done manually, and it takes time...


altenbach
Knight of NI

Personally, I would be happy with much less functionality. The FP layout is personal taste.

 

Often, we encounter VIs such as this (from here), where some controls/indicators are a handful of screens outside the window bounds, with huge wastelands in-between.

 

A cleanup action would collect all objects that are far away and line them up right outside the windows boundary.

 

Of course we have the further complications on what do do with hidden controls during cleanup. If the just serve as local variables, they should be moved outside the visible area, but if the are made visible at times, they need to stay where they are.

JackDunaway
Trusted Enthusiast
altenbach has pointed out a VI that serves more as a user interface more than it does just a data function SubVI. This feature is not meant for UI FP's, but targeted more for the "reusable functional" SubVI's. For every UI FP here, there are 10 or more functional SubVI's that conform to the standard above. Personal taste? Absolutely. But for goodness sakes, I hope every prolific VI writer has a "taste" for a logical, predictable panel layout. Fundamentally, you are correct: there's a sizable percentage of VI's that you would not use this tool for (for us it's around 10% or so??). However, the vast majority would benefit.
jgcode
Active Participant

mecheleceng I really like your FP layout, I have been using a similar one for the last two years, ever since I read A Software Engineering Approach to LabVIEW by Conway and Watts. I think this layout is very intuative, and clear to other developers. 

 

But I agree with altenbach, Style is personal or company dependent. I wouldn't want LabVIEW to force "a default" unless it was my own (/company) 🙂

 

I use a subVI template to get the desired effect each time. And now a RCF plugin to format LVOOP class templates (although in 2009 it seems we may have access to these). 

 

I guess though, if there was a community agreed FP design, it may be handy to be able to cleanup the FP. 

 

As for your posting request here is what my Style is:

Layout is similar to yours

CP influences FP layout

Indicators and their labels right justified

Inputs that are required on CP must have bold Labels to match the connector pane png

If its in the resue library and can be distributed (via packages) it has a license associated with it

 

  

  

 SubVI Front Panel Layout - CP.png

 

SubVI Front Panel Layout.png

 

 

  

Certified LabVIEW Architect * LabVIEW Champion
JackDunaway
Trusted Enthusiast

Thanks for the input, jg-code!

 

You're touching on what I originally was afraid to say in the original idea... it would be nice to be able to define our own template.

 

In the least, we would need to define preferences. Like, which border, what spacing between objects, minimum size of the rectangle borders, where to put the top dead center inputs on the connector pane, size of the rectangle labels, the text, the label placement on objects...

jgcode
Active Participant

No probs, happy to share!

 

Certified LabVIEW Architect * LabVIEW Champion