Downloading & Uploading CODESYS Applications from the Management System#
With the kit you can deploy CODESYS applications from the Management System to the MFN 100. The two default CODESYS applications are already available in the Management System. You can also upload your own applications to the repository in the Management System and make them ready for deployment.
Deploying a CODESYS Workload#
One CODESYS workload is available with first login that can be used with the kit immediately. The workload is named Nerve Blue Kit and it has two versions: Nerve Blue Starter Kit App1 and Nerve Blue Starter Kit App2. For more information on the deployment process for all workload types refer to the user guide.
Select Deploy in the left-hand menu.
Select the CODESYS workload icon on the right. A list of CODESYS workloads will appear below.
Select a workload from the list. A list of versions of this workload will appear to the right.
Select the version of the workload you would like to deploy.
Click Next in the bottom-right corner.
In the next window, select one or more nodes from the list for deployment by ticking the checkboxes on the left.
Select Next in the lower-right corner.
In the next window, enter a Deploy name above the Summary of the workload. Choose a name that makes this deployment easy to identify.
You can only use alphanumeric characters (
0-9) and underscore (
_). Any other special characters are not allowed. If you use a character that is not allowed, the deploy button will be grayed out.
Select Deploy to execute the deployment.
You will be taken to the log next. Your current deployment is at the top of the list. The Deploy name you have chosen before is the name that identifies the deployment in the log.
You can see the progress of the current deployment and click the workload to see a more detailed view.
Confirm the deployment by viewing the workload in the node details view in the Node Tree. Select Node Tree in the menu on the left and select the node you have deployed a workload to.
Clicking a workload tile leads to the workload control screen. This is where workloads can be controlled. However, CODESYS workloads can only be controlled through the local UI.
All workloads are started as soon as they are deployed.
Connecting to the Local UI#
In order to access the local UI, you need to connect a workstation to the console port (P1) of the MFN 100 and configure the network adapter of your workstation. The IP address has to be in the range from
172.20.2.254 with a
255.255.255.0 subnet mask. You also need the credentials for the local UI that you can find in the customer profile.
- Follow this link to connect to the local UI: http://172.20.2.1:3000/
Log in with the credentials from the customer profile.
You will reach the main page of the local UI.
Control of CODESYS Applications#
CODESYS workloads can only be controlled in the local UI, as operation of a CODESYS workload may have an impact on your machine operation and therefore should not be controlled remotely. Select CODESYS management in the menu on the left-hand side to reach the interface for controlling a CODESYS application running on the Nerve Device:
|Start||This starts the CODESYS application.|
|Stop||This stops the CODESYS application and it is reset to its initial values.|
|Remove||This removes the CODESYS application from the Nerve Device.
If you want to deploy the CODESYS application again, you have to do so through the Management System in the cloud.
|Message||CODESYS workloads have the following set of messages:
It takes a moment before CODESYS applications are actually started, stopped or removed.
Uploading New CODESYS Applications#
In order to work with new CODESYS applications on the MFN 100, new CODESYS workloads need to be provisioned in the Management System. Here, provisioning is the creation of a workload and its storage in the workload repository of the Management System so that it can be deployed to nodes. This requires configuration of the workload and the upload of the required files to the Management System. After that, the workload can be deployed to nodes.
Before the workload can be provisioned, however, a CODESYS application has to be loaded into the CODESYS runtime first. Refer to the introduction to working with CODESYS and the MFN 100 first before continuing.
Note that app1 is already loaded into the CODESYS runtime by default. If you wish to try the provisioning process, continue in the current chapter.
Once a CODESYS application has been loaded into the MFN 100, the following steps have to be taken before provisioning a CODESYS workload:
- Creating the ZIP file of the CODESYS application
- Transferring the ZIP file to a local workstation
In this version, Nerve Blue does not provide a GUI based method for creating a ZIP file of the CODESYS application. Therefore, this chapter focuses on the manual process. Two tools are required for the instructions below, assuming Windows is used on the workstation:
Also the workstation needs to be connected to the console port (P1) of the MFN 100 and the network adapter of the workstation needs to be configured. The IP address has to be in the range from
Creating the ZIP File on the Nerve Device#
First, the CODESYS project needs to be zipped on the Nerve Device before it can be copied from the CODESYS runtime.
- Open an SSH client like PuTTY.
172.20.2.2under Host Name (or IP address) to log in to the CODESYS runtime of the MFN 100.
- In the new window, enter the admin password for the CODESYS runtime.
Enter the following commands:
systemctl stop nerve-codesys
zip -r /tmp/<userproject>.zip CmpApp.cfg PlcLogic/
You can freely name the ZIP file here by replacing
<userproject>with a name of your choice.
The ZIP file has now been created and is available on the Nerve Device.
Transferring the ZIP File to a Local Workstation#
The zipped CODESYS project file needs to be transferred from the MFN 100 to a workstation with a file transfer client in order to be uploaded to the Management System.
- Open a file transfer client like WinSCP.
172.20.2.2under Host Name.
Enter the credentials for the CODESYS runtime below under User name and Password.
Navigate to the /tmp/ directory on the right side of the WinSCP window. You will find it in the root directory.
Drag and drop the ZIP file to your workstation.
Since the CODESYS project ZIP file is on your local workstation, you can now provision a CODESYS workload in the Management System.
Provisioning a CODESYS Workload#
The following instructions cover the basic requirements for provisioning a CODESYS workload. Optional settings will be left out. Extended options are addressed in the user guide.
- Log in to the Management System.
- Select Workloads in the left-hand menu.
- Select + in the upper-right corner.
Select the CODESYS symbol (CODESYS workload) on the left of the three symbols that expanded.
Enter a name for the workload in the new window.
Select + next to Versions to add a new version of the workload.
Enter the following information in the new window:
Item Description Name Enter a Name for the version of this workload. Release name Enter a Release name for the version of this workload. CODESYS project file Click the upward arrow symbol to open the file browser and add the CODESYS application ZIP file.
This is the ZIP file that you have created before.
The workload has now been provisioned and is ready to be deployed in the Deploy menu.