Chapter 7
Understanding Discrete I/O
7-6
This function, which is software enabled/disabled, causes the scanner to
interrupt the host whenever a change in input data from an adapter is
detected. This function should be enabled only when the system inputs are
expected to remain in a steady state, with a change indicating an
exception condition. That is, during a steady-state application, any change
in input data implies an exception causing the scanner to interrupt the host.
Enable/Disable COS Detection
To
the host
enable COS detection
must set the enable_cos_detect bit (bit 2) high in config_data
in the dual port (see appendix A)
disable COS detection
clears the enable_cos_detect bit in config_data
The host may set/clear this bit as often as desired without handshaking
with the scanner.
HostKT
x
Handshaking
When COS detection is enabled, whenever the host receives an interrupt
from the KTx it should check two variables in the dual port for the
interrupt type. The host should first check
cos_link_address
. If the value in
cos_link_address
is not FFh, a COS interrupt occurred and the value in
cos_link_address
is the adapter address that had an input state change. When
this happens, the host should write FFh into
cos_link_address
to
acknowledge receipt of the COS interrupt. If the host fails to do this before
the next COS interrupt, the scanner sets the
cos_overrun
bit (bit 13) in
operating_status
. The host should check this bit whenever it receives a COS
interrupt to verify that it is keeping up with the scanner.
After checking for a COS interrupt, the host should check
int_status_to_host
for a non-zero value. If there is a non-zero value, the host received another
type of interrupt (
CONFIRMATION
,
PROCESSING_PROBLEM
, etc.) and
should service that.
Exceptions
When autoconfiguring or when configuring a new scan list, the scanner
will not enable COS detection regardless of the state of the
enable_cos_detect
bit. When autoconfiguration or configuration of the new
scan list is complete, normal operation of COS detection will resume
(based on the state of the
enable_cos_detect
bit).
Input Change of State
(COS) Detection