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.

Debug messages in TwinCAT->Error List 1:

Debug messages in TwinCAT->Error List 2:

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

ST_IEC870_5_101TBuffer.eDbg

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: