Siemens SIMATIC S7-1200 Manual page 53

Easy book
Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

OBs control the following operations:
● Program cycle OBs execute cyclically while the CPU is in RUN mode. The main block of
● Startup OBs execute one time when the operating mode of the CPU changes from STOP
● Cyclic interrupt OBs execute at a specified interval. A cyclic interrupt OB will interrupt
● Hardware interrupt OBs execute when the relevant hardware event occurs, including
● A time error interrupt OB executes when either the maximum cycle time is exceeded or a
● Diagnostic error interrupt OBs execute when a diagnostic error is detected and reported.
Easy Book
Manual, 11/2011, A5E02486774-04
the program is a program cycle OB. This is where you place the instructions that control
your program and where you call additional user blocks. Multiple program cycle OBs are
allowed and are executed in numerical order. OB 1 is the default. Other program cycle
OBs must be identified as OB 200 or greater.
to RUN, including powering up in the RUN mode and in commanded STOP-to-RUN
transitions. After completion, the main "Program cycle" OB will begin executing. Multiple
startup OBs are allowed. OB 100 is the default. Others must be OB 200 or greater.
cyclic program execution at user defined intervals, such as every 2 seconds. You can
configure up to a total of 4 for both the time-delay and cyclic events at any given time,
with one OB allowed for each configured time-delay and cyclic event. The OB must be
OB 200 or greater.
rising and falling edges on built-in digital inputs and HSC events. A hardware interrupt OB
will interrupt normal cyclic program execution in reaction to a signal from a hardware
event. You define the events in the properties of the hardware configuration. One OB is
allowed for each configured hardware event. The OB must be OB 200 or greater.
time error event occurs. The OB for processing the time error interrupt is OB 80. If
triggered, it executes, interrupting normal cyclic program execution or any other event
OB. The events that trigger the time error interrupt and the reaction of the CPU to those
events are described below:
– Exceeding the maximum cycle time: You configure the maximum cycle time in the
properties of the CPU. If OB 80 does not exist, the reaction of the CPU for exceeding
the maximum time is to change to STOP.
– Time errors: If OB 80 does not exist, the reaction of the CPU is to stay in RUN. Time
errors occur if the time of day event is missed or repeated, the queue overflows, or an
event OB (time delay event, time of day event, or cyclic interrupt) starts before the
CPU finishes the execution of the first.
The occurrence of either of these events generates a diagnostic buffer entry describing
the event. The diagnostic buffer entry is generated regardless of the existence of OB 80.
A diagnostic OB interrupts the normal cyclic program execution if a diagnostics-capable
module recognizes an error (if the diagnostic error interrupt has been enabled for the
module). OB 82 is the only OB number supported for the diagnostic error event. You can
include an STP instruction (put CPU in STOP mode) inside your OB 82 if you desire your
CPU to enter STOP mode upon receiving this type of error. If there is no diagnostic OB in
the program, the CPU ignores the error (stays in RUN).
PLC concepts made easy
4.3 Execution of the user program
53

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents