beautypg.com

Special programming – Rockwell Automation 1771-IJ_IK IK ENCODER/COUNTER MODULES User Manual

Page 55

background image

Chapter

7

Publication 1771ĆUM006B-EN-P - June 2002

Special Programming

The input Status word stores a maximum count of 999 (BCD). If
using binary resolution, the maximum count is 1111 1111 1111 (4095
binary). To count beyond these full scale values, you may want to
use either of the following ladder programs for PLC–2 or PLC–3
family processors.

Both programs (Figure 7.1 and Figure 7.2) extend the count beyond
999 (4095 binary) in the same manner. Either program compares the
new count value with the value in the previous scan (old value). If
the difference of the new value less the old value is greater than a
constant (a constant less than 999/2 or 4095/2), the count passed
through zero. If the sign of the difference is negative, the up counter
is incremented by one; if positive the down counter is decremented
by one.

Extending the Count

Beyond 999