Mitsubishi QD51 Programming Manual page 610

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
ZMESSAGE GET
• Reads messages from message ports.
ZMESSAGE GET <message port number>, <variable name> • • • [TIMEOUT <timeout
Syntax
value>]
<message port number>
<variable name>
<timeout value>
ZMESSAGE GET 1, AS
Examples
ZMESSAGE GET 16, A%
TIMEOUT "0:1:0:0"
• The ZMESSAGE GET instruction is used to read messages written in a message port. If
Description
no messages have been written in the message port, the program execution is halted and
the program waits for a message to be written.
• Specify the number of the message port from which the message is to be read in
<message port number>.
• Specify the variable to which messages read from message ports are to be assigned in
<variable name>.
The type of the messages in the message ports and the type of the variable specified in
<variable name> must match.
11 - 440
Instruction
ZMESSAGE GET
• • • •
• • • •
• • • •
• • • •
• • • •
• Store dummy data for a greater number of bytes than the message length in the variable specified
in <variable name>, before executing the ZMESSAGE GET instruction as shown below.
If such dummy data has not been stored in advance, an error occurs when the ZMESSAGE GET
instruction is executed.
Numeric variable
Character variable
• Always define an array variable specified as <variable name> using the DIM instruction,
even if the number of elements used is less than 10. If it is not defined using the DIM instruction,
an error occurs at the execution of the ZMESSAGE GET instruction
(usually, an array with 10 or fewer elements can be used without defining it using the DIM instruction).
Specify the number of the message port from which
the message is to be read.
Specify the variable to which the message read is to
be assigned.
Specify the maximum time to wait for a message to
be written 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)
Reads character data from the message port with
message port number 1 and assigns it to AS.
Reads numeric data from the message port with
message port number 16 and assigns it to A%. If the
message is not written in one minute, a timeout error
occurs.
%=0,
!=0,
#=0
S=SPACE$(255)
MELSEC-Q
Available only in execution mode
11 - 440

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents