Skip to content
PDF

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.

  1. Select Deploy in the left-hand menu.

    !Workload Icons

  2. Select the CODESYS workload icon on the right. A list of CODESYS workloads will appear below.

    !Workload List

  3. Select a workload from the list. A list of versions of this workload will appear to the right.

    !Workload Versions

  4. Select the version of the workload you would like to deploy.

  5. Click Next in the bottom-right corner.

    !Workload Icons

  6. In the next window, select one or more nodes from the list for deployment by ticking the checkboxes on the left.

  7. Select Next in the lower-right corner.

    !Workload Icons

  8. In the next window, enter a Deploy name above the Summary of the workload. Choose a name that makes this deployment easy to identify.

    Note

    You can only use alphanumeric characters (a-z, A-Z, 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.

  9. Select Deploy to execute the deployment.

    !Workload Icons

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.

!Workload Icons

You can see the progress of the current deployment and click the workload to see a more detailed view.

!Workload Icons

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.

!Workload Icons

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.5 to 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.

  1. Follow this link to connect to the local UI: http://172.20.2.1:3000/
  2. Log in with the credentials from the customer profile.

    !Local UI Login

You will reach the main page of the local UI.

!Local UI Dashboard

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:

!CODESYS Control

Function Name Description
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:
  • "Preparing files for installation"
  • "Starting CODESYS application"
  • "CODESYS application started"
  • "Stopping CODESYS application"
  • "CODESYS application stoppped"
  • "Removing CODESYS application file"
  • "An unexpected error has occurred. <errormessage>"
Here, <errormessage> is a message that is sent by the CODESYS Development System.

Note

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

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:

  1. Creating the ZIP file of the CODESYS application
  2. 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:

  • an SSH client like PuTTY
  • a file transfer client like WinSCP

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 172.20.2.5 to 172.20.2.254.

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.

  1. Open an SSH client like PuTTY.
  2. Enter 172.20.2.2 under Host Name (or IP address) to log in to the CODESYS runtime of the MFN 100.

    !PuTTY

  3. Click Open.

  4. In the new window, enter the admin password for the CODESYS runtime.
  5. Enter the following commands:

    sudo su
    
    systemctl stop nerve-codesys
    
    cd/var/lib/codesys
    
    zip -r /tmp/<userproject>.zip CmpApp.cfg PlcLogic/
    

    Note

    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.

  1. Open a file transfer client like WinSCP.
  2. Enter 172.20.2.2 under Host Name.
  3. Enter the credentials for the CODESYS runtime below under User name and Password.

    !WinSCP Login

  4. Navigate to the /tmp/ directory on the right side of the WinSCP window. You will find it in the root directory.

    !WinSCP TMP Directory

  5. 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.

  1. Log in to the Management System.
  2. Select Workloads in the left-hand menu.
  3. Select + in the upper-right corner.
  4. Select the CODESYS symbol (CODESYS workload) on the left of the three symbols that expanded.

    !CODESYS Workload

  5. Enter a name for the workload in the new window.

  6. Select + next to Versions to add a new version of the workload.

    !New Version

  7. 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.

    !Version Settings

  8. Click Save.

The workload has now been provisioned and is ready to be deployed in the Deploy menu.