Siemens SIMATIC S5 CP 523 Manual page 220

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

Advertisement

Using the "SEND" and "RECEIVE" Function Blocks
STL FB 201
0039
:JC
=NEIN
003A
:
003B
:L
KH 0001
003D
:JU
=STAT
003E NEIN :
003F
:L
KH 0000
0041 STAT :
0042
:T
=STAT
0043
:
0044
:L
=KBE
0045
:L
KH 007F
0047
:AW
0048
:T
=KBE
0049
:
004A
:AN
F 255.0
004B
:ON
F 254.7
004C
:BEC
004D
:
004E
:***
NETWORK 3
004F
004F
:
0050
:LW
=Z-DB
0051
:SLW
0052
:SRW
0053
:
0054
:L
KH E400
0056
:+F
0057
:LIR
0058
:
0059
:L
KB
005A
:!=F
005B
:JC
=FE04
005C
:
005D
:TAK
005E
:ADD KF -2
0060
:LIR
0061
:ADD KF -5
0063
:T
FW 232
0064
:
0065
:LW
=ZANF
0066
:L
KB 0
0067
:<F
0068
:JC
=FE04
8-30
8
7
0
0
0
Explanations
Load STAT bit "Data available" and
jump to 'output STAT'
STAT bit "No data"
Output STAT bit
Reset KBE.7 (Request
accepted) but do not
reset error flags
RLO "0" at jump?
or no data available?
Program "End"
Check whether Z-DB is available
Load Z-DB parameter
Isolate the DB number from
the Z-DB parameter specification
Calculate the start address
of the Z DB using the
block address list
Z-DB available?
"E R R O R"
Calculate length of the Z-DB
Gross length in words
Subtract length of block header
and store
Check ZANF information
ZANF less than 0?
"E R R O R"
CP 523
EWA 4NEB 811 6044-02a

Advertisement

Table of Contents
loading

Table of Contents