Mitsubishi QD51 Programming Manual page 154

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

8 MULTITASK PROCESSING
Programmer A
1
If the resource number of a resource
(e.g., the text screen) is different
between programs, the mutual exclusive
control cannot be achieved.
8 - 9
(1) To limit the access to the resource
In order to limit the access to resources, the following should first be understood:
(a) Mutual exclusive control of the resource is performed strictly under the
agreement between the programmers. The mutual exclusive control of the
resource is meaningless if such agreement is not followed.
(b)
A program that uses a resource (see (2)) with an assigned resource number
must always execute the ZRESERVE instruction before it uses the
resource. After finishing using the resource, it must execute the ZRELEASE
instruction immediately so that another program can use the resource.
If the resource with the assigned resource number is already being used by
another program when the ZRESERVE instruction is executed, the
execution is halted until that program finishes using the resource and
executes the ZRELEASE instruction.
In order to prevent the execution of a program from being stopped for a
long period of time, specify a "timeout" when executing the ZRESERVE
instruction.
An error occurs if the resource is not available within the specified period of
time, which makes it possible to perform another processing by the error
handling.
(c)
Try to limit the access to one resource at a time if possible when using
resources to which resource numbers are assigned.
(d) When using multiple resources with assigned resource numbers
simultaneously, decide the order of the specified resource numbers in each
ZRESERVE instruction. (To prevent deadlock of the program.)
For example, use the resources in sequence from the smaller or largest
resource number. (See (3).)
Programmer B
1
The resource with a given resource number
(e.g., the text screen) must be referenced
using the same number by all programs.
Programmer A
1
MELSEC-Q
Programmer B
5
8 - 9

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents