Configuration files

Although PLCnext Engineer is the recommended tool you can load programs and program instances onto the controller even without using the PLCnext Engineer. This also applies to files in .pcwlx libraries programmed in C++ by using the Eclipse® IDE with PLCnext Technology Add-in, or Visual Studio® with PLCnext Technology Extension, or the PLCnext CLI.

But before transferring a C++ program directly to the controller, the necessary settings have to be configured in .config files. That is usually done automatically by using PLCnext Engineer for downloading programs to the controller. The following description applies to all four necessary files types: 

  • acf.config
  • plm.config
  • esm.config
  • gds.config

Standard directories

The PLCnext Technology firmware expects to find the .config files in these locations:

  • *.acf.config file in the /opt/plcnext/projects/Default/ subdirectory
  • *.plm.config file in the /opt/plcnext/projects/Default/Plc/Plm/ subdirectory
  • *.esm.config file in the /opt/plcnext/projects/Default/Plc/Esm/ subdirectory
  • *.gds.config file in the /opt/plcnext/projects/Default/Plc/Gds/ subdirectory

Up to 2020.6:

The firmware installs Default.*.config files into these subdirectories, e.g. /opt/plcnext/project/Default/Plc/Default.plm.config.

From 2021.0 LTS:

Beginning with firmware 2021.0 LTS, these subdirectories have become user-only while the installation directory of the Default.*.config files has changed.

As a further consequence, files named Default.*.config are being erased during a firmware update from earlier versions to 2021.0 LTS. To prevent issues with updating the firmware, manual configurations may use any file name but Default.*.config.

Adding a different directory

To keep things simple, Phoenix Contact now recommends locating all configuration and binary files in the Default structure. Otherwise you can add  <Include path=...> into the configuration files so the firmware will additionally examine these subdirectories for .config files.  For this include statements you may make use of the $ARP_PATH_PROJECTS_DIR$ PLCnext Technology environment variable with the value /opt/plcnext/projects. The syntax for adding include paths is the same for all four kinds of configuration files:

<Includes>
   <Include path="$ARP_PROJECTS_DIR$/Example/*.gds.config" />
</Includes>

Generating configuration files using PLCnext Engineer

When using PLCnext Engineer for downloading programs to the controller, the above mentioned configuration files are created automatically and placed in a PLCnext Engineer specific folder structure similar to the default mentioned above:

  • PCWE.acf.config files in the /opt/plcnext/projects/PCWE/ subdirectory
  • PCWE.plm.config files in the /opt/plcnext/projects/PCWE/Plc/Plm/ subdirectory
  • PCWE.esm.config files in the /opt/plcnext/projects/PCWE/Plc/Esm/ subdirectory
  • PCWE.gds.config files in the /opt/plcnext/projects/PCWE/Plc/Gds/ subdirectory

Note: Do not store any other files in the /opt/plcnext/projects/PCWE directory! The PCWE folder is exclusively managed by PLCnext Engineer so anything in that folder will be erased prior to downloading a project to the controller and creating the .config files there automatically.

The PLCnext Technology firmware imports the respective .config files of both the Default and the PCWE structure and concatenates them. This means that duplicate configurations are regarded as a configuration error.

If no configuration error occurs, the components and program instances are subsequently executed by the firmware.

Manual configuration

The .config files are usual XML files. You can create or edit them using a text or code editor of your choice. Before making manual changes to the .config files it is recommended to duplicate them from the respective PCWE subdirectory as a template.

Note: Beginning with firmware 2021.0 LTS, the Default.*.config files provided by the firmware must not be edited. Manual configurations may use any file name but Default.*.config.

Using Windows

The file system of the controller is accessed via the SFTP protocol. Use a suitable SFTP client software for this, e.g., WinSCP.

Using Linux

Usually you're using the Linux® command scp with the -p option when copying configuration files from a Linux® PC to the directory /opt/plcnext/projects on the controller.

Note: If you're using the Linux® command scp without the option -p for this, the file permissions are partly set incorrectly. 
You can remedy this by doing the following: After copying the configuration files, use the Linux® command chmod to set the file permissions in such a way that the firmware can backup and restore the configuration files in case of Download Changes (group: plcnext, owner: plcnext_firmware). You can then manually configure these files.

acf.config/plm.config

The acf.config and plm.config files contain information on instances of libraries (shared objects), components and programs, as well as on processes of shared objects (C++ programs). Both files have the same format. For additional information on the Application Component Framework (ACF) and the Program Library Manager (PLM), please refer to Managing components.

The information is required by the firmware to load shared objects and to execute component instances or programs. There are two ways to instantiate components:

  • Included in opt/plcnext/projects/Default/*.acf.config
    The component is instantiated when starting the firmware. For additional information, please refer to ACF configuration via configuration files.
  • Included in opt/plcnext/projects/Default/Plc/Plm/*.plm.config
    The component is instantiated during cold or warm restart of the project. For additional information, please refer to PLM configuration via configuration files.

esm.config

The esm.config configuration file contains the task configuration, the instantiation of programs, and assignment to a processor core (one ESM per processor core). For additional information, please refer to Task configuration via configuration files.

gds.config

The gds.config configuration file contains the port definition as well as the assignment of IN and OUT ports. For additional information, please refer to GDS configuration using configuration files.

.tic file

Note: Phoenix Contact recommends creating the .tic files using the PLCnext Engineer software.

The .tic configuration file contains information on the bus configuration with the associated I/O process data of the IN and OUT ports.

Meta files

Metadata describes classes and types of components and programs that are created in a PLCnext Technology application: *.libmeta, *.progmeta, and *.compmeta.

They are required for using the program in PLCnext Engineer. The PLCnext CLI automatically generates the meta files (see detailed PLCnext CLI description).

With current firmware versions, there's nothing to configure manually in the meta files. Just leave them alone. :-)

 

 

 


• Published/reviewed: 2024-05-06   ★  Revision 068 •