Configuration of the PLCnext Runtime Services 

If you need access or sometimes exclusive access to PLCnext System Services in your app or a PLCnext System Service is not allowed to be running when your app run, you can state this in the "plcnextservices" field of the app_info.json. This is often not necessary because there are defaults in place which will suffice for most cases. If you specify your own requirement for a service, the default action for that service will be overwritten. In case there are multiple app parts in your app and their default actions contradict each other, you have to specify an action explicitly or you will get an inconsistency error and installation of the app will be prevented.

The app description contains an optional field in which the relevant PLCnext System Services are listed with one of the following actions:

  • Exclusive Access: Exclusive access to the PLCnext System Service is required
  • Must have: PLCnext System Service must be present
  • Must not have: PLCnext System Service must not be present

When an app is started, the configurations of the PLCnext System Services are checked for consistency using the procedure described in the section Consistency Check of the PLCnext System Services.

Necessary additions in the app description file 

If the optional JSON object "plcnextextensions" is present in the app description file, the AppManager knows that at least one configuration for controlling the PLCnext features/services is located within the app.

The "plcnextservices" entry is structured as follows:

"plcnextservices":
  [
     {
        "service" : "<service id 1>",
        "action" : "<action id 1>"
     },
        <service configuration 2>,
        ...
        <service configuration n>
  >]

"service":

