beautypg.com

Programming – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 229

background image

Using High-Speed Counter Instructions

12–15

Input 0

A

B

Z

(Reset input)

Quadrature Encoder

1

2

3

2

1

Forward Rotation

Reverse Rotation

A

B

Count

Input 1

Input 2

Operation

For the Bidirectional Counters, both high and low presets are used. The low preset
value must be less than the high preset value or an error

INVALID PRESETs

LOADED TO HIGH SPEED COUNTER

(37H) occurs.

When the HSC instruction is first executed true, the:

Instruction accumulator is loaded to the hardware accumulator.

Instruction high preset is loaded to the hardware high preset.

Any instruction accumulator value between –32,768 and

+

32,767 inclusive can be

loaded to the hardware.

After the first true HSC instruction execution, data can only be transferred to the
hardware accumulator via an RES or RAC instruction, or to the hardware high and
low presets via the HSL instruction.

The Following Condition

Occurs when

either the hardware accumulator transitions from the hardware high
preset –1 to the hardware high preset, or

A high preset is reached

the hardware accumulator is loaded with a value greater than or
equal to the hardware high preset, or

the hardware high preset is loaded with a value that is less than or
equal to the hardware accumulator.

Programming