Siemens SIMATIC S5 CP 523 Manual page 183

Serial i/o module
Hide thumbs Also See for SIMATIC S5 CP 523:
Table of Contents

Advertisement

Communications Mode
7.7.2
Receiving Message Frames with Evaluation of the Specified End-of-Text
Characters
After a Receive request, you can receive a message frame from the CP which ends with end-of-text
characters. The CP checks the end-of-text characters. You can evaluate the receive data in the user
program.
Prerequisites
You must specify the end-of-text characters in parameter block 7 when initializing the CP 523
( 7.3)
You must make sure that the peripheral device sends only message frames containing these
end-of-text characters to the CP.
The CP 523 must be set for Interpretive mode. You must define this in parameter block 7 at the
initializing stage ( 7.3).
Schematic for "Receive a message frame with evaluation of the specified end-of-text characters"
1. The CPU transfers the "Coordinate data transfer for receive message frame" request (A080
to word 0 of the transfer memory
2. The CPU reads the coordination information from word 0 of the transfer memory. If there is no
message frame in the Receive mailbox (bit 7 in byte 1 = "0"), no message frame can be
received. Byte 7 also contains the number of message frames in the Receive buffer.
3. The CPU reads the message frame from the transfer memory in message blocks of eight bytes.
The CPU reads the message block from the transfer memory and checks that the end-of-text
characters have been transferred.
4a. If end-of-text characters have been received, then Block End.
4b. If no end-of-text character was transferred, then write word 0 of the transfer memory.
The CP then updates the transfer memory.
5. Return to step 3.
Example:
Receiving a message frame with the end-of-text character 0D0D
Start address 128 is set on the CP 523. The message frame is to be stored in DB 22 beginning DW 0.
Flag 101.1 is to be set if a message frame is stored in DB 22. The STL does not explain how flag
101.1 is reset. You could reset the flag when you have evaluated the message frame and it can be
overwritten in DB 22. FB 126 can be assigned the relevant parameters. You have a free choice of
start address of the module and end-of-text characters. These must be specified when the FB is
called. FB 126 receives only one message frame, and does not evaluate byte 7 of the transfer
memory (number of message frames in the Receive mailbox).
7-78
CP 523
H
EWA 4NEB 811 6044-02a
)
H

Advertisement

Table of Contents
loading

Table of Contents