429
2020/09
Comparison value 1, comparison value 2
The recorded encoder position can be compared with two loadable values. The character ”x” below
stands for ”1” or ”2”. The register contents are loaded into the register REG_CMPx using in a write
operation. The comparison functions are activated by setting bit EN_CMPx = 1 in the process output
data. The results of the continuous comparison operations are displayed in the process input data
via STS_CMPx, REL_CMPx and FLAG_CMPx. Bit REL_CMPx indicates as the actual status message the
relation of the actual value (register content of REG_SSI_POS) to the comparison value (register con-
tent of REG_CMPx). Bit STS_CMPx is non-retentive and indicates whether the current actual value
(REG_SSI_POS) and the comparison value (REG_CMPx) match. FLAG_CMPx is also used as a marker
to indicate that the status (REG_SSI_POS = REG_CMPx) is present or has been passed. This bit must
be reset by the application via the process output data using CLR_CMPx = 1. If the comparator is
inactive (EN_CMPx = 0), the signals from STS_CMPx, REL_CMPx and FLAG_CMPx are always zero.
Comparator EN_CMPx = 0
Process input data Process output data
REL_CMPx = 0
STS_CMPx = 0
FLAG_CMPx = 0
Comparator EN_CMPx = 1
Process input data Process output data
(REG_SSI_POS) < (REG_CMPx)
REL_CMPx = 1 STS_CMPx =0
FLAG_CMPx = Z0
The value Z0 of this flag is 1 as soon
as the comparison values match.
The value remains 1 until it is reset.
Reset of FLAG_CMPx with CLR_C-
MPx = 1
(REG_SSI_POS) > (REG_CMPx)
REL_CMPx = 1 STS_CMPx =0
FLAG_CMPx = Z0
The value Z0 of this flag is 1 as soon
as the comparison values match.
The value remains 1 until it is reset.
Reset of FLAG_CMPx with CLR_C-
MPx = 1
(REG_SSI_POS) = (REG_CMPx)
REL_CMPx = 1 STS_CMPx = 1
FLAG_CMPx = 1
Rest of FLAG_CMPx not possible, as
long as
equality exists.