Technical data
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 71
4 Basics of Designing a Program Structure
4.1 Programs in a CPU
A CPU will principally run two different programs:
• The operating system and
• The user program.
Operating System
Every CPU comes with an integrated operating system that organizes all CPU functions and
sequences not associated with a specific control task. The tasks of the operating system include
the following:
• Handling restart (warm start) and hot restart
• Update of the process image table of the inputs and output of the process image table of the
outputs
• Calling the user program
• Acquisition of interrupt information and calling interrupt OBs
• Recognition of errors and error handling
• Management of the memory areas
• Communication with programming devices and other communication partners
You can influence CPU reactions in certain areas by modifying the operating system parameters
(operating system default settings).
User Program
You create the user program and download it to the CPU. It contains all the functions required to
process your specific automation task. The tasks of the user program include:
• Specifying the conditions for a restart (warm start) and hot restart on the CPU (for example,
initializing signals with a particular value)
• Processing process data (for example, generating logical links of binary signals, fetching and
evaluating analog signals, specifying binary signals for output, output of analog values)
• Reaction to interrupts
• Handling disturbances in the normal program cycle.