EasyManua.ls Logo

Siemens Simatic S7 Series

Siemens Simatic S7 Series
726 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...
Programming concepts
5.2 Elements of the user program
S7-200 SMART
88 System Manual, 09/2015, A5E03822230-AC
Interrupt routines are optional elements of your program that react to specific interrupt
events. You design an interrupt routine to handle a pre-defined interrupt event. Whenever
the specified event occurs, the CPU executes the interrupt routine.
The interrupt routines are not called by your main program. You associate an interrupt
routine with an interrupt event, and the CPU executes the instructions in the interrupt
routine only on each occurrence of the interrupt event.
Note
Because it is not possible to predict when the CPU might generate an interrupt, it is
desirable to limit the number of variables that are used both by the interrupt routine and
elsewhere in the program.
Use the local
variable table of the interrupt routine to ensure that your interrupt routine
uses only the temporary memory and does not overwrite data used somewhere else in
your program.
There are a number of programming techniques you can use to ensure that data is
co
rrectly shared between your main program and the interrupt routines. Refer to the
descriptions of the
Interrupt instructions (Page 282).
Other blocks contain information for the CPU. You can choose to download these blocks
when you download your program:
System Block: The system block allows you to configure different hardware options for
the CPU.
Data Block: The DB stores the initial values for different variables (V memory) used by
your program.

Table of Contents

Other manuals for Siemens Simatic S7 Series

Related product manuals