Mitsubishi QD51 Programming Manual page 163

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

Advertisement

8 MULTITASK PROCESSING
Program A
Program B
8 - 18
3) To write a message to the message port:
ZMESSAGE PUT <message port number>, <transmission data>, • • •
3)' To read a message from the message port:
ZMESSAGE GET <message port number>, <variable where the data read is stored>, • • •
• • •
<timeout>
See 2) in (3) for the specification of <timeout>.
4) Close the message port to finish inputting/outputting the message.
ZMESSAGE CLOSE <message port number>
The closed message port can be opened again by the ZMESSAGE OPEN instruction.
5) Delete the message port when finishing using the message port.
ZMESSAGE KILL, <message port number>
Once the message port is deleted, the message port in the main memory is also deleted.
Therefore, it is necessary to define the message port in order to use the message
port specified by <message port number> again.
(3) Execution order of instructions when using a message port
The following shows the execution order of instructions when programs are
exchanging messages and synchronizing their executions through message
ports:
1)
The following occurs when program B reads a message after program A
writes the message.
1) ZMESSAGE to
ZMESSAGE OPEN to
Prepare and open the
message port.
ZMESSAGE OPEN to
Open the message
port.
The deletion of a message port using the ZMESSAGE KILL
instruction should be performed in one of the programs
executed by multitasking.
2) ZMESSAGE PUT to
Write the message.
A
3) ZMESSAGE GET
Read the message.
MELSEC-Q
8 - 18

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents