Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

i got a problem with my sampling rate

    hey everybody.
i got the following problem:

i use 4 analog input channels, i set the sampling rate to 10k and the number to read at 100. i record the data for a few seconds. after opening my .lvm file, i see that i got more than 400 values, every 1msec. it seems that my while-loop records contiuously.!?!

another example: i set the rate to 1kHz and the number to read at 200. after recording i get data every 1msec. some of the channels have read 100 values the others read contiuously. that means that i got empty lines in my file for some channels that appear every 100 lines for 100 lines. !?

i think for 200 values that i record with a sampling rate of 10k i should get 200 lines of data with a timestep of 100µsec. after this 20msec i should see a step in the timescale due to the while loop and than it should start from right again.

but it does not. so my question:
what have i done wrong? just entering sample rate and number to read leads not to the expected result.
my DAQ and my card can up to 1MHz!
thanks
0 Kudos
Message 1 of 3
(2,745 Views)

Hi billanator,

well, the reason that you get so much values is probably the fact that you have placed the VI which acquires the data in a while-loop.

If you set the sampling rate to 10kS/s and the number of values to read at 100 you will acquire exactely that. But since you're using a loop you will acquire that contiuously because your VI starts every iteration again till the while-loop stops.

Hope that helps.

Regards

Paul

0 Kudos
Message 2 of 3
(2,726 Views)
    thanks for your help. it was hard work but yesterday i found the bug.
it was the following: i got the data of some channels out of a case structure which was switched of 🙂
after turning it on i got the right number auf read data points with the right ratio at all channels for each iteration 🙂
thanks, billa
0 Kudos
Message 3 of 3
(2,712 Views)