LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

WaveformGraph/XScale/UnitLabel

The XScale and the YScale of the WaveformGraphs have a UnitLabel property, which has subproperties.
Does this unit property do something or is is it for compatibility only?
By default it is off, its size is 0; 0, its text is "".
I set Visible = True; Size = 50; 50; Text = "Something"; FontSize = 12;
Nothing happened.

0 Kudos
Message 1 of 3
(262 Views)

If the data has units (settable with "Convert Unit") then you can optionally display these units on the plot. Right click the plot, then select "Visible", then you'll see "Unit labels" probably grayed out. If you add a "Convert Unit" function, you can tell LV that the units are in, for example, meters.

 

Once you do this, "Unit labels" is no longer grayed out, and you can toggle the visibility. Now, writing to the YScale.UnitLabels.text property will let you convert the units without changing the data. If you type in a random value, it'll throw an error, but if you use, for example, "in" (for inches) then the plot will update in "inches" despite data being in meters.

 

units.png

 

 

0 Kudos
Message 2 of 3
(225 Views)

Thanks, I tried your example and it worked.
But I could not make a unit label shown for the XScale, any idea how to do it?

0 Kudos
Message 3 of 3
(213 Views)