DOCA0172EN-12

Modbus Gateway Function

Presentation

The EcoStruxure Panel Server implements a Modbus gateway function. It can serve requests received from the Modbus TCP/IP clients connected upstream so that each client can access data simultaneously from downstream devices, connected either via IEEE 802.15.4 wireless network (depending on the model) ,or Modbus-SL wired network (Universal and Advanced models). The maximum number of Modbus TCP/IP devices connected to one Panel Server is 128 and includes devices physically connected to the Panel Server and any type of devices connected to a child gateway. For more information, see Maximum Configuration .

The Modbus protocol exchanges information using a request-reply mechanism between a client (formerly master) and a server (formerly slave). The client-server principle is a model for a communication protocol in which one device (the client) controls one or more other devices (the servers). Modbus client ID was formerly known as Master and Modbus server ID was formerly known as Slave.

Availability

This function is available on Panel Server Entry , Universal , and Advanced .

Modbus Gateway Function

The Panel Server implements its own Modbus registers that are available at unit ID 255, to provide its own identification information. Therefore, Panel Server has its own register table (see DOCA0241EN EcoStruxure Panel Server  - Modbus File ).

The Panel Server acts as a transparent Modbus-SL to Modbus TCP/IP gateway. It converts Modbus TCP/IP requests received on unit ID X to Modbus-SL requests sent on server ID X. Responses obtained from the downstream devices are then forwarded upstream to the Modbus TCP/IP client.

By default, out-of-the-box, the Modbus gateway uses the unit ID in the Modbus TCP/IP request as unit ID / Server ID of the physical Modbus-SL device.

For Modbus TCP/IP devices, when carrying out commissioning, a virtual server ID is added to a Modbus TCP/IP device to allow access in case of separate topology or to enable the Modbus TCP proxy feature.

The Panel Server implements a set of virtual Modbus register tables per paired IEEE 802.15.4 wireless device. Each time a new wireless device is paired to the Panel Server , the device is automatically assigned a virtual Modbus server ID. The first paired wireless device is assigned virtual server ID 100. Each subsequent wireless device takes the next virtual ID, which gets automatically incremented by one each time a new device is paired. For detailed information about the registers of supported wireless devices, refer to spreadsheet DOCA0241EN EcoStruxure Panel Server  - Modbus File .

To avoid conflicts between the server IDs of the physical Modbus-SL devices and the virtual server IDs of the wireless devices, it is possible to update the virtual server ID through EcoStruxure Power Commission software or the Panel Server webpages (select Settings > Wireless devices then choose one connected device and change value in Modbus virtual > Virtual server ID ).

NOTE: The Modbus gateway function should not be confused with a network gateway or a router. The Panel Server does no routing and no forwarding at the network (IP) layer.

Definitions of Modbus Unit ID / Server ID and Virtual Server ID

To enable an external Modbus TCP/IP client to access a device connected to the Panel Server , each device must have a unique ID named virtual server ID.

The virtual server ID is automatically assigned:

  • when a wireless device is connected to the Panel Server .

  • whenever a device is created and associated to a device Unit ID / Server ID.

The unit ID / server ID is either:

  • the configured unit ID of any device connected to the RS485 serial port,

  • the configured unit ID of a connected Modbus TCP/IP device, or

  • the unit ID used by a Modbus TCP/IP gateway that connects a device to an Ethernet network.

The Panel Server uses the following rules to assign the virtual server ID when a downstream device is discovered or added:

  • For Modbus-SL devices, if the physical server ID / unit ID (also known as the Modbus address) is not already used as a virtual server ID by another device, it will be assigned as the virtual server ID. If not, then, the first available virtual server ID in the range 1–254 will be assigned starting from virtual server ID 1.

  • For wireless devices, the first available virtual server ID in the range 1–254 will be given starting from virtual server ID 100.

  • For Modbus TCP/IP devices, the first available virtual server ID in the range 1–254 will be given starting from virtual server ID 200.

IMPORTANT: It is recommended to set the Modbus physical address of Modbus-SL devices in the range 1–99.

Following this recommendation, in most configurations with less than 100 Modbus-SL devices, less than 100 wireless devices, and less than 48 Modbus TCP/IP devices, the virtual server ID will automatically be given as follows:

  • Modbus-SL devices will have their physical server ID assigned as virtual server ID in the range 1–99.

  • Virtual server ID of wireless devices will be in the range 100–199.

  • Virtual server ID of Modbus TCP/IP devices will be in the range 200–254.

