跳至主要内容

ModbusGateway

Architecture

The ModbusGateway program primarily performs the conversion between Modbus TCP and Modbus RTU protocols. The Modbus Client on the north side can directly access the Modbus Gateway program on the gateway device to connect to the instruments on the south side.

Enable

To enable the Modbus Gateway functionality, a connection from ETH to COM will be added by default.

Default Connection Parameters Description

ParametersDescription
North -direction portThe port type used by the client to send requests, TCP:502 means the requests are sent through the TCP port to access the Modbus Gateway using port number 502
Client IPThe IP address of the requesting client. If there are no special restrictions, all IP addresses will be allowed to access
Node IP mappingThe mapping relationship between the requesting client's ID and the south-facing instrument's ID, where 1:1 mapping means that if the requesting client's ID is "a", the request will be forwarded to the instrument with the ID of "a" in the south-facing connection
South -direction portThe port type used to connect to the actual instruments

Configuration Instruction

  1. Add

When the cursor selects the northbound port, a new connection can be added, and different client IPs can be added under the same northbound port

When the cursor selects any one of the client IP, node ID mapping, or southbound port, a new connection can be added, or a new client IP or node ID mapping and southbound port can be added

  1. Connection

There are four types of connection methods

Connection typeDescription
ETH-->COMConvert the northbound network requests to southbound serial requests
COM-->ETHConvert the northbound serial requests to southbound network requests
ETH-->ETHConvert the northbound network requests to southbound network requests
COM-->COMConvert the northbound serial requests to southbound serial requests
  1. NorthPort

Double-click the northbound port of a specific connection to access the northbound port settings

ParametersDescription
TypeThe type of Modbus request:Modbus TCP/ Modbus UDP / Modbus RTU / Modbus ASCII
PortThe port number needs to be set only when using Modbus TCP or Modbus UDP for access
Idle timeThe maximum idle time of a specific connection
Max ConnectionThe maximum number of connections allowed by Modbus Gateway
When the maximum number of connections is exceededhe strategy when the number of connections exceeds the maximum: refuse connection / drop the earliest connection
  1. Client IP

Double-click the client IP of a specific connection to access the client IP settings

ParametersDescription
IPAllowed client IP addresses. Using an asterisk (*) allows all IP addresses, while specifying a single IP or an IP range is also possible
RTU Over TCPAfter selecting this option, the protocol type for northbound requests will be Modbus RTU Over TCP
  1. Node ID mapping

Double-click the node ID mapping of a specific connection to access the node ID mapping settings. Using an asterisk (*) represents no ID conversion, meaning a 1:1 mapping

ParametersDescription
Add multipleBy default, each click on add will increase the number of ID mappings by one. Clicking add on an empty field allows you to add multiple ID mappings at once
Request Node IDThe node ID of the northbound client when sending requests
The actual node IDThe actual ID of the instrument on the southbound side
  1. South Port

Double-click the southbound port of a specific connection to access the southbound settings

ParametersDescription
TypeThe Modbus protocol type used by the southbound instrument:Modbus TCP/ Modbus UDP / Modbus RTU / Modbus ASCII
Serial numberThe serial port used to connect the gateway to the southbound instrument
TimeoutThe timeout time for southbound requests