User's Manual

--------------------------------------------------------------------------------------------------------------------------------- www.moxa.com info@moxa.com
How Slave IDs are Mapped on the MGate W5X08
When a Modbus master requests information from a Modbus slave, the request is addressed to the
desired slave's ID, which must be unique on the network. When Modbus networks are integrated by a
Modbus gateway, complications can arise if the same slave ID is being used on different networks. If this
is not properly addressed, a request sent to that slave ID would receive more than one response,
causing communication problems.
With the MGate MB3000, this situation is addressed by using a slave ID map. While configuring the
MGate, users set up a range of "virtual" slave IDs that are mapped to slave devices on a specific
Modbus network. To send a request to a slave that is on a different Modbus network, a master would
address the request to the appropriate virtual slave ID. The MGate then routes that request as specified
by the slave ID map.
For example, if a TCP master needs information from an ASCII slave, it addresses the request to the
corresponding virtual slave ID as defined on the MGate's slave ID map. The MGate identifies the request
as within its virtual slave ID range and forwards the request to the Modbus ASCII network, this time
addressed to the device's actual slave ID.
Virtual slave IDs must not conflict with each other or with other TCP slave IDs.
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.