Starting Up the PLC
11.4 PLC programming
11-181
SINUMERIK 802D sl Instruction Manual (BA), 05/2005 Edition
6FC5 397-0CP10-1BA0
11.4.3 Program organization
A programmer should structure the user program into separate program sections (subrouti-
nes). The S7-200 programming language offers the user the possibility to create a structured
user program. There are two program types – main program and subroutine. Eight program
levels are possible.
A PLC cycle can be a multiple of the control-internal interpolation cycle (IPO cycle). The ma-
chine manufacturer must set the PLC cycle according to his particular conditions (see ma-
chine data “PLC_IPO_TIME_RATIO”). An IPO/ PLC ratio of 1:1 has been proven to provide
the fastest possible cyclic program execution.
Example: The programmer will write a sequence control in the main program using a cycle
defined by himself. This sequence control will organize all cyclic signals in the subroutine
(UP0); UP1/UP2 are called every two cycles, and UP3 controls all signals at an interval of
three cycles.
11.4.4 Data organization
The data can be divided into three areas:
S non-retentive data
S retentive data
S machine data for the PLC (all these machine data are active after POWER ON).
Most of the machine data, such as process image, timer and counter are non-retentive data
which are deleted each time when the control system is powered up.
The data area 1400 0000 –1400 0127 is reserved for the retentive data. The user can here
store all data which are to remain valid after POWER OFF/ON.
The user can either load the data in his program with default data using the PLC machine
data (see “User interface”) or parameterize various program sections.
11.4.5 Interface to the control system
This interface can be selected via SYSTEM, softkeys PLC > STEP7-connect.
This V24 interface continues to be active even after cold restart or normal booting. The con-
nection (STEP7 connect active) to the control system can be checked in the “PLC/informa-
tion” menu of the PLC 802 Programming Tool. If the interface is active, the active PLC
mode, for example (Run/Stop) is displayed in this window.
Siemens Automation Parts