LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Solved!
Go to solution
Highlighted

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..:)

0 Kudos
Message 1 of 5
(260 Views)
Highlighted

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 GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 5
(253 Views)
Highlighted

Hi altenbach,

Thanks for the reply.


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

0 Kudos
Message 3 of 5
(190 Views)
Highlighted
Solution
Accepted by seshasai94

@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".
Multiple plots_graphed_JoB.png

 

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

Multiple plots measured & predicted_JoB.png

(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

0 Kudos
Message 4 of 5
(156 Views)
Highlighted

Hey Joeorbod,

I got the result man.

Thanks for helping me out

 

Cheers....!!!

0 Kudos
Message 5 of 5
(139 Views)