11 - 441 11 - 441
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
• If <variable name> is a numeric variable, it is possible to specify multiple <variable name>
by separating by commas. In this case, the type of each variable read must correspond
correctly to the type of each message written to the message port by the ZMESSAGE
PUT instruction. Otherwise, improper messages will be read.
Example
[Program that writes messages]
[Program that reads messages]
ZMESSAGE PUT 1, A%, B!, C#,
Integer
Single precision
Double
precision
ZMESSAGE GET 1, P%, Q!, R#
ZMESSAGE GET 1, A1%, A2%, A3%
Integer 3
Integer
Single precision
Double
precision
• In <timeout value>, specify the maximum time the program waits for a message to be
written in case a message port is empty, using the format shown below (the program
execution is stopped while waiting).
"HH:MM:SS:R"
HH
• • • •
Hours ("0" to "23")
MM
• • • •
Minutes ("0" to "59")
SS
• • • •
Seconds ("0" to "59")
R
• • • •
ms (express 0 to 900 ms
using numbers from "0" to "9")
If the specification of <timeout value> is omitted or "0:0:0:0" is specified, the program waits
for an infinite time.
REMARK
See the ZMESSAGE, ZMESSAGE CLOSE, ZMESSAGE KILL, ZMESSAGE OPEN
and ZMESSAGE PUT instructions, and Section 8.5.2.