Skip to main content

Command: Configure the Local Gateway

Function: The command opens the Gateway Configuration dialog where you can configure the block drivers for the local gateway – an alternative to manually editing the Gateway.cfg configuration file.

Call: Context menu when a gateway entry is selected in the device editor in the Communication Settings dialog

Important

A correct configuration of the gateway requires detailed knowledge. If you have any doubts, do not change the default configuration settings.

Tip

To enable the Edge Gateway functionality and to connect the Edge Gateway to the CODESYS Automation Server, you can use the CODESYS Automation Server Connector or the CODESYS Service Tool. For more information about this, see the help for the CODESYS Automation Server in the chapter "Connecting an Edge Gateway to the Server and Entering PLCs". Note also the "Security Notices for the Edge Gateway" in the help.

Dialog: Gateway Configuration

The configuration tree displayed in the dialog corresponds to the description currently valid gateway.cfg configuration file. It displays the parameters with the current settings for the interfaces involved. Changes to the configuration in the dialog, confirmed by clicking OK result in the direct update of the configuration file.

Tip

After the gateway gateway.cfg configuration file has been changed, the gateway has to be restarted in order for the changes to be applied.

Add

Menu with commands for adding interfaces and settings

The commands are also available in the context menu of the dialog. The selection depends on which entry is selected and which settings have already been added:

Add Interface: Select an interface for communication via the gateway. It is inserted at the top level of the tree. See the table below for the possible block driver interfaces.

Add Configuration Setting: Select a setting for the selected interface. It is inserted below the interface in the tree. To edit the value of the setting, double-click in the Setting column to open an editing field. See the table below for the possible settings per block driver interface.

Delete

Deletes the selected configuration setting

Move Up, Move Down

Moves the selected configuration entry one position up or down

OK

The settings are confirmed.

In CODESYS version 3.5.21.0 and higher: The CAN drivers selected in the dialog are written in the configuration file CODESYSControl.cfg.

Table 130. Possible block driver interfaces

COM Port

Serial port on the device, for example for data exchange according to the RS232 standard on a COM port intended for this purpose

Possible configuration settings:

Name: Symbolic only

Port: Physical serial port which is used for this interface, for example COM 5 on a Windows computer

Baudrate: 2400, 4800, 9600, 19200, 38400, 57600, 115200

Activate auto addressing: _cds_icon_checked.png (default = _cds_icon_option_deactivated.png)

The Local address setting is evaluated. Both devices, which communicate via the serial port, will independently negotiate their addresses before they begin exchanging messages. If the addresses of both devices are the same, then they are negotiated again. This setting is useful when the local addresses cannot be set explicitly, for example for devices which are physically separated.

Local address: Evaluated only when Enable auto addressing is activated

Default = actual value for port

Shared Memory

Shared memory driver

Possible settings:

Name: Symbolic name (has no function)

Forced address: Default = -1 (= no forced address)

Example: 42 means that the driver has to use the fixed address defined here and that addresses are assigned freely in the range 0255. This setting can be useful when more than one shared memory driver is activated in the configuration.

Ethernet UDP/IP

Ethernet interface for data exchange according to the "User Datagram Protocol"

Possible settings:

Name: Symbolic, unique name (has no influence on the function)

Port index: Port number for the communication

Port indices are in the range 03.

They are mapped to the following Ethernet port: 17401743.

IP address: Default = 127.0.0.1

This setting can be useful to explicitly set an interface when the device has multiple network interfaces.

Example: 127.0.0.1 stands for some local network interface, also known as localhost. Every other address (for example, 10.27.7.72) represents a real IP address which has to be available on the device.

Network mask: Default = 255.255.255.0

Example: 255.255.252.0

This setting can be useful to explicitly set an interface when the device has multiple network interfaces.

PPP address: Default = 127.0.0.1

Example: 10.13.42.240

Establishes a logical point-to-point connection between the UDP interface and the node named with the address specified here

Causes the UDP interface to communicate exclusively with this node and no broadcasts to be sent in the network

Ethernet TCP/IP

Ethernet interface for data exchange according to the "Transmission Control Protocol"

Possible settings:

Name, Port, IP address: See Ethernet UDP/IP above

Inactivity timeout: Default = 0

This setting defines the time span (in seconds) after which the TCP connections are closed when data is no longer exchanged.

CAN Client (legacy)

Name: Symbolic, unique name (has no influence on the function)

Network ID: Network ID (0...255) of the CAN interface, which should be used for communication.

Node ID: CANopen node ID, which is used for communication. Make sure that there is no node ID conflict.

Enable block transfer: TRUE: Block transfer should be used (default setting)

Baudrate (kbit/s): Baud rate for communication

CAN driver: CAN driver component which should be included in the component list.

Descriptions of the settings can also be found directly in the dialog.

USB Port

Name: Symbolic, unique name (has no influence on the function)

A description for the other settings can be found directly in the dialog.

CAN

For controllers version 3.5.21.0 and higher, this interface should be used instead of CAN-Client (legacy).

Both transfer layers – CAN and CAN FD – are possible. CAN FD allows for a higher data throughput and faster transfer.

Name: Symbolic, unique name (has no influence on the function)

[GLOBAL] Task priority: Global setting for all CAN interfaces. This setting defines the priority for the communication task (default value: '95'; highest priority).

Address: Unique ISO-TP address (0...255) used by the CAN block driver.

Functional Address (Broadcast): Unique functional ISO-TP address used for broadcast messages (0...255, default value: 255).

Network ID: Network ID (0...255) of the CAN interface, which should be used for communication.

CAN FD:

  • FALSE: The CAN interface will be opened in classic CAN mode.

  • TRUE: The CAN interface will be opened in CAN FD mode.

If you set TRUE, then all devices in the network must support CAN FD. If there exist devices in the network which do not support CAN FD, then you should consider using the additional setting Adaptive FD.

Adaptive FD:

  • FALSE: The adaptive FD mode should not be enabled.

  • TRUE: The adaptive FD mode should be enabled.

This mode can be enabled only when the CAN FD mode is enabled. It can be used for compatibility with classic CAN networks. As long as no CAN FD message is received, the gateway communicates via classic CAN. It automatically switches to the faster FD mode when at least one FD message is received. In order to switch back to classic CAN, the gateway must be restarted.

Baudrate (kbit/s): Baud rate for communication

Data Baudrate (kbit/s): Baud rate for CAN FD communication Used only when CAN FD mode is enabled.

Message Limit: Optional setting to limit the maximum number of messages which are sent consecutively. Default value: 0

CAN driver: CAN driver component which should be included in the component list.

Descriptions of the settings can also be found directly in the dialog.



For more information, see the following: Tab: Communication Settings