The virtual server ID can be changed using EcoStruxure Power Commission software or on the Panel Server webpages (see Modbus Discovery settings). The virtual server ID must be unique.

EcoStruxure Power Commission software and the Panel Server webpages provide the following information for each device (see addition of Modbus devices):

  • Virtual server ID

  • Connection:

    • Unit ID / server ID for Modbus-SL devices

    • IP address for remote devices and unit ID / server ID for Modbus TCP/IP devices

    • RFID for wireless devices

  • Device type as defined in the device settings

For information about how to manage virtual server ID conflict, see Example of Modbus Server ID Conflict and Resolution.

For examples how to use virtual server ID to access data in downstream devices according to the communication architecture, see Examples of Modbus Routing.

Modbus TCP/IP Service Activation

To help reinforce security of data access and avoid malicious access to device data from an upstream connection, Modbus TCP/IP server can be enabled/disabled per interface (ETH1/ETH2 (not on Entry model)/Wi-Fi) on the Panel Server webpages at Settings > Network communication > Services > Service activation .

Do not disable Modbus service on port ETH1, ETH2, or Wi-Fi if the interface is used to connect EcoStruxure Power Commission software or a monitoring software such as SCADA.

Examples of typical cases of architectures for which Modbus TCP/IP service is disabled for the upstream connection:

Architecture

Modbus TCP/IP service configuration

Panel Server connected to Panel Server webpages and Modbus and wireless devices

To allow access only to the upstream application (such as a web browser), it is recommended to disable Modbus service on Ethernet ports and Wi-Fi. This avoid malicious access to the downstream devices.

Panel Server connected to the cloud and in the separated mode to Modbus and wireless devices

When the Ethernet network is configured in the separated mode, it is recommended to:

  • Disable Modbus service on Panel Server ETH1 port to avoid malicious access to data of the downstream devices.

  • Enable Modbus service on Panel Server ETH2 port to allow data acquisition from the downstream devices only if you need to connect a Modbus TCP/IP client on ETH2 through EcoStruxure Power Commission software.

Modbus Server ID Conflict and Resolution

With the above discovery and addition mechanism, the Panel Server will always assign an available and unique virtual server to every device.

However, it is possible to assign the same virtual server ID to two devices when carrying out commissioning.

To resolve this situation, update the virtual server ID in one of the two devices to an available server ID.

Example of Modbus Server ID Conflict and Resolution

In the following example, Panel Server is used as a gateway with the following devices installed in the switchboard:

  • One PM3250 Power Meter communicating through Modbus-SL, and configured with server ID 100

  • One PowerTag Energy

Consider the following sequence that will generate a conflict and see how to resolve it:

  1. Connect the PM3250 Power Meter configured with server ID 100 to the RS485 Modbus communication port on Panel Server .

  2. Power up the Panel Server .

  3. From the monitoring tool connected upstream, you can access the Modbus registers of PM3250 by sending Modbus TCP/IP requests to unit ID 100 of the Panel Server Modbus server.

  4. From EcoStruxure Power Commission software, discover the Panel Server and access the Panel Server homepage without performing a Modbus-SL device discovery. From the wireless device discovery card, launch a wireless device discovery for the first time. The PowerTag Energy sensor is then discovered and paired to Panel Server .

    Result: The PowerTag Energy sensor is automatically assigned a virtual server ID equal to 100. Because it is the same ID as for PM3250, there is a conflict.

  5. If you send Modbus TCP/IP requests to unit ID 100 of the Panel Server Modbus server:

    • The virtual registers of the PowerTag Energy will be available.

    • You will no longer be able to send requests to the PM3250 Power Meter.

    • The PM3250 Power Meter is now masked by the virtual device.

  6. To resolve this situation, you need to update the virtual server ID to any value you choose, except 100. This can be performed from the wireless device configuration by using EcoStruxure Power Commission software.

Modbus TCP/IP Proxy

The Panel Server can act as a Modbus TCP proxy for a Modbus TCP/IP device connected to the Panel Server . This function can be used to connect several devices simultaneously to a TCP/IP device offering a single TCP/IP connection.

With this function, the upstream communication system establishes as many TCP/IP connections as required by the Panel Server . This is done by using the virtual server ID of the Modbus TCP/IP device managed by the Panel Server . The Panel Server establishes a single connection to the downstream Modbus TCP/IP device.

For more information about Modbus routing and assignment of virtual Modbus server IDs, see Examples of Modbus Routing.

QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?