From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiplot charts with units

Solved!
Go to solution

I'd like to make a chart using units on the vertical axis.  I'd like to plot temperature on the left axis, and something else, like pressure, on the right axis.  I would like to incorporate units, so I can easily switch between metric and Imperial units.

I can build a single plot with units and assign it to the value of the chart easily enough.  Changing the units on that y axis  changes the display appropriately, as in the enabled case of the enclosed VI.  However, if I build a second plot with different units in the second parameter and try to build an array with the two of them, I get broken wires because the units aren't compatible.  Is there a way to assign my second plot to the second axis and avoid the broken wires?  I attempted using two methods for creating a multiplot chart, and neither seemed to work.  They are in the disable cases.

I am using 32 bit  LV2019 on a Windows 7 machine.

0 Kudos
Message 1 of 5
(1,120 Views)
Solution
Accepted by topic author PghFool

Hi PghFool,

 

you cannot mix different incompatible units in an array: all elements share the same properties!

 

So my suggestion is to handle the unit conversion on your own and indicate the currently used unit in the plot/axis label…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,109 Views)

So there's no way to assign the values of one plot to one Y axis, and the values of a second plot to a second axis?  I didn't see a way, but I was hoping, because there are a lot of properties to a chart and its various components.

0 Kudos
Message 3 of 5
(1,096 Views)

Hi PghFool,

 

the chart properties doesn't matter.

Its the BuildArray which gives the error: you cannot build an array from elements of different datatype!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(1,093 Views)

I understand I can't build an array from different dataypes.  I was hoping to build two different arrays, and assign them the the "Value" of different active Y axes, but there's no such property.  I will accept your solution of using Convert Unit before building the array to get rid of the units.  I can display with different units by switching which Convert Unit I use, thus avoiding any of my own math.

0 Kudos
Message 5 of 5
(1,088 Views)