Siemens SIMATIC S7 System Manual page 327

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Ensuring access for a single shared variable
● For an STL program that is sharing a single variable: If the shared data is a single byte,
word, or double word variable and your program is written in STL, then correct shared
access can be ensured by storing the intermediate values from operations on shared
data only in non-shared memory locations or accumulators.
● For a LAD program that is sharing a single variable: If the shared data is a single byte,
word, or double word variable and your program is written in LAD, then correct shared
access can be ensured by establishing the convention that access to shared memory
locations be made using only Move instructions (MOVB, MOVW, MOVD, MOVR). While
many LAD instructions are composed of interruptible sequences of STL instructions,
these Move instructions are composed of a single STL instruction whose execution
cannot be affected by interrupt events.
Ensuring access for multiple shared variables
For an STL or LAD program that is sharing multiple variables: If the shared data is
composed of a number of related bytes, words, or double words, then the interrupt
disable/enable instructions (DISI and ENI) can be used to control interrupt routine execution.
At the point in your main program where operations on shared memory locations are to
begin, disable the interrupts. Once all actions affecting the shared locations are complete, re-
enable the interrupts. During the time that interrupts are disabled, interrupt routines cannot
be executed and therefore cannot access shared memory locations; however, this approach
can result in delayed response to interrupt events.
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
Program instructions
7.10 Interrupt
327

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents