A cyclic interrupt is activated by programming the corresponding OB within the CPU. The
cyclic interrupt can be delayed and enabled with the system functions SFC 41 DIS_AIRT
and SFC 42 EN_AIRT.
After startup to RUN the activated cyclic OBs are called in the configured equidistant
intervals with consideration of the phase shift. The equidistant start times of the cyclic
OBs result of the respective time frame and the phase shift. So a sub program can be
called time controlled by programming a respective OB.
The phase offset can be used to stagger the execution of cyclic interrupt handling rou-
tines despite the fact that these routines are timed to a multiple of the same interval. The
use of the phase offset achieves a higher interval accuracy. The start time of the time
interval and the phase offset is the instant of transition from STARTUP to RUN. The call
instant for a cyclic interrupt OB is thus the time interval plus the phase offset.
Time interval, phase offset (not OB 28, 29) and priority may be parameterized by the
hardware configurator.
Depending on the OB there are the following possibilities for parameterization:
OB 28, 29, 33: Parameterizable as VIPA specific parameter by the proper-
ties of the CPU.
OB 32, 35: Parameterizable by Siemens CPU 318-2DP.
You must make sure that the run time of each cyclic interrupt OB is signif-
icantly shorter than its interval. The cyclic interrupt that caused the error
is executed later.
The following table describes the start information with default names of the variables and
its data types. The variable names are the default names of OB 35.
Variable Type Description
OB35_EV_CLASS BYTE Event class and identifiers:
11h: Cyclic interrupt is active
OB35_STRT_INF BYTE 2Fh: Start request for OB 28
30h: Start request for OB 29
33h: Start request for OB 32
34h: Start request for OB 33
35h: Start request for OB 34
36h: Start request for OB 35
OB35_PRIORITY BYTE Assigned priority class;
Default values: 24 (OB 28, 29),
9 (OB 32) ... 12 (OB 35)
Activation
Function
Phase offset
Parameterization
Local data
VIPA SPEED7
Organization Blocks
Cyclic Interrupts > OB 28, 29, 32, 33, 34, 35 - CYC_INTx - Cyclic Interrupt
HB00 | OPL_SP7 | Operation list | en | 18-30 81