PROFIBUS Telegrams1
PROFIBUS Telegrams1
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 1 of 13
Master/Slave startup sequence DP Slave state machine
Power on/
Set slave address (from a class II master) can only be performed
before parameterisation (while slave is in wait PARAM state).
reset
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 2 of 13
Set Parameterisation The Set_PRM.Req telegram from the master to the slave contains communication parameters, expected functions, device related parameters and Identification
Number. The Slave has to check whether the requested parameters and functions are allowed/supported or not.
Parameterisation Data Unit (DU) minimum 7bytes, but can contain up to 244 bytes
First 7 bytes are mandatory for every Slave Device and module related Parameter Data (optional)
1……………………………………………………….. 7 8 ……………………………………………………………………………244
Description for the 7 mandatory parameter bytes (according to the PROFIBUS DP Standard):
Byte(Octet) 1: Byte (Octet) 2: Byte (Octet) 3: Byte (Octet) 4: Byte (Octet) 5: Byte (Octet) 6: Byte (Octet) 7: Byte (Octet) 8:
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Extended Parameters
0 0 0 0-255DEC (0-FFHEX) 0-255DEC (0-FFHEX) 0-255DEC (0-FFHEX) 0-255DEC (0-FFHEX) 0-255DEC (0-FFHEX) x x x x x x x x Device and module related
x (DPV1 Status bytes, see p8)
x
x
x Watchdog Factor 1 Watchdog Factor 2 Min. station response PROFIBUS ID No. PROFIBUS ID No. Group assignment
x (WD1) (WD2) time ( TSDR) (MSB) (LSB)
UNLOCK flag (1= Master unlocks slave for other masters)
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 3 of 13
Check Configuration The purpose of the check configuration telegram is to compare the configured I/O (master system) with the real I/O of the slave. The slave will execute the compaison
and check the configuration whether it is valid or not.
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 4 of 13
Diagnostic Response The purpose of the DIAG_res is to inform the master about the slave status and whether the slave accepted the parameter and configuration data from the
master or a parameterisation and configuration is still required.
Diag.req: Entire transferred Request Telegram (Master Æ Slave): Has no Data Unit (DU)
SD LE LEr SDr DA SA FC DSAP SSAP FCS ED
68hex xx xx xx xx xx xx 3Chex 3Ehex xx 16hex
Diagnostic Data Unit (DU) min. 6bytes, but can contain up to 244 bytes
First 6 bytes are mandatory for every Slave device related Diag block Identifier-module related Diag block Channel related Diag block(s)
(mandatory) (optional) (optional) (optional)
1………………………………………………………………6 7……………………………………………………………………………………………………………………………………………....…244
PROFIBUS International
Response monitoring/ Watchdog ON (1=ON ; 0=OFF)
255DEC (FFHEX)
Slave does not support requested parameter function
or parameterised by
Diag overflow: Has more diag data as it can report
Config_Fault: slave did not accept last config data
any Master
Slave has extended Diag data to report an error
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 5 of 13
Extended Diagnostic Data The extended Diag data are additional diagnostic information beside the 6 mandatory bytes. 3 different kind of ext. diag are possible ‘device
related’ ‘identifier related’ and ‘channel related’. The device vendor defines the order or existence of the extended Diag blocks.
Extended Diagnostic Data
First 6 bytes are mandatory for every Slave device related Diag block Identifier-module related Diag block Channel related Diag block(s)
(mandatory) (optional) (optional) (optional)
1………………………………………………………………6 7……………………………………………………………………………………………………………………………………………....…244
Header byte Device related diag. data bytes Header byte Identifier (module) related diag. data bytes Header byte Channel related diag. data
00xx xxxx 1 - 62 bytes 01xx xxxx 1 – 62 bytes 10 xx xxxx always 2 bytes (3 bytes incl. header)
Header Byte (device related Diag) Header Byte (identifier related Diag) Header Byte (channel related Diag)
7 6 5 4 3 2 1 0 Bit 7 6 5 4 3 2 1 0 Bit 7 6 5 4 3 2 1 0 Bit
0 0 Header Byte device related Diag 0 1 Header Byte identifier related Diag 1 0 Header Byte channel related Diag
2 – 63DEC Length of Diag. block incl. Header: 2 – 63DEC Length of Diag. block incl. Header: 0 – 63DEC Reporting Identifier (Module) number
02HEX = 2 bytes 02HEX = 2 bytes e.g.
3FHEX = 63 bytes 3FHEX = 63 bytes 00HEX = Identifier Byte 0 (Mod. 1) has Diag
3FHEX = Identifier Byte 63 (Mod. 64) has Diag
Following device related diag. data bytes Following identifier related diag. data bytes
7 6 5 4 3 2 1 0 Bit 7 6 5 4 3 2 1 0 Bit Byte 2 : (channel related Diag)
Vendor determines Device related diag. data bytes X Identifier Byte 0 (Mod. 1) has Diag 7 6 5 4 3 2 1 0 Bit
the meaning of the bits, (or DPV1 alarm/status see page 10) X Identifier Byte 1 (Mod. 2) has Diag 0 – 63DEC Reporting Channel number
bit area or bytes X Identifier Byte 2 (Mod. 3) has Diag 0 1 Channel type: Input
X Identifier Byte 3 (Mod. 4) has Diag 1 0 Channel type: Output
X Identifier Byte 4 (Mod. 5) has Diag 1 1 Channel type: Input & Output
X Identifier Byte 5 (Mod. 6) has Diag
X Identifier Byte 6 (Mod. 7) has Diag Byte 3 : (channel related Diag)
X Identifier Byte 7 (Mod. 8) has Diag 7 6 5 4 3 2 1 0 Bit
0 0 1 Channel type: Bit
…Next Bytes (only necessary if device has more than 0 1 0 Channel type: 2 Bits
8 Modules)…. Channel type: 4 Bits
0 1 1
7 6 5 4 3 2 1 0 Bit Channel type: Byte
1 0 0
X Identifier Byte 8 (Mod. 9) has Diag Channel type: Word
1 0 1
…….
1 1 0 Channel type: 2 Words
X Identifier Byte 15 (Mod.16) has Diag
1DEC Error type: Short Circuit
7 6 5 4 3 2 1 0 Bit 2DEC Error type: Under Voltage
3 DEC Error type: Over Voltage
X Identifier Byte 16 (Mod.17) has Diag
……. 4 DEC Error type: Overload
X Identifier Byte 23 (Mod.24) has Diag 5 DEC Error type: Over Temperature
6 DEC Error type: Wire Break
7 6 5 4 3 2 1 0 Bit 7 DEC Error type: Upper Limit Exceeded
X Identifier Byte 24 (Mod.25) has Diag 8 DEC Error type: Lower Limit Exceeded
……. 9 DEC Error type: Error (General)
X Identifier Byte 31 (Mod.32) has Diag 10-15 DEC Error type: Reserved
16-31 DEC Error type: Device Related
………..
………..
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 6 of 13
Global Control The global control telegram is broadcast (all slaves) or multicast telegram (group of slaves) in order to activate or deactivate certain functions for those slaves
simultaneous e.g. CLEAR, SYNC, FREEZE …etc. The telegram is the only PROFIBUS telegram with no response to prevent conflicts.
No response Telegram
The command
Activates FREEZE (freezes input data of the slaves)
Activates SYNC (freezes output data of the slaves)
Reserved
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 7 of 13
DPV1 Extended Parameterisation Telegram
Set_PRM.req: Entire transferred Request Telegram (Master Æ Slave):
SD LE LEr SDr DA SA FC DSAP SSAP DU FCS ED
68hex xx xx xx xx xx xx 3Dhex 3Ehex xx xx … xx 16hex
Entire transferred Response Telegram (Slave Æ Master):
E5hex Only one byte response, short character (SC)
Parameterisation Data Unit (DU) minimum 7bytes, but can contain up to 244 bytes
First 7 bytes are mandatory for every Slave DPV1_Status (3 bytes) Device and module related Parameter Data (optional)
1……………………………………………………….. 7 8 …………………………10 11……………….…………………………………………………………244
Enable_Manufacturer_Specific _Alarm
DPV1_Enable (0 = Disable, 1 = Enable)
Enable_Diagnostic_Alarm
Enable_Pull_Plug_Alarm
Enable_Process_Alarm
Enable_Update_Alarm
Reserved
Reserved
Reserved
Reserved
Reserved
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 8 of 13
DPV1 Extended Configuration Telegram
DPV1 uses the vendor specific configuration data in the special format specifier to give additional information on the data types that are being transferred
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 9 of 13
DPV1 Extended Diagnostics Telegram
Extended Diagnostic Data
First 6 bytes are mandatory for every Slave device related Diag block Identifier-module related Diag block Channel related Diag block(s)
(mandatory) (optional) (optional) (optional)
1………………………………………………………………6 7……………………………………………………………………………………………………………………………………………....…244
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 10 of 13
DPV0 Master-Master Functions and DPV1 Master-Slave Acyclic Functions
DPV1 Acyclic Functions: Entire transferred Request/Response Telegram (Master Æ Slave):
SD LE LEr SDr DA SA FC DSAP SSAP DU FCS ED
68hex xx Xx xx xx xx xx xx xx xx xx … xx 16hex
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 11 of 13
PA Profile – Cyclic data and Status byte
Cyclic data exchange transmitted as 5 bytes, containing the process value as a 32-bit float plus status as an unsigned 8-bit byte:
Status byte:
7 6 5 4 3 2 1 0 Bit 7 6 5 4 3 2 1 0 Bit
1 0 GOOD - non cascade 0 0 BAD
0 0 0 0 Ok 0 0 0 0 Non-specific
0 0 0 1 Update event 0 0 0 1 Configuration error
0 0 1 0 Active advisory alarm 0 0 1 0 Not connected
0 0 1 1 Active critical alarm 0 0 1 1 Device failure
0 1 0 0 Unacknowledged update event 0 1 0 0 Sensor failure
0 1 0 1 Unacknowledged advisory alarm 0 1 0 1 No communication (last usable value)
0 1 1 0 Unacknowledged critical alarm 0 1 1 0 No communication (no usable value)
1 0 0 0 Initiate fail safe 0 1 1 1 Out of service
1 0 0 1 Maintenance required 0 1 UNCERTAIN
1 1 GOOD - cascade 0 0 0 0 Non specifiv
0 0 0 0 Ok 0 0 0 1 Last usable value
0 0 0 1 Initialisation acknowledged 0 0 1 0 Substitute value
0 0 1 0 Initialisation request 0 0 1 1 Initial value
0 0 1 1 Not invited 0 1 0 0 Sensor conversion not accurate
0 1 0 1 Do not select 0 1 0 1 Engineering unit violation (unit not in the valid set)
0 1 1 0 Local override 0 1 1 0 Sub normal
1 0 0 1 Initiate fail safe 0 1 1 1 Configuration error
0 0 No limit 1 0 0 0 Simulated value
0 1 Low limit 1 0 0 1 Sensor calibration
1 0 High limit 0 0 No limit
1 1 Constant 0 1 Low limit
1 0 High limit
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 12 of 13
Common Diagnostic Responses (first two bytes in PDU):
First two Action
Other Helpful Information Diag Bytes
02 05 …. slave is not ready (no parameterisation received yet) Wait until Master has sent a PRM
and CFG telegram
HEX - BIN - DEC conversion no configuration received yet or slave not ready with Check whether the master has sent
02 04 ….
configuration check (Watchdog = OFF) a CFG, otherwise check next cycles
Hex Binary Decimal no configuration received yet or slave not ready with Check whether the master has sent
02 0C ….
0 0000 0 configuration check (Watchdog = ON) a CFG, otherwise check next cycles
1 0001 1 42 05 …. PRM_Fault: wrong ID, invalid WD factor (=00) or Check the set parameter telegram
2 0010 2 wrong device related parameters (ID number, user PRM data and
3 0011 3 length)
4 0100 4 12 05 …. Function_not_supp: Either SYNC or FREEZE bits are Check the set parameter telegram
set in PRM telegram but not supported from slave and whether the slave supports the
5 0101 5 requested function or not
or reserved bits are set in PRM telegram
6 0110 6 wrong parameterisation + not supported functions Check the set parameter telegram
52 05 ….
7 0111 7 within PRM telegram (ID number, user PRM data and
8 1000 8 length, supported functions)
9 1001 9 08 04 …. slave has extended diagnostic data + is in Data Check the extended Diagnostic
A 1010 10 exchange mode (Watchdog = OFF) data
B 1011 11 08 0C …. slave has extended diagnostic data + is in Data Check the extended Diagnostic
exchange mode (Watchdog = ON) data
C 1100 12
0A 05 …. slave has extended diagnostic data + no PRM and Wait until Master has sent a PRM
D 1101 13 config received yet and CFG telegram, if the ext. Diag
E 1110 14 is still ON check the ext. Diag. data
F 1111 15 06 05 …. Config_Fault: slave received wrong configuration or Check the configuration telegram
an output data telegram with wrong length and compare the config data and
length with the expected (real) data
0E 05 …. slave received wrong configuration + has extended Check the configuration telegram
diagnostics
00 04 …. slave is happy and in Data exchange (Watchdog = Slave just reports everything is OK.
OFF) Check the master addr. in the diag.
00 0C …. slave is happy and in Data exchange (Watchdog = Slave just reports everything is OK.
ON) Check the master addr. in the diag.
00 06 …. slave has static diagnostic, but is in data exchange Try to reset the device or check the
(master requests only diag, until bit is reset) manual for possible reasons
02 07 slave has static diagnostic and must be parameterised Wait until Master has sent a PRM
and configured and CFG telegram
PROFIBUS_Telegrams.doc PROFIBUS Certified Engineer Course, Version 7.0, December 2008 © A. Verwer Page 13 of 13