3 cr9071e timerio for measuring frequency inputs, 4 high frequency pulse measurements – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 126

Advertising
background image

Section 3. CR9000X Measurement Details

E = # of Rising edges per Scan or 1, whichever is greater. (For a 1000 Hz

input signal E would be 500 given a 0.5 second scan, or 5000 given a 5.0
second scan). If E is less than 1, use a value of 1 for E.

For example, if the input signal frequency was 1000 Hz and the Scan period
was 0.1 Seconds, then the signal’s period (P) would be 0.001 Seconds
(1/1000Hz), and E, or number of pulses per Scan, would be 100 (Signal
Freq/Scan freq = 1000 Hz/10 Hz = 100).

FreqResolution = [(40 x 10

-9

)/100]/[((0.001(0.001 + 40 x 10

-9

/100)

= ~ 0.0004 Hz

As shown in this example, the Frequency resolution can be improved beyond
the basic resolution through having multiple edges (pulses) per scan (scan
interval to signal period ratio). The same advantage can be realized through
setting up a running average using the PulseCount instruction's POption.

If the input signal's period is greater than the scan rate, with a POption of 1 (no
running average), the correct frequency will be returned at the scan when the
pulse edge is encountered. The following scans will return zeros until another
edge is seen.

The maximum period that can be measured with the CR9071E is about 171.7
seconds (32 bit counter with a 40 nanosecond resolution: 2

32

x 40 E-9).

When using a running average whose duration is shorter than the input signal
period, the output from the running average will become the correct value at
the scan when the edge is encountered. It will stay at this value until either
another edge is encountered or, if another edge is not encountered before the
time period of the running average is exceeded, the output will fall off to zero.

3.4.3 CR9071E TimerIO for Measuring Frequency Inputs

Another method for measuring frequency is to use the TimerIO instruction
with one of the Pulse channels on the CR9071E Pulse. The value returned can
be programmed to be the input signal's period in milliseconds (40 nanosecond
resolution), or the signal's frequency in Hz. The advantage of using the
TimerIO instruction over the PulseCount instruction is, that the measured
frequency result will stay at the last recorded value until another edge is
encountered or the 2.6 second timeout period is exceeded. After 2.6 seconds
without another edge, the output from the instruction will change to NAN.

Resolution for the CR9071E TimerIO instruction is the same as for its
PulseCount instruction. See Section 3.4.2 for discussion on measurement
resolution.

3.4.4 High Frequency Pulse Measurements

All twelve pulse channels of the CR9070 and CR9071E can be configured for
high frequency inputs. The signal is fed through a filter with a time constant of
200 (

τ

= 200 nanoseconds

)

nanoseconds to remove higher frequency noise. It

is then fed through a Schmitt circuit to convert the signal to a square wave, and
to guard against false triggers when the signal is hovering around the threshold
level. In the High Frequency mode, the input signal to the Schmitt trigger
must rise from below 1.5 volts to above 3.5 volts in order to trigger an output.
Due to the attenuation caused by the filter on the front side of the Schmitt

3-38

Advertising