Siemens SIMATIC S5 Manual page 149

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

Advertisement

S5-95U, SINEC L2
8.3
Assigning the S5-95U Parameters for Data Communications
There is no default setting in DB1 for layer 2 accesses. You assign the following parameters in DB1:
The location of a 'Send' status byte for L2-SEND and L2-RECEIVE with the corresponding SAP
number.
The location of a 'Receive' status byte for L2-RECEIVE with the corresponding SAP number.
All STBs must be in the flag area. The status byte flags the status of the send and/or receive job,
and informs you of any errors ( section 5.4).
The byte following the status byte is always reserved as the length byte. This byte indicates how
many bytes of data have been received.
Defining the job numbers for a PLC ( chapter 5):
Define a job number for the request and confirmation in L2-SEND.
Define a job number in L2-RECEIVE for the indication.
The following applies to a PLC:
Job
Job
numbers
in the
L2 FBs
Figure 8-5 gives an example of the interaction of DBs, STBs and L2 FBs for data communications
using layer 2 services.
In the example, the request is sent with L2-SEND and A-NR 48. The confirmation is fetched with A-
NR 48 and L2-RECEIVE. The status byte for both jobs is FY 77. The indication is fetched with A-NR
149 and L2-RECEIVE; the status byte is FY 79.
DB1
SL2:
...
STBS 48 MB77
STBR 49 MB79
...
Figure 8-5. Schematic: Data Transmission Using Layer 2 Services
EWA 4NEB 812 6112-02
A-NR for request/confirmation = SAP number
A-NR for indication = SAP number + 100.
Table 8-2. Defining Job Numbers in the L2 FBs
Send Job with L2-
SEND
33
34
.
.
.
54
64
'Send' status byte FY 77
Length byte FY 78
'Receive' status byte FY 79
Length byte FY 80
Data Transmission by Accessing Layer 2 Services
Fetch Confirmation
with L2-RECEIVE
33
34
.
.
.
54
64
L2-SEND
.
A-NR
: KY 0,48
.
DBNR : KY 0,21
QANF : KF 0
.
L2-RECEIVE
.
A-NR
: KY 0,48
.
DBNR : KY 0,22
ZANF
: KF 1
.
L2-RECEIVE
.
A-NR
: KY 0,149
.
DBNR : KY 0,23
ZANF
: KF 1
.
Fetch Indication with
L2-RECEIVE
133
134
.
.
.
154
164
DB21
DW 0
.
.
.
DB22
DW 1
.
.
.
DB23
DW 1
.
.
.
8-9

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinec l2S5-95u

Table of Contents