This content has moved to a new space on the Internet.

Go to new location

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
WBM Web-based Management
EHMI Embedded HMI
PROFINET PROFINET® Process Field Network
OPCUA Open Platform Communications Unified Architecture
FWM Configuring the Linux firewall filter rules with the nftables tool. E.g. via the WBM
TRACING Controlling Lttng Traces and Trace Sessions
DATALOGGER Support for the Datalogger
IEC Support for IEC 61131 Runtime

 

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

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 PLCnext System Services, which are essential for an app type, in advance and enter them in the app description, they are taken into account in the system by default.

The following applies:

  • Default system services, which in turn 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 the AppManager:

  • AppManager
  • 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.
  • The original PLCnext System state can be restored after stopping of the app.

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!

 

 

 

 


 • Published/reviewed: 2020-06-11 • Revision 35 •