LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to plot a waveform chart where I have a constant slope(defined by me) and new data is plotted over the chart with the defined slope already in the background.

Solved!
Go to solution

I want my chart to have a constant slope already plotted before it continues to start plotting the real time data.. so that I can compare my new data point to point with the ideal slope that i already have in the background

0 Kudos
Message 1 of 10
(3,301 Views)

Hi raza,

 

use a graph instead of the chart and use two plots for that graph…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(3,276 Views)

Hi GerdW,,

 

Thanks for the reply.. Actually if I use graph they plot data after all the calculations are done. I want to plot data as I receive the data,, like in waveform chart. Basically I have 2 slopes .. 1 is what I expect and 1 is which I am receiving,, I want my expected slope to be there on the chart and when I start the calculation the received results should be plotted over it.. 

 

Please see the snapshot I attached.. Here I want my red slope "expected" to be there and and when I start the calculation the white  slope should be plotted..

 

 

0 Kudos
Message 4 of 10
(3,264 Views)

Hi raza,

 

and what's the problem?

 

Why don't you plot your data while aquisition is running? Nobody says you have to plot them when the loop has finished…

 

Did you look at those example VIs coming with LabVIEW?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(3,261 Views)

Hi,

 

the problem is I have 2 arrays of data and I want 1 array to print before the loop executes and second array prints when the loop runs. and both arrays should be printed on the same chart . 

0 Kudos
Message 6 of 10
(3,243 Views)

Hi,

 

Thanks for help.. But this would work when i have one array and a constant "slope". What if I want to print 2 arrays of data.. means if there is an array of data instead of constant "slope"...

 

 

 

0 Kudos
Message 7 of 10
(3,239 Views)
Solution
Accepted by raza51

Hi raza,

 

as said before: it is no problem to have two plots on a graph. But you will have to use a graph instead of a chart!

 

Like this:

check.png

having a constant plot created before the loop and a variable plot created in the loop!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(3,236 Views)

@raza51 wrote:

Hi,

 

Thanks for help.. But this would work when i have one array and a constant "slope". What if I want to print 2 arrays of data.. means if there is an array of data instead of constant "slope"...

 

 

 


Since your graph is refreshed every time you go through the loop anyway, just set up the constant/reference array before the loop and feed it into the graph. That way you'll also have a full X-axis (and a Y-axis which at least includes all the reference data) for the graph already set up.

 

(That's twice in two days I've been scooped by a couple of minutes, I've got to get my typing speed up...)

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 9 of 10
(3,225 Views)

Hi GerdW,

 

Thanks for help,, actually i am new to labView so my basics are weak.. this helped,, the only thing is I need to enable auto indexing and I got my desired result 🙂 

 

Thanks Again..

 


Cheers!!

 

Raza

0 Kudos
Message 10 of 10
(3,221 Views)