When a PROFIBUS DP slave misbehaves, the slave itself often only drops off the bus or flashes a red LED, and the real cause has to be found in the diagnostic data. Reading DP slave diagnostics in TIA Portal means reaching the diagnostic frame the slave reports, through system diagnostics or diagnostic instructions, and translating it into device-level, module-level or channel-level fault information.
DP diagnostics run from coarse to fine in three layers. Device level states whether the slave as a whole is available, for example a broken cable or a dropped station. Module level states which module or slot is at fault. Channel level goes down to a single channel, for example one input shorted, broken or over-range. When troubleshooting, check first that communication at device level is sound, then locate the slot at module level, and only then look at channel level — this order pins the scope down fastest.
In the device view and the online diagnostics of TIA Portal you can see the slave's communication status, module status and some diagnostic information directly, and standardised diagnostic data is even given a text explanation. This is intuitive and good for quickly judging whether this is where the problem lies. It only shows the parts already interpreted from the configuration, though; vendor-specific diagnostics usually have to be read another way.
Reading slave diagnostics from the program usually means a system function block or diagnostic instruction that reads the individual bytes of the standard diagnostic frame. That frame has a fixed structure: address and station status and similar common information first, then bit-coded error types, and the vendor-specific part after that. The bytes read must be parsed by structure, not taken as one integer.
The frame contains a number of status bits. The common ones indicate that the station is not present or not ready, that a diagnostic frame has arrived, a parameterisation error, a configuration error, or that the slave requires re-parameterisation. The bits differ in priority: some point to a communication-layer problem, others to a configuration mismatch. Grouping the bits by meaning is easier to learn than memorising each one, and lets you decide faster whether to reset or to check the configuration.
Diagnostics can be read by eye in the TIA Portal online view, or read cyclically by the program to raise alarms. In practice the two go together: the online view for quick confirmation during commissioning, program alarms for putting faults onto the HMI and into the record at run time. Diagnostic information read by the program has to be displayed on the HMI, otherwise only an engineer standing at the panel sees it while the machine runs.
| Diagnostic information | Layer | Meaning | Usual action |
|---|---|---|---|
| Station not present | Device | Slave offline or unpowered | Check supply, bus connector and terminating resistor |
| Slave not ready | Device | Slave power-up not complete | Wait, or check the slave self-test |
| Diagnostic frame arrived | Device | New diagnostics waiting | Read and parse the frame |
| Parameterisation error | Device | Downloaded parameters rejected | Cross-check parameters and firmware version |
| Configuration mismatch | Device | Actual setup differs from the configuration | Compare module types and slots |
| Re-parameterisation required | Device | Slave asks for parameters again | Run re-parameterisation |
| Module fault | Module | A slot module reports an error | Locate the slot, then replace or check wiring |
| Channel wire break | Channel | Open circuit on a channel | Check that channel's wiring and sensor |
| Channel over-range | Channel | Signal beyond the range | Check the range and sensor specification |
When reading diagnostics, separate "standard diagnostics", which parse by a uniform structure, from "vendor-specific diagnostics", which need the maker's documentation. Reading diagnostics cyclically consumes communication load, so the read cycle need not be fast; refining the read when an alarm occurs is more economical. Bus faults and slave faults sometimes appear together: restore communication first, then look at the remaining diagnostics, so that slave hardware is not misjudged while the bus is still unhealthy.
The PROFIBUS DP protocol and diagnostic frame structure follow the GB/T 20540 series (equivalent to the PROFIBUS DP specification); the fieldbus architecture follows the IEC 61158 and IEC 61784 series; the programming conventions for PLC programs and diagnostic function blocks follow GB/T 15969.3 (identical to IEC 61131-3); the electrical connection, protection and earthing of the equipment follow GB 5226.1 and the equivalent international standard IEC 60204-1.
Stop the machine, isolate, prove dead and apply lock-out/tag-out before checking the bus or slaves. Both terminating resistors at the ends of a PROFIBUS segment must be correctly engaged, and connectors must not be plugged or unplugged under power, to avoid damaging the transceivers.