Building a PLCnext App

Independent of the amount and types of your app parts the general way to build the app is always identical. The necessary changes you need to include for every app part will be detailed below the general build process. The description of each app part type will contain the following sections:

  • A general description of the app part type.
  • The steps to create the app part and to integrate in the your app.
  • A section about specifications and restrictions for the corresponding app part
  • A simple demo example of that app part type with a link to its files in the GitHub repository.

If anything about the syntax of the app_info.json is still unclear consider having a look at the completely filled out example:
Example of a complete app_info.json

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.

 

  1. Connect to your controller with both clients mentioned above.
  2. On the controller, create an app folder for your app (e.g. /opt/plcnext/myapp).
  3. Take care that the app folder has permission rights "drwxr-x-r-x". 
  4. Move every file your app needs to run to this app folder. It is a best practice to separate all your app parts into different subfolders. The files you are going to need for each part will be mentioned in the app part type description.
  5. Create the app_info.json in your app folder (e.g. /opt/plcnext/myapp/app_info.json). Fill the app_info.json with the following data:
    • the format and metadata about your app outlined above
    • descriptions of your app parts (specific instructions on how to do this are in each chapter for the different app part type below)
    • storage and service requirements of the integrated app part types.
  6. Now navigate to the folder in which the app container file is to be created (e.g. /opt/plcnext). (Make sure that you have the necessary access rights to the folder.)
  7. Execute the command "plcnextapp create <app directory> <app name>" in the SSH client. This creates a file named <appname>.app 
    (see “Creation of an app container”).
    • 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).
  8. Copy the .app file to your computer with SFTP client.

 

 

 

 


•  Web browser recommendation: Chrome, Firefox 78 or newer, Edge 88 or newer, or Safari • 
• Published/reviewed: 2022-12-16 • Revision 11 •