PLC concepts
5.1 Execution of the user program
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
105
You can program the MC-PreServo OB to contain program logic for the STEP 7 program to
execute directly after the MC-Servo OB executes.
The MC-PreServo OB allows you to read out the configured application cycle information in
microseconds.
Table 5- 15 Start information for MC-PostServo OB
TRUE indicates first call of this OB on transition from STOP to RUN
TRUE indicates the associated process image input is up to date.
PIP_Output BOOL TRUE indicates that the CPU transferred the associated process
image output to the outpus in good time after the last cycle.
Number of the distributed I/O system triggering the interrupt
Event_Count INT n: number of lost cycles
-1: unknown number of cycles lost (for example, because cycle has
CycleTime UDINT Display of the application cycle configured for the MC-Servo OB in
Event execution priorities and queuing
The CPU processing is controlled by events. An event triggers an interrupt OB to be
executed. You can specify the interrupt OB for an event during the creation of the block,
during the device configuration, or with an ATTACH or DETACH instruction. Some events
happen on a regular basis like the program cycle or cyclic events. Other events happen only
a single time, like the startup event and time delay events. Some events happen when the
hardware triggers an event, such as an edge event on an input point or a high speed counter
event. Events like the diagnostic error and time error event only happen when an error
occurs. The event priorities and queues are used to determine the processing order for the
event interrupt OBs.
The CPU processes events in order of priority where 1 is the lowest priority and 26 is the
highest priority. Prior to V4.0 of the S7-1200 CPU, each type of OB belonged to a fixed
priority class (1 to 26). From V4.0 forward, you can assign a priority class to each OB that
you configure. You configure the priority number in the attributes of the OB properties.