101BExtended instructions
8.4 Interrupts
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
277
Table 8- 90 Data types for the parameters
Parameter and type
Data type
Description
OB_NR
IN
OB_CYCLIC
OB number (accepts symbolic name)
CYCLE
IN
UDInt
Time interval, in microseconds
PHASE
IN
UDInt
Phase shift, in microseconds
RET_VAL
OUT
Int
Execution condition code
Time parameter examples:
●
If the CYCLE time = 100 us, then the interrupt OB referenced by OB_NR interrupts the
cyclic program scan every 100 us. The interrupt OB executes and then returns execution
control to the program scan, at the point of interruption.
●
If the CYCLE time = 0, then the interrupt event is deactivated and the interrupt OB is not
executed.
●
The PHASE (phase shift) time is a specified delay time that occurs before the CYCLE
time interval begins. You can use the phase shift to control the execution timing of lower
priority OBs.
If lower and higher priority OBs are called in the same time interval, the lower priority OB is
only called after the higher priority OB has finished processing. The execution start time for
the low priority OB can shift depending on the processing time of higher priority OBs.
581
W
W
W
W
W
W
W
W
2%
+LJKHUSULRULW\
2%
ORZSULRULW\
2%FDOOZLWKRXWSKDVHVKLIW
If you want to start the execution of a lower priority OB on a fixed time cycle, then phase shift
time should be greater then the processing time of higher priority OBs.
3KDVHVKLIW
581
W
W
W
W
W
W
W
W
2%
+LJKHUSULRULW\
2%
ORZSULRULW\
2%FDOOZLWKSKDVHVKLIW