Siemens SIMATIC S7 System Manual page 329

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Time-based interrupts
Time-based interrupts include timed interrupts and the timer T32/T96 interrupts. You can
specify actions to be taken on a cyclic basis using a timed interrupt. The cycle time is set in
1-ms increments from 1 ms to 255 ms. You must write the cycle time in SMB34 for timed
interrupt 0, and in SMB35 for timed interrupt 1.
The timed interrupt event transfers control to the appropriate interrupt routine each time the
timer expires. Typically, you use timed interrupts to control the sampling of analog inputs or
to execute a PID loop at regular intervals.
A timed interrupt is enabled and timing begins when you attach an interrupt routine to a
timed interrupt event. During the attachment, the system captures the cycle time value, so
subsequent changes to SMB34 and SMB35 do not affect the cycle time. To change the cycle
time, you must modify the cycle time value, and then re-attach the interrupt routine to the
timed interrupt event. When the re-attachment occurs, the timed interrupt function clears any
accumulated time from the previous attachment and begins timing with the new value.
After being enabled, the timed interrupt runs continuously and executes the attached
interrupt routine, at the end of each successive time interval. If you exit RUN mode or detach
the timed interrupt, the timed interrupt is disabled. If the global DISI (disable interrupt)
instruction is executed, timed interrupts continue to occur, but the attached interrupt routine
is not processed yet. Each occurrence of the timed interrupt is queued (until either interrupts
are enabled or the queue is full).
The timer T32/T96 interrupts allow timely response to the completion of a specified time
interval. These interrupts are only supported for the 1-ms resolution on-delay (TON) and off-
delay (TOF) timers T32 and T96. The T32 and T96 timers otherwise behave normally. Once
the interrupt is enabled, the attached interrupt routine is executed when the active timer's
current value becomes equal to the preset time value during the normal 1-ms timer update
performed in the CPU. You enable these interrupts by attaching an interrupt routine to the
T32 (event 21) and T96 (event 22) interrupt events.
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
Program instructions
7.10 Interrupt
329

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents