Section 8. Operation
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
P
or
C
terminals.
Mechanical-switch closures have a tendency to bounce before solidly closing.
Unless filtered, bounces can cause multiple counts per event. The CR1000
automatically filters bounce. Because of the filtering, the maximum switch-
closure 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
Data output options include counts, frequency (Hz), and running average.
P 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 on P Terminals
(p. 356).
•
Maximum input frequency = 90 Hz
•
CRBasic instruction:
PulseCount()
C Terminals
Switch-closure mode is a special case edge-count function that measures dry-
contact-switch closures or open collectors. The operating system filters bounces.
Connection configurations are illustrated in table
Switch Closures and Open
Collectors on C Terminals
(p. 357).
•
Maximum input frequency = 150 Hz
•
CRBasic instruction:
PulseCount()
8.1.3.5 Edge Timing
Edge time and period can be measured on
P
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).
355
Summary of Contents for CR1000
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 36: ......
Page 38: ......
Page 40: ......
Page 60: ...Section 4 System Quickstart Figure 16 PC200W View Line Graph 60 ...
Page 96: ......
Page 98: ...98 ...
Page 302: ......
Page 453: ...Section 8 Operation Figure 115 Using the Keyboard Display 453 ...
Page 456: ...Section 8 Operation Figure 118 Real Time Custom 456 ...
Page 457: ...Section 8 Operation 8 8 1 3 Final Memory Tables Figure 119 Final Memory Tables 457 ...
Page 458: ...Section 8 Operation 8 8 2 Run Stop Program Figure 120 Run Stop Program 458 ...
Page 460: ...Section 8 Operation Figure 122 File Edit 460 ...
Page 461: ...Section 8 Operation 8 8 4 PCCard Memory Card Display Figure 123 PCCard CF Card Display 461 ...
Page 478: ......
Page 506: ......
Page 536: ......
Page 636: ......
Page 642: ......
Page 644: ......
Page 676: ......
Page 677: ......