Types Of Interrupt Events That The S7-200 Smart Cpu Supports - Siemens Simatic S7 Series System Manual

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

7.10.4

Types of interrupt events that the S7-200 SMART CPU supports

Communication port interrupts
The serial communications port of the CPU can be controlled by your program. This mode of
operating the communications port is called Freeport mode. In Freeport mode, your program
defines the baud rate, bits per character, parity, and protocol. The Receive and Transmit
interrupts are available to facilitate your program-controlled communications. Refer to the
Transmit and Receive instructions for more information.
I/O interrupts
I/O interrupts include rising/falling edge interrupts, high-speed counter interrupts, and pulse
train output interrupts. The CPU can generate an interrupt on rising and/or falling edges of
an input for input channels I0.0, I0.1, I0.2, and I0.3 (and for I7.0 and I7.1 for standard CPUs
with an optional digital input signal board). The rising edge and the falling edge events can
be captured for each of these input points. These rising/falling edge events can be used to
signify a condition that must receive immediate attention when the event happens.
The high-speed counter interrupts allow you to respond to conditions such as the current
value reaching the preset value, a change in counting direction that might correspond to a
reversal in the direction in which a shaft is turning, or an external reset of the counter. Each
of these high-speed counter events allows action to be taken in real time in response to high-
speed events that cannot be controlled at programmable logic controller scan speeds.
The pulse train output interrupts provide immediate notification of completion of the output of
the prescribed number of pulses. A typical use of pulse train outputs is stepper motor control.
You enable each of the above interrupts by attaching an interrupt routine to the related I/O
event.
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.
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
Program instructions
7.10 Interrupt
287

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents