Low frequency counting | LabJack
 

Low frequency counting

3 posts / 0 new
Last post
jfisher
Low frequency counting

Hi Folks, I am using the T7-Pro to generate a low frequency pulse for driving a pump (one falling edge per revolution on this control board) and I am testing over the range [1.0 1.5 2.0 2.5 2.9 3.0]. When I use the example file for PWM and counter (thanks for that, really nice and clear) it will not read back the fractional frequencies. Is there a way for me to get what I want, i.e. a readback from a counter with a float rather than an integer looking answer?

Here is my table of values for reference:

 For DIO_EF_CLOCK#_DIVISOR = 256
    =====================================
    DIO_EF_CLOCK0_ROLL_VALUE     FREQ OUT
    104166.66                    3
    107758.62                    2.9
    125000                       2.5
    156250                       2
    208333.33                    1.5
    312500                       1    

Not that it should matter, but I am doing this all in Python 2.7. Independent verification with "nScope" shows the pulses are right on with respect to my fractional values, only the counter is reporting incorrectly.

Thanks,

JF

LabJack Support
labjack support's picture
If you are reading the

If you are reading the counter 1 per second, your resolution is 1 Hz.  If you read the counter every 100 seconds, your resolution is 0.01 Hz:

https://forums.labjack.com/index.php?showtopic=1105

With low frequencies like you have you want to time pulses rather than count pulses.

 

Your first inclination might be to use Frequency In:

https://labjack.com/support/datasheets/t-series/digital-io/extended-feat...

... but the same roll value affects Frequency In and PWM Out, so you can only measure frequencies less than the PWM frequency.

I would suggest Interrupt Frequency In as the best option:

https://labjack.com/support/datasheets/t-series/digital-io/extended-feat...

 

jfisher
Thank you for the quick and

Thank you for the quick and clear suggestion! I will get on it tomorrow.

 

Regards,

 

jack