From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fixed rate acquisiton decimated to different rates and saved to tdms with correct timing

I am attaching a vi that I made to try and show what it is I want to do. The data will be captured at 10K Hz and 2000 samples. I want different rates used to decimate the data and then get proper timing stored to tdms. I seem to be able to get the data decimated properly as far as sample size. I just can't get the data into tdms so it show the proper number of samples and proper time stamps.

0 Kudos
Message 1 of 5
(2,088 Views)

Hi bassinbc,

 

why don't you scale the dt of those waveforms in this weird manner? Why not apply the decimation factor on dt?

check.png

Keep in mind: your decimation factor should be limited to integer values!

Best regards,
GerdW


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

Thanks, that is simpler. Since I am capturing at 10k Hz and 2000 samples a pop, I get 5 of the decimated waveform sample per second. So is I were to save these I would have 5 times the # samples for each waveform as the decimated factor for that channel. Hard to see this with the same amplitude of the samples always being generated. So my next question is how to get proper timing saved to the tdms file. How to timestamp the data in the file to be viewed with a program such as scout with several waveforms on the screen so the data is aligned by time.

0 Kudos
Message 3 of 5
(2,066 Views)

@bassinbc wrote:

How to timestamp the data in the file to be viewed with a program such as scout with several waveforms on the screen so the data is aligned by time.


Just wire up your new waveforms to the TDMS Write and all of that information will be taken care of (T0 and dt will be stored as metadata for the channel or group).


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 4 of 5
(2,062 Views)

Didn't catch it at first. You have to multiply by 5 to get correct dt.

0 Kudos
Message 5 of 5
(2,040 Views)