11 - 444 11 - 444
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Available only in execution mode
ZMESSAGE PUT
Instruction
ZMESSAGE PUT
• Writes messages to a message port.
ZMESSAGE PUT <message port number>,<message>, • • •
Syntax
<message port number>
• • • •
Specify the number of the message port to which a
message is to be written.
<message>
• • • •
Specify the message to be written to the message
port.
Examples
ZMESSAGE PUT 1,"Hello"
• • • •
Writes a message containing the character string
"Hello" to the message port of message port number 1.
ZMESSAGE PUT 16, A%
• • • •
Writes a message containing the data in A% to the
message port of message port number 16.
Description
• The ZMESSAGE PUT instruction is used to write messages to message ports.
• Specify the message port number of the message port to which messages are to be
written in <message port number>.
• A numeric constant, character string constant, numeric variable, character variable, or an
array variable can be specified for <message>. A character string must be enclosed by
double quotation marks (").
• If <message> is a numeric value or numeric variable, it is possible to specify multiple
<message> by separating each <message> by commas.
In this case, the types of the messages written and the types of the messages read by the
ZMESSAGE GET instruction must match correctly. Otherwise, improper messages will be
read.
Examples
[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