Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 24

PROFIBUS - Frame

Data Link Layer (Layer 2)


Fieldbus Data Link ( FDL )

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.1
Information- and Trainings-Center
Knowledge for automation
Frame Characters

Universal Asynchronous Receiver/Transmitter for


 UART Characters Start-Stop characters

Bit string on 1 2 3 4 5 6 7 8 9 10 11
the line

Bit significance (I) 20 27


LSB MSB
0 b1 b2 b3 b4 b5 b6 b7 b8 P 1

Start bit (ST) Stop bit (SP)


Parity bit even

1 Start bit ST with binary "0" signal


8 Information bit I with binary "0" or "1" signal
1 Parity bit EVEN P with binary "0" or "1" signal
1 Stop bit SP with binary "1“ signal

LSB Least Significant Bit


MSB Most Significant Bit

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.2
Information- and Trainings-Center
Knowledge for automation
Frame Formats with Hamming Distance 4 (HD = 4)
 Formats with fixed information field length without data unit
Format of the request frame:

SYN SD1 DA SA FC FCS ED

L
Format of the acknowledgement frame:

SD1 DA SA FC FCS ED
L
Format of the short acknowledgement frame):

SC SYN = Synchronization bits, at least 33 bits idle


SD1 = Start delimiter 1, code: 10H
DA = Destination address
SA = Source address
FC = Frame control
FCS = Frame check sequence)
ED = End delimiter, code: 16H
L = Information field length, fixed No. of bytes, L=3

SC = Single character, code: E5H

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.3
Information- and Trainings-Center
Knowledge for automation
Frame Formats with Hamming Distance 4 (HD = 4)
 Formats with fixed information field length with data unit

Format of the Send/Request frame:

SYN SD3 DA SA FC D A T A _U N IT ED
L

Format of the acknowledgement frame:

SD3 DA SA FC DATA_UNIT FCS ED


L

SYN = Synchronization bits, at least 33 bits idle


SD3 = Start delimiter 3, code: A2H
DA = Destination address
SA = Source address
FC = Frame control)
DATA_UNIT = Data unit, fixed length (L-3) = 8 bytes
FCS = Frame check sequence)
ED = End delimiter, code: 16H
L = Information field length, fixed No.of bytes L=11

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.4
Information- and Trainings-Center
Knowledge for automation
Frame Formats with Hamming Distance 4 (HD = 4)
 Formats with variable information length

Format of the Send/Request frame:

SYN SD2 LE LE r SD2 DA SA FC DATA_UNIT FC S ED

L
Format of the response frame:

SD2 LE LE r SD2 DA SA FC DATA_UNIT FC S ED

SYN = Synchronization bits, at least 33 bits idle


SD2 = Start delimiter 2, code: 68H
LE = Length, value: 4 to 249
LEr = Length repeat
DA = Destination address
SA = Source address
FC = Frame control
DATA_UNIT = Data unit, fixed length (L-3), max. 246 bytes
FCS = Frame check sequence
ED = End delimiter, code: 16H
L = Information field length, variable No. of bytes L = 4 to 249

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.5
Information- and Trainings-Center
Knowledge for automation
Token Frame

 Token

S YN SD 4 DA SA

SYN = Synchronization bits, at least 33 bits idle


SD4 = Start delimiter 4, code: DCH
DA = Destination address)
SA = Source address)

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.6
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Length bytes LE and LEr

Format of the Send/Request frame, Hd = 4:

SYN SD2 LE LEr SD2 DA SA FC DATA_UNIT F C S ED

b8 b1
27 20

Hd=4: L=4 to 249

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.7
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Address bytes

b8 b1
SA Source address byte
EXT 26 20

Address
SA = 0 to 126

SYN SD2 LE LEr SD2 DA SA FC DATA_UNIT F C S ED

b8 b1
DA Destination address byte
E XT 26 20

Address
DA = 0 to 127

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.8
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Address bytes

b8 b1
E XT 26 20

Address

EXT = 0 : No address extension in the DATA_UNIT


EXT = 1 : Address extension follows in the DATA_UNIT

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.9
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 DAE / SAE bytes in the frame

