Mitsubishi QD51 Programming Manual page 162

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

Advertisement

8 MULTITASK PROCESSING
8 - 17
• An error occurs if the total number of messages in all message ports exceeds
64. Fortunately, the total number decreases by one each time a message is
read.
A
D51H
• If there are no messages in the specified message port when a program is
trying to read a message from the message port, the operation will wait until a
message is sent to the message port.
• Make an agreement on the following in advance before using a message port.
1) The length of the message input to and output from the message port
(number of bytes)
2) The message port type (FIFO method, priority method)
• When multiple data is combined into one message, it is treated as one data
item on the reading side even if it is written as follows.
Write
ZMESSAGE PUT 1,A$,B$
A$
MELSEC
B$
AD51H
This is because message ports do not support delimiters within a message. The
user needs to manage delimiters within a message.
(2) How to use message ports
The following explains message port data, how to input or output messages, and
precautions on inputting/outputting messages.
1) Define a message port.
ZMESSAGE <message port number> LEN=<message length>
BASIC creates a message port in the main memory according to the definition of the message port.
2) Open the message port.
ZMESSAGE OPEN <message port number>
The opening of the message port using the ZMESSAGE OPEN
should be performed in each of the programs executed by multitasking.
Only 64 messages
can be stored.
STOP
MELSECAD51H
Message port
The definition of the message port using the ZMESSAGE instruction
should be performed in one of the programs executed by multitasking
MELSEC-Q
Read
ZMESSAGE GET 1,C$
C$
MELSECAD51H
8 - 17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents