LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change physical unit of an y-axis in plot for a waveform chart

Solved!
Go to solution

I would like to change the physical unit of an y-axis in plot for a waveform chart(xy graph) in the same way I change the unit in an numerical control. How can I do that ?. I use LV2012.01f4 32bit.

0 Kudos
Message 1 of 19
(6,163 Views)
What do you mean by physical unit of y-axis?
-if you are talking about the name, you can edit the name in chart>>Properties>>scale>>y-axis or simply double click on the name.
-if you want to change the scale of y-axis, create property node for y-axis scale parameters and change them.
-Sorry i did not understand the thing "change the unit in an numeric control". Please can you explain this more.
Thanks
uday
0 Kudos
Message 2 of 19
(6,158 Views)

Hi Joern,

 

it seems the chart doesn't support units:

- you cannot make the "unit" visible" when right-clicking the chart and look under "visible objects"...

- even when there are properties available regarding the Y axis unit they don't seem to have an effect on the chart's appearance...

(Tested with LV2009)

 

What is the reason to show an unit at the Y axis? You can always change the axis label, that should be sufficient for most purposes...

Best regards,
GerdW


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

The reason behind is that I have an application which stores data in binary file format without the unit information. Now I want to have the opportunity to make these data visible in a plot of an waveform chart (or XY graph) dependant from users choice of the unit system (SI metric system or US custom system). That means I want to see my stored values in mm if the users choose SI and inches if the users chooes UScustom without changing my stored values.

 

Best regards,

Jörn

0 Kudos
Message 4 of 19
(6,150 Views)
Solution
Accepted by topic author joernheit

Hi Joern,

 

then you should apply a base unit to your data before displaying them in the chart:

check.png

The chart does accept numbers with unit (in contrast to my former message), but you have to apply the unit to your data before wiring the chart...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 19
(6,135 Views)

Exactly what I found out in parallel. Thanks again for your time Smiley Happy.

Jörn

0 Kudos
Message 6 of 19
(6,125 Views)

Little drawback with historical data already stored : If you stored your data without units but with units in mind for example mm instead of baseunit meter than you have to scale your data before drawing because the conversion only converts to baseunits. This could be complicated with complex unitmixtures.

0 Kudos
Message 7 of 19
(6,115 Views)

Hi Jörn,

 

when your data is already provided in "mm" you can also cast to unit "mm" instead of base "m"...

 

Anyway: you should know what type of data is stored in your files!

Best regards,
GerdW


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

Let's assume your example and let's say the array  contains values representing 1 to 5 mm. The array itself has no units but we know it is mm. That means I would like to see it in mm in the plot. In my example the first waveform  graph. Now I convert to mm and simply copy the graph and wire from convert. Now I see  0.001 to 0.005  on the Y-Axis. After rescaling it is ok. Did I missed something ?.

 

Convert_and_scale_Diagramms2014-01-06_14-50-03_.png

0 Kudos
Message 9 of 19
(6,091 Views)

Hi Jörn,

 

could you PLEASE attach non-scaled graphics (for the FP)?

 

It seems you fiddled with multiplier/offset setting of the scale. Don't do this when you want to show numbers with units, the scaling is already done by the unit display:

check.png

Numeric data is unit-casted to "mm" and shown in "inches"...

And you should make the unit display visible (as in my picture, the small "in" left of the chart). That way you can easily change the shown unit!

Best regards,
GerdW


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