LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Different wf_increment from sampling rate

Hi

 

I'm streaming data continuously to a tdms-file. The sampling rate is set to 3kHz. Oddly the wf_increment parameter is showing 0.000333325s in the tdms-file instead of 1/3000.

Can anyone give me a hint why there's this difference?

Because I need the correct value to build a time channel for postprocessing data in excel.

 

I have set the sampling rate per channel to 6000 and the rate of the clock to 3000Hz.

 

Thanks for your help

Yves

0 Kudos
Message 1 of 5
(5,328 Views)

Yves, could you provide a VI to reproduce this issue? BTW, what's your expectation? 0.000333333s  for wf_increment parameter?

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

Thanks for your help. Yes, my exceptation is 0.000333333s.

An here's my vi.

 

0 Kudos
Message 3 of 5
(5,321 Views)

Yves,

 

There are at least two issues here.

 

1. 1/3000 cannot be represented exactly in binary. Create a simple example with a numeric indicator set to display >= 18 significant figures.  1/3000 = 0.00033333333333333332200.

 

2. Your DAQ device may not be able to generate exactly 3 kHz. For example suppose the internal clock is 20 MHz. 20 MHz/6666 = 3000.30003 Hz and 20 MHz/6667 = 2999.850008 Hz.

 

Lynn

Message 4 of 5
(5,297 Views)

Thank you for your help.

Answer 1 is the relevant one. Obviously. I should have seen this too...

 

Unfortunately I have to set the rate on a similar rate. Because I need to reduce part of my data to 600Hz.

Well, I'll set the rate to 3600Hz. This makes the error quite small.

 

Yves

0 Kudos
Message 5 of 5
(5,269 Views)