Specifications

IP 240 Positioning
When they have been read, status bits NPUE, UEBL, MESE and UEBS are reset on the IP 240, i.e.
these bits can be read out only once.
The actual value
The actual value is updated on the IP 240 in every firmware cycle.
Depending on how the channel was configured, the actual value is made available in either
binary or BCD code.
The final value
The final value is updated only when synchronization with an external control signal was selected
in parallel with actual value acquisition.
In this synchronization mode, the control signal at the IN input is used as synchronizing pulse:
a positive edge of the IN signal initiates synchronization,
a negative edge of the IN signal stored the current actual value as final value (of a count).
The final value is made available in either binary or BCD, depending on how the channel was
configured.
10.17 Reading the Interrupt Request Bytes
During configuring, you specify which status bits are to trigger an interrupt. When an interrupt is
generated (system interrupt or process interrupt), the S5 CPU invokes an interrupt service OB in
which the IP 240's interrupt request bytes must be read. These bytes tell you which channel and
which event triggered the interrupt.
When the interrupt request bytes are read,
the bits in the interrupt request bytes on the IP 240 are reset,
the interrupt request to the S5 CPU is revoked,
status bit UEBL, DRBR, NPUE or UEBS is reset, depending on which triggered the interrupt.
Since the interrupt request bytes are read for both channels and the current state can be read out
from the IP 240 only once, only the data block specified in control FB 168 can be immediately
updated.
The interrupt request bytes shown in Table 10-21 are based on the assumption that both IP
channels are being operated in positioning mode.
Reading the interrupt request bytes
with control FB 168 in direct data interchange
You must initialize FB 168 as follows to read
the interrupt request bytes:
: JU FB 168
NAME : STEU.POS
:
FKT : 3,0
The FB reads the interrupt request bytes and
transfers them to DW 20 to 21.
You must specify 31
H
as job number for
channels 1 and 2 to read the interrupt re-
quest bytes.
Following transfer of the job number, the
IP 240 makes the interrupt request bytes
available in the transfer buffer.
EWA 4NEB 811 6120-02a
10-61