Evaluation of the PROFIBUS DP Diagnostic Message
 
Overview
During the addressing of the PROFIBUS devices, the diagnostic data addresses are given as well as the input and output data addresses.
Input references are assigned to the diagnostic data. These do not have to have any connection to the Momentum module’s input data but can be assigned to any input area in the PLC’s state memory.
If new diagnostic data is issued, a bit is set by the slave (e.g. by a Momentum I/O module). If the master detects this bit, it automatically requests the diagnostics.
Structure of the Diagnostic Message
The diagnostic data includes 19 bytes per Momentum module:
The standard diagnostics are identical for all DP slaves, the length and content of the enhanced diagnostics is manufacturer-specific.
Structure of the diagnostic message
Byte No.
Diagnostics Type
Contents
1
Standard diagnostics
Station status 1
2
Station status 2
3
Station status 3
4
Master address
5
Ident no. of the 170 DNT 110 00 (high byte)
6
Ident no. of the 170 DNT 110 00 (low byte)
7
Enhanced diagnostics (specifically for Momentum)
Diagnostics header for I/O bases
8
I/O error
9
Parameter control (prm_control)
10
Firmware version and index of the 170 DNT 110 00
11
12
13
14
15
16
reserved
17
reserved
18
Ident code of the I/O base (high byte)
19
Ident code of the I/O base (low byte)
NOTE: If you want to save memory, please note that bytes 10 .. 19 do not have to be stored in the PLC’s state memory.
Station Byte 1 (Diagnostic Byte 1)
Diagnostic byte 1
Bit
Function
Meaning, if Bit = 1
0
Station Non Existent
Master cannot establish communication with slave
1
Station Not Ready
Slave cannot establish communication with master
2
Config Fault
Error in configuration data for slave
3
Extended Diagnosis
Slave provides extended diagnostics as well as standard diagnostics
4
Not supported
A function has been called that the slave does not support
5
Invalid Slave Response
Master received an implausible response from slave
6
PRM Fault
Set by the slave in the case of incorrect bus parameters
7
Master Lock
The slave was parameterized by another master from the one that provided the diagnostic data
Station Byte 2 (Diagnostic Byte 2)
Diagnostic byte 2
Bit
Function
Meaning, if Bit = 1
0
PRM Request
Slave requires new bus parameters
1
Static Diagnostics
Slave reports that it has received invalid I/O data/parameters
2
Const. 1
Slave reports that it is ready for operation
3
Watchdog On
Watchdog is active
4
Freeze Mode
Slave received the "freeze" command
5
Sync Mode
Slave received the "Sync" command
6
Not used
7
Deactivated
Master reports that the slave is inactive
Station Byte 3 (Diagnostic Byte 3)
Diagnostic byte 3
Bit
Function
Meaning, if Bit = 1
0... 6
Not used
7
Extended Diagnosis Overflow
Set by the master when the diagnostic buffer has overrun.
Station Byte 4 (Diagnostic Byte 2)
Diagnostic byte 4
Bit
Meaning
0... 7
Address of the master that parameterized the slave (e.g. 1). In the case of a connection interruption the value here is 255 (decimal) or FF (hex).
Ident No. of the Slave (Diagnostic Bytes 5 and 6)
Diagnostic bytes 5 and 6
Byte
Bit No.
Meaning
7
6
5
4
3
2
1
0
5
0
1
1
1
0
1
0
1
The value here must be 75 hexadecimal or 117 decimal (high byte).
6
0
0
0
1
0
0
1
0
The value here must be 12 hexadecimal or 18 decimal (high byte).
NOTE: If the connection to the master is interrupted, both bytes have the value 0.
Diagnostic Header 7 (Diagnostic Byte 7)
Diagnostic byte 7
Byte
Bit No.
Meaning
7
6
5
4
3
2
1
0
7
0
0
0
0
1
1
0
1
The value here must be D hexadecimal or 13 decimal.
I/O Error (Diagnostic Byte 8)
Analog I/O bases can report an I/O error, e.g. if they detect a hardware or firmware error in a self test (timeout).
With discrete I/O bases, an I/O error is reported if, for example, there is a short circuit or overload, and with 170 ADM 390 10 if there is an open circuit.
This byte should always contain the value 0.
Diagnostic byte 8
Byte
Bit No.
Meaning
7
6
5
4
3
2
1
0
8
0
0
0
0
0
0
0
0
There have been no I/O errors.
1
1
1
1
1
1
1
1
There has been one I/O error.
Parameter Control (Diagnostic Byte 9)
This byte is meaningless for discrete I/O bases. In the case of complex I/O bases, it displays whether new parameters have been sent to and accepted by the I/O base.
Diagnostic byte 9
Bit
Function
Meaning, if Bit = 1
0
Not Ready
I/O base is not ready for operation (not yet parameterized)
1
Parameter invalid
I/O base received invalid parameters
2 ... 7
Not used
Firmware Identification (Diagnostic Bytes 10 ... 15)
Diagnostic bytes 10 ... 15
Byte
Bit No.
Meaning
7
6
5
4
3
2
1
0
10
0
0
1
0
0
0
0
0
The value here must be 32 decimal or 20 hexadecimal (ASCII code for a blank).
11
0
1
1
1
0
0
0
0
The value here must be 112 decimal or 70 hexadecimal (firmware identification).
12
1
0
0
0
0
1
0
1
The value here must be 133 decimal or 85 hexadecimal (firmware identification).
13
0
1
0
1
0
0
0
1
The value here must be 81 decimal or 51 hexadecimal (firmware identification).
14
0
0
0
0
0
0
1
0
The value here must be 2 (firmware index).
15
0
0
0
0
0
0
0
0
The value here must be 0 (firmware sub-index, only in test versions > 0).
Ident Code of the I/O Base (Diagnostic Bytes 18 and 19
Diagnostic bytes 18 and 19
Byte
Meaning
18
The ident code high byte for the I/O base appears here, e.g. E0 hex.
This byte is required for unique identification on the PROFIBUS.
19
The ident code low byte for the I/O base appears here, e.g. 2.
This byte is required for internal data administration.
An overview of the ident codes can be found in the Ident Codes for Momentum I/O Bases section.