04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Section 8. Operation<br />

Table 70. Example. E for a 10 Hz input signal<br />

Scan Rising Edge / Scan E<br />

5.0 50 50<br />

0.5 5 5<br />

0.05 0.5 1<br />

TimerIO() instruction measures frequencies of ≤ 1 kHz with higher frequency<br />

resolution over short (sub-second) intervals. In contrast, sub-second frequency<br />

measurement with PulseCount() produce measurements of lower resolution.<br />

Consider a 1-kHz input. Table Frequency Resolution Comparison (p. 319) lists<br />

frequency resolution to be expected for a 1-kHz signal measured by TimerIO()<br />

and PulseCount() at 0.5-s and 5.0-s scan intervals.<br />

Increasing a measurement interval from 1 second to 10 seconds, either by<br />

increasing the scan interval (when using PulseCount()) or by averaging (when<br />

using PulseCount() or TimerIO()), improves the resulting frequency resolution<br />

from 1 Hz to 0.1 Hz. Averaging can be accomplished by the Average(),<br />

AvgRun(), and AvgSpa() instructions. Also, PulseCount() has the option of<br />

entering a number greater than 1 in the POption parameter. Doing so enters an<br />

averaging interval in milliseconds for a direct running average computation.<br />

However, use caution when averaging, Averaging of any measurement reduces<br />

the certainty that the result truly represents a real aspect of the phenomenon being<br />

measured.<br />

Table 71. Frequency Resolution Comparison<br />

0.5 s Scan 5.0 s Scan<br />

PulseCount(), POption=1 FR = 2 Hz FR = 0.2 Hz<br />

TimerIO(), Function=2 FR = 0.0011 Hz FR = 0.00011 Hz<br />

Q — When more than one pulse is in a scan interval, what does TimerIO() return<br />

when configured to return a frequency Does it average the measured periods and<br />

compute the frequency from that (f = 1/T) For example:<br />

Scan(50,mSec,10,0)<br />

TimerIO(WindSpd(),11111111,00022000,60,Sec)<br />

A — In the background, a 32-bit timer counter is saved each time the signal<br />

transitions as programmed (rising or falling). This counter is running at a fixed<br />

high frequency. A count is also incremented for each transition. When the<br />

TimerIO() instruction executes, it uses the difference of time between the edge<br />

prior to the last execution and the edge prior to this execution as the time<br />

difference. The number of transitions that occur between these two times divided<br />

by the time difference gives the calculated frequency. For multiple edges<br />

occurring between execution intervals, this calculation does assume that the<br />

frequency is not varying over the execution interval. The calculation returns the<br />

average regardless of how the signal is changing.<br />

319

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!