# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Programming Multiple Plots and Baseline on Waveform Chart

Hello folks, in my attached sample vi, I have three difree plots and a "baseline" plot on my waveform chart.  I also have ontrols to adjust the gain of these plots.

However, I want to also have Controls on my Front Panel for each plot that I can use to move the specific plot to align with the "baseline" plot.  I have placed the Controls on my Front Panel but really confused on how to code it to achieve that behavior.  I would appreciate any suggestion.

Message 1 of 11
(3,164 Views)

## Re: Programming Multiple Plots and Baseline on Waveform Chart

What do you mean by "align"?  Looking for a vertical offset?  If so, then you just add those controls with the Y values.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 11
(3,155 Views)

## Re: Programming Multiple Plots and Baseline on Waveform Chart

Hi Crossrulz, thanks for your response.  By "Align", I meant that if for instance the "Baseline" is at Y=2.0 axis, and the incoming signal from my Daq device (sinousoidal) is plotting at Y=0.7 axis, I want to use the "Align Numerical Controls" to adjust the incoming signal to where the Baseline is plotting to align with it, as in overlay with the Baseline signal.

If that is what you thought, you might want to expand more on your previous comment, as in "just add those controls with the Y values".

Thanks

Message 3 of 11
(3,140 Views)
Solution
Accepted by Igho

## Re: Programming Multiple Plots and Baseline on Waveform Chart

Igho wrote:

If that is what you thought, you might want to expand more on your previous comment, as in "just add those controls with the Y values".

You use the Add function to add your signal with your control.  That is how you apply an offset.
And as far as your other problem, right click on the legend on your graph and select Visible Items->Plot Visibility Check Box.  That is the easiest way to control which plots are actively being shown.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 11
(3,119 Views)

## Re: Programming Multiple Plots and Baseline on Waveform Chart

Hi Crossrulz, thanks a lot for your time and help.

Message 5 of 11
(3,106 Views)

## Re: Programming Multiple Plots and Baseline on Waveform Chart

I'm trying to essentially do the same thing- make a waveform chart but do it with a data from a DAQ channel and also show a baseline. I don't know how to do this because the data I acquire from my torque sensor is outputted as an array and of course the base line is just a single constant. How do I get a waveform chart to show "real time data" being acquired but also a baseline?

Thanks everyone!

Message 6 of 11
(2,919 Views)

## Re: Programming Multiple Plots and Baseline on Waveform Chart

Make the baseline an array instead of a scalar. You can easily use the Initialize Array function to set it to the same size as the acquisition array.
Message 7 of 11
(2,915 Views)

## Re: Programming Multiple Plots and Baseline on Waveform Chart

Thanks so much for your input.

I outputted my data as an array. I did initialize array with 0.75 as the element and the dimension size as 1. I then used build array and connected that to my waveform chart. My chart show my sensor data as well as the 0.75,but the "baseline" that I want it to show is oscilating between 0.75 and 0. Is there a fix for this or a different way to do this?

Thanks again!

Message 8 of 11
(2,906 Views)

## Re: Programming Multiple Plots and Baseline on Waveform Chart

Why do you set the number of elements to one? You need to set it to the number of samples you take. Otherwise, the baseline array will be padded with zeroes.
Message 9 of 11
(2,888 Views)

## Re: Programming Multiple Plots and Baseline on Waveform Chart

What if I don't know how many samples I am taking and as long as I am reading data, I'd like to show a baseline as well with the data that is being taken?

Is this possible? How would you recommend I do this? Thanks again, really appreciate it!

Message 10 of 11
(2,881 Views)