Diagnostics
PROFIBUS state
In many cases it is important to know whether the communication with the higher-level master is still OK. To this end, link the DpState variable with your PLC program.

Error number | Description | Remedy |
---|---|---|
0 | No error | - |
129 | Waiting for configuration data | Start PROFIBUS |
130 | Waiting for parameter data | Start PROFIBUS |
131 | No master available | Check PROFIBUS cables and connectors |
Example
If the PROFIBUS is interrupted, e.g. if the cable is pulled or the PLC is switched, the Bus Terminal Controller indicates this by reporting 130 in DP state. That is, the Bus Terminal Controller is waiting for parameter data from the master.
Slave boot sequence after a timeout or starting of the master:
parameter data - configuration data - data exchange
Reading fieldbus state by ADS
In default or TwinCAT configuration the fieldbus state can be read via ADSREAD.
Parameter ADSREAD function block | Description |
---|---|
NetID | local – empty string |
Port | 1 |
IndexGroup | 16#0006 |
IndexOffset | BX3100: 16#000C_A0F4 |
LEN | 1 |
State of the K-bus
An internal bus or Bus Terminal error is indicated in the K-Bus state. A more precise fault description can be obtained via a function block (in preparation). To this end, link the K-bus state variable with your PLC program.

Error bit | Description | Error type |
---|---|---|
0 | No error | No ERROR. |
Bit 0 | K-bus error | ERROR |
Bit 2 | K-Bus is re-triggered | NOTE |
Reading K-bus state by ADS
In default or TwinCAT configuration the fieldbus status can be read via ADSREAD.
Parameter ADSREAD function block | Description |
---|---|
NetID | local – empty string |
Port | 1 |
IndexGroup | 16#0006 |
IndexOffset | 16#000C_9000 |
LEN | 1 |