Rate value, Ring counter -10, Rate value -10 – Rockwell Automation 1746-HSCE2 Multi-Channel High Speed Counter Module User Manual

Page 30: Ring counter

Advertising
background image

Publication 1746-UM002B-EN-P - August 2004

2-10 Module Operation

Ring Counter

Figure 2.6 demonstrates ring counter operation. In ring counter
operation, the count value changes between programmable minimum
and maximum values. If, when counting up, the counter reaches the
maximum value, it rolls over to the minimum value. If, when counting
down, the counter reaches the minimum value, it rolls over to the
maximum value.

Figure 2.6 Ring Counter Diagram

Rate Value

The rate value reported to the processor is calculated in counts per
second (Hz), and is available with all input configurations. The input
configuration determines how the rate value is calculated. When the
count value is increasing, the rate value is positive. When the count
value is decreasing, the rate value is negative.

The rate value is generally calculated as follows:

When the first input pulse is received, the value of an independent,
free-running timer (Ta) is recorded. The module waits approximately
16 ms, while counting more input pulses. After 16 ms, the module
waits for the next input pulse, and the value of the independent timer
(Tb) is again recorded. The module then calculates the rate value
using the formula:

Rollover

Count Up

Count Down

Maximum Value

Minimum Value

rate value

number of counts

Tb Ta

------------------------------------------

=

Advertising