VIPA System SLIO
5.6.7.5
Counter output channel
Characteristics of the
output
5.6.7.6
Hysteresis function
Hysteresis
HB300 | CPU | 013-CCF0R00 | en | 16-40
Each counter has an output channel. You pre-define the behavior of the counter output
via the parametrization:
no comparison:
n
–
The output is used as normal output.
Ä Chapter 5.6.4 'SFB 47 - COUNT - Counter controlling' on page 105:
–
The input parameter CTRL_DO is effect less.
The status bits STS_DO and STS_CMP (status comparator in the instance DB)
remain reset.
Counter value ³ comparison value respectively counter value £ comparison value
n
–
The output remains set as long as the counter value is higher or equal compar-
ison value respectively lower or equal comparison value.
–
Ä Chapter 5.6.4 'SFB 47 - COUNT - Counter controlling' on page 105:
Control bit CTRL_DO must be set.
The comparison result is shown by the status bit STS_CMP. This status bit may
only be reset if the comparison condition is no longer fulfilled.
Pulse at comparison value
n
–
When the counter reaches the comparison value the output is set for the parame-
trized pulse duration. When you've set a main counting direction the output is only
set at reaching the comparison value from the main counting direction.
If the pulse duration = 0, the output is set until the comparison condition is not
longer fulfilled.
Ä Chapter 5.6.4 'SFB 47 - COUNT - Counter controlling' on page 105:
–
Control bit CTRL_DO must be set.
The status of the digital output may be shown by the status bit ST_DO.
The comparison result is shown by the status bit STS_CMP. The bit may only be
reset if the pulse duration has expired.
n
Pulse duration
–
The pulse duration starts with the setting of the according digital output.
–
The inaccuracy of the pulse duration is less than 1ms.
–
There is no past triggering of the pulse duration when the comparison value has
been left and reached again during pulse output.
–
If the pulse duration is changed during operation, it will take effect with the next
pulse.
–
If the pulse duration = 0, the output is set until the comparison condition is not
longer fulfilled.
–
Range of values: 0...510ms in steps of 2ms
n
The hysteresis serves the avoidance of many toggle processes of the output and the
interrupt, if the counter value is in the range of the comparison value.
n
For the hysteresis you may set a range of 0 to 255.
n
The settings 0 and 1 deactivate the hysteresis.
n
The hysteresis influences zero run, comparison, over- and underflow.
n
An activated hysteresis remains active after a change. The new hysteresis range is
activated with the next hysteresis event.
The following pictures illustrate the output behavior for hysteresis 0 and hysteresis 3 for
the according conditions:
Deployment I/O periphery
Counting > Counter - Additional functions
125