Building a solution

App containers must be created on a PLCnext Control, using a command line utility called plcnextapp.
In order to build an app, you will need an SSH client (e.g. PuTTY) and an SFTP client (e.g. WinSCP). Then you just have to follow the steps below. Most steps can be done with both tools, unless stated otherwise.

You have to transform your PLCnext Engineer program in an app container. This transformation from a PLCnext Engineer program to an app container takes place directly on a PLCnext Control
In order to build an app container, you will need an SSH client (e.g. PuTTY) and an SFTP client (e.g. WinSCP). Then you just have to follow the steps below. Most steps can be done with both tools, unless stated otherwise.

Before you create an app container, you have to create an app folder on your PLCnext Control

Preparing the app folder

  • Download the PLCnext Engineer program to your controller by using PLCnext Engineer
  • Connect to your controller with both clients mentioned above.
  • On the controller, create an app folder for your app (e.g. /opt/plcnext/myapp).
  • Copy the entire PLCnext Engineer folder from /opt/plcnext/projects/PCWE to this new app folder. 

The structure of the PLCnext Engineer folder of this example would be: /opt/plcnext/myapp/PCWE/

Creating the app description file 

  • Create the app description file with the name app_info.json in your app folder (e.g. /opt/plcnext/myapp/app_info.json).
    Note: The app description file is used for the app compatibility check. Please pay attention to the defined structure of the file. Otherwise, the compatibility check will not work.
  • Fill the app_info.json with your data.

Below you can see an example of an app_info.json. You can copy the example on the right and paste it into your project (don't forget to add the attributes!).

 
Example of an app_info.json with attributes:
{
    "plcnextapp": {
        "name": "MySolutionApp",
        "identifier": "12345678",
        "version": "1.0",
        "target": "AXC F 2152",
        "minfirmware_version": "20.6.0",
        "manufacturer": "Phoenix Contact",
        "licensetype": "Free"
    },
    
    "engineerapp": {
        "folder": "/PCWE/"
    }
}

 

 
Example of an app_info.json  to copy without attributes:
{
    "plcnextapp": {
        "name": 
        "identifier": 
        "version": 
        "target": 
        "minfirmware_version": 
        "manufacturer": 
        "licensetype":
    },
    
    "engineerapp": {
        "folder": 
    }
}

 

Click here to hide the information about the attributesClick here to get information about the attributes

"name":

Any name that describes the app.

 

"identifier":

An unique app identifier assigned by the PLCnext Store on app creation (the combination of Firm Code / Product Code). It is going to be used for creating unique folder names, which will be marked with <App Identifier> throug­hout this guide.

The app identifier must consist of 14 numbers in string format.

 

"version":

A version string identifying the current version of the app. The following notation should be observed:

 

Full (external) version format:

<Name> ( <major>.<minor>.<patch>.<build> <state>)

Valid cases:

abc (1.2.3.4 alpha)

abc (1.2.3 alpha)

abc (1.2 alpha)

abc (1 alpha)

abc (1.2.3.4)

abc (1.2.3)

abc (1.2)

abc (1)

 

Internal version format:

<major>.<minor>.<patch>.<build> <state>

Valid cases:

1.2.3.4 alpha

1.2.3 alpha

1.2 alpha

1 alpha

1.2.3.4

1.2.3

1.2

1

 

Limitation of numerical values:

  • major, minor and patch: unsigned 8 bit
  • build: unsigned 32 bit

"target":

the controller this app is intended to run on. To be recognized automatically this string has to be identical to the representation in the WBM of the controller under Information → Type. The target may contain:

  • a single target entry:
    • e.g. "target": "AXC F 2152"
    • supported in all PLCnext firmware version from 19.0.0.
  • several entries of supported targets, which are separated from each other by a comma
    • e.g. "target": "AXC F 2152,AXC F 1152"
    • Attention: please enter the target name without any additional characters or spaces.
    • Bad example: "AXC F 2152,  AXC F 1152"
  • supported in the PLCnext firmware from version 2021.0

 

"minfirmware_version":

the minimally required firmware version to run the app in the format <major version>.<minor version>.<fixes> e.g. 19.0.0 for the LTS version of 2019.

 

"manufacturer":

Manufacturer name (optional entry. Default value is an empty string. Available in firmware from version 19.3.0.)

 

"licensetype":

App license type needed for app management to set the action required when an app has no valid license.
(Optional entry. Default string value is "Free". Available in firmware from Version 20.0.0):

  • "Free": The app is license free and may start without valid license file.
  • "Full": The app requires a valid license. Without a valid license the app...:
    • will be stopped on system start if it runs.
    • is not allowed to start e.g. after offline installation via WBM.
  • "Limited": The app requires a valid license to run with full functionality. Without it the app may start with "limited" functionality.

 "folder":

 Specifies in which directory within the app container the complete PLCnext Engineer project is stored. This makes it possible to build up the folder structure as desired   within the app container.

 

Creating the app file

  • Create the solution with the command plcnextapp create <app directory>  <app name> in the SSH client. This creates a file named <appname>.app.
    In the example above the command would be  

    plcnextapp create /opt/plcnext/myapp/ MySolutionApp

If plcnextapp is not in your path it can be found in /usr/bin and executed with /usr/bin/plcnextapp <appdirectory> <app name>.
After creation the app container is located in the folder where you executed the create command (e.g. /opt/plcnext/<app name>.app).

  • Copy the *.app file to your computer with SFTP client.

 

→ Next step: Publishing a solution

 

Or go back to Overview.

 

 


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