Campbell Scientific CR6 CR6 Measurement and Control System - Page 343
Switch-Closure and Open-Collector Measurements, 1.3.5 Edge Timing
![]() |
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 343 highlights
Section 8. Operation TimerIO(WindSpd(),11111111,00022000,60,Sec) A: In the background, a 32-bit-timer counter is saved each time the signal transitions as programmed (rising or falling). This counter is running at a fixed high frequency. A count is also incremented for each transition. When the TimerIO() instruction executes, it uses the difference of time between the edge prior to the last execution and the edge prior to this execution as the time difference. The number of transitions that occur between these two times divided by the time difference gives the calculated frequency. For multiple edges occurring between execution intervals, this calculation does assume that the frequency is not varying over the execution interval. The calculation returns the average regardless of how the signal is changing. 8.1.3.4 Switch-Closure and Open-Collector Measurements Switch-closure and open-collector signals can be measured on U or C terminals. Mechanical-switch closures have a tendency to bounce before solidly closing. Unless filtered, bounces can cause multiple counts per event. The CR6 automatically filters bounce. Because of the filtering, the maximum switchclosure frequency is less than the maximum high-frequency measurement frequency. Sensors that commonly output a switch-closure or open-collector signal include: • Tipping-bucket rain gages • Switch-closure anemometers • Flow meters Measurements include counts, frequency in hertz, and running average. U and C Terminals An internal 100 kΩ pull-up resistor pulls an input to 5 Vdc with the switch open, whereas a switch closure to ground pulls the input to 0 V. An internal hardware debounce filter has a 3.3 ms time-constant. Connection configurations are illustrated in table Switch Closures and Open Collectors (p. 344). • Maximum input frequency = 90 Hz • CRBasic instruction: PulseCount() • 8.1.3.5 Edge Timing Edge time and period can be measured on U or C terminals. Applications for edge timing include: • Measurements for feedback control using pulse-width or pulse-duration modulation (PWM/PDM). Measurements include time between edges expressed as frequency (Hz) or period (µs). U and C Terminals • Maximum input frequency
![](/manual_guide/products/campbell-scientific-cr6-cr6-measurement-control-a476969/343.png)