Updating the process trial of the inputs and outputs Cyclically calling the user program Detecting interrupts and calling interrupt OBs Detecting and handling errors Managing memory areas The operating system is an integral component of the CPU and comes pre-installed. The user program contains all functions that are necessary for executing your specific automation task. The tasks of the user program include the following: Checking the basic requirements for a warm restart using startup OBs Processing of process data, i.e. activation of output signals as a function of the input signal states Reaction to interrupts and interrupt inputs Error handling during normal program execution Organization blocks Organization blocks (OBs) form the interface between the operating system of the controller (CPU) and the application program. They are called from the operating system and control the following operations: Cyclic program processing (e.g. OB1) Startup characteristics of the controller Interrupt-driven program processing handling A project must have an organization block for cyclic program processing at a minimum. An OB is called by a start event as shown in Figure 1. In addition, the individual OBs have defined priorities so that, for example, an OB82 for error handling can interrupt the cyclic OB1. Figure 1: Start events in the operating system and OB calls When a start event occurs, the following reactions are possible: If an OB has been assigned to the this event triggers the execution of the assigned OB. If the priority of the assigned OB is greater than the priority of the OB that is currently being executed, it is executed immediately (interrupt). If not, the assigned OB waits until the higher-priority OB has been completely executed. If an OB is not assigned to the event, the default system reaction is performed. Table 1 gives a couple of examples of start events for a SIMATIC S7-1500, their possible OB number(s) and the default system reaction in the event the organization block is not present in the controller. Start event Possible OB Default system numbers reaction Startup 100, 123 Ignore
Updating the process of the inputs and outputs Cyclically calling the user program Detecting interrupts and calling interrupt OBs Detecting and handling errors Managing memory areas The operating system is an integral component of the CPU and comes pre-installed. The user program contains all functions that are necessary for executing your specific automation task. The tasks of the user program include the following: Checking the basic requirements for a warm restart using startup OBs Processing of process data, i.e. activation of output signals as a function of the input signal states Reaction to interrupts and interrupt inputs Error handling during normal program execution Organization blocks Organization blocks (OBs) form the interface between the operating system of the controller (CPU) and the application program. They are called from the operating system and control the following operations: Cyclic program processing (e.g. OB1) Startup characteristics of the controller Interrupt-driven program processing handling A project must have an organization block for cyclic program processing at a minimum. An OB is called by a start event as shown in Figure 1. In addition, the individual OBs have defined priorities so that, for example, an OB82 for error handling can interrupt the cyclic OB1. Figure 1: Start events in the operating system and OB calls When a start event occurs, the following reactions are possible: If an OB has been assigned to the this event triggers the execution of the assigned OB. If the priority of the assigned OB is greater than the priority of the OB that is currently being executed, it is executed immediately (interrupt). If not, the assigned OB waits until the higher-priority OB has been completely executed. If an OB is not assigned to the event, the default system reaction is performed. Table 1 gives a couple of examples of start events for a SIMATIC S7-1500, their possible OB number(s) and the default system reaction in the event the organization block is not present in the controller. Start event Possible OB numbers Default system reaction Startup 100, 123 Ignore trial