8 - 16 8 - 16
MELSEC-Q
8 MULTITASK PROCESSING
8.5.2 Message ports
It is possible to exchange messages, as if sending letters, between the programs, and
synchronize the executions by making (defining) a message transfer location
(message port) in memory in AD51H-BASIC.
To synchronize the executions via a message port, it is not necessary to consider the
interlocking of the wait status as required by the event control. The wait status is
created automatically.
A
B
Message port
Message port
Are there any
letters for me?
(1) To use message ports
In order to use message ports, the following should first be understood:
• In order to use a message port, it is necessary to open the message port in one
of the BASIC programs in advance. A message port can be opened in any
program. Moreover, the program that opened the message port does not have
to reside in memory.
• The maximum length of a message is 256 bytes.
• Up to a maximum of 32 message ports can be opened in the communication
module. To distinguish each message port, a number from 0 to 31 is assigned
to each message port.
• Each message port can store up to 16 messages asynchronously. Message
data in a message port can be retrieved in the order of transmission (FIFO
method) or in the order of the program priority (priority method). Whether a
message port uses the FIFO method or priority is predefined by the message
port number.
Priority method • • • Message port numbers from 0 to 15
IN
B
A
Low priority
High priority
Program 1
Program 2
2
A
1
B
FIFO method • • • Message port numbers from 16 to 31
B
A
Program 1
Program 2
1
A
2
B
M e s s a g e p o r t b u f f e r
OUT
(1)
(2)
(3)
(14)
(15)
(16)
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...