User manual

6 Detailed descriptions of I/O modules | Digital counter module UR20-2CNT-100
359Manual u-remote1432790000/08/12.2015
Comparison function
Via the parameter „Comparison function“ you can deactivate
the comparison function or dene a comparison condition:
Counter value higher or equal comparison value
Counter value lower or equal comparison value
Counter value equal comparison value
To use the comparison function, you have to preset the com-
parison values for both counting channels in the respective
rst double word of the process data outputs and to set the
bit QX8.1 and QX10.1 respectively ("Comparison bit re-
leased") in each control word.
As soon as the counting value meets the corresponding
comparison condition, the bits "Comparison bit active" and
"Comparison condition met" are activated. The bit "Compari-
son bit active" remains set as long as the comparison condi-
tion is being met (respectively the parameterised hysteresis).
The bit "Comparison condition met" remains active until it
will be reset with the bit "Reset of the status bits" in the con-
trol word.
When using a counting mode with primary direction, the
comparison bit will be set only upon reaching the compari-
son value from the primary direction.
Hysteresis
It is possible to reduce frequent triggering of a process alarm
and toggling of the comparison bit (e.g. if the value of a
sensor signal fluctuates around the comparison value), by
setting the hysteresis. Thereby you dene a range above and
below a reference value (zero crossing, overow/underow
and comparison value), within which the status bit will not
be reset.
A limit value between 0 and 255 can be parameterised for
the hysteresis. With hysteresis = 3 for example, all values
differing less than 3 from the reference value are smoothed.
Hysteresis is deactivated with the values 0 and 1.
The hysteresis is activated upon reaching the comparison
condition. The comparison result remains unchanged during
active hysterersis until the counting value reaches the prede-
termined hysteresis limit. After leaving the hysteresis range,
hysteresis is reactivated only upon reaching the comparison
condition again.
After changing the hysteresis value, an active hysteresis re-
mains active. The new hysteresis value is actived during the
next hysteresis event.
The behaviour of the status bit for hysteresis=0 (hysteresis
deactivated) and hysteresis= 3 is shown in the following di-
agrams (legends describe the behaviour for hysteresis=3)::
Counting value
Output:
Hysteresis = 0
Hysteresis = 3
1 2 3 4 75 6
Comparison
value
9 8 7 6
5
4 3 2 1 0
Operatingprincipleofthehysteresiswithcountervalue≥comparisonvalue
1 Comparison condition met ➝ status bit is set and hysteresis activated
2 Comparison condition not met, leaving the hysteresis range ➝ status bit is
reset
3 Comparison condition met ➝ status bit is set and hysteresis activated
4 Leaving the hysteresis range, the status bit remains set because the compa-
rison condition is still met
5 Comparison condition no longer met but hysteresis still active ➝ status bit
remains set
6 Comparison condition met, hysteresis still active ➝ status bit remains set
7 Leaving the hysteresis range and comparison condition met ➝ status bit
remains set
Counting value
Output:
Hysteresis = 0
Hysteresis = 3
1 2 3 4 75 6
Comparison
value
9 8 7 6
5
4 3 2 1 0
Operating principle of the hysteresis whit counter value = comparison value
1 Comparison condition met ➝ status bit is set and hysteresis activated
2 Comparison condition not met, leaving the hysteresis range ➝ status bit is
reset
3 Comparison condition met ➝ status bit is set and hysteresis activated
4 Leaving the hysteresis range and comparison condition not met ➝ status
bit is reset
5 Comparison condition met ➝ status bit is set and hysteresis activated
6 Comparison condition met and hysteresis active ➝ status bit remains set
7 Leaving the hysteresis range and comparison condition no longer met ➝
status bit is reset