Chapter 4
Chapter 4
PROFIBUS DP Services
Read Diagnostic
Upload, Download
(De)Activate Parameters Master Class 2
Master Class 1
(De)Activate Slaves
Set Operation Mode
Read Diagnostic
Controls the Field Devices
Set Station Address
Parameterization
Read Configuration
Configuration
Read I/O
Cyclic Data Exchange
Take Over Control of 1 Slave
Read Diagnostic
Parameterization
Configuration
Data Exchange
Field Device (Slave)
! Master Class1 and/or Class 2 and/or Slave can be implemented in one Device !
s PROFIBUS Details
Date 06/22/00, Page 1
PROFIBUS Details
Electronic... (continued) GSD
s PROFIBUS Details
Date 06/22/00, Page 2
PROFIBUS Details
Electronic... (continued) GSD
French = “.gsf”
German = “.gsg”
Italian = “.gsi”
Portuguese = “.gsp”
Spanish = “.gss”
s PROFIBUS Details
Date 06/22/00, Page 3
PROFIBUS Details
Electronic... (continued) - File Structure GSD
#Profibus_DP
s PROFIBUS Details
Date 06/22/00, Page 4
PROFIBUS Details
File Structure... (continued) GSD
Vendor/Manufacturer Name
s PROFIBUS Details
Date 06/22/00, Page 5
PROFIBUS Details
File Structure... (continued) GSD
1=Station Expandable
s PROFIBUS Details
Date 06/22/00, Page 6
PROFIBUS Details
Data Exchange - SYNC/UNSYNC
In Normal Mode, When the Outputs Are Received by the Slave
ASIC, They Are Immediately Given to the Slave Firmware for
Writing to the Physical Outputs
Outputs to Slave Physical Outputs
MASTER DATA x DATA x
Normal Mode
Sync Mode
DATA x
Sync Mode
s PROFIBUS Details
Date 06/22/00, Page 7
PROFIBUS Details
Data Exchange - SYNC/UNSYNC
Receive Buffer User’s Buffer
Outputs (x) to Slave 3 Physical Outputs = x
DATA x DATA x
Time Lag Between Data
Outputs (y) to Slave 4 Physical Outputs = y Appearing at Physical
DATA y DATA y
Outputs of Different Slaves
Outputs (z) to Slave 5 Physical Outputs = z
DATA z DATA z
s PROFIBUS Details
Date 06/22/00, Page 8
PROFIBUS Details
Data Exchange - SYNC/UNSYNC
Receive Buffer User’s Buffer
SYNC Broadcast 3 Physical Outputs = a
DATA a DATA
DATA ax
Data is Immediately
Transferred to User’s
4 Physical Outputs = a Buffer & Physical Outputs
DATA a DATA ay Appear “Simultaneously”
For All Slaves in Groups
Indicated
5 Physical Outputs = a
DATA a DATA az
Data is Immediately
UNSYNC Broadcast Physical Outputs = b Transferred to User’s
DATA b DATA a
b
Buffer, Physical Outputs
Appear “Simultaneously”
& Slaves Go Back Into
Physical Outputs = b Normal Mode For All Slaves
DATA b DATA
DATA ab
in Groups Indicated
s PROFIBUS Details
Date 06/22/00, Page 9
PROFIBUS Details
PROFIBUS Demo
C””
YNNC
“SSY
r ee “
u
ttu r
a
FFeea
s PROFIBUS Details
Date 06/22/00, Page 10
PROFIBUS Details
PROFIBUS Message Structure
= Included in FCS
s PROFIBUS Details
Date 06/22/00, Page 11
PROFIBUS Details
PROFIBUS Character Format
Start Data Data Data Data Data Data Data Data Parity Stop
Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit
“0” 0 1 2 3 4 5 6 7 “1”
LSB MSB
s PROFIBUS Details
Date 06/22/00, Page 12
PROFIBUS Details
Communication Ports (Service Access Points)
Is it…? Parameterization
Configuration
Output Data
Diagnostic Request
s #24
d d res
S A
U
FIB
You got PRO
mail...
s PROFIBUS Details
Date 06/22/00, Page 13
PROFIBUS Details
Communication Ports (continued)
au lt 2 1
Def #6 #6
#60 P SAP SAP
SAP SA
You got
mail...
s #24
d d res
S A
U
It is: FIB
PRO
Configuration
s PROFIBUS Details
Date 06/22/00, Page 14
PROFIBUS Details
Communication Ports (continued)
DP Master DP Slave
Function
Dec. Hex Dec. Hex
Data_Exchange - - - -
RD_Inp 62 3E 56 38
RD_Outp 62 3E 57 39
Slave_Diag 62 3E 60 3C
Set_Prm 62 3E 61 3D
Chk_Cfg 62 3E 62 3E
Get_Cfg 62 3E 59 3B
Global_Control 62 3E 58 3A
Set_Slave_Add 62 3E 55 37
-
s PROFIBUS Details
Date 06/22/00, Page 15
PROFIBUS Details
High-Speed Data Exchange - Startup Sequence
s PROFIBUS Details
Date 06/22/00, Page 16
PROFIBUS Details
Startup Sequence (continued)
s PROFIBUS Details
Date 06/22/00, Page 17
PROFIBUS Details
Startup Sequence - Parameterization
SD LE LEr SD DA SA FC DSAP SSAP DU.. FCS ED
Up to 244 Bytes
s PROFIBUS Details
Date 06/22/00, Page 18
PROFIBUS Details
Parameterization (continued)
Parameters are sent once after Power On/Reset
First 7 bytes are mandatory for every field device
Mandatory parameterization consists of:
Response Monitoring Time
TSDR Time for Master/Slave Timing
Freeze/Sync Mode
Lock or Unlock Slave for this Master
Assignment to Group
Master Address
Ident Number
s PROFIBUS Details
Date 06/22/00, Page 19
PROFIBUS Details
Parameterization (continued) - Mandatory
7 0
Octet 1
Reserved
WD_ON (1=Response Monitoring (Watchdog) Activated)
Freeze_Req (1=Support of Freeze Mode Required)
Sync_Req (1=Support of Sync Mode Required)
Unlock (See Table below)
Lock (See Table below)
s PROFIBUS Details
Date 06/22/00, Page 20
PROFIBUS Details
Parameterization - Mandatory (continued)
Octet 2 WD_Fact_1
s PROFIBUS Details
Date 06/22/00, Page 21
PROFIBUS Details
Parameterization (continued) - Device Related
s PROFIBUS Details
Date 06/22/00, Page 22
PROFIBUS Details
Parameterization (continued) - Example GSD File
s PROFIBUS Details
Date 06/22/00, Page 23
PROFIBUS Details
Startup Sequence (continued)
s PROFIBUS Details
Date 06/22/00, Page 24
PROFIBUS Details
Startup Sequence - Configuration
SD LE LEr SD DA SA FC DSAP SSAP DU.. FCS ED
Up to 244 Bytes
s PROFIBUS Details
Date 06/22/00, Page 25
PROFIBUS Details
Configuration (continued)
Configuration is sent once after Power On/Reset
Master sends configurations to Slaves
– any device-specific configuration
– I/O configuration
Slave confirms receipt with short acknowledge
acknowledge configuration (Short Acknowledge “E5”h)
check configuration information for validity
s PROFIBUS Details
Date 06/22/00, Page 26
PROFIBUS Details
Configuration (continued) - Simple Format
Additional Configuration Data (Simple and/or Special Format)
7 0
Identifier 1 (1 Byte per Module for Simple Format)
Data Length for Input and/or Output Data (NOT for Special Format)
0000=1 Byte/Word...
1111=16 Bytes/Words
Data Definition
00=Special Format (see page 28)
01=Input
10=Output
11=Input & Output
Size Data Unit (NOT for Special Format)
0=Byte
1=Word
Data Consistency (NOT for Special Format)
0=Byte/Word
1=Whole Length
s PROFIBUS Details
Date 06/22/00, Page 27
PROFIBUS Details
Configuration (continued) - Example Simple Format
0 1 1 0 1 0 1 0
Data Length
1010=11 Words
Data Definition
10=Output
s PROFIBUS Details
Date 06/22/00, Page 28
PROFIBUS Details
Configuration (continued) - Special Format
Header
s PROFIBUS Details
Date 06/22/00, Page 29
PROFIBUS Details
Configuration (continued) - Special Format
Header
s PROFIBUS Details
Date 06/22/00, Page 30
PROFIBUS Details
Configuration (continued) - Example Special Format
s PROFIBUS Details
Date 06/22/00, Page 31
PROFIBUS Details
Configuration (continued) - Example Telegram
= Simple Format
= Special Format
s PROFIBUS Details
Date 06/22/00, Page 32
PROFIBUS Details
Configuration (continued) - Example GSD File
s PROFIBUS Details
Date 06/22/00, Page 33
PROFIBUS Details
Startup Sequence (continued)
s PROFIBUS Details
Date 06/22/00, Page 34
PROFIBUS Details
Startup Sequence - Data Exchange Request
SD LE LEr SD DA SA FC DU.. FCS ED
Up to 244 Bytes
Application Specific
Data
s PROFIBUS Details
Date 06/22/00, Page 35
PROFIBUS Details
Startup Sequence - Data Exchange Response
SD LE LEr SD DA SA FC DU.. FCS ED
Up to 244 Bytes
Application Specific
Data
s PROFIBUS Details
Date 06/22/00, Page 36
PROFIBUS Details
Data Exchange (continued) - Example GSD File
s PROFIBUS Details
Date 06/22/00, Page 37
PROFIBUS Details
Startup sequence (continued) - Diagnostic
When does the master request diagnostic?
Before sending the parameter download to make sure
the field device is available
Before entering the data exchange mode to validate
parameters and configuration and make sure the field
device is ready
During data exchange whenever indicated by the field
device
s PROFIBUS Details
Date 06/22/00, Page 38
PROFIBUS Details
Diagnostic (continued)
Are you there?
Power ON/ (Check whether field device is available)
Reset
I/O Configuration
What happened?
(Master fetches diagnostic as indicated by
field device)
Data Exchange
s PROFIBUS Details
Date 06/22/00, Page 39
PROFIBUS Details
Diagnostic (continued) - How is it indicated
during the Data Exchange?
SD LE LEr SD DA SA FC DU.. FCS ED
0x68 x x 0x68 x x 0x0A x .. x 0x16
Up to 244 Bytes
Application Specific
Data
s PROFIBUS Details
Date 06/22/00, Page 40
PROFIBUS Details
Diagnostic (continued) - Request to Field Device
s PROFIBUS Details
Date 06/22/00, Page 41
PROFIBUS Details
Diagnostic
(continued) --Response
Startup Sequence from Field Device
Parameterization
SD LE LEr SD DA SA FC DSAP SSAP DU.. FCS ED
Up to 244 Bytes
s PROFIBUS Details
Date 06/22/00, Page 42
PROFIBUS Details
Diagnostic (continued) - Mandatory
7 0
Octet 1
s PROFIBUS Details
Date 06/22/00, Page 43
PROFIBUS Details
Diagnostic - Mandatory (continued)
7 0
Octet 2
s PROFIBUS Details
Date 06/22/00, Page 44
PROFIBUS Details
Diagnostic - Mandatory (continued)
Octet 3
Reserved
Diag.Ext_Overflow (Too much extended diagnostic data)
Octet 4 Diag.Master_Add (Address of controlling master; FFh if none)
s PROFIBUS Details
Date 06/22/00, Page 45
PROFIBUS Details
Diagnostic (continued) - Optional: Device Related
Data length
(including header)
00 (Fixed)
s PROFIBUS Details
Date 06/22/00, Page 46
PROFIBUS Details
Diagnostic Device Related (continued) - Example
GSD File
s PROFIBUS Details
Date 06/22/00, Page 47
PROFIBUS Details
Diagnostic (continued) - Optional: Identifier Related
Data length
(including header)
01 (Fixed)
s PROFIBUS Details
Date 06/22/00, Page 48
PROFIBUS Details
Diagnostic Identifier Related (continued) - Example
s PROFIBUS Details
Date 06/22/00, Page 49
PROFIBUS Details
Diagnostic (continued) - Optional: Channel Related
s PROFIBUS Details
Date 06/22/00, Page 50
PROFIBUS Details
Diagnostic Channel Related (continued) - Example
s PROFIBUS Details
Date 06/22/00, Page 51
PROFIBUS Details
Data Exchange (continued) - DP Master
Four main operation modes for a DP Master:
OFFLINE - No activity
STOP - Communication to a Master Class 2 possible;
no communication to field devices
CLEAR - Master communicates with field devices;
output data are set to “0” or output length = 0 in case
of field devices that support “Fail Safe” feature
OPERATE - Standard operation mode; data exchange
between master and field devices
s PROFIBUS Details
Date 06/22/00, Page 52
PROFIBUS Details
Data Exchange (continued) - DP Master
“Global_Control” Telegram
Sent as broadcast (= message to all stations)
Destination address = 127
Used in CLEAR and OPERATE to inform field devices
of the current operation mode of the Master
Used to signal change in operation mode from CLEAR
to OPERATE and vice-versa
Used to select groups of field devices for operation in
SYNC and/or FREEZE mode
s PROFIBUS Details
Date 06/22/00, Page 53
PROFIBUS Details
Data Exchange (continued) - Global Control
SD LE LEr SD DA SA FC DSAP SSAP DU.. FCS ED
s PROFIBUS Details
Date 06/22/00, Page 54
PROFIBUS Details
Data Exchange (continued) - DP Master
AUTOCLEAR
Feature can be specified during network configuration
Master automatically switches operation mode from
OPERATE to CLEAR if one or more field devices do
not answer within a defined time frame
To indicate the mode change, the Master sends a
“Global_Control” telegram with the CLEAR command
The switch back to OPERATE must be initiated by the
user/application
s PROFIBUS Details
Date 06/22/00, Page 55