Supported platforms: CODESYS 3.5, CODESYS 3.5 SAFETY

 

CODESYS 3.5 CAN gateway

CODESYS 3.5 CAN gateway is a application that enables CAN bus based connection from CODESYS 3.5 IDE to EPEC control unit.

 

See Going Online and Downloading Application (CODESYS 3.5, Using CAN ) for more information about defining mandatory settings to CAN gateway and go online.

 

 

 

CODESYS 3.5 CAN gateway uses socket communication to transfer data between different application parts. Application uses the first free socket port starting from port 8888. It should be ensured that Windows firewall does not block application's socket communication.

 

CODESYS 3.5 CAN gateway application can be closed from system tray pop-up menu. Selecting the X button on the top right corner only hides the main window.

 

Start all - button is disabled if same CAN adapter and channel is selected to use more than one gateway.

 

 

Gateway Start - button is disabled if other gateway is already running with same CAN adapter and channel.

 

Gateway Sets

Gateway sets can be used to configure different gateway settings for example different machine types.

A gateway set can contain one or several gateways. For example in the screenshot below the gateway set Machine Type 1 contains two separate gateways MainNetwork and SubNetwork.

 

 

 

Add a new gateway set to Gateway Set drop-down list.

Remove selected gateway set from drop-down list.

Import saved gateway set from file (XML).

Export selected gateway set to file (XML).

 

Configuring Gateway Settings

A new gateway can be added by selecting Click here to add new item.

The selected gateway can be deleted by selecting Delete gateway.

 

Gateway settings:

Gateway Name

Gateway name is only descriptive, it does not affect the gateway's operation.

Port

Port number used in communication.

Bitrate

Control unit's bitrate.

Target Node ID

Control unit's CODESYS node-ID.

CODESYS scan finds other node-IDs too, but communication is more reliable when using correct node-ID.

Gateway Node ID

Gateway's node-ID. Select node-ID that is not used by any other device connected to the bus (range 1-127).

CAN adapter

Used CAN adapter. Only adapters which are connected to PC is shown on list.

Channel

Used CAN adapter channel. Note that channel numbering starts from zero.

Start/Stop

Start/stop gateway.

Status

Status of running gateway:

 Green up arrow indicates that gateway has transmitted CAN messages during last second.

 Red down arrow indicates that gateway has received CAN messages during last second.

Yellow triangle indicates that other gateway is detected in CAN bus.

Red triangle indicates CAN busoff. CAN connections and used bit rate should be checked.

 

 

 

CAN Gateway Event Log

In the status bar is shown the application's latest event.

 

 

Whole application's event log can be seen by clicking the blue notebook icon. Every gateway has also its own log.

 

 

 

System Tray Pop-Up Menu

Windows system tray pop-up menu can be opened by right clicking the CODESYS 3.5 CAN gateway icon.

 

 

From pop-up menu it is possible to select CAN card, used bitrate and start/stop gateway.

 

 

 

CODESYS 3.5 CAN Gateway Application Settings

Start automatically when starting Windows

CODESYS 3.5 CAN gateway application is started automatically when Windows is started. However, note that gateways need to be start always manually from main window or system tray pop-up menu.

Start minimized

CODESYS 3.5 CAN gateway application is started without main window. Only system tray pop-up menu is available. It is possible to open main window by clicking Manage-button in pop-up menu.

 

 

Source file topic100739.htm

Last updated 13-Jun-2024