LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to resample an array to the proper timing?

Solved!
Go to solution

I have a DAQ which returns the data for each channel as a row vector (1-D array)  The sampling rate is defined by the user, so I know the dt between each data point in the array.  I'm taking 1000 samples at 10KHz.  However, when I plot this array on a waveform chart, the time scale goes from 0 to 1000 (the index of the element) instead of 0 to 0.1 s (time).  I need to get this dt incorporated into the data so when I plot it it displays properly vs time, and thus I can perform an FFT to get frequency content.

 

 

0 Kudos
Message 1 of 4
(2,444 Views)

You can use Build Waveform to bundle up your array, the dT time and a T0 time to get a Waveform datatype that contains the timing information.

0 Kudos
Message 2 of 4
(2,439 Views)
Solution
Accepted by jtrout13

Use the Build Waveform to turn your data into waveforms.  One of the inputs is Y (your data), another is dt (time/sample).  You probably don't care about the T0.  You can then take the array of waveforms to the graph and the times will be there for you.


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 3 of 4
(2,437 Views)

Got it.  Thanks again guys!

0 Kudos
Message 4 of 4
(2,428 Views)