Mitsubishi QD51 Programming Manual page 631

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
ZRESERVE
Instruction
• Prohibits other programs from using a resource to which a resource number is assigned.
ZRESERVE <resource number>[,<timeout value>]
Syntax
resource number
timeout value
ZRESERVE 1, "0:0:5:0"
Examples
• The ZRESERVE instruction prohibits other programs from using a resource to which a
Description
resource number allocated among the programmers is assigned when the resource is
shared by multiple programs executed at once. A program that executes the ZRESERVE
instruction can obtain the exclusive use of the resource.
• In order to terminate the exclusive use, specify the same resource number as in the
ZRESERVE instruction that prohibited the use, and execute the ZRELEASE instruction.
• The ZRESERVE and ZRELEASE instructions are used as a pair so that other programs
cannot use the resource for a specified time or while the processing involving the resource
is performed.
• The programmers should reach an arrangement in advance for the resources to which
resource numbers are to be assigned. Then they should create programs in such a way
that the ZRESERVE instruction is executed immediately before using the resources and
the ZRELEASE instruction is executed immediately after using it.
• Specify the number assigned to the resource whose use should be prohibited for other
programs in <resource number>.
• If another program has executed the ZRESERVE instruction specifying the same resource
number before a program executes the ZRESERVE instruction, it must wait before
prohibiting the use of the resource from other programs. Specify the maximum time that
the program waits in this case in <timeout value>. The specification should be made in the
following format. (The program execution is stopped while waiting.)
"HH:MM:SS:R"
HH
SS
11 - 461
Z RESERVE
• • • •
• • • •
• • • •
• • • •
Hours ("0" to "23")
• • • •
Seconds ("0" to "59")
Available only in execution mode
Specify the number (0 to 31) allocated among the
programmers and assigned to a resource used in a
program.
Specify the maximum time that is allowed to wait
before prohibiting other programs to use a resource,
in the format "HH:MM:SS:R."
HH: Hours
(0 to 23)
MM: Minutes
(0 to 59)
SS: Seconds
(0 to 59)
R: 100 ms
(express 0 to 900 ms using the
numbers from 0 to 9)
Prohibit other programs from using the resource to
which resource number 1 is assigned. A timeout
error is generated if it cannot be prohibited within 5
seconds.
MM
• • • •
R
• • • •
MELSEC-Q
Minutes ("0" to "59")
ms (express 0 to 900 ms
using numbers from "0" to "9")
11 - 461

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents