Skip to main content

Finding the Configuration File of the Runtime System

Different descriptions in this help require an entry in the configuration file *.cfg of the runtime system. This section describes who has access to the file, where the file is located, and how to find the file.

Access to the configuration file

An entry in the configuration file requires access to the file.

  • For SL runtime systems, you have direct access to the .cfg file.

  • For controllers from device manufacturers, only the device manufacturer has access to the .cfg file.

Configuration file on Linux

On Linux, edit the /etc/codesyscontrol/CODESYSControl_User.cfg file.

Finding the configuration file on Windows

For CODESYS Control Win SL, a CODESYSControl.cfg file is located in the GatewayPLC\ directory of the CODESYS installation directory. This file contains the Setting Windows.WorkingDirectory in the [SysFile] section.

Opening the CODESYSControl.cfg file in the installation directory

  1. In the Start menu, right-click CODESYS Control Win SL in the CODESYS folder.

  2. Select More → Open file location.

  3. Right-click the CODESYS Control Win SL link.

  4. Select Open file path.

    A CODESYSControl.cfg file will be located in this directory.

Determining the working directory

The CODESYSControl.cfg file to be edited is located in the working directory. The working directory depends on how you start the runtime system.

  1. In the GatewayPLC\ directory, open the CODESYSControl.cfg file.

  2. Copy the value of the Windows.WorkingDirectory setting to the clipboard.

  3. Paste the value into the Windows file explorer.

    The working directory of the logged-in Windows user will open.

This working directory applies if you start the runtime system as a console application via the Start menu entry CODESYS → CODESYS Control Win SL.

If you start the runtime system as a Windows service via the system tray, then the runtime system runs in the Windows user account LocalSystem. Then the following working directories apply:

  • C:\Windows\system32\config\systemprofile\AppData\Roaming\CODESYS\

  • C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming\CODESYS\ for 32-bit applications on 64-bit Windows

Important

You need administrator privileges to access these directories.