CP 523
Using the ”SEND” and ”Receive” Function Blocks
STL FB 200
Explanation
Segment 3 006F
006F :
Check whether Q DB available
0070 :LW =Q-DB
Load Q DB parameter
0071 :SLW 8
Isolate DB number from
0072 :SRW 7
Q DB parameter
0073 :
0074 :L KH E400
Calculate start address
0076 :+F
of the Q DB using
0077 :LIR 0
the block address list
0078 :
0079 :L KB 0
Q DB available?
007A :!=F
007B :JC =FE03
" E R R O R "
007C :
007D :TAK
Calculate the length of the Q DB
007E :ADD KF -2
0080 :LIR 0
0081 :ADD KF -5
0083 :T FW 254
and buffer
0084 :
0085 :
Check the QANF
0086 :LW =QANF
QANF less than 0 ?
0087 :L KB 0
0088 :<F
0089 :JC =FE03
" E R R O R "
008A :
008B :TAK
QANF > 255 ?
008C :L KB 255
008D :>F
008E :JC =FE03
" E R R O R "
008F :
0090 :
Check QLAE
0091 :L =QLAE
QLAE > 0 ?
0092 :L KB 0
0093 :>F
0094 :JC =CONT
" C O N T I N U E "
0095 :
0096 :LW =ENDZ
Check end-of-text,
0097 :L KH 0000
characters for > 0 ?
0099 :>F
009A :JC =PAOK
"P A R A M E T E R S O.K."
009B :JU =FE03
otherwise "E R R O R "
009C :
009D CONT :
009E :L =QLAE
QLAE > 128?
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 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-13