Identifier of the PLCnext system service to be configured (see "Defined PLCnext Runtime Services”)

 

"action":

Action/setting for this service (see possible actions in the section "Defined PLCnext Runtime Services”)

Defined PLCnext Runtime Services

The following features/services can be configured in the system via the "plcnextservices" entry in the PLCnext Runtime Services Configuration section:

PLCnext Runtime Service ID Description Available from firmware version
WBM Web-based Management 2019.3
EHMI PLCnext Engineer HMI 2019.3
PROFINET

Discarded in PLCnext firmware from version 2021.6. Use the PLCnext Runtime Services with IDs "PROFINET CONTROLLER" and "PROFINET DEVICE" for PROFINET®.

When this service is enabled, the services with IDs "PROFINET CONTROLLER" and "PROFINET DEVICE" are not considered.

Open Industrial Ethernet standard of PROFIBUS® and PROFINET® International (PI) for automation

2019.3
PROFINET DEVICE

Open Industrial Ethernet standard of PROFIBUS® and PROFINET® International (PI) for automation, device only

2021.0
PROFINET CONTROLLER Open Industrial Ethernet standard of PROFIBUS® and PROFINET® International (PI) for automation, controller only 2021.0
OPCUA Open Platform Communications Unified Architecture 2019.3
FWM Configuring the Linux firewall filter rules with the nftables tool. E.g. via the WBM 2019.3
TRACING Controlling Lttng Traces and Trace Sessions 2019.3
DATALOGGER Support for the Datalogger 2019.3
IEC Support for PLCnext Engineer IEC 61131 Runtime 2019.3
ETHERNET IP Industrial network protocol that adapts the common industrial protocol to standard ethernet (slave device) 2021.3
PROFICLOUD Support functions that can be assigned to the area "Device and Update Management" 2021.3
LINUX SYSLOG

Syslog is a standard for transmitting log messages in an IP computer network. This feature is responsible for forwarding PLCnext notifications to syslog.

2021.3
NETLOAD LIMITER Used to limit the number of frames or bytes allowed per read cycle for an ethernet interface. 2021.3
SOFTWARE UPDATE Software Update via Device and Update Management 2022.0
GRPC LOCAL SERVER High performance RPC framework which provides an API for using the PLCnext services (RSC) from a variety of programming languages (accepts clients on the Unix domain socket) 2022.0

 

Possible actions for the PLCnext Runtime Services are defined in the following Table:

Action ID Meaning and restrictions
EXCLUSIVE_ACCESS The service must be running and no other app may be requiring the service.
MUST_HAVE The service must be running and no app may request exclusive access.
MUST_NOT_HAVE The service must be disabled.
 

Default PLCnext Runtime Services of the app types

 

Note: The default configurations are not available in the PLCnext firmware from version 2021.3. 

 

Some app types such as a solution require certain PLCnext System Services such as PROFINET® by default for execution. So that the app developer does not have to know these necessary PLCnext System Services in advance and enter them in the app description, they are included in the system by default.

The following applies:

  • Default system services that are explicitly configured in the app description are overwritten with the corresponding actions/values of the app description.
  • Default configurations of the apps are checked for inconsistency when several app types are used in one app container.

 

First, the following default PLCnext System Services with the corresponding actions (see “Configuration of the PLCnext Runtime Services”) are defined or considered in the system:

 

"EngineerApp":

  • "IEC": "EXCLUSIVE_ACCESS"
  • "PROFINET": "EXCLUSIVE_ACCESS"
  • "EHMI": "EXCLUSIVE_ACCESS"
  • "OPCUA": "MUST_HAVE"

The following system services must not be configured or switched off via PLCnext Apps:

  • AppManager
  • PLCnext Store
  • Proficloud

 

When configuring PLCnext Services in an app, the default settings of an app type are overwritten if they match. The following must be observed:

  • The "plcnextservices" entry is not present in the app description: If a service ID occurs several times with inconsistent actions in the default configurations, an inconsistency error is reported (see following section) and the app installation is prevented.
  • The "plcnextservices" entry is present in the app description: If a service ID occurs several times in the default configurations, these are removed and replaced with the "one" service setting from the app description.

Consistency check of the PLCnext Runtime Services

The actions (MUST_HAVE, MUST_NOT_HAVE and EXCLUSIVE_ACCESS) of the individual PLCnext features are evaluated. An inconsistency of the configurations for a PLCnext System Service occurs in at least one of the following cases:

  • A PLCnext System Service has at least two different actions at several points simultaneously. E.g. in one app MUST_HAVE and in another MUST_NOT_HAVE
  • A PLCnext System Service has at least two simultaneous actions of type EXCLUSIVE_ACCESS in at least two places.

For aPLCnext System Service, the following combinations of actions are permissible at the same time:

  • Several entries only with the action MUST_HAVE or several entries only with the action MUST_NOT_HAVE.
  • Or only one EXCLUSIV_ACCESS entry.

 

Consistency check is done on:

  • App start: An app with inconsistent service configurations may not start.
  • System start: Any already started app with inconsistent service configurations will be stopped. 

Specifications and restrictions

  • The affected services are to be switched off at system start of the runtime. I.e. a restart of the firmware is necessary after  app start.
  • It is not possible to switch off/on PLCnext Services at runtime.
  • PLCnext Runtime Services configuration is activated/deactivated when you start/stop the app.
  • The original PLCnext System state can be restored after stopping of the app.
  • The activation/deactivation of PLCnext Runtime Services requires a restart of the firmware.

Demo app to configure PLCnext Runtime Services

In the demo app for configuring PLCnext System Services, the Wbm-Plcnext component is switched off. For this the action "MUST_NOT_HAVE" is configured for the PLCnext Service with the ID "WBM", therefore the name "SC_WBM-MNH" is selected for the app.

 

The app description for the WBM Deactivator app is as follows:

{
   "plcnextapp":
      {
         "name": "WBM Deactivator",
         "identifier": "10000010000003",
         "version": "22.10.1 alpha",
         "target": "AXC F 2152",
         "minfirmware_version": "19.0.0",
         "manufacturer": "PhoenixContact",
         "licensetype": "Free"
      },
   "plcnextservices" :
      [
         {
            "service" : "WBM",
            "action" : "MUST_NOT_HAVE"
         }
      ]
   }

In the following sources for the demo PLCnext Services Config App are available on GitHub HERE:

  • App container folder:
    • app description file app_info.json
  • Demo app container file: WbmDeactivator.app

 

Note: The identifiers used in the app descriptions of the illustrated demo applications have only demo values. The app identifier generated in the PLCnext Store on app creation must be used!

 

 

 

 


•  Web browser recommendation: Chrome/Edge 88 or newer, Firefox ESR 90 or neweror Safari  • 
• Published/reviewed: 2023-11-17 • Revision 14 •