Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple plots to same chart in LabVIEW

Tags:

charts

labview

I am doing a two-channel data acquisition to read out the voltages of two diodes. I am using LabVIEW to do this. Below you can see the part of the code relevant for my question.enter image description here

The voltages are converted to temperatures by 1D interpolation, as shown in the above code. 0.9755 V corresponds to 2 degrees, 1.68786 V to 100 degrees. For this simple example, I expected the waveform chart to display two constant curves, one at 2 and one at 100. However, it plots only one curve that zigzags between the two values. How can I get two separate plots?

like image 667
zeus300 Avatar asked Jan 29 '26 19:01

zeus300


2 Answers

Add "Index Array" at the "yi" output of the "Interpolate 1D VI" function and expand it to two elements. Then put "Bundle" function with two inputs. Connect "Index Array" outputs to them. The resulting cluster connect to the chart.
That's it :)

Explanation: to display multiple plots in the chart, you need to feed it with a cluster, not an array. Your "Interpolate 1D VI" output gives you 2-element array (result of interpolation for 0.9755 and 1.68786), so you need to convert it to a cluster using Bundle function.

like image 101
Mateusz Owczarek Avatar answered Feb 01 '26 01:02

Mateusz Owczarek


The general answer to this question is that if you open the context help and hover over the BD terminal of a graph or chart, you will see the various data types it supports:

chart BD terminal context help

This will help if you want to get it right every time, as the various charts and graphs can each take different types of data to display different types of graphs and remembering them can be tricky.

like image 37
Yair Avatar answered Feb 01 '26 01:02

Yair



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!