Container Application "Eclipse 4DIAC"

Introduction

4DIAC is an open source Soft-PLC project hosted under the Eclipse foundation, developed and maintained by the fortiss research institute of TU Munich.
The 4DIAC IDE and the FORTE runtime environment, provide a framework for distributed industrial automation and control by implementing the IEC 61499 standard.
The framework is used to implement distributed/interacting control tasks spread among different target devices turning the target devices into Soft-PLCs participating in the overall control application.

This document describes how to set up the 4DIAC-IDE on your development machine and connect to a container with the forte-RTE on your target router.

Download and prepare the 4diac-IDE

Download and unpack the latest stable release of the 4diac-IDE. If you want to install from source, download directly from the 4diac-repositories.

Check 4diac-IDE execution

Change into the 4diac-folder and run the 4DIAC-IDE executable. Set the workspace to suggested folder and check if the 4diac-IDE starts without errors.

Download demo projects

In order to access router functionalities like I/Os, sending emails and MQTT messages, reading CPU and RAM usage through the CLI (Command Line Interface), router specific interface function blocks need to be added. Some sample applications are provided to demonstrate how to work with the router specific function blocks.

Download the demo project archive INSYS_Demo.tar. Within the 4diac-IDE select File -> Open projects:

Import archive

Select the archive with demo projects and import the eclipse project and click finish.

The INSYS_Demo project should appear within the System Explorer:

System explorer

Before you can start playing with the demo projects and create your own distributed applications, at least one device with the forte runtime environment is necessary.

Install and configure a container with 4diac-RTE (forte)

In order to execute your modelled control applications across various devices, on every involved device a runtime needs to be present. The 4diac runtime environment (RTE) is called forte and a pre built container for INSYS routers is available.

The next steps are optional, but recommended. They configure DNS and gateway, so the applications in the container access other nets (like the internet).

Run demo application blinky_led

To verify the correct installation of 4diac and the forte container on your router, we will deploy the blinky_led demo application.
The application will toggle your routers Info-LED with the specified interval when running.

blinky led application

Find the System Explorer tab on the left side of the IDE and double click on System Configuration configure your local resource. You currently might have only one forte container (the green one in the picture below) on your router, which is sufficient if you only want to work with a single device for now. For more sophisticated projects you can instantiate multiple forte containers on your router to simulate a distributed system.

Change the IP address to your containers IP address with a double click on the IP address, e.g. 192.168.1.3:61499 where 192.168.1.3 is the IP address and :61499 the port the application will listen to.

On the device multiple so called embedded resources are present. It allows you to deploy multiple applications to a single device and run them in parallel. For the blinky_led application we only use the embedded resource blinky_led for now:

System configuration

After configuring the application, switch to the deployment console. If the console is not visible by default, click on the symbol in the upper right corner with the pop up description Open Perspective Alternatively you can open it via the menu Window -> Perspective -> Open Perspective -> Deployment.

Drawing

In the tab Download Selection activate the checkbox blinky_led. Right click on it and select CLEAN Resource in order to remove all programs that might already be on the embedded resource.

Afterwards download the blinky application to the embedded resource on your forte device with a click on the button Download. The download has been successful if no errors are shown in the Deployment Console.

Deployment console

Check the Info-LED on your router, it should now blink with the specified interval in the application.

Monitor application execution

4diac gives you the opportunity to watch the execution of your application live within the IDE.
Therefore go back to the System perspective (top right in IDE). Right click on INSYS_Demo system and select Monitor System. A small green circle appears next to the system. Right click into every function block of the blinky application and select Watch All. Next to the function blocks the current values are be shown.

Important: Before downloading or cleaning the embedded resource, exit the system monitoring first, or communication with the container will fail!
Monitor system

Watch all - Function Blocks

Monitoring Function Blocks