Table 4-2 Organization blocks (OB)
Address Name Description Called PLC basic pro‐
gram block
OB1 OB1 Cycle OBs are higher-level logic blocks in the program which are cy‐
clically processed and in which you can program instructions or call
additional blocks.
GP_HP [FC2]
OB40 OB40 Hardware interrupt OBs interrupt the cyclic program processing due to
a hardware event.
GP_PRAL [FC3]
OB82 OB82 Diagnostic error interrupt OBs interrupt the cyclic execution of the pro‐
gram if the diagnostic-capable module for which the diagnostic inter‐
rupt was enabled detects an error.
GP_DIAG [FC5]
OB86 OB86 A rack or station failure OB is called, for example, in the event of failure
of a rack or station in the distributed I/O.
GP_DIAG [FC5]
OB100 OB100 Startup OBs are processed once when the mode of the CPU switches
from STOP to RUN. After execution of the startup OB, the execution of
the cycle OB is started.
RUN_UP [FB1] with
gp_par [DB7]
Table 4-3 Function blocks (FBs)
Address Icon Description
FB1 RUN_UP The block configures and initializes the basic program, starts synchroniza‐
tion between PLC and NCK, is called in OB100 with instance DB gp_par
[DB7].
FB2 GET The block is used for reading NC tags.
FB3 PUT The block is used for writing NC tags.
FB4 PI_SERV The block is used for starting PI services.
FB5 GETGUD The block is used for reading global user data (GUD) from the NC and for
determining the GUD tag address.
FB7 PI_SERV2 The block is used for starting PI services that are defined in PI [DB16].
FB9 M2N The block is used for switching over operating components (MCP/OP)
which are connected with one or several control modules NCU; uses the
signals from MMC [DB19].
FB10 SI_relay Safety Integrated (SPL) block: Safety relay
FB11 SI_BrakeTest Safety Integrated (SPL) block: Brake test
FB29 Diagnostics Diagnostic routines for the PLC user program with logging of signal states
and signal changes.
Table 4-4 Functions (FCs)
Address Icon Description
FC2 GP_HP The block processes the cyclic part of the basic program, is called at
the beginning of OB1.
FC3 GP_PRAL The block processes the block-synchronous part of the basic program,
is called at the beginning of OB40.
FC5 GP_DIAG The block is used to record module disruptions and failures, is called
at the beginning of the following OBs: OB82, OB83, OB86.
Programming the PLC
4.1 General information about the PLC program
SINUMERIK STEP 7 Toolbox V15.1
62 Configuration Manual, 12/2018, A5E46279635B AA