LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot VS time after transforming data from Dynamic to array ?

Hi ! 


I am currently using a DAQ Assistant to get dynamic data from 2 channels input.
With a splitting VI, I substract one to the other and plot them ( Graphic named 1 )
Then I use a VI which transform the Dynamic result of the soustraction into an array, in order to calculate its mean.
VI
After that step, when I turn my script ON, I am well capable to observe dynamically my mean evolve from an indicator

BUT

I can not observe it plotted VS time as I would like.

In other words, from the dynamic data I have value VS time, I get the mean of it over time, and I would like to be able to plot it back VS time, with the previous mean points plotted.
All I can get now is a single point moving up and down, because it is lacking time data.
Left : Soustraction and good represenation ; Right : bad representation of mean

I attached to this post a simple represenation of my issue, I hope I provide enough information.
I just would like to be able to plot like the window on the left, and not having the one on the right ...

Thank you !

0 Kudos
Message 1 of 4
(2,990 Views)
You've thrown away all timing information by Condon to DBL. To keep it, immediately after the DAQ Assistant, convert to a waveform array. Use the Index Array function to get the individual channels.
0 Kudos
Message 2 of 4
(2,982 Views)

Hi ! 

Thank you for your quick answer.

I see what you mean, it makes sense.

But how will I be able to plot the mean VS time if now I have all my data splited into arrays ? 
I am not sure I talk clearly ... In other ords how will I rebind that mean and Time into one wire to send it into graph VI ?

0 Kudos
Message 3 of 4
(2,978 Views)
Sorry, I misunderstood.

The mean will return a scalar so I'm assuming that you are using chart and not a graph. You can use the build waveform and set the t0 from the original waveform and use the build array function to create a single element Y array.
0 Kudos
Message 4 of 4
(2,969 Views)