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:

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. Debugging messages that are logged when the TCP/IP connection is established or released:

Name

ON

OFF

Controlled station

Control 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 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_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 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_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. State change messages:

Name

ON

OFF

Controlled station

Control 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: Link layer error messages:

Name

ON

OFF

Controlled station

Control 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 from the PLC application (sample).

Further diagnostic tools: