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.

  • Connect to your controller with both SSH and SFTP clients.
  • On the controller, create an app folder for your app (e.g. /opt/plcnext/myapp).
  • Take care that the app folder has the permission rights drwxr-x-r-x
  • Move every file your app needs to run into 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.
  • 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.
  • Now navigate to the folder in which the app container file is to be created (e.g. /opt/plcnext).
    Note: Make sure that you have the necessary access rights to the folder.
  • Execute the command plcnextapp create <app directory> <app name> via an SSH client. This creates a file named <appname>.app 
    (see “Creation of an app container”).
    Note: If plcnextapp is not defined by the PATH variable on your computer, it can be found in /usr/bin and is executed by /usr/bin/plcnextapp <appdirectory> <app name>.
    → After creation, the app container is located in the folder where you just executed the create command (e.g. /opt/plcnext/<app name>.app).
  • Copy the .app file to your computer via an SFTP client.

 

 

 

 


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