Diagnosis
Ethernet state (FieldbusState)
In many cases it is important to know whether the communication with the higher-level master is still OK. To this end, link the FieldbusState variable with your PLC program.

FieldbusState
Error number |
Description |
Cause |
---|---|---|
0 |
No error |
- |
1 |
Watchdog error |
Communication interrupted |
EthernetType
Here it is possible to determine which Ethernet protocol is accessing the PLC variables, and thereby triggering the watchdog (for example, the data in the Default Config area starting from addresses %IB1000 and %QB1000).
Diagnostic number |
Description |
Protocol |
---|---|---|
0x0000 |
No protocol is accessing the PLC variables |
- |
0x0001 |
ADS TCP |
Communication via ADS TCP/IP |
0x0002 |
ADS UDP |
Communication via ADS UDP/IP |
0x0010 |
ModbusTCP |
Communication via Modbus TCP/IP |
0x0011 |
ModbusUDP |
Communication via Modbus UDP |
Reading fieldbus 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 |
6 |
IndexOffset |
0x000C_A200 |
LEN |
4 |
First word (FieldbusState)
Error number |
Description |
Cause |
---|---|---|
0x0000 |
No error |
- |
0x0001 |
Watchdog error |
Communication interrupted |
Second word (EthernetType)
Diagnostic number |
Description |
Protocol |
---|---|---|
0x0001 |
ADS TCP |
Communication via ADS TCP/IP |
0x0002 |
ADS UDP |
Communication via ADS UDP/IP |
0x0010 |
ModbusTCP |
Communication via Modbus TCP/IP |
0x0011 |
ModbusUDP |
Communication via Modbus UDP |
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 |
NOTICE |
Reading K-Bus state by ADS
In the default configuration or in the TwinCAT configuration the K-bus 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 |