Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 263

Advertising
background image

Chapter 14
Using High-Speed Counter Instructions

14–13

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 (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.

When a high preset is reached, the:

HP bit is set.

High-speed counter interrupt file (file 4) is executed if the interrupt is
enabled. The IH bit is set and the IL, IN, and IV bits are reset.

Unlike the Up Counters, the accumulator value does not reset and the high
preset value does not get loaded from the image to the hardware high preset
register.

The Following Condition

Occurs when

either the hardware accumulator transitions from the
hardware low preset +1 to the hardware low preset, or

A low preset is reached

the hardware accumulator is loaded with a value less than
or equal to the hardware low preset, or

the hardware low preset is loaded with a value that is
greater than or equal to the hardware accumulator.

Advertising