Preface
MicroLogix 1000 Programmable Controllers User Manual
12–8
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 I:0/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 C5:0:0.ACC is loaded to the hardware accumulator.
•
High preset C5:0:0.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 has been 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
INVALID PRESETs LOADED TO HIGH SPEED COUNTER
(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.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive