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 - 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:
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:
OPC-UA
Here is an example of an 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.
- Here you can see that the directory tree is not loaded
- Press the button to load the whole connection tree
- Wait until the tree is fully loaded. This can take up to five minutes, depending on how much data needs to be downloaded.
- If a green mark appears, the tree has been loaded.
Now go to the page you want to edit and add elements. Then look at the connection properties (1).
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.
- This icon means that the tree is loaded in the background
- Status indicates whether the connection is active
- Here you can download the complete variable tree
- You can update the connection here
Add new Connection
Go to the Connections menu item in the menu and open the connection editor.
A button appears in the upper left corner that says "New" (2). Click on it and create a new connection.
- Set a unique name for the connection
- Address of the controller or hoster
- www = Hoster
PLC = control
Local virtual PLC = CODESYS Control Win
- Active port of the connection
- Websocket connection to PLC, OPC UA
- Off: no active reconnection, On: active reconnection
- Name assigned in the CODESYS project
- Password that was assigned in the CODESYS project
- This is not required for CODESYS Control Win
- Create Connection