Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Number of read buffered data too high

Hi,
 
I'm using the slightly modified example program
 
 
In this program a pulse train is generated on Counter 0, the output is then routed to the RTSI Line 0.
 
The RTSI Line 0 is then used as the Gate of Counter1, this Counter is used to count pulses coming from PFI Line 1 as the source.
Counter 1 is set to "buffered event counting".
 
When I set the frequency of the pulse train for example to 100 Hz, I would expect 100 numbers in the read buffer but I get something around 150 to 160, the same happens at other frequencies, I always get about 1.5 times the amount of bufferd data that I actually would expect from the chosen frequency.
 
Has anybody an idea what I'm doing wrong?
 
Thanks
andreas 
 
 
0 Kudos
Message 1 of 3
(3,159 Views)
As the pulse train is generated continously, the numer of pulses generated is independent of the frequency you configure. So if you configure the frequency to 100 Hz, and read the buffer every 2 seconds, you would find 200 new values in the buffer.
0 Kudos
Message 2 of 3
(3,142 Views)
I agree that the number of the buffered data depends on how long buffer is read. But when I adjust the frequency of the pulse train to 100 Hz and set the time limit of the "Read buffer.vi" to 1 second, I still get a number of ~ 155 buffered data.
 
I know that there is an uncertainty in the time limit of ~ 55 ms under Windows (according to the Help) but I don't think this can account for such a high deviation from the expected number of buffered data.
 
In addition it seems like there is a constant factor between the expected number and the read number of ~1.55, i.e. when I choose a 10 seconds time limit I get ~ 1550 numbers, which tells me that it is unlikely that the uncertainty in the time limit might be the reason.
 
regards
andreas
0 Kudos
Message 3 of 3
(3,137 Views)