EasyManua.ls Logo

Siemens S7-1200 - Page 343

Siemens S7-1200
1028 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Extended instructions
8.4 Interrupts
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
343
Adding time delay interrupt OB subprograms to your project
Only time delay interrupt OBs can be assigned to the SRT_DINT and CAN_DINT
instructions. No time delay interrupt OB exists in a new project. You must add time delay
interrupt OBs to your project. To create a time-delay interrupt OB, follow these steps:
1. Double-click the "Add new block" item in the "Program blocks" branch of the project tree,
select "Organization block (OB)", and choose "Time delay interrupt".
2. You have the option to rename the OB, select the programming language, or select the
block number. Switch to manual numbering if you want to assign a different block number
than the number that was assigned automatically.
3. Edit the time delay interrupt OB subprogram and create programmed reaction that you
want to execute when the time delay timeout event occurs. You can call other FC and FB
code blocks from the time delay interrupt OB, with a maximum nesting depth of six.
4. The newly assigned time delay interrupt OB names will be available when you edit the
OB_NR parameter of the SRT_DINT and CAN_DINT instructions.
QRY_DINT parameter STATUS
Table 8- 110 If there is an error (REL_VAL <> 0), then STATUS = 0.
Bit
Value
Description
0
0
In RUN
1
In startup
1
0
The interrupt is enabled.
1
The interrupt is disabled.
2
0
The interrupt is not active or has elapsed.
1
The interrupt is active.
4
0
An OB with an OB number given in OB_NR does not exist.
1
An OB with an OB number given in OB_NR exists.
Other bits
Always 0
Condition codes
Table 8- 111 Condition codes for SRT_DINT, CAN_DINT, and QRY_DINT
RET_VAL (W#16#...)
Description
0000
No error occurred
8090
Incorrect parameter OB_NR
8091
Incorrect parameter DTIME
80A0
Time delay interrupt has not started.

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals