101BExtended instructions
8.4 Interrupts
S7-1200 Programmable controller
278
System Manual, 11/2011, A5E02486680-05
Table 8- 91 Condition codes
RET_VAL (W#16#....)
Description
0000
No error
8090
OB does not exist or is of wrong type
8091
Invalid cycle time
8092
Invalid phase shift time
80B2
OB has no attached event
8.4.2.2
QRY_CINT (Query cyclic interrupt)
Table 8- 92 QRY_CINT (Query cyclic interrupt)
LAD / FBD
SCL
Description
ret_val := QRY_CINT(
ob_nr:=_int_in_,
cycle=>_udint_out_,
phase=>_udint_out__,
status=>_word_out_);
Get parameter and execution status from a cyclic
interrupt OB. The values that are returned existed
at the time QRY_CINT was executed.
Table 8- 93 Data types for the parameters
Parameter and type
Data type
Description
OB_NR
IN
OB_CYCLIC
OB number (accepts symbolic name like OB_MyOBName)
RET_VAL
OUT
Int
Execution condition code
CYCLE
OUT
UDInt
Time interval, in microseconds
PHASE
OUT
UDInt
Phase shift, in microseconds
STATUS
OUT
Word
Cyclic interrupt status code:
Bits 0 to 4, see the STATUS table below
Other bits, always 0
Table 8- 94 STATUS parameter
Bit
Value Description
0
During CPU RUN
0
1
During startup
0
The interrupt is enabled.
1
1
Interrupt is disabled via the DIS_IRT instruction.
0
The interrupt is not active or has elapsed.
2
1
The interrupt is active.
0
The OB identified by OB_NR does not exist.
4
1
The OB identified by OB_NR exists.