# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution
Highlighted

## Plotting a real time 1D array along with predicted data.

Hi Guys,

Objective: To plot a continuous real time data (1D array) on the same graph in which the predicted data is already preloaded and plotted.

I don't think i've made my objective clear to you..:(

Let me Elaborate...!!!

I'm acquiring data continously in the form a 1d array, from a hardware with a sampling rate of 500 samples/sec. Buffer size is 100 samples (or 200 msec). I already have the predicted data (1D array of Nominal, Upper bound & Lower bound) prior to the measurement.

My objective is to superimpose the measured data coming from hardware on to the graph preloaded with the predicted data.

Note: The sampling rate of the already available predicted data and the channel to be measured in real time are different...!!!

HELP ME GUYS..:)

Message 1 of 5
(269 Views)
Highlighted

## Re: Plotting a real time 1D array along with predicted data.

Are the x-values of the predicted data spaced equally in time, just with a different dx?

@seshasai94 wrote:

I already have the predicted data (1D array of Nominal, Upper bound & Lower bound) prior to the measurement.

Is this a 1D array with three values or three 1D arrays, one for each type? Are the bounds time dependent or not?

THis seems like a trivial thing. Maybe you should resample the predicted data and the actual sampling rate, then graph all four, filling the real data initially with NaN, then replace with real data as it arrives.

We typically can give much more useful advice if you could show us some simplified code.

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 2 of 5
(262 Views)
Highlighted

## Re: Plotting a real time 1D array along with predicted data.

Hi altenbach,

No, x values are not equally spaced in all the three predicted data 1D array as well as the measured data.

Here i'm attaching the VIs where the three predicted files are read each from a text file and shown as an array of time and pressure data.

And the measured data is of 500 samples/sec coming from a hardware.

I want the predicted data of nominal, lower and upper to be plotted at prior on the graph and should be waiting for the measured value to be superimposed on that.

I'm using LabVIEW 2019

Message 3 of 5
(199 Views)
Highlighted
Solution
Accepted by topic author seshasai94

## Re: Plotting a real time 1D array along with predicted data.

@seshasai94 wrote:

I want the predicted data of nominal, lower and upper to be plotted at prior on the graph and should be waiting for the measured value to be superimposed on that.

Hi, @seshasai94,

I'm not sure how your data will stay above "Lower" and below "Upper"...

Spoiler
...since after about 85 seconds, "Lower" is greater than "Upper".

But here's a snippet of something that I think will work, based on the requirements you gave.

(I wasn't able to test it, since I have no data. So...it might have errors. But I think it works.😅)

(Also, I suspect this is really inefficient, but I'm pretty inexperienced at LabVIEW, so I'm not aware of a better way to do it.)

(Except maybe this.)

If you use any of this code, you should incorporate it into your existing diagram - It will not work as a subVI.

Let us know how it goes.

-joeorbob

Message 4 of 5
(165 Views)
Highlighted

## Re: Plotting a real time 1D array along with predicted data.

Hey Joeorbod,

I got the result man.

Thanks for helping me out

Cheers....!!!

Message 5 of 5
(148 Views)