5.17.9 Counter Functions
Counting Mode
Depending on the application you can chose the counting mode:
•
Endless counting, e.g. for detecting the position with a rotary encoder
•
1-time counting with or without primary direction, e.g. for counting products up to a
maximum limit
•
Periodic counting with or without primary direction, e.g. repeated identical pick-and-
place operations
For both counting modes 1-time counting and periodic counting you can parameterize the
counting range with load value and end value.
Via bit QX8.5 or QX10.5 respectively of the control word you can load a set value into the
counting value. You can define the set value in the module parameters.
Counting Direction
No Primary Direction
The entire counting range is available when using a counting mode without primary
direction.
Primary Direction Up
The counting range is limited at the top by a parameterized end value. Starting from 0, a set
value or a parameterized load value, the counter counts until the end value -1 and is reset
to the load value with the next encoder pulse.
Primary Direction Down
The counting range is limited at the bottom by a parameterized end value. Starting from 0,
a set value or a parameterized load value, the counter counts until the end value +1 and is
reset to the load value with the next encoder pulse.
Gate Function Activate / Deactivate Counter
The counter is activated and deactivated using an internal gate. The internal gate is identical
to the software gate (SW gate), it is activated using a 0-1 edge at the bit Set SW gate in the
control word and deactivated with a 0-1 edge at the bit Reset SW gate in the control word
(see table Process data outputs).