
01.93
1 General Overview
1.2.2 PLC program structure
Each OB and the programs called in it represent a processing level. The processing level can
change during an operating routine; OB 2 breaks off the cyclic programs of the operating level
of OB 1 in the event of an interrupt. The PLC operating system coordinates this processing
level change. In particular, the flags FY 224 to FY 255 or FY 200 to FY 255
d)
(if bit MD 6026.3
is set) are saved and restored before resuming processing of the interrupted level.
The PLC user program is offered the following types of interface:
•
Communication via data blocks (DBs)
•
Communication via the data areas of the input, output and flag bytes (IB, QB, FY)
•
Reaction to interrupt and alarm signals.
The type and scope of an interface often depends on machine data (MD) and Options; the
interface can therefore be parameterized by means of machine data.
1.2.2.3 Communication via data blocks
Each data block has a fixed structure. The structure of the data blocks depends on the inter-
face. One or several data blocks exist for each interface (exception: IB, QB, FY). Some DBs
contain fields that can be utilized freely by the user. The PLC user program can read and write
the signals in the DBs.
The data blocks represent images of the relevant signals of the communication partner. The
image is not necessarily a 1:1 representation; the program parts (PLC operating system, FBs,
data driver of the partner) that implement the data transfer via the link RAM ensure the correct
assignment of the data by the communication partner as appropriate.
Depending on when an interface DB is processed by the PLC operating system, a distinction
is made between cyclic, time-controlled and request-controlled signal transfer.
Cyclic transfer
At the beginning of the following PLC cycle, the input signals of the cyclically processed DBs
are updated by the PLC operating system reading the relevant signals from the internal
interface of the communication partner and transferring them to the DBs.
At the end of the PLC cycle, the PLC operating system reads the output signals of the inter-
face DBs and transfers them to the communication partner.
At the start of a PLC cycle, therefore, the signals in the DBs are always up to date.
Cyclically transferred input signals thus have the characteristic of being constant for the dura-
tion of a PLC cycle, whereas cyclically transferred output signals are not effective until the end
of the PLC cycle (possibly following an additional delay by the recipient).
Examples of the cyclic transfer of DBs are provided by DB 10 ... DB 25, the interfaces to the
NC channels.
_______
d)
with GA2, software version 1 and higher
© Siemens AG 1991 All Rights Reserved 6ZB5 410-0HE02
1–15
SINUMERIK 880 (PJ)