D300529 0115 - BL67 I/O modules
12-41
BL67-1SSI
12.3.5 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 oper-
ation. The comparison functions are activat
ed 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_C-
MPx, 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 content of REG_C-
MPx). Bit STS_CMPx is non-retentive a
nd 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 sta-
tus (REG_SSI_POS = REG_CMPx) is present or has been passed. T
his 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 sig-
nals from STS_CMPx, REL_CMPx and FLAG_CMPx are always zero.
Comparator EN_CMPx = 0
Process input data Process output data
Comparator EN_CMPx = 1
Process input data Process output data
Table 12-5:
Comparator
enab
le
A
The value Z0
o this flag
is 1 as soon as
the comparison
values match.
The value stays 1
until it is reset.
REL_CMPx = 0
STS_CMPx = 0
FLAG_CMPx = 0
(REG_SSI_POS) < (REG_CMPx)
REL_CMPx = 1 STS_CMPx =0
FLAG_CMPx = Z0
A
Reset of FLAG_CMPx with
CLR_CMPx = 1
(REG_SSI_POS) > (REG_CMPx)
REL_CMPx = 1 STS_CMPx =0
FLAG_CMPx = Z0
A
Reset of FLAG_CMPx with
CLR_CMPx = 1
(REG_SSI_POS) = (REG_CMPx)
REL_CMPx = 1 STS_CMPx = 1
FLAG_CMPx = 1
Rest of FLAG_CMPx not pos-
sible, as long as
equality exists.