beautypg.com

Programming – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 225

background image

Using High-Speed Counter Instructions

12–11

Operation

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.

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.

Any instruction accumulator value between –32,768 and

+

32,767 inclusive can be

loaded to the hardware.

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 (program file 4) is executed if the interrupt is
enabled. The IH bit is set and the IL, IV, and IN bits are reset.

Unlike the Up Counters, the accumulator value does not get 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.

Programming