If the Ext_Diag bit is set, from byte 7 further diagnostic blocks will follow. Every block begins with a header byte. This header byte determines the type and length of the diagnostic block.
Three formats have been defined:
a)Device-based diagnostics
b)Identifier-based diagnostics
c)Channel-based diagnostics
Identifier-based diagnostics:
Identifier-based diagnostics concerns the position of the module in the configuration telegram. Events on the relevant module are signalled by a set bit.
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
0 |
1 |
|
|
|
|
|
|
Header identifier-based diagnostics |
|
|
0 – 63 |
Number of bytes in the identifier-based diagnosis (inc. this byte) |
First byte of identifier-based diagnosis:
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
|
|
|
|
|
|
|
X |
Module no. 1 has a diagnosis |
|
|
|
|
|
|
X |
|
Module no. 2 has a diagnosis |
|
|
|
|
|
|
|
|
.... |
X |
|
|
|
|
|
|
|
Module no. 8 has a diagnosis |
Second byte of identifier-based diagnosis:
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
|
|
|
|
|
|
|
X |
Module no. 9 has a diagnosis |
|
|
|
|
|
|
X |
|
Module no. 10 has a diagnosis |
|
|
|
|
|
|
|
|
.... |
X |
|
|
|
|
|
|
|
Module no. 16 has a diagnosis |
Example for identifier-based diagnosis
Addr |
Msg type |
Req Res |
SAPS |
Len |
Data |
1->14 |
Slave Diagnosis |
Req |
62 -> 60 |
|
|
1<-14 |
Slave Diagnosis |
Res |
62 <- 60 |
10 |
08 04 00 00 00 85 44 00 01 00 |
In this example, the module with the 9th identifier has signalled a problem.
If multiple identifiers are signalled in one module, the diagnosis relates to the identifier and not the module.
Channel-based diagnostics:
Channel-based diagnostics provide information about the module's channel faults and represent a detailed, channel-based diagnosis. Channel-based diagnostics always have a fixed length of 3 bytes.
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Channel-based diagnostics header (1st byte) |
1 |
0 |
|
|
|
|
|
|
Header channel-based diagnostics |
|
|
0 – 63 |
Module concerned: no. 1 - 64 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Channel-based diagnostics 2nd byte: |
|
|
0 – 63 |
Number of the channel concerned in the module |
|||||
0 |
1 |
|
|
|
|
|
|
Input |
1 |
0 |
|
|
|
|
|
|
Output |
1 |
1 |
|
|
|
|
|
|
Input & output |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Channel-based diagnostics 3rd byte: |
---|---|---|---|---|---|---|---|---|
0 |
0 |
1 |
|
|
|
|
|
Bit |
0 |
1 |
0 |
|
|
|
|
|
2 bits |
0 |
1 |
1 |
|
|
|
|
|
4 bits |
1 |
0 |
0 |
|
|
|
|
|
Byte |
1 |
0 |
1 |
|
|
|
|
|
Word |
1 |
1 |
0 |
|
|
|
|
|
2 words |
|
|
|
1 2 3 4 5 6 7 8 9 10-15 16-31 |
Short circuit Under-voltage Over-voltage Overload Over-temperature Line break Upper limit overshoot Lower limit undershoot Error Reserved Vendor-specific |
Example for channel-based diagnosis
Addr |
Msg type |
Req Res |
SAPS |
Len |
Data |
1->14 |
Slave Diagnosis |
Req |
62 -> 60 |
|
|
1<-14 |
Slave Diagnosis |
Res |
62 <- 60 |
9 |
08 04 00 00 00 85 88 41 21 |
In this example, the module with the 9th identifier has a short-circuit on the 2nd binary input.
The appearance of multiple diagnostic blocks in one telegram is, of course, also possible:
Addr |
Msg type |
Req Res |
SAPS |
Len |
Data |
1->14 |
Slave Diagnosis |
Req |
62 -> 60 |
|
|
1<-14 |
Slave Diagnosis |
Res |
62 <- 60 |
10 |
08 04 00 00 00 85 44 00 01 00 88 41 21 |
Device-based diagnostics:
There is no further specification of device-based diagnostics in DP-V0. The meaning of the individual bits must be defined by the manufacturer in the GSD file.
Header for device-based diagnostics:
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
0 |
0 |
|
|
|
|
|
|
Header device-based diagnostics |
|
|
0 - 63 |
Number of bytes in the device-based diagnosis (inc. this byte) |
Unit_Diag_Bit(0x12)="short-circuit on channel 3"
This example from a GSD signals a short-circuit on channel 3 with the 18th bit in the device-based diagnosis.
In DP-V1, these device-based diagnostics are developed into alarm blocks and/or status messages. To activate this syntax, the bit DPV1_Enable in the parameter telegram must be set to 1 and the corresponding alarm enabled. The whole block is built up in a fixed format.