CP 523
Communications Mode
Message frame structure
A message frame is defined as all data transferred after a Send or Receive request. A message
frame can be up to 256 bytes in length in the case of the CP 523. The CPU sends and receives
message frames in message blocks of eight bytes.
The CP 523 can detect the end of a message frame sent by the peripheral device in three ways:
•
You define the message frame length in parameter block 7 during configuring.
•
You specify one or two end-of-text characters in parameter block 7 when you set the
parameters in the parameter block. In this case, the message frame size must be 0 bytes.
The CP 523 must be initialized for Interpretive mode.
The setting of parameters is explained in 7.3.
•
In 3964(R) mode, the procedure automatically computes the message frame size on the basis
of end identifier string DLE ETX (BCC).
Transferring the message frame
After the CP 523 has accepted the Receive request, it transfers the first message block from the
Receive mailbox to the transfer memory. After the CPU has read a message block, it must write
word 0 of the transfer memory. The CP then updates the transfer memory.
Example:
Receiving a message frame with a length of 12 bytes.
Start address 128 is set on the CP 523. The message frame is to be stored in data block 20
beginning DW 0.
Figure 7-15. Data Interchange with "Receive Message Frame"
A53D
H
Contents
Message
block 2
Message
block 1
34E1
H
9002
H
8765
H
0D0D
H
6ED4
H
DW
0
1
2
3
4
5
DB 20
on the CPU
Transfer memory
of the CP
Word
Contents
128
130
132
134
128
130
Message
block 2
Message
block 1
Receive 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-75