From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the Label for a Front Panel Control to appear in the Block Diagram but not on the Front Panel?

How do I get the Label for a Front Panel Control to appear in the Block Diagram but not on the Front Panel? On the Front Panel I am making a complex control that consists of a Slider and a Numerical Input box. Both Controls display the same information and either can be used for Input. When one changs, the other is made to display the same value.

 

 But I only want the Slider to display the Label on the Front Panel, to avoid confusion. On the Block Diagram however, I want both controls to display their Labels so that I know what they are. How do I display the Label for a Control on the Block diagram, but not display its Label on the Front Panel?

0 Kudos
Message 1 of 6
(4,469 Views)

Right click on the control on the front panel and uncheck Visible Items > Label

0 Kudos
Message 2 of 6
(4,465 Views)

@Ravens Fan wrote:

Right click on the control on the front panel and uncheck Visible Items > Label


 

 

But if I uncheck the Visible Items > Label on the Front Panel, won't that also make the Label disappear on the Block Diagram?

 

I tried the reverse. I had the Label Not Visible on the Front Panel and went to the Block Diagram and change the Property on the Label to Visible. That caused the Label to appear on the Front Panel, but the Label did not appear on the Block Diagram. STRANGE. BUG.

0 Kudos
Message 3 of 6
(4,459 Views)

What version of LabVIEW are you using? I have never seen the behavior you are describing.

0 Kudos
Message 4 of 6
(4,453 Views)

No.  The Label Visible property is separate for the front panel control label and the block diagram terminal label.

 

How did you start out with the block diagram's label not being visible?  Whenever I drop a control or indicator, the label is always visible on both the FP and BD by default.  Maybe there is a LabVIEW option that causes new controls/indicators not to have their labels visible by default, but I have yet to find it.  I don't think an item should ever be dropped without the label visible, good LabVIEW coding practice demands that the labels for control terminals on the block diagram be visible so that you know what control or indicator a wire is going to.

 

That being said, I have seen a lot of VI's posted where the label for the terminal on the BD is not shown (against good programming practice.)  I've gone to the BD and right clicked to show the label.  Sometimes, the people have an empty label (which will turn off the visibility for both the FP and BD) and I'm forced to add some text of my own into the label so I can figure out what their code is doing.  When I add some text to the label, at that time, I find both the BD and FP labels become visible.

 

Are you dealing with controls that have empty labels to start?

Good programming practices:

1.  Always have a name for all of your controls, never use and empty label by deleting the text in the label.

2.  Make the labels unique.  For example, don't have two controls both called Stop.  How do you know quickly know which terminal relates to which control?

3.  Always show the labels on the block diagram, so you know the function of a control's terminal.  If you want to hide the label on the FP, that's okay.

4.  If you want a different label to appear on the FP than whatever you actually called the control, then use the caption.  You can hide the label and show the caption.  This is useful if you need to programmatically change what the "label" is on the front panel such if you are making an application that needs to change its user interface such as for a foreign language.

0 Kudos
Message 5 of 6
(4,452 Views)

Hi dbaechtel,

 

which "property" are you talking about?

 

Did you open the properties dialog for that element? All settings in there affect the front panel behaviour.

Did you use a property node? They also affect the front panel behaviour.

 

Did you right-click the terminal and selected (the first menu item) "Visible Items"->"Label"? Then the label should be visible in the block diagram...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(4,430 Views)