Connections

The connection module is one of the most important functions of eDESIGN. It establishes the connection between the client (browser) and the backend program where the variable values are changed. The value changes are transferred to the client for display.

Connection types

  • WWW | This connection type is used when eDESIGN is hosted on a web provider and the deployment is operated via this type
  • PLC | Classic connection type to a PLC
  • Virtual PLC | Similar to a PLC, but connecting to a virtual (soft) PLC that normally runs on the developers PC. Mainly used during the development process without the need for additional hardware.

Protocols

eDESIGN currently implements three types of internal protocols:

  • eWEB | Websocket type protocol that reads values from the PLC. eWEB uses a non-permanent subscription when reading values. It subscribes and unsubscribes the values when switching between pages.
  • eWEB-Static | Websocket type protocol, similar to eWEB. The connection uses a permanent subscription and reads the values into a "memory" in the background. These values are then read by the visualization. When switching between pages, the variables are not subscribed/unsubscribed, so the display is faster, but it has a higher resource consumption as a result.
  • OPC-UA | eDESIGN is able to read values from the OPC-UA server. This is done via a middleware (gateway) component.

eWEB protocol

Here is an example of a connection via the eWEB protocol:

eWEB protocol

eWEB - Static

Websocket type protocol is similar to eWEB. The connection uses a permanent subscription and reads the values into a "memory" in the background. These values are then read by the visualization. When switching between pages, the variables are not subscribed/unsubscribed, so the display is faster, but this results in higher resource consumption.

For full usage of this protocol, CODESYS needs to be set accordingly.
In CODESYS application setup the following Variable tree:

CODESYS application setup

Two important structures need to be set up:

  • Application.GVL_HMI_static.normalStruct (1 second refresh rate)
  • Application.GVL_HMI_static.fastStruct (333 ms refresh rate for really fast applications)

You can define your variables under these structures. Be careful with the size of the structure. It is recommended not to use more than 100 variables in the structure.

Note: The advantage of this protocol is that it stores the variables internally in the HMI, even if they are not currently used on the screen, which results in faster display of values when changing pages. The disadvantage is the memory and computation requirements. To be used with caution. Normally the eWeb protocol (classic) is sufficient.

Here is an example of a static eWEB connection:

eWEB - Static

OPC-UA

Here is an example of an OPC-UA connection in eDESIGN:

OPC-UA connection in eDESIGN

Connection Tree

To use your Soft-PLC in the editor you must first make sure that the tree of your connections are loaded. Here you will see how to load the tree.

Connection Tree

  1. Here you can see that the directory tree is not loaded
  2. Press the button to load the whole connection tree

Connection Tree

Connection Tree

  1. Wait until the tree is fully loaded. This can take up to five minutes, depending on how much data needs to be downloaded.
  2. If a green mark appears, the tree has been loaded.

Connection Tree

Now go to the page you want to edit and add elements. Then look at the connection properties (1).

Connection Tree

Once you have selected your connection, you should be able to see the entire connection tree (2).

Admin Dashboard

The connection overview is also available in the main dashboard.

The connection overview is also available in the main dashboard.

  1. This icon means that the tree is loaded in the background
  2. Status indicates whether the connection is active
  3. Here you can download the complete variable tree
  4. You can update the connection here

Add new Connection

Go to the Connections menu item in the menu and open the connection editor.

Main menue: click on connections

A button appears in the upper left corner that says "New" (2). Click on it and create a new connection.

Create new connection

edit connection settings

  1. Set a unique name for the connection
  2. Address of the controller or hoster
  3. www = Hoster
    PLC = control
    Local virtual PLC = CODESYS Control Win

edit connection settings

  1. Active port of the connection
  2. Websocket connection to PLC, OPC UA
  3. Off: no active reconnection, On: active reconnection
  4. Name assigned in the CODESYS project
  5. Password that was assigned in the CODESYS project
  6. This is not required for CODESYS Control Win
  7. Create Connection