User`s manual
MGate MB3000 User’s Manual Configuring the Modbus Gateway
9-15
With the slave ID map, smart routing is achieved for units with multiple serial ports. Since each
virtual slave ID is routed to a specific Modbus network, requests are not broadcast over all serial
ports. This keeps communication efficient and prevents devices on one port from slowing down the
whole system.
How Slave ID Map is Defined
The slave ID map consists of entries (channels) that specify a range of virtual IDs, the destination,
and the offset value. The offset value is used to convert the virtual ID to the actual ID.
Setting Value Notes
Virtual Slaves ID Range
(numeric range from
1 to 254)
This specifies the range of IDs that will be
routed to the selected set of slave devices.
For example, you can specify that IDs
between 8 and 24 be routed to the devices
on Port 3. The ID 255 is reserved for the
gateway itself
Slave ID Offset
(number between
-253 and 253)
This specifies the difference between the
virtual slave ID and the actual slave ID. If a
slave's virtual ID is 16 and the actual ID is
5, you would set the offset to -11. This
offset is applied to the entire range of
virtual slave IDs.
When a serial port is set to RTU slave or ASCII slave mode, a virtual ID range will already be
created for you. Simple select the entry in the table and modify the range and offset as needed. For
TCP slaves, you can add an entry that assigns a range of virtual IDs to a specific IP address, using the
Remote TCP Slave IP setting.
Slave ID Map Example
Suppose you have two ASCII slave devices on port 1 assigned to slave IDs 3 and 5. The MGate will
automatically create a virtual ID range for port 1, which you will need to modify. If slave IDs 3 and
5 are already in use by TCP slaves, the virtual ID range should be set to IDs that are not in use, such
as 20 through 22. In that case, you would specify a slave ID offset of -17, since that is the difference
between the virtual ID range and the actual slave IDs. The formula is as follows:
(Real Slave ID) - (Virtual Slave ID)= (Slave ID Offset)
3 - 20 = -17
With the slave ID map configured, a master that wants information from one of the ASCII slaves
would address the request to slave ID 20 or 22. The MGate would identify that the request was
addressed to a virtual slave ID in the slave ID map. The MGate would then forward the request to
port 1, applying the -17 offset to obtain the actual ID of the desired device.