Time Delay Interrupts - Siemens S7-1200 System Manual

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

Advertisement

Extended instructions
8.4 Interrupts
8.4.4

Time delay interrupts

You can start and cancel time delay interrupt processing with the SRT_DINT and CAN_DINT
instructions, or query the interrupt status with the QRY_DINT instruction. Each time delay
interrupt is a one-time event that occurs after the specified delay time. If the time delay event
is cancelled before the time delay expires, the program interrupt does not occur.
Table 8- 108 SRT_DINT, CAN_DINT, and QRY_DINT instructions
LAD / FBD
Table 8- 109 Data types for the parameters
Parameter and type
OB_NR
IN
DTIME
IN
1
SIGN
IN
1
RET_VAL
OUT
STATUS
OUT
Only for SRT_DINT
1
Operation
The SRT_DINT instruction specifies a time delay, starts the internal time delay timer, and
associates a time delay interrupt OB subprogram with the time delay timeout event. When
the specified time delay has elapsed, a program interrupt is generated that triggers the
execution of the associated time delay interrupt OB. You can cancel an in-process time
delay interrupt before the specified time delay occurs by executing the CAN_DINT
instruction. The total number of active time delay interrupt events must not exceed four.
342
SCL
ret_val := SRT_DINT(
ob_nr:=_int_in_,
dtime:=_time_in_,
sign:=_word_in_);
ret_val := CAN_DINT(
ob_nr:=_int_in_);
ret_val := QRY_DINT(
ob_nr:=_int_in_,
status=>_word_out_);
Data type
Description
OB_DELAY
Organization block (OB) to be started after a time-delay: Select from
the available time-delay interrupt OBs that were created using the "Add
new block" project tree feature. Double-click on the parameter field,
then click on the helper icon to see the available OBs.
Time
Time delay value (1 to 60000 ms)
Word
Not used by the S7-1200: Any value is accepted. A value must be
assigned to prevent errors.
Int
Execution condition code
Word
QRY_DINT instruction: Status of the specified time-delay interrupt OB,
see the table below
Description
SRT_DINT starts a time delay interrupt that
executes an OB when the delay time specified by
parameter DTIME has elapsed.
CAN_DINT cancels a time delay interrupt that has
already started. The time delay interrupt OB is not
executed in this case.
QRY_DINT queries the status of the time delay
interrupt specified by the OB_NR parameter.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents