Tab ‘Communication’

In this tab of the generic device editor, you define the connection path between CODESYS and the device where your application should run.

Note

If you prefer the classic form of display for the dialog box, you can activate it in the CODESYSOptions (category Device editor.

You can select a gateway and a target device from the list boxes. The possible selections depend on the entries in the Manage gateways and Manage favorite devices dialog boxes (see the Gateway menu).

You can also type in select the target device directly with the IP address (example: “192.168.101.109”), device address (example: “[056D]”), or device name (example: “MyDevice”). After the device is entered successfully, CODESYS searches for the device in the network of the gateway.

Note

The option of searching by device name requires unique device names in the network.

The filled circle on the lower right corner of the gateway symbol provides information about the connection status:

  • Red: CODESYS cannot establish a connection.
  • Green: The connection is established.
  • Black: The connection status is unknown.

Note

Some communication protocols allow regular checking of the gateway so that the status cannot be displayed.

Clicking the filled circle of the target device starts a network scan for the device. This works only if the network is not already being scanned.

Scan network This button opens the Select Device dialog box with a list of all configured gateways and their connected devices. You can select one target device from this list. Refer to the description of the classic view below for details about this dialog.
Gateway

This menu includes the following commands:

  • Add new gateway: Opens the Gateway dialog box for defining a new gateway channel.
  • Manage gateways: Opens the Manage gateways dialog box with an overview of all gateways. You can add or delete entries here or change their order.
  • Configure the local gateway: Opens the Gateway Configuration dialog box. You can configure the block drivers for the local gateway.
Device

This menu includes the following commands:

  • Add current device to favorites: Adds the currently set device to the list of favorite devices.

  • Manage favorite devices: Opens the favorites dialog box with a list of all preferred devices. In this dialog box, you can add or delete entries or change their order. The top device is the default.

  • Rename active device: Opens the Change device name dialog box.

  • Wink active device: Devices that support this function illuminate a flashing signal.

  • Send echo service: CODESYS sends five echo services to the PLC. These are used for testing the network connection, similar to the ping function. The services are sent first without data packets and then with data packets. The scope of the data packets depends on the communication buffer of the PLC. A message box opens with information about the average echo service delay and the scope of the sent data packets.

  • Store communication settings in project:

    7a8ca3cbc369b81dc0a8640e012568ee_9a3f06830c0506c5c0a8640e012f0ace : CODESYS restores the communication settings automatically, even if you open the project on another computer.

    7a8ca3cbc369b81dc0a8640e012568ee_4681610f0c058035c0a8640e0049916a : The current connection settings are saved on your computer in the local CODESYS options. You have to reset them if you use the project on another system.

  • Confirmed online mode:

    7a8ca3cbc369b81dc0a8640e012568ee_9a3f06830c0506c5c0a8640e012f0ace : CODESYS requires you to confirm the following when calling the following online commands (for safety purposes): force values, write values, multiple loading, remove force list, single cycle, start, and stop.

  • Filter network scans by target ID:

    7a8ca3cbc369b81dc0a8640e012568ee_9a3f06830c0506c5c0a8640e012f0ace : The display is limited on the devices that have the same target ID as the current device configured in the project.

See also

Communication Settings - Classic View

In the CODESYS options, you can activate the classic view of the dialog (Tools ‣ Options, category “Device editor”).

Select the network path to the controller

Gateway channel for the connection.

Select the channel from the lower part of the view.

View displaying configured gateway channels and network devices
Left side of view

Tree structure of the configured gateway channels with the connected devices in the local network:

7a8ca3cbc369b81dc0a8640e012568ee_c5b36a1bc2a9141fc0a8640e01f3382a .

Note: CODESYS saves these entries on the local system, not in the project.

The device entries are preceded by a device symbol ( 7a8ca3cbc369b81dc0a8640e012568ee_2280b34e1e8ce432c0a8640e01947982 ). Entries with a target ID that are different from those currently configured in the project are displayed in gray.

Clicking Scan network refreshes the list.

Note: If you created the first project on the local system, then the local gateway is listed as an entry in the tree by default. CODESYS starts this gateway automatically on system boot.

The filled circle on the lower right corner of the gateway symbol provides information about the connection status:

  • Red: CODESYS Development System Cannot establish a connection.

  • Green: The connection is established. 7a8ca3cbc369b81dc0a8640e012568ee_4f74984ac2ac4c8bc0a8640e01c93dc1

  • Black: The connection status is unknown.

    Note: Some communication protocols allow regular checking of the gateway so that the status cannot be displayed.

Each of the device entries in the tree consist of a symbol followed by the Device Name> [Device Address]. On the right side of the view, you also see the Target ID, Target Name, Target Type, Target Vendor, and Target Version.

Right side of view Information about the gateway channel of device selected on the left side of the view.
Filter and sorting functions on the right side of the dialog
Filter: You can reduce the displayed list of devices that have the same Target ID as the current device configured in the project.
Sorting order: You can sort the list by Name or Device Address in alphabetical or ascending order.
Command buttons on the right side of the dialog
Set active path This command sets the selected communications channel as active. Double-clicking the entry in the channel tree achieves the same result.
Add gateway This command opens the Gateway dialog box where you can define a gateway that CODESYS should add to the current configuration.
Add device This command opens the Add device dialog box where you can define a device manually to be added to the tree below the selected gateway. Please note the functionality of Scan network as well.
Scan network This command starts a search for available devices in the local network. The configuration tree of the gateway is refreshed accordingly.
Commands in the context menu of the gateway tree and device tree in the dialog
Scan for device by address This command searches the network for devices with a unique address as given in the configuration tree. CODESYS displays the detected devices with the given address below the gateway. The search always applies to the devices below the selected gateway or below the selected entry.
Scan for device by name This command searches the network for devices with the same name as given in the configuration tree. Capitalization is ignored here. CODESYS displays the detected devices below the gateway with the given name together with its unique device address. The search always applies to the devices below the selected gateway or below the selected entry.
Scan for device by IP address This command searches the network for devices with a unique IP address as given in the configuration tree. CODESYS displays the detected devices with the given address below the gateway together with its name. The search always applies to the devices below the selected gateway or below the selected entry.
Send echo service Send echo service: CODESYS sends five echo services to the PLC. These are used for testing the network connection, similar to the ping function. The services are sent first without data packets and then with data packets. The scope of the data packets depends on the communication buffer of the PLC. A message box opens with information about the average echo service delay and the scope of the sent data packets.
Delete selected device This command deletes the selected device from the channel tree.
Edit Gateway This command opens the Gateway dialog box for editing the settings for the selected gateway.
Configure the local gateway This command opens a dialog box for configuring a local gateway. This provides an alternative to manually editing the Gateway.cfg file.
Options in the lower part of the dialog
Don’t store communication settings in project

7a8ca3cbc369b81dc0a8640e012568ee_9a3f06830c0506c5c0a8640e012f0ace : The current connection settings are saved to the local CODESYS options on your computer, not in the project. This means that you have to reset them if you use the project on another system.

7a8ca3cbc369b81dc0a8640e012568ee_4681610f0c058035c0a8640e0049916a : The settings are saved in the project and CODESYS Development System restores them automatically when you open the project on another computer.

Confirmed online mode 7a8ca3cbc369b81dc0a8640e012568ee_9a3f06830c0506c5c0a8640e012f0ace : CODESYS requires you to confirm the following when calling the following online commands (for safety purposes): force values, write values, multiple loading, remove force list, single cycle, start, stop.

See also