beautypg.com

Frequency/rate measurement, Frequency/rate measurement …… 14-5 – Measurement Computing DataShuttle User Manual

Page 119

background image

DataShuttle and DynaRes

11-12-01

Digital I/O 14-5

Frequency/Rate Measurement

Flow meters and tachometers put out pulses that are usually measured as a rate or frequency. You can
measure rate or frequency by counting pulses in one counter/timer and measuring the time interval in
another. The frequency is the number of pulses divided by the time interval. This can be done by using
more than one board with a counter/timer.

Figure 14-5 uses three counter/timers. CT1 and CT2 are cascaded. CT1 gets its input from the internal
clock. CT3 is gated by CT2. The pulses are counted by CT3. Figure 14-

5a uses no boards.

In the software, set up CT1 to use the internal input of 2 megahertz. Set it to a full count of 65,536. Enable
its external output and put it in the one shot mode. Enable the input of CT2. Enable the external output of
CT2 so it can gate CT3. Set the output mode of CT2 to pulse, and to single cycle (it only counts to full
count once, then stops). Enable the input and the external gate of CT3. Set the full count of CT2 to give
the output interval desired for the gating of CT3. It can count as long as 35.8 minutes.

The frequency is calculated as follows:

Frequency = (CT3 count)

÷ (CT2 full count x 0.032768)

The gate interval for CT3 determines the resolution of the frequency measurement or how finely the
frequency is measured. The resolution is calculated as follows.

Resolution (%) = 100

÷ (gate interval x frequency)

Figure 14-5. Frequency/Rate

This manual is related to the following products: