Modbus Gateway Function
Presentation
The 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 through:
-
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 Functioning
The Panel Server implements its own Modbus registers that are available at unit ID 255, to provide its own identification information. The register table of the Panel Server is described in DOCA0241EN EcoStruxure Panel Server - Modbus File.
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 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 then choose one connected device and change value in ).
Modbus Transparent Gateway
The Panel Server can also act as a transparent Modbus-SL to Modbus TCP/IP gateway. It converts Modbus TCP/IP client requests received on unit ID X to Modbus-SL or Modbus TCP/IP requests sent on server ID X. Responses obtained from the downstream devices are then forwarded upstream to the Modbus TCP/IP client.
When used as a transparent gateway, the client (for example, SCADA) is connected via a Modbus TCP/IP connection . Any Modbus-SL settings for that connection are not taken into account.
When using the Panel Server as a transparent gateway, do not discover the Modbus devices in the Panel Server webpages. You can discover them for test purposes (for example, checking connected status) and then delete them from the list of connected devices in the Panel Server to maintain an optimal communication between upstream edge systems and downstream devices.
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.
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 .
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:
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:
-
Connect the PM3250 Power Meter configured with server ID 100 to the RS485 Modbus communication port on Panel Server.
-
Power up the Panel Server.
-
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.
-
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.
-
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.
-
-
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.