Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The image below shows an example of how Modbus RTU Devices would be connected through the Moxa gateway.

Image Modified


The gateway uses male DB9 serial ports to connect to the Modbus RTU or ASCII devices.

...

Once you have logged into the MGate unit, navigate to the “Network Parameter” tab within the web UI. The MGate unit provides for both DCHP as well as STATIC IP settings. Because we want the MGate to reliably appear at a known IP address after things like power outages and resets, it is best to configure the device with a known STATIC IP address. 

Image Modified


  • Under the “IP Configuration” drop down in the Web UI, select “Static”.
  • Enter a Static IP address that makes sense in your network topology. In this example, we have used 192.168.1.96

...

Configuring the Serial Port

The purpose of the Moxa MGate device is to provide that translation layer between the more modern Modbus TCP layer of the protocol to the original Modbus RTU protocol that was designed to work over legacy RS-232/RS-485 serial networks.

The next step is to configure is the type of serial port connection (RS-232, RS-485 2 Wire, RS-485 4 wire, or RS-422) and the serial port UART parameters of baud rate, data bits, stop bits, and parity. Click on the left ”Serial Settings” tab to bring up this configuration page:


Image Added


Note
This tutorial is focused on the physical setup of a RS-485 2 wire serial network with 3 Modbus RTU devices all on the RS-485 network. The baud rate is set to 19200 baud with no parity, 8 data bits, and 1 stop bit.


Configuring the Modbus TCP Parameters

The next step is to configure the Modbus TCP parameters of the MGate. This includes the Initial Delay, the TCP Port number that Modbus TCP will be listening on, the Response Time-out of any Modbus RTU slave devices attached to the MGate,  and the Inter-character Time-out and Inter-frame Delay.

Setup the Modbus Parameters as shown below:

Image Added

Configuring the Modbus Routing

The last item to configure on the MGate is the Modbus Routing. This informs the MGate which serial port to use for a range of Modbus RTU slave device addresses. For this example, we’re using an MGate MB3180 which only has a single serial port, so the routing is simple. For other MGate units with multiple serial ports this would inform the MGate which serial port to use for associated Modbus RTU slave device addresses.


Image Added



Once the configuration steps have been completed, the resulting network topology is shown below:


Image Added