Rate measurement calculation, Rate measurement calculation -12 – Rockwell Automation 1746-HSCE,D17466.5 High-Speed Counter Module User Manual

Page 30

Advertising
background image

Publication 1746-UM006B-EN-P - August 2005

2-12 Module Operation

Rate Measurement Calculation

The module calculates the Rate Measurement by counting pulses in a
fixed interval of time. You enter the fixed interval in the Rate Period
parameter. This value is set in increments of 10 ms, from 10 ms to 2.55
seconds. The number of pulses counted in the interval is made
available in the Rate Period Count word (I:e.2). Pulses increment or
decrement the count. For example, if 8 up counts and 9 down counts
are received in one Rate Period, the Rate Period Count will be equal
to -1.

If the Input type has been selected as X2 or X4 encoder, the Rate
Period Count is counted on both edges of A or both edges of A and B
respectively.

The resulting Rate Measurement is determined by dividing the Rate
Period Count by the Rate Period and by dividing out the X2 or X4
encoder multiplier:

Rate Measurement = Rate Period Count/Rate Period

for X2 encoder:

Rate Measurement = (Rate Period Count/Rate Period)/2

for X4 encoder:

Rate Measurement = (Rate Period Count/Rate Period)/4

The Rate Period Count can have values between -32767 and 32767. If
more than 32767 counts arrive in the Rate Period, the Rate Counter
Overflow bit (I:e.0/4) is set to 1. Refer to Rate Counter Overflow
located in Chapter 5.

If the Rate Measurement value is valid (a rate sample was taken and
no Rate Counter Overflow and no Rate Measurement Overflow
occurred) the Rate Valid bit (I:e.0/3) is set. This bit can be monitored
by the user program to insure a valid rate value is available.

If no pulses were counted during the Rate Period, the Zero Rate
Period Count bit (I:e.0/2) is set.

Advertising