Siemens SIMATIC S5 Manual page 154

Interface of the programmable controller
Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

Data Transmission by Accessing Layer 2 Services
FB224
Segment 1
0000
Name :EMPFANG
Bez
:EMPF
I/Q/D/B/T/Z: I
:
:
:
:ON
=EMPF
:ON
F
79.0
:
:BEC
:
:JC FB 253
Name :L2-REC
A-NR :
KY 0,148
ZTYP :
KS DB
DBNR :
KY 0,34
ZANF :
KF +10
ZLAE :
KF -1
:
:A
F
255.0
:=
F
20.7
:
:AN
F
255.0
:AN
F
79.3
:RB
=EMPF
:
:BE
In the following sample programs for the various layer 2 services ( sections 8.5 to 8.9), data
are interchanged between two stations on the SINEC L2 LAN. Both stations are S5-95Us and have
the station addresses TLN 1 and TLN 2.
The parameters to be assigned to the layer 2 accesses are listed in section 8.3, Table 8-4. It is
assumed that you have already configured the DB1s.
Once you have completely developed your program for using a layer 2 service, start up your PLC.
Proceed as follows:
Switch the mode selector of the PLC to RUN.
Data transmissions are best checked by means of a programmer. Connect a programmer to
each PLC and have it display the DBs, the status bytes and the parameter assignment error
byte. (The format of the status bytes and parameter assignment error byte are shown in
chapter 5.).
Read also section 3.3 "Starting Up a System".
Appendix E contains the cycle delay times of the PLC in connection with data transmissions.
8-14
Fetch indication
BI/BY/W/D: BI
Only the indications of layer 2 services are
fetched in this FB
If receive is not enabled or the
STBR bit "Receive viable"
is not set
End
Invoke L2-RECEIVE
Job number for indication = 148
Data are stored in DB
DB34 in this case
Data are stored starting at DW 10
Wildcard length"
"
*******
Save parameter assignment error
byte for subsequent evaluation
*******
If no parameter assignment error has
occurred and STBR bit "Completed with
error" is not set, reset receive enable
S5-95U, SINEC L2
Explanation
EWA 4NEB 812 6112-02

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinec l2S5-95u

Table of Contents