EXT=1 EXT=0

DA SA FC D AE FC S ED

DATA_UNIT

EXT=0 EXT=1

DA SA FC SAE FC S ED

DATA_UNIT

EXT=1 EXT=1

DA SA FC DAE S AE FC S ED

DATA_UNIT

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.10
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Address extension byte

DATA_UNIT
EXT=1 EXT=1

DA SA FC DAE SAE

b8 b7 b6 b1
EXT TYP 25 20

Address

b7 identifies the type

b8 indicates an additional address extension

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.11
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Link Service Access Point (LSAP)

Station 1 Station 2

SAE DAE
Associations
between the stations

SA DA

PROFIBUS

DA SA

LSAPs = Layer 2 connection


DAE SAE
SSAP (source) DSAP (destination)
FDL User 1 FDL User 2
DSAP (dest.) SSAP (source)

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.12
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Service Access Points (SAP)

Link
Link
Service
LSAP
LSAP Service
Access
Access
Point
Point

Source
Source
Service
SSAP
SSAP Service
Access
Access
Point
Point

Destination
Destination
Service
DSAP
DSAP Service
Access
Access
Point
Point

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.13
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Frame control byte, FC
b8 b7 b6 b5 b4 b1
3 0
1 FCB FCV 2 2
Res Frame Function Function:
0 Stn-Type Transmission function

Stn-Type: (Station Type and FDL Status)


b6 b5
0 0 = passive station
0 1 = active station not ready
1 0 = active station ready for the logical token ring
1 1 = active station in the logical token ring
FCB = Frame Count Bit: 0/1. Alternating call sequence bit
FCV = Frame Count Bit valid
0 = alternating function of the FCB invalid
FCV 1 = alternating function of the FCB valid
Frame Type:
b6 b5
1 = (Send and/or Request; Primary)
0 = (Acknowledgement/Response; Secondary) FCB FCV
0 0 = do not evaluate FCB (b6)
x 1 = evaluate FCB (b6), X=0 or 1
1 0 = save FCB (b6)
Res: Reserved (IEC-TC 57,P.5-2)

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.14
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Frame Count Bit, FCB
FC = Frame Control
Station 1 Station 2
active FC active/passive
Send/Request frame

TS = 1 TS = 2
FC byte
FCV = 0 Save SA + FCB
SA = 1 Send/Request 1 FCB = 1 SA = 1
FCB = 1
Acknowledgement/Response
FC byte
SA = 1 Send/Request 2 FCV = 1
FCB = 0
Evaluate FCB
FCB = 0

Acknowledgement/Response
FC byte

SA = 1 Send/Request 3 FCV = 1
FCB = 1
Evaluate FCB
FCB = 1

Acknowledgement/Response

The frame count bit prevents duplication or loss of messages

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.15
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Frame Count Bit
FCB, FCV at the responder
b8 b7 b6 b5 b4 b1
3 0
1 FCB FCV 2 2 FCBM = Saved FCB
Res Function
Frame SAM = Saved SA

FCB FCV Condition Meaning Action


0 0 DA = TS/127 Call without acknowledgement Delete last
Call FDL Status / Ident/LSAP Status acknowledgement/response
0/1 0/1 DA  TS Call to the other responder Delete last acknowl./response
1 0 DA = TS Initial call FCBM := 1 SAM := SA
Delete last acknowl./response
0/1 1 DA = TS New call FCBM := FCB
SA = SAM Delete last acknowl./response
FCB  FCBM Keep acknowl./response in
readiness for repetition
0/1 1 DA = TS Call repetition FCBM := FCB
SA = SAM Repeat acknowl./response and
FCB  FCBM continue to keep in readiness
0/1 1 DA = TS New Initiator FCBM := FCB SAM := SA
SA  SAM Keep acknowl./response in
readiness for repetition
-- -- Token Telegram Delete last acknowl./response

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.16
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Transmission function code

Aufruf-Telegramme

Function Abkürzung Code Nr.

IEC-TC 57, P.5-2, FC-Code 0-2 0-2


Send Data with Acknowledge low SDA low 3
Send Data with No Acknowledge low SDN low 4
Send Data with Acknowledge high SDA high 5
Send Data with No Acknowledge high SDN high 6
Reserved / Req. Diagnosis-Data 7
IEC-TC 57, P.5-2, FC-Code 8 8
Request FDL-Status with Reply FDL-Status 9
Reserve 10
Reserve 11
Send and Request Data low SRD low 12
Send and Request Data high SRD high 13
Request and Ident with Reply Ident 14
Request LSAP-Status with Reply LSAP-Status 15
(Code Nr. 14 und 15: FMA 1/2)

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.17
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Transmission function code
Send/Request frame; Primary)

Frame control byte (FC)

b8 b7 b6 b5 b4 b3 b2 b1 b4 b3 b2 b1 Code Nr.
2
3
2
2
2
1
2
0 0 0 0 0 0
Res 1 FCB FCV 0 0 0 1 1
Function 0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10
1 0 1 1 11
1 1 0 0 12
Frame 1 1 0 1 13
Type Send/Request frame 1
1
1
1
1
1
0
1
14
15
b7 = 1

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.18
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Transmission function code
Quittungs-Telegramme
Function Abküzung Code Nr.

ACKnowledgement positive OK 0 *
ACK negative UE 1
FDL/FMA 1/2 - User Error
ACK negative RR 2
no Resource for Send Data (& no Response FDL-Data)
ACK negative RS 3
no Service activated
Reserve 4 -7
Response FDL/FMA 1/2-Data low (& Send Data ok) DL 8
ACK negative NR 9 *
no Response FDL/FMA 1/2-Data (& Send Data ok)
Response FDL-Data high (& Send Data ok) DH 10
Reserve 11
Response FDL-Data low RDL 12
no Resource for Send Data
Response FDL-Data high RDH 13
no Resource for Send Data
Reserve 14, 15

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.19
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Transmission function code
Acknowledgement / Response frame; Secondary)

Frame control byte (FC)

b8 b7 b6 b5 b4 b3 b2 b1 b4 b3 b2 b1 Code Nr.
2
3
2
2
2
1
2
0 0 0 0 0 0
Res 0 Stn Type 0 0 0 1 1
Function 0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10
1 0 1 1 11
1 1 0 0 12
Frame
Type
Acknowledgement 1
1
1
1
0
1
1
0
13
14
b7 = 0 frame 1 1 1 1 15

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.20
Information- and Trainings-Center
Knowledge for automation
Length, Address, Frame Control and Frame Check
Sequence Bytes
 Frame check sequence (FCS)

Format of the Request frame

SYN SD1 DA SA FC FC S ED

Format of the Send/Request frame

SYN SD2 LE LEr SD2 DA SA FC DATA_UNIT FCS ED

FCS byte

b8 b1
27 20

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.21
Information- and Trainings-Center
Knowledge for automation
Data Unit

 Address part
max. 4 address extension bytes
 Data unit, Hd=4
max. 246 bytes

SYN SD2 LE LEr SD2 DA SA FC DATA_UNIT FCS ED

DAE / SAE

Address part Data part

DATA_UNIT

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.22
Information- and Trainings-Center
Knowledge for automation
Data Unit

 Data part for Ident remote management service

Response frame

SD2 LE LEr SD2 DA SA FC DATA_UNIT FCS ED

LE _VN LE_C T LE_H R LE_SR Vendor_nam e

Ident data part

C ontroller_type H W _release S W _release

Ident data part

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.23
Information- and Trainings-Center
Knowledge for automation
Data Unit

 Data part for LSAP Status remote management service


LSAP Status data part

Response frame

SD2 LE LEr SD2 DA SA FC DATA_UNIT FCS ED

b8 b5 b4 b1
Byte 1 Access

Address-Extension

Role_in_service Service_type

“ “

“ “

Byte 6 Role_in_service Service_type

SIMATIC NET
Siemens AG 1998. All rights reserved.
date:
file:
01.08.21
7Kdp_Fr.24
Information- and Trainings-Center
Knowledge for automation

You might also like