Debug messages in TwinCAT->Error List
Debugging messages written to the application log facilitate troubleshooting of the system. In order to view the activated debug messages start the TwinCAT XAE and select the View->Other Windows->Error List menue command. A debug output is shown below. The different message types are identified with the respective numbers.
The messages are activated in different ways (with different parameters) depending on whether you use the "Low-Level" or "High-Level" interface. Below the list of the different parameters.
1. Hexadecimal output of the ASDUs (without link layer control header). 32 ASDU data bytes per row are output as hexadecimal numbers. Bigger frames are split into multiple lines:
Name |
ON |
OFF |
Controlled station |
Control station | ||
---|---|---|---|---|---|---|
Low-Level |
High-Level |
Low-Level |
High-Level | |||
eIEC870_FIFO_DBG_ALL |
eIEC870_FIFO_DBG_OFF |
Yes |
- |
Yes |
- | |
FB_IEC870_5_101Slave.sysPara.dbgMode |
IEC870_DEBUGMODE_ASDU |
IEC870_DEBUGMODE_DISABLED |
- |
Yes |
- |
- |
FB_IEC870_5_101Master.sysPara.dbgMode |
IEC870_DEBUGMODE_ASDU |
IEC870_DEBUGMODE_DISABLED |
- |
- |
- |
Yes |
2. Hexadecimal output of the APDUs (TCP/IP frames). 32 APDU data bytes per row are output as hexadecimal numbers. Bigger frames are split into multiple lines:
Name |
ON |
OFF |
Controlled station |
Control station | ||
---|---|---|---|---|---|---|
Low-Level |
High-Level |
Low-Level |
High-Level | |||
FB_IEC870_5_101TProtocol.bOutDbg |
TRUE |
FALSE |
Yes |
- |
Yes |
- |
FB_IEC870_5_101Slave.sysPara.dbgMode |
IEC870_DEBUGMODE_LINKLAYER |
IEC870_DEBUGMODE_DISABLED |
- |
Yes |
- |
- |
FB_IEC870_5_101Master.sysPara.dbgMode |
IEC870_DEBUGMODE_LINKLAYER |
IEC870_DEBUGMODE_DISABLED |
- |
- |
- |
Yes- |
3. State change messages:
Name |
ON |
OFF |
Controlled station |
Control station | ||
---|---|---|---|---|---|---|
Low-Level |
High-Level |
Low-Level |
High-Level | |||
FB_IEC870_5_101Slave.sysPara.dbgMode |
IEC870_DEBUGMODE_DEVSTATE |
IEC870_DEBUGMODE_DISABLED |
- |
Yes |
- |
- |
FB_IEC870_5_101Master.sysPara.dbgMode |
IEC870_DEBUGMODE_DEVSTATE |
IEC870_DEBUGMODE_DISABLED |
- |
- |
- |
Yes |
4: Link layer error messages:
Name |
ON |
OFF |
Controlled station |
Control station | ||
---|---|---|---|---|---|---|
Low-Level |
High-Level |
Low-Level |
High-Level | |||
FB_IEC870_5_101Slave.sysPara.dbgMode |
IEC870_DEBUGMODE_LINKERROR |
IEC870_DEBUGMODE_DISABLED |
- |
Yes |
- |
- |
FB_IEC870_5_101Master.sysPara.dbgMode |
IEC870_DEBUGMODE_LINKERROR |
IEC870_DEBUGMODE_DISABLED |
- |
- |
- |
Yes |
5. Messages logged from the PLC application (sample).
Further diagnostic tools:
- Portmon for Windows (v3.02, Windows Sysinternals);
- Diverse protocoll test suite products;