How to Change a Control or Indicator’s Label Programmatically in LabVIEW
What I want to do in one of my LabVIEW program is: There is a numeric control and I’d like to change the Label of it programmatically.
In this program, I create a property node for the Label Text and change this to a writable node. And I wire a constant into this property. But when I run this program I get error message like this “Input unit is not compatible with the current unit”. It is weird, the input is string as the property needs.
So, I searched the LabVIEW official website and get that I won’t be able to change the value of the owned label programmatically. But there are a way to get around it as follows:
In LabVIEW, you cannot change the value of an Owned Label during run-time. An Owned Label is a label that belongs to a control or an indicator. For instance, when you move the control/indicator, the label will move with it. The Owned Label is the Label item for the control/indicator in a property node. These items can only be changed during development because it is used as the identifier for the control/indicator throughout the executing VI. Trying to change an Owned Label using property nodes will produce error 1073.
An easy way to change the "label" for a control/indicator would be to use the Caption (Visible Items»Caption) to identify the control/indicator instead of the Label, which is the Owned Label. You can change a Caption at both run-time and development-time. Remember to make the Caption visible and the Label invisible first if you just want to see one "label" for the control/indicator.
So, after I change this LabVIEW program as it says, everything works.