Edge Gateway for Linux
You have purchased the CODESYS Automation Server in the CODESYS Store International and created a user account with user name and password for accessing the CODESYS Automation Server. For detailed instructions, see Getting Started with the CODESYS Automation Server.
The CODESYS Automation Server Connector package is installed on your computer in the CODESYS Development System and CODESYS has been restarted.
The CODESYS Edge Gateway for Linux package for Linux is installed on your computer.
If this package is not installed on your computer, then download the CODESYS Edge Gateway for Linux package from the CODESYS Store International and install it on your computer or on a standalone target device.
Installing the Operating System
Connect a keyboard, mouse, and monitor to the Linux device. Add the device to your network which has a connection to a DHCP server.
Follow the manufacturer's instructions.
Detect the network address.
See the manufacturer's documentation for the set network parameters of the Linux device.
You can also detect the network parameters of the Linux device by means of the console command
"ifconfig"
in a console of the Linux device.
Start CODESYS.
Click
.The Edge Gateway view opens.
In Select target, click the Scan button.
The Scan Edge Gateway dialog lists the IP addresses of the devices available in the network.
Identify your Linux device.
Open a Windows command prompt.
Note: For this purpose, your Linux device needs a known and unique name in the network.
Execute the
ping
command on the device name.The network address is returned.
Installing the runtime package in CODESYS
Click
.The Edge Gateway view opens.
In Select target, click Scan.
The network is scanned for PLCs. The result is listed as IP addresses in the Scan Edge Gateway dialog. The respective MAC address is displayed in parentheses after each IP address.
Select the listed item in the dialog that matches your PLC. If the IP address is unknown, then the MAC address can serve as the identifier. This is usually also provided on the hardware housing (for example, a label).
The connection to the PLC is established.
As an alternative to Steps 2 and 3, you could also specify the name of your Linux computer in the IP address field.
In Login credentials, specify the configured credentials for the Linux system.
In CODESYS Edge Gateway for Linux Package, in Version, select the desired version with architecture of the Edge Gateway package.
The folder is displayed in the Package directory where CODESYS stored the Debian files for the Edge Gateway file (DEB file).
Example:
..\Users\<name>\CODESYS Edge Gateway for Linux
.Select the version with the desired architecture to be installed.
Click Install.
The selected Edge Gateway is installed. The Edge Gateway is started automatically. A manual restart is not required.
Connecting an Edge Gateway to the Automation Server and Entering PLCs
If the Edge Gateway view is not open, then click .
Tip
Note: If the
command cannot be executed for a Linux gateway, then you can enable the configuration mode by adding the following entry in the configuration fileGateway.cfg
:[CmpEdgeGateway]
MaintenanceMode=1
Then the Edge Gateway has to be restarted.
In the Edge Gateway view, in the Edge Gateway area, click the Activate configuration mode button.
Read the notes in the Activate CODESYS Edge Gateway Configuration Mode dialog and then click OK.
Dialog: Activate CODESYS Edge Gateway Configuration Mode
In CODESYS, click .
The Connect or Reconfigure Edge Gateways view opens.
In the Edge Gateway group, in the Gateway hostname / IP field, click the list box arrow and select the gateway that should be configured as the Edge Gateway. The list box contains that gateways that are already configured in CODESYS.
The Gateway port field is updated automatically.
As an alternative to the previous step, you could also manually specify Gateway hostname / IP and Gateway port.
If you have manually specified the data, then you need to click the Check / Refresh Gateway Information button for the initial display of the Edge Gateway data (for example, whether or not the configuration data is set). As an alternative, you could also press the Enter key in one of the two fields.
If the Configuration mode is displayed as disabled in the Edge Gateway group of this view, then click the Check / Refresh Gateway Information button. If the configuration mode is still not enabled, then recheck Steps 1 to 3 of this guide.
Now enter the following information for CODESYS Automation Server in this view:
Server URL: URL of the CODESYS Automation Server
Name on server: Name that the Edge Gateway will have on the CODESYS Automation Server
Description: Description of the Edge Gateway
Click the Connect to Server button.
The following dialog opens for signing in to the CODESYS Automation Server:
You have specified the Server URL in the Connect or Reconfigure Edge Gateways view. You can no longer change it in this step.
When MFA is activated for the given user, or not yet activated but enforced, then the browser view of the CODESYS Automation Server also opens to enter the token or to activate MFA. After you have completed this successfully, you are redirected back to CODESYS.
If the communication with the CODESYS Automation Server is running via a proxy server, then the Proxy Server – Sign In dialog opens first before the Automation Server – Sign In dialog. In this dialog, you specify the Proxy URL, User name, and Password for the proxy server and then click OK.
In this dialog, enter your user name and password for the CODESYS Automation Server and click OK.
A message is displayed in the message view that a new Edge Gateway has been created on the CODESYS Automation Server.
The Certificate state and Certificate thumbprint fields are updated in the Connect or Reconfigure Edge Gateways view. The certificate state of the CODESYS Automation Server area reads Primary Certificate matched. The Certificate thumbprint for the Edge Gateway and the CODESYS Automation Server is identical. The Certificate thumbprint is visible when the Show details option is selected.
Click the Show Edge Gateway on Server command.
The sign-in dialog of the CODESYS Automation Server opens.
In the Sign In dialog, use your user name and password to sign in to the .
When MFA is activated for the given user, or not yet activated but enforced, then the browser view of the CODESYS Automation Server also opens to enter the token or to activate MFA. After you have completed this successfully, you are redirected back to CODESYS.
The
view opens.The recently created gateway is shown and is identified by a solid green circle (which means that it is currently running).
In the next steps, you specify a PLC on the CODESYS Automation Server for the new gateway.
To establish the connection from the CODESYS Automation Server to your PLC, first make sure that the PLC is running. In the menu of the CODESYS Automation Server, click .
In the Network Scan view, select your recently created gateway and click the refresh
button.
Note: Make sure that the names of the PLCs below a gateway are unique.
All available PLCs in the network are displayed.
Select your PLC from this list.
The Last seen on, Serial number, and Device identification information is displayed for this PLC.
Click Add to Server.
The Add PLC to Automation Server dialog opens.
If a user management is enabled for a PLC in CODESYS, then in the Add PLC to Automation Server dialog you first have to enter the User name and Password for the PLC.
In order for the CODESYS Automation Server to successfully connect to a PLC, the credentials of a PLC user with administrator permissions have to be entered here.
If no user management is enabled for the PLC, then a dialog prompt opens for you to set up a user management on the PLC. To do this, specify the User name, Password, and Repeat password fields. Finally, click Confirm.
The user management with the user which have just configured is set up on the PLC.
The List View window opens and also shows the recently added PLC. This PLC is identified by a solid green circle
(which means that the CODESYS Automation Server is connected to the PLC). By contrast, PLCs which are not currently connected to CODESYS Automation Server, or which are in an error state, are identified by the
symbol.
To add a tag to your PLC, click the Details button. Then click New tag in the PLC Details view and provide a name for the tag (example:
Group1
).In the List View, you can filter the displayed PLCs by tags. Click the tag of a PLC to do this.
Moreover, you can group the PLCs by tags in the topology view.