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

Page 257

Advertising
background image

Chapter 14
Using High-Speed Counter Instructions

14–7

Once instruction entry is complete, the parameters are condensed to two
screens as shown here:

P 0 0 8

H S C

T Y P E

U P

R E S / H L D

P 0 0 8

H S C

C 0 0

P

1

A

– 1

Using the Up Counter and the Up Counter with Reset and Hold

Up counters are used when the parameter being measured is uni-directional,
such as material being fed into a machine or as a tachometer recording the
number of pulses over a given time period.

Both types of Up Counters operate identically, except that the Up Counter
with reset and hold uses external inputs 2 and 3.

For the Up Counter, each Off-to-On state change of input I0/0 adds 1 to the
accumulator until the high preset is reached. The accumulator is then
automatically reset to zero. The Up Counter operates in the 0 to

+

32,767

range inclusive and can be reset to zero using the Reset (RES) instruction.

When the HSC instruction is first executed true, the:

Accumulator C0.ACC is loaded to the hardware accumulator.

High preset C0.PRE is loaded to the hardware high preset.

Operation

If you move data to the high preset without using the RAC instruction (with a
MOV) after the high-speed counter is configured, the data is loaded to the
instruction image but is not loaded to the hardware. The modified high
preset value is not loaded to the hardware until the existing hardware high
preset is reached or an RAC or RES instruction is executed.

The high preset value loaded to the hardware must be between 1 and 32,767
inclusive or an error (37H) occurs. Any value between –32,768 and

+

32,767

inclusive can be loaded to the hardware accumulator.

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.

Tip

Advertising