LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the Label of a binary controller?

What I am trying to do is create a binary switch that changes its label depending on it current state e.g. switch on label = 1 switch off label = 0.
I have already tried using a property node inside a case structure but i always recieve an error (simple version attached). 
 
If anyone know how to get around this problem i would be very grateful
 
Dbarr
0 Kudos
Message 1 of 5
(3,083 Views)
if you right click on your boolean control, and select properties you can set the boolean text which will change depending on the state of the switch.
Message 2 of 5
(3,077 Views)
Thanks you
0 Kudos
Message 3 of 5
(3,067 Views)
you cannot set the label during run time (thats like renaming your "variable" in another programming language, while it is running).

You should be able to set the caption to whatever text you like using a property node.
0 Kudos
Message 4 of 5
(3,058 Views)
Dbarr,

The Label is the Name of the control. Even though there is an apparently writable property node for Label.text, that text cannot be changed while the VI is running. You saw the error. If you want to change the text associated with a control you want to show the Caption and hide the Label. This stuff is easy to do, but it is not immediately obvious.

The Strings[4] property allows you to change the boolean text. However, you must first go to the control properties tab and enable Show boolean text and Show multiple strings.

Look at the attached modification of your VI.

Lynn
0 Kudos
Message 5 of 5
(3,056 Views)