User manual

6 Detailed descriptions of I/O modules | Digital counter module UR20-1CNT-500
369Manual u-remote1432790000/08/12.2015
Setting up the counter
To start a counting process at least the signal mode needs
to be parameterised and a rising ank at the bit QX8.2 (“Set
SW gate”) of the control word is required.
You can dene the counter functions by parameterising: the
counting mode, a primary direction (counting up or down),
and the counting behaviour. In addition you can paramete-
rise options for setting a comparison bit (conditions, hystere-
sis) as well as producing a process alarm (see section „additi-
onal counter features").
Counting range, count limits
The maximum count limits are predetermined by the register
size and cannot be changed.
Maximum counting range
Limit Value
Lower count limit –2 147 483 648 (–2
31
)
Upper count limit +2 147 483 647 (2
31 
– 1)
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 parameterise the counting range with
load value and end value.
Via bit QX8.5 of the control word you can load a set value
into the counting value. You can dene 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 parameterised
end value. Starting from 0, a set value or a parameterised
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 paramete-
rised end value. Starting from 0, a set value or a parameter-
ised 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”).
Counting bahaviour: interrupt / cancel counting
You can parameterise the counting behaviour after a new
gate start: Using “Interrupt counting”, the counter continues
from the last counting value. Using “Cancel counting”, count-
ing starts again from the load value.
Endless counting
Upper
count limit
Lower
count limit
Load value
Gate start Gate stop
Time
Counting value
0
Overrun
Underrun
Continous counting
Counting starts at the load value, the entire counting
range is used.
If the upper count limit is reached during up-counting, an
additional counting pulse in the positive direction leads to
a jump to the lower count limit. Counting continues from
there.
If the lower count limit is reached during down-counting,
an additional counting pulse in the negative direction
leads to a jump to the upper count limit. Counting conti-
nues from there.
Upon exceeding the upper or lower counting limit, the
status bit “Overflow performed” or “Underflow perfor-
med” is set and a process alarm is triggered if it is para-
meterised. The status bits remain set until they are reset
with the bit “Reset status bits” in the control word.