Siemens SIMATIC S5 CP 521 Manual page 173

Printer/ascll communications module
Hide thumbs Also See for SIMATIC S5 CP 521:
Table of Contents

Advertisement

ASCII Mode
Receiving variable-length messages
Variable-length messages are received in the same way as fixed-length messages.
If you want to receive variable-length data messages from a peripheral device
using the CP 521, you must define the message end code for both devices with
the job 9072
in word 6.
H
Example: Receiving variable-length messages (only for CPU 103)
Let's assume you have plugged into the module in slot 7 (initial address 120) and
you want to receive data messages from a peripheral device using the CP 521.
Write the data you receive into data block (DB) 40.
STL FB 4
NAME
:EMPFANG
:C
DB
40
:
:L
KH 0000
:T
QW
120
:
:A
F
90.0
:JC
=M001
:L
KH A080
:T
QW
120
:S
F
90.0
:
:
:L
KH 6001
:T
FW
22
:L
KH C001
:T
FW
24
:L
KF +0
:T
FW
30
:L
KF +1
:T
FW
32
:L
KF +2
:T
FW
34
7-50
Explanation
Receiving with variable length
Open target DB
Transfer "Data not relevant" to the
CP 521
Initiate from the CP 521 to the CPU data
transfer
Request data from CP 521 (coordination
information)
Coordination information sent
Auxiliary register preset: data transfer
from CP 521 to CPU with
block number
Acknowledgement to CP 521 data
block transferred
Preset pointer in target DB with initial
value
GWA 4NEB 812 6030-02b
CP 521

Advertisement

Table of Contents
loading

Table of Contents