8 - 8 8 - 8
MELSEC-Q
8 MULTITASK PROCESSING
8.3 To Use Devices (Resources) in Multitasking (Mutual Exclusive Control of Resources)
Resources refer to all of the hardware and software that can be used by the programs.
For example, they could be screens, printers, files, disks, optional boards, memory,
etc. When these devices are used in multiple programs being executed, some of them
can be grouped into one resource, or split into pieces to treat each of the pieces as a
single resource.
Example
EM200
EM299
• •
EM0
EM199
• • • • • • •
EM300
EM1023
• • • • • • • • • • •
Text screen
+
To split one resource into pieces and treat each of the pieces as a single resource
(Extension relays of the communication module EM0 through EM1023)
Keyboard
Mutual exclusive control of a resource means limiting access to that certain resource.
While one program is using a certain resource, other programs are prevented from
using the resource when multiple programs are executed simultaneously. This section
explains how to limit access to the specified resource to one program at a time while
multiple programs are being executed.
• Example of exclusive control of a printer
P
e
rm
ission
P
e
rm
ission
System program
ZRESERVE 1
BASIC
program (A)
BASIC
program (B)
ZRESERVE 1
Two programs request
to use the printer.
Please wait
The program that made the request
first gets to use the printer.
The program that made the request
later has to wait.
After the program that made the request
first finishes using the printer,
the program that made the request
later gets to use the printer.
Here you go
Thank you
BASIC
program (A)
System program
ZRESERVE 1
BASIC
program (B)
BASIC
program (B)
BASIC
program (A)
System program
ZRESERVE 1
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...