06-24-2024 07:43 AM
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.
06-24-2024 02:37 PM
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.
06-25-2024 01:15 AM - edited 06-25-2024 01:15 AM
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?