CP 523
Using the ”SEND” and ”RECEIVE” Function Blocks
STL FB 201
Explanations
00C0 :
00C1 :L FW 242
Set pointer to base
00C2 :I 6
a6 (byte 6)
00C3 :T FW 242
00C4 :
00C5 :DO FW 242
Read no. of message blocks in
00C6 :L PY 0
Receive message frame from the CP,
00C7 :D 1
decrement by 1,
00C8 :SLW 2
convert to number of words
00C9 :
(one message block comprises 4 words)
00CA :T FW 238
and store
00CB :
00CC :L FW 242
Set pointer to base
00CD :ADD KF -4
a2 (byte 2)
00CF :T FW 242
00D0 :
00D1 :DO FW 242
Read length of Receive
00D2 :L PW 0
message frame in the bytes from the CP,
00D3 :SRW 1
convert to number of words
00D4 :T FW 240
and store
00D5 :
00D6 :L FW 238
Subtract the number of message blocks
00D7 :-F
in words from this
00D8 :T FW 244
and store
00D9 :
The result of the subtraction
00DA :
is the number of words
00DB :
in the last message block
00DC :
00DD :L FW 238
Correct the number
00DE :SRW 2
of message blocks
00DF :I 1
00E0 :T FW 238
00E1 :
00E2 :
00E3 :L KB 0
Reset the ZLAE register
00E4 :T FW 230
00E5 :
00E6 :LW =ZANF
Load ZANF
00E7 :T FW 236
and store
00E8 :
00E9 :L FW 242
Set module address register
00EA :D 2
to CP 523 base address
00EB :T FW 242
and load into
00EC :T FW 234
module address
00ED :
index register
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
EWA 4NEB 811 6044-02a
8-33