Debug messages in TwinCAT->Error List
Debug messages that are written in TwinCAT XAE->Error List facilitate troubleshooting in the system. To view the activated debug messages, start TwinCAT XAE and select in the menu: View->Other Windows->Error List. A debugging output is shown below. The different types of messages were marked with numbers.

The messages are activated in different ways (by different parameters) depending on whether you are using the "low-level" or "high-level" interface. Below is a list of the different parameter names.
1. Debug messages logged when establishing or terminating the TCP/IP connection:
Name | ON | OFF | Substation | Central station | ||
---|---|---|---|---|---|---|
Low-Level | High-Level | Low-Level | High-Level | |||
F_CreateServerHnd | CONNECT_MODE_ENABLEDBG | 0 | Yes | Yes | - | - |
FB_ClientServerConnection | CONNECT_MODE_ENABLEDBG | 0 | - | - | Yes | - |
FB_IEC870_5_104Master.sysPara.dbgMode | IEC870_DEBUGMODE_LINKERROR | IEC870_DEBUGMODE_DISABLED | - | - | - | Yes |
2. Hexadecimal output of ASDUs (without link layer control header). 32 ASDU data bytes per row are output as hexadecimal numbers. Longer ASDUs are spread across several rows:
Name | ON | OFF | Substation | Central station | ||
---|---|---|---|---|---|---|
Low-Level | High-Level | Low-Level | High-Level | |||
eIEC870_FIFO_DBG_ALL | eIEC870_FIFO_DBG_OFF | Yes | - | Yes | - | |
FB_IEC870_5_104Slave.sysPara.dbgMode | IEC870_DEBUGMODE_ASDU | IEC870_DEBUGMODE_DISABLED | - | Yes | - | - |
FB_IEC870_5_104Master.sysPara.dbgMode | IEC870_DEBUGMODE_ASDU | IEC870_DEBUGMODE_DISABLED | - | - | - | Yes |
3. Hexadecimal output of the APDUs (TCP/IP telegrams). 32 APDU data bytes per row are output as hexadecimal numbers. Longer APDUs are spread across several rows:
Name | ON | OFF | Substation | Central station | ||
---|---|---|---|---|---|---|
Low-Level | High-Level | Low-Level | High-Level | |||
FB_IEC870_5_104TProtocol.bOutDbg | TRUE | FALSE | Yes | - | Yes | - |
FB_IEC870_5_104Slave.sysPara.dbgMode | IEC870_DEBUGMODE_LINKLAYER | IEC870_DEBUGMODE_DISABLED | - | Yes | - | - |
FB_IEC870_5_104Master.sysPara.dbgMode | IEC870_DEBUGMODE_LINKLAYER | IEC870_DEBUGMODE_DISABLED | - | - | - | Yes- |
4. Station status messages:
Name | ON | OFF | Substation | Central station | ||
---|---|---|---|---|---|---|
Low-Level | High-Level | Low-Level | High-Level | |||
FB_IEC870_5_104Slave.sysPara.dbgMode | IEC870_DEBUGMODE_DEVSTATE | IEC870_DEBUGMODE_DISABLED | - | Yes | - | - |
FB_IEC870_5_104Master.sysPara.dbgMode | IEC870_DEBUGMODE_DEVSTATE | IEC870_DEBUGMODE_DISABLED | - | - | - | Yes |
5: Output of link layer errors as messages:
Name | ON | OFF | Substation | Central station | ||
---|---|---|---|---|---|---|
Low-Level | High-Level | Low-Level | High-Level | |||
FB_IEC870_5_104Slave.sysPara.dbgMode | IEC870_DEBUGMODE_LINKERROR | IEC870_DEBUGMODE_DISABLED | - | Yes | - | - |
FB_IEC870_5_104Master.sysPara.dbgMode | IEC870_DEBUGMODE_LINKERROR | IEC870_DEBUGMODE_DISABLED | - | - | - | Yes |
6. Messages logged by the PLC application (sample project) using the ADSLOGSTR, ... functions.
Further diagnostic tools:
- TwinCAT ADS Monitor;
- Network monitor;
- Wireshark®;
- Ethereal;
- Diverse protocol test suite products;