Using the ”SEND” and ”RECEIVE” Function Blocks
CP 523
STL FB 201
Explanations
00EE :DO =Z-DB
Open destination DB
00EF :
00F0 NBLO :JU OB 31*
(Retrigger scan time)
00F1 :L KH 0000
Access word 0 on CP 523
00F3 :DO FW 242
for transferring a message block
00F4 :T PY 0
00F5 :L FW 242
00F6 :I 1
00F7 :T FW 242
00F8 :L KH 0000
00FA :DO FW 242
00FB :T PY 0
00FC :
00FD :L FW 242
Set pointer back to
00FE :D 1
base address
00FF :T FW 242
0100 :
0101 :L FW 238
Decrement no. of message blocks
0102 :D 1
for Receive message frames
0103 :T FW 238
and store
0104 NWOR :
0105 :DO FW 234
Fetch a data word from CP 523
0106 :L PW 0
0107 :
0108 :DO FW 236
and store
0109 :T DW 0
in Z-DB
010A :
010B :L FW 238
Last message block?
010C :L KB 0
010D :><F
010E :JC =KEND
”N O”
010F :
0110 :L FY 246
Increment auxiliary register by 1
0111 :I 1
0112 :T FY 246
and store
0113 :
(shows the number of the word
0114 :
received in the last message block)
0115 :L FW 244
and compare with the number of words
0116 :<F
in the last message block to see
0117 :
if the last word was received
0118 :JC =KEND
”NO”
0119 :
011A :L FW 230
Increment ZLAE register by 1
011B :ADD KF +1
011D :T FW 230
and store
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
* In 115 CPUs only (if required)
8-34
EWA 4NEB 811 6044-02a