Siemens SIMATIC S5 CP 523 Manual page 170

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

Advertisement

CP 523
Example:
Sending a message frame with a length of 12 bytes
Start address 128 is set on the CP. The message frame is stored in data block 20 beginning from
DW 0. Flag 100.0 is set if the CP has accepted the job. The STL does not describe how F 100.0 is to
be reset. You could reset F 100.0 when another job request has been forwarded to the CP.
STL FB 122
NAME:SEND2
:A
F
100.0
:BEC
:L
KH
000C
:T
PW
130
:L
KH
A001
:T
PW
128*
:L
KH
0001
:L
PW
128
:AW
:><F
:BEC
:S
F
100.0
:C
DB
20
:L
DW
3
:T
PW
134
:L
DW
2
:T
PW
132
:L
DW
1
:T
PW
130
:L
DW
0
:T
PW
128*
:L
DW
5
:T
PW
130
:L
DW
4
:T
PW
128*
:BE
*
5.2
EWA 4NEB 811 6044-02a
The CP 523 has accepted the job if flag 100.0 is set,
then Block End
Load length 12 bytes into ACCUM 1 and
transfer to word 2 of the transfer memory
Load "Send frame" job (A001
of the transfer memory
Check that Send request has been accepted
If no, then Block End
If yes then set flag 100.0 and send message frame
Open DB 20
Transfer DW 3 to
word 6 of the transfer memory
Transfer DW 2 to
word 4 of the transfer memory
Transfer DW 1 to
word 2 of the transfer memory
Transfer DW 0 to
word 0 of the transfer memory
The CP transfers the contents of the transfer memory to the Send
mailbox
Transfer DW 5 to
word 2 of the transfer memory
Transfer DW 4 to
word 0 of the transfer memory
The CP transfers the contents of words 2 and 0 in the transfer
memory to the Send mailbox.
The CP then sends the message frame from the Send mailbox to the
peripheral device
Communications Mode
Explanation
) into ACCUM 1 and transfer to word 0
H
7-65

Advertisement

Table of Contents
loading

Table of Contents