Siemens CPU 948 Programming Manual page 148

Simatic s5 s5-155u
Table of Contents

Advertisement

Semaphore Operations
Effect of SED/SEE
Use of SED/SEE
3 - 76
The CPU that executes the operation SED xx (disable semaphore)
accesses a specific byte in the coordinator (provided that no other
CPU has access to that byte already). Once a CPU has reserved access,
the other CPUs can no longer access the memory area protected by the
semaphore (numbers 0 to 31). The area is therefore disabled for all
other CPUs.
Make sure that the coordination functions correctly, all CPUs
requiring access to the same area of global memory must use the same
semaphore.
The SEE xx (enable semaphore) operation resets the byte on the
coordinator. The protected memory area is then once again accessible
to the other CPUs. A semaphore can only be enabled by the CPU that
disabled it.
Fig. 3-8 illustrates the basic sequence of coordinated access using a
semaphore.
Di s a b l e se m a p h o r e
O p e r a t i o n
s u c c e s s f u l ?
Ye s
A c c e s s t o s e m a -
p h o r e p r o t e c t e d
g l o b a l m e m o r y
E n a b l e se m a p h o r e :
Fig. 3-8
Coordination of access to the global memory
START
SED
No
SEE
E n d
CPU 948 Programming Guide
C79000-G8576-C848-04

Advertisement

Table of Contents
loading

Table of Contents