Sharing Equipment (Resources) By Multitasking - Mitsubishi QD51-R24 User Manual

Melesec q series
Hide thumbs Also See for QD51-R24:
Table of Contents

Advertisement

3 SPECIFICATIONS

3.13.2 Sharing equipment (Resources) by multitasking

3 - 66
If use of resources is shared by BASIC programs, the same resources cannot be used
by multiple BASIC programs at the same time.
Exclusive control of resources is a way of making it impossible for another BASIC
program to use resources while one BASIC program is using them.
This exclusive control of resources must in the end be decided and implemented by
fellow programmers.
If this problem is not decided by the fellow program creators and therefore not provided
for, exclusive control of resources cannot be implemented.
Exclusive control of resources is accomplished by the following commands.
• ZRESERVE : Requests exclusive control of a resource.
• ZRELEASE : Ends exclusive control of a resource.
Task1
Program
ZRESERVE
(Requests mutual
exclusive control of
the resource)
ZRELEASE
(Finishes mutual
exclusive control
of the resource)
Program execution status
REMARK
Resources are said to be all the hardware and software that can be used by a
BASIC program. For example, the screen, printer, files, disks or memory, etc.
Resource
Not used
Stop for using
resources
Used by
Task 1
Resume
Used by
Task 2
Not used
Resources usage status
MELSEC-Q
Task2
Program
ZRESERVE
(Requests mutual
exclusive control of
the resource)
ZRELEASE
(Finishes mutual
exclusive control
of the resource)
Program execution status
3 - 66

Advertisement

Table of Contents
loading

This manual is also suitable for:

Qd51

Table of Contents