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
• 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
SS
If the specification of <timeout value> is omitted or "0:0:0:0" is specified, the program waits
for an infinite time.
11 - 441
[Program that writes messages]
ZMESSAGE PUT 1, A%, B!, C#,
Integer
Single precision
• • • •
Hours ("0" to "23")
• • • •
Seconds ("0" to "59")
REMARK
See the ZMESSAGE, ZMESSAGE CLOSE, ZMESSAGE KILL, ZMESSAGE OPEN
and ZMESSAGE PUT instructions, and Section 8.5.2.
[Program that reads messages]
ZMESSAGE GET 1, P%, Q!, R#
Double
precision
ZMESSAGE GET 1, A1%, A2%, A3%
MM
• • • •
R
• • • •
MELSEC-Q
Double
Integer
precision
Single precision
Integer
3
Minutes ("0" to "59")
ms (express 0 to 900 ms
using numbers from "0" to "9")
11 - 441