LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming Multiple Plots and Baseline on Waveform Chart

Solved!
Go to solution

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.

 

Thanks in advance.

0 Kudos
Message 1 of 11
(3,194 Views)

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


GCentral
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
0 Kudos
Message 2 of 11
(3,185 Views)

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

0 Kudos
Message 3 of 11
(3,170 Views)
Solution
Accepted by Igho

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.

GCentral
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,149 Views)

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

 

0 Kudos
Message 5 of 11
(3,136 Views)

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!

0 Kudos
Message 6 of 11
(2,949 Views)
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.
0 Kudos
Message 7 of 11
(2,945 Views)

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!

0 Kudos
Message 8 of 11
(2,936 Views)
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.
0 Kudos
Message 9 of 11
(2,918 Views)

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!

0 Kudos
Message 10 of 11
(2,911 Views)