PLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

Diagnostic logfile

PLCnext Technology provides a diagnostic log file where you can find information on the start-up behavior of the system, logged error, warning and information messages, as well as your own debugging messages.

Therefore, the logfile is useful for analyzing and fixing the causes of any issues or unexpected behavior of your PLCnext Technology controller. You can also send the diagnostic file to an assisting person.

This document is based on FW Release version.


  • Many problems are caused by violations of naming conventions. Refer to the Naming conventions PLCnext Technology manual for details. Correct any invalid identifiers in the project first.
  • The diagnostic logfile is designed as a ring buffer. This means messages will be overwritten when the maximum file size is exceeded.
    In case of an occurred error, load and evaluate the diagnostic logfile as soon as possible.

Content and structure of the diagnostic logfile

The PLCnext Technology Firmware writes general diagnostic information into the logfile which can point the root cause of any occurred issue.

The logfile is divided into the following groups of messages:

  • Fatal & Errors: messages of this type always result in a stop of the PLC. They are mostly caused during the start-up or execution of a user application.
  • Error: errors within the user application which result in a stop of the PLC.
  • Warning: warning messages may indicate upcoming errors.
  • Information: output by core components; these messages provide an overview on the system status.

"Debug" posts are a special message group.
Using the "log.Debug("Text")" method, you can write your own diagnostic messages into this group.

How to read the logfile from your controller

  1. Establish an SSH connection to the AXC F 2152. This can easily be done using WinSCP ( How to use WinSCP) or any other program that supports SFTP.
  2. Open the folder "/opt/plcnext/logs". (Usually, the initial directory after connecting is "/opt/plcnext".)
  3. Copy the "Output.log" to your local computer.

Figure 1: Diagnostic log

How to view the logfile in the shell (continuously)

Instead of loading the file onto your local PC, you can use the plotting function integrated in your terminal connection:

  • "cat /opt/plcnext/logs/Output.log" plots the logfile contents in your console.
  • "tail -f /opt/plcnext/logs/Output.log" continuously updates changes: every new entry is directly output in your console.

The following shows an example how to use the continuous log when debugging.

Figure 2: Using the continuous Output.log of a proprietary socket server when debugging

Example messages

The following list will be updated continuously.

Time Stamp

(Message Location)


Log Message
(info text, or stack trace)


15.11.17 11:51:36.959 Ap.System.Acf.Internal.Sm.ComponentsController Error Exception occurs while setting up config of component 'Arp.Plc.Plm': Library 'XXX' does not exist.

A library of a user application could not be started. Possible causes are:
- Library not there
- Missing or wrong configuration files (e.g. *.libmeta.xml)

15.11.17 11:51:36.959 Arp.Plc.Esm.Internal.TaskBase Fatal Exception occurs in task 'XYZ: Invalid Eclr State: shall be PlcStateRunning
Exception of type 'Arp::System::Commons::InvalidOperationException' was thrown

An IEC 61131-3 exception (like div/0, out of bounce ...) occured and the PLC stopped.
- Connect with PC Worx Engineer for more detailed information.

14.11.17 20:51:54.608 Arp.System.Acf.Internal.ApplicationBase Info ArpVersion: During startup is the FW version stated.
15.11.17 11:51:36.959


Debug Your debug message Posted via the method "log.Debug("Text")"