Rockwell-automation 1775-KA PLC-3 Communication Adapter Module User Ma Instrukcja Użytkownika Strona 227

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 239
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 226
Detailed Flowcharts
Appendix D
D17
Figure D.20
SLEEP and W
AKEUP Interaction
PROCESS A PROCESS B PROCESS
C
SLEEP
A Previous
Wakeup
Later
WAKEUP
2
1
7
8
3
4
6
5
NOTE: Sequence of processor
execution
is indicated by circled
numbers.
10090–I
The SLEEP and WAKEUP subroutines are always used in connection
with some type of indivisible process interlock. Indivisibility is achieved
on many processors (as on the Z80) by disabling processor interrupts. For
this reason, SLEEP and WAKEUP assume that interrupts are off when
they are called. They will always return with interrupts off.
When one process calls SLEEP, the results is a return from a call to
WAKEUP by another process. When a process calls WAKEUP, the result
is a return from a call to SLEEP by another process. An interrupt
subroutine that calls WAKEUP is viewed as a subroutine of the
interrupted process.
Figure D.20 shows an example of interaction between SLEEP and
WAKEUP. In this example, process B work up process A some time ago.
Now at 1, when A goes to sleep, actual execution resumes after the
wakeup call in B at 3 and 4. Some time later, process C (at an interrupt,
for example) calls WAKEUP at 5. Execution flow proceeds to the
instructions at 8 following the call to sleep in process A. The next time A
calls SLEEP, the WAKEUP call in C will terminate.
This is not the only possible implementation of SLEEP and WAKEUP. A
second alternative implementation would allow a process to call
SLEEP and WAKEUP
Przeglądanie stron 226
1 2 ... 222 223 224 225 226 227 228 229 230 231 232 ... 238 239

Komentarze do niniejszej Instrukcji

Brak uwag