CP 523
Communications Mode
Message frame structure
A message frame consists of all the data transferred in response to a Send or Receive request. In
the case of the CP 523, a message frame can be up to 256 bytes long. The CPU sends and receives a
message frame in message blocks of eight bytes.
The CP 523 can detect the end of a message frame sent by the CPU in two ways:
•
You specify the message frame size in bytes with the "Send message frame" request.
•
You specify one or two end-of-text characters with the "Send message frame" request. You
must specify 0 bytes as the Send message frame size.
The end-of-text characters must be identical to those defined when setting the CP 523
parameters ( 7.3)
Transferring a message frame
After the CP 523 has accepted a Send request, the CPU transfers the message frame to the transfer
memory in message blocks of eight bytes. After the CPU has written word 0, the CP accepts the
data from the transfer memory and stores it in the Send mailbox.
This means you transfer words 2, 4 and 6 to the transfer memory first and then word 0.
Example:
Transferring a message frame with a length of 12 bytes.
Start address 128 is set on the CP 523. The message frame is stored in data block 20 beginning from
DW 0.
Figure 7-10. Forwarding Data with "Send Message Frame"
Message
block 2
Message
block 1
A53D
H
34E1
H
9002
H
8765
H
0D0D
H
6ED4
H
DW
0
1
2
3
4
5
Contents
DB 20
on the CPU
Transfer memory
of the CP
Word
Contents
128
130
132
134
128
130
Message
block 2
Message
block 1
Send mailbox of
the CP
Word
Contents
0
2
4
6
8
10
A53D
H
34E1
H
9002
H
8765
H
0D0D
H
6ED4
H
A53D
H
34E1
H
9002
H
8765
H
0D0D
H
6ED4
H
EWA 4NEB 811 6044-02a
7-63