3.2
Battery
monitoring
Flag F 63.6 is used for monitoring the
The PC must be in the "RUN" state.
battery.
Flag F 63.6 is reset by the "ERASE PRO-
This flag is set by the operating system
GRAM"
function of the programner or by
of the PC on power recovery and during
the user program. The user can therefore
the normal scanning cycle
if
failure determine how the PC is to react to
of the battery backup
v01 tage
is detected.
backup battery fail ure.
The
S5-101W has a total of 512 flags.
The flag area is subdivided as follows:
Retentive flags (F
0.0
...
F
31.7)
-
retain their last state prior to
-
power-down on power-up (with backup
battery only)
-
retain their last state when the
mode is changed from "STOP" to "RUN"
(with and without backup battery)
-
are reset like the non-retentive
flags on power-up (without backup
battery)
-
can also be reset by the user program
(
"
ERASE PROGRAM" function
).
By using retentive flags, the last
status of the plant or machine prior
to the PC leaving the "RUN" mode can
be stored. On restart, the plant or
machine can resume operations at the
point at which
it
was stopped.
Interrupt processing
When an interrupt signal (e.g. emer-
gency off) from the process is re-
ceived by the PC, the latter interrupts cyclic scanning of the user program
and inititates the processing of a
specific interrupt routine.
Interrupt processing with the
S5-101U
is defined exclusively by the user program so that each input and output can
be used for interrupt processing.
Non-retentive flags (F 32.0.. .F 63.7)
-
are reset when the PC mode changes
from "STOP" to "RUN" and on power-up.
Flags F 61.0
-
F 62.7 are reserved
as coordinating
fl
ags for operation
in the SINEC L1 local area network;
flags F 63.0
-
F 63.7 are reserved
as system flags. Since they are affected by the PC operating system,
they must not be used as flags in
the normal sense.
In order to achieve minimum response
times, the inputs and outputs are referenced direct, i.e. outside cyclic
program scanning. The
load/transfer
operations "LPB" (inputs) and "TPB"
(outputs) are available for this purpose.
A
more or less constant response time
is achieved
if
the scanning of the in-
puts
programmed by the user as interrupt
inputs is uniformly distributed over
the entire user program. Fig. 6 shows
a user program with interrupt processing.