Diagnostics
CANopen 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 NodeState variable with your PLC program. A TwinCAT configuration is required for this purpose.

Error number |
Description |
Remedy |
---|---|---|
0 |
No error |
- |
2 |
Guarding error |
Check the connection |
20 |
Too few PDOs (only TwinCAT configuration) |
Check the configuration |
22 |
Sync error |
Check the connection |
129 |
Node is pre-operational |
Switch the node to operational |
130 |
Node is stopped |
Start the node |
Example
If the CANopen is interrupted, e.g. if the cable is pulled or the PLC is switched off, the Bus Terminal Controller indicates this by reporting ??? in the node state.
Reading fieldbus state by ADS
You can read the fieldbus state via ADSREAD in the default configuration or in the TwinCAT configuration.
Parameter ADSREAD function block |
Description |
---|---|
NetID |
local – empty string |
Port |
1 |
IndexGroup |
16#0006 |
IndexOffset |
16#000C_AE00 |
LEN |
1 |
State of the K-bus
An internal K-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
You can read the fieldbus state via ADSREAD in the default configuration or in the TwinCAT configuration.
Parameter ADSREAD function block |
Description |
---|---|
NetID |
local – empty string |
Port |
1 |
IndexGroup |
16#0006 |
IndexOffset |
16#000C_9000 |
LEN |
1 |