Section 8. Operation
C Terminals
• Maximum input frequency = <1 kHz
• CRBasic instructions: PulseCount(), TimerIO()
8.1.3.3.1 Frequency Resolution
Resolution of a frequency measurement made with the PulseCount() instruction
is calculated as
where
FR = resolution of the frequency measurement (Hz)
S = scan interval of CRBasic program
Resolution of a frequency measurement made with theTimerIO() instruction is
where
FR = frequency resolution of the measurement (Hz)
R = timing resolution of the TimerIO() measurement = 540 ns
P = period of input signal (seconds). For example, P = 1 / 1000 Hz = 0.001
s
E = Number of rising edges per scan or 1, whichever is greater.
Example: E for a 10 Hz input signal
Scan Rising Edge / Scan E
5.0 50 50
0.5 5 5
0.05 0.5 1
TimerIO() instruction measures frequencies of ≤ 1 kHz with higher frequency
resolution over short (sub-second) intervals. In contrast, sub-second frequency
measurement with PulseCount() produce measurements of lower resolution.
Consider a 1 kHz input. Table Frequency Resolution Comparison
(p. 375) lists
frequency resolutions to be expected for a 1 kHz signal measured by TimerIO()
and PulseCount() at 0.5 s and 5.0 s scan intervals.
Increasing a measurement interval from 1 s to 10 s, either by increasing the scan
interval (when using PulseCount()) or by averaging (when using PulseCount()
or TimerIO()), improves the resulting frequency resolution from 1 Hz to 0.1 Hz.
Averaging can be accomplished by the Average(), AvgRun(), and AvgSpa()