Introduction Welcome to the MGate 5109 line of Modbus-to-DNP3 gateways. All models feature easy protocol conversion between Modbus RTU/ASCII, Modbus TCP, and DNP3 protocols. This chapter is an introduction to the MGate 5109. The following topics are covered in this chapter: ...
Introduction Overview The MGate 5109 is an industrial Ethernet gateway for Modbus RTU/ASCII/TCP and DNP3 serial/TCP/UDP protocol conversion. All models are protected with a rugged metallic casing, DIN-rail mountable, and offer built-in serial isolation. The rugged design is suitable for industrial applications such as oil/gas, power, process automation, and factory automation.
Hardware The following topics are covered in this chapter: Power Input and Relay Output Pinouts LED Indicators Dimensions Pin Assignments Mounting the Unit Specifications Reset Button Pull-high, Pull-low, and Terminator for RS-485 ...
No serial communication with Modbus device Green Normal Modbus serial communication in progress Serial communication error When MGate 5109 acts as Modbus Master: 1. Slave device returned an error (exception) 2. Received frame error (parity error, checksum error) 3. Timeout (slave device no response) When MGate 5109 acts as Modbus Slave: 1.
MGate 5109 Hardware Transparent Mode: Color Description Ready Power is off, or a fault condition exists Green Steady: Power is on, and the MGate is functioning normally Steady: Power is on, and the MGate is booting up Blinking slowly: Indicates an IP conflict, or the DHCP or BOOTP server is not...
3. Use an Ethernet cable to connect the MGate to the Modbus or DNP3 device. 4. The MGate 5109 is designed to be attached to a DIN rail or mounted on a wall. For DIN-rail mounting, push down the spring and properly attach it to the DIN rail until it snaps into place. For wall mounting, install the wall-mounting kit (optional) first and then screw the device onto the wall.
Ready LED stops blinking (approx. five seconds). Pull-high, Pull-low, and Terminator for RS-485 Remove the MGate 5109’s top cover, and you will find DIP switches to adjust each serial port’s pull-high resistor, pull-low resistor, and terminator.
Hardware MicroSD The MGate 5109 provides users with an easy way to backup, copy, replace, or deploy. The MGate is equipped with a microSD card slot. Users can plug in a microSD card to backup data, including the system configuration setting, and system data log.
Getting Started The following topics are covered in this chapter: Connecting the Power Connecting Serial Devices Connecting to a Network Installing DSU Software Logging in to the Web Console Quick Setup Quick Setup—System Setting ...
Power Input and Relay Output Pinout section in chapter 2. Connecting Serial Devices MGate 5109 support Modbus serial and DNP3 serial devices. Before connecting or removing the serial connection, first make sure the power is turned off. For the serial port pin assignments, see the Pin Assignments section in chapter 2.
MGate 5109 Getting Started The DSU window should appear as shown below. Click Search and a new Search window will pop up. Logging in to the Web Console Use the Web console to configure the MGate through Ethernet or verify the MGate’s status. Use a web browser, such as Microsoft Internet Explorer or Google Chrome to connect to the MGate, using the HTTP/HTTPS protocol.
MGate 5109 Getting Started Quick Setup The MGate series now provides a Quick Setup wizard, an illustrated guide specifically designed to make the configuration process easy. The Quick Setup wizard takes you through the configuration process from start to finish so that you do not miss any step. The following agent modes are supported in the Quick Setup:...
DNP3 TCP/UDP Outstation by itself. Regarding protocol configuration, refer to chapter 4. Quick Setup—Role 1 and Role 2 of MGate 5109 (Example 1) After finishing the device protocol selection, Role 1 and Role 2 of MGate will be confirmed. You will need to configure the roles on each side by the following steps.
Page 19
MGate 5109 Getting Started DNP3 serial settings: Set MGate DNP3 Master ID address. DNP3 serial settings: Add DNP3 Outstation List. For configuration details, refer to chapter 4. Quick Setup—Finish (Example 1) Once all the configurations are done, you can check if the parameters are correct on this webpage. Click Save to make the parameters effective.
Page 20
MGate 5109 Getting Started Quick Setup—Role 1 and Role 2 of MGate 5109 (Example 2) Here is an example of Role 1 as a DNP3 TCP/UDP Outstation, and Role 2 as a Modbus RTU/ASCII Master. DNP3 TCP settings: For configuration details, refer to chapter 4.
Page 21
MGate 5109 Getting Started Quick Setup—Finish (Example 2) Once all the configurations are done, you can check if all the parameters are correct on this webpage. Moreover, if you want to determine the data mapping status, you can click the View I/O data mapping to know more...
Web Console Configuration and Troubleshooting This chapter provides a quick overview of how to configure the MGate 5109 by web console. The following topics are covered in this chapter: Overview Basic Settings Network Settings Serial Settings ...
You can enter a name to help you identify the unit location. Such as “Cabinet A001.” Time Settings The MGate 5109 has a built-in Real-Time Clock for time calibration functions. Functions such as the log function can add real-time information to the message. ATTENTION First-time users should select the time zone first.
(or other 32-bit number) Serial Settings The MGate 5109 serial interface supports RS-232, 2-wire RS-485, 4-wire RS-485, and RS-422 interfaces. You must configure the baudrate, parity, data bits, and stop bits before using the serial interface with Modbus RTU/ASCII protocol. Incorrect settings will result in communication failures.
Protocol Settings (Agent Mode) A typical MGate 5109 application consists of SCADA/PLC as client/master and RTU/IED as server/slave. Both these components use different protocols and hence need a gateway in between to exchange data. The MGate can do the role of a gateway by acting as the server/slave when it is connected to SCADA/PLC and the client/master when it is connecting to RTU/IED.
DNP3 Transparent Agent Agent TCP/UDP Agent Outstation When using MGate 5109 for various different protocol conversions, it should be set to agent mode. In agent mode, the MGate 5109 uses an internal memory to exchange data between Modbus and DNP3.
MGate 5109 Web Console Configuration and Troubleshooting The MGate’s internal memory is divided into two parts—one for input and the other for output as shown in the illustration below. The internal memory concept is shown in the figure below: To learn more about MGate’s internal memory, refer to Protocol Settings- I/O Data Mapping.
Page 28
This allows the Modbus system to continue the operation even if a slave device is disconnected or faulty. On the MGate 5109, the Response timeout field is used to configure how long the gateway will wait for a response from a Modbus slave.
Page 29
MGate 5109 Web Console Configuration and Troubleshooting Parameter Value Default Description Name (an alphanumeric string) Command1 Max. 32 characters Slave IP address 0.0.0.0 - 0.0.0.0 The IP address of a remote slave device. 255.255.255.255 Port 1-65535 The TCP port number of a remote slave device.
Page 30
This allows the Modbus system to continue operations even if a slave device is disconnected or faulty. On the MGate 5109, the Response timeout field is used to configure how long the gateway will wait for a...
Page 31
The users can determine the time delay to transmit the timeout data frame received from the slave device to the upstream. (only for Modbus The MGate 5109 will automatically determine the time RTU) interval if it is set to 0. Add Modbus Commands Refer to A1.
Page 32
MGate 5109 Web Console Configuration and Troubleshooting After configuring the Master Settings, click on Add in the Outstation List section Adding an Entry to the Outstation List (Outstation Settings) Click on Add option to open the Outstation Settings page, which consists of three sections: Basic Settings, Advanced Settings, and DNP3 Object Setting.
Page 33
MGate 5109 Web Console Configuration and Troubleshooting Parameter Value Default Description Name an alphanumeric string Outstation1 Max. 32 characters IP address 0.0.0.0 to 0.0.0.0 The IP addresses of a remote 255.255.255.255 slave device. Port 1-65535 20000 The TCP port number of a remote slave device.
Page 34
MGate 5109 Web Console Configuration and Troubleshooting Parameter Value Default Description the timeout period is set long enough to permit data link retries. Auto Time Sync Enable Enable When an outstation anticipates that its Disable timing reference (such as a crystal oscillator) will drift beyond the required accuracy, it should set the IIN1.4...
Page 35
MGate 5109 Web Console Configuration and Troubleshooting Command Group Variation Qualifier Parameters Select Read Binary 1: binary input 0: Any variation 06: all Input method 2: binary input event 0: Any variation 06: all 1: Without time 07/08: limited quantity...
Page 36
MGate 5109 Web Console Configuration and Troubleshooting Parameter Value Default Description timeout (sec) model), Close-trip (close-trip model) Advance Commands Read current Binary Output value. Command Parameters Group Variation Qualifier Select Read Binary Output 10: Binary Output 0: Any variation 06: all...
Page 37
MGate 5109 Web Console Configuration and Troubleshooting Advanced Commands Command used to read the current data in the Counter. Command Parameters Group Variation Qualifier Select Read Counter method 20: counter 0: Any variation 06: all 21: frozen counter 0: Any variation...
Page 38
MGate 5109 Web Console Configuration and Troubleshooting Advanced Commands: Command Parameters Group Variation Qualifier Select Read Analog Input 30: analog input 0: Any variation 06: all method 32: analog input event 0: Any variation 06: all 07/08: limited quantity (1-65535)
Page 39
MGate 5109 Web Console Configuration and Troubleshooting Advanced Commands: Read current analog output value. Command Parameters Group Variation Qualifier Select Read Analog Input 40: analog output 0: Any variation 06: all method A4. DNP3 Serial Master Settings Master Settings Parameter...
Page 40
MGate 5109 Web Console Configuration and Troubleshooting DNP3 serial Master supports an auto detection function, which can automatically detect DNP3 serial outstation attributes, such as quantity of BI, BO, and so on. A5. Modbus TCP Server (Slave) Settings Server Settings...
Page 41
MGate 5109 Web Console Configuration and Troubleshooting A6. Modbus RTU/ASCII Slave Settings Slave Settings Parameter Value Default Description Mode RTU or ASCII The Modbus protocol type Slave ID 1-255 The Modbus slave ID that this slave module will accept. A7. DNP3 TCP/UDP Outstation Settings The DNP3 TCP/UDP outstation configuration consists of three parts: Basic Settings, Advanced Settings, and DNP3 Object Settings.
Page 42
Unsolicited response 192.168.1.1: 192.168.1.1: 20000 DNP3 master IP address/Port to which master IP/Port (1-65535) the MGate 5109 unsolicited response is (for TCP mode) send to. Remote master IP/Port 192.168.1.1: 192.168.1.1: 20000 DNP3 master IP address/Port to which (for UDP mode)
Page 43
MGate 5109 Web Console Configuration and Troubleshooting Parameter Value Default Description Unsolicited 1-9999 ms 1000 The outstation keeps the unsolicited message with a hold response hold time before DNP3 master requests a confirmation time message. Unsolicited 0-100 Retry count response retry...
Page 44
MGate 5109 Web Console Configuration and Troubleshooting Binary Input The Binary Input parameters define the format of outstation’s response to DNP3 commands from the DNP3 Master. Binary Input Setting Value Description 1: Packet Format—Reports only the state Default Static Variation...
Page 45
MGate 5109 Web Console Configuration and Troubleshooting Analog Input Settings For analog inputs, in addition to setting the value of each point index to Class 0/1/2/3 (Default: Class 0), you can also configure an event trigger method in the Event Settings section of the Analog Input Settings page.
Page 46
The following examples illustrate Role 1 and Role 2 configurations of MGate: Example 1—MGate 5109 as Modbus TCP Server (Role 1) and DNP3 Serial Master (Role 2) 1x0001 The Modbus master must write the value 1 to the corresponding Coil Address,...
Page 47
Modbus addresses 4x9217 and 4x9218, whose value will be periodically updated as a result of cyclic polling to the outstation on the other side. Example 2—MGate 5109 as DNP3 TCP Outstation (Role 1) and Modbus RTU Master (Role 2) Door_control...
MGate 5109 Web Console Configuration and Troubleshooting Current_Value, Likewise, if DNP3 TCP master wants to read the Modbus register command named the DNP3 type must first be set to Analog Input. The I/O Data Mapping table shows that AI [0] is mapped to the Current_Value command.
This allows the Modbus system to continue operation even if a slave device is disconnected or faulty. On the MGate 5109, the Response timeout field is used to configure how long the gateway will wait for a response from a Modbus ASCII or RTU slave. Refer to your device manufacturer’s documentation to manually set the...
Protocol Settings—Modbus Transparent—Slave ID Map In slave mode, the default slave ID mapping will define all Modbus IDs to serial port since the MGate 5109 only has one serial port. In master mode, you have to add all the Modbus IDs manually.
Page 51
ATTENTION The MGate 5109 will disregard any request that is not addressed to a virtual slave ID on its slave ID map. If a device has not been assigned a virtual slave ID, it will not be accessible by masters on the other side of the Modbus gateway.
MGate 5109 Web Console Configuration and Troubleshooting Protocol Settings—Modbus Transparent—Priority Control The Priority Control tab is where emergency requests are enabled and configured. Priority control is designed for requests that are sent to Modbus RTU/ASCII slaves. Since Modbus RTU/ASCII slaves cannot handle multiple requests, the Modbus gateway must send each request individually and wait for the response before sending the next request.
Not all Modbus TCP masters require this exception, so it is up to you to determine if this setting should be enabled. DNP3 Transparent The MGate 5109 series supports DNP3 transparent mode. Only the following combination can select transparent mode: 4-32...
Page 54
MGate 5109 Web Console Configuration and Troubleshooting Connected serial device's mode Device 1 Device 2 Master mode DNP3 serial Master DNP3 TCP/UDP Outstation Outstation mode DNP3 TCP/UDP Master DNP3 Serial Outstation Add all DNP3 devices into the table, including master and all outstations.
MGate 5109 Web Console Configuration and Troubleshooting For DNP3 packet frames from Ethernet side, you need to assign a serial port along with related ranges of DNP3 addresses to receive these DNP3 data packets. Similarly, for DNP3 packet frames coming from the serial side, you need to assign the DNP3 device’s address and IP address.
MGate 5109 Web Console Configuration and Troubleshooting Additional configuration examples are shown in the following table: Desired IP Range IP Address Field Netmask Field Any host Disable Enable 192.168.1.120 192.168.1.120 255.255.255.255 192.168.1.1 to 192.168.1.254 192.168.1.0 255.255.255.0 192.168.1.1 to 192.168.255.254 192.168.0.0 255.255.0.0...
MGate 5109 Web Console Configuration and Troubleshooting The system log settings enable the MGate firmware to record important events for future verification. The recorded information can only be displayed on the web console. The available information that can be recorded includes the following events:...
MGate 5109 Web Console Configuration and Troubleshooting System Management—Email Alert Parameters Description Mail server (SMTP) The mail server’s domain name or IP address. User name This field is for your mail server’s user name, if required. Password This field is for your mail server’s password, if required.
This is a text password mechanism that is used to weakly authenticate changes to agents of managed network devices. SNMP agent version The MGate 5109 supports SNMP V1, V2c, and V3. Read-only and Read/write access control The following fields allow you to define user names, passwords, and authentication parameters for two levels of access: read-only and read/write.
MGate 5109 Web Console Configuration and Troubleshooting System Management—LLDP Settings The Link Layer Discovery Protocol (LLDP) standardizes the method that devices on a network use to periodically send information on their configuration and status. This self-identification method keeps all LLDP devices on a network informed of each other's status and configuration.
MGate 5109 Web Console Configuration and Troubleshooting System Management—Misc. Settings This page includes console settings, password and relay output. System Management—Misc. Settings—Console Settings Configuration Value Description HTTP/HTTPS Enable/Disable This setting is to enable/disable the web console. For security issues, users can only enable the HTTPS or just disable all settings.
Page 62
MGate 5109 Web Console Configuration and Troubleshooting System Management—Misc. Settings—Notification Message Users can input a message for Login or for Login authentication failure message. System Management—Misc. Settings—Account Management Parameters Value Description Account admin, user Users can modify the password for different accounts. MGate provides two different level accounts: admin and user.
Firmware updates for the MGate 5109 are located at www.moxa.com. After you have downloaded the new firmware onto your PC, you can use the web console to write it onto your MGate 5109. Select the desired unit from the list in the web console and click Submit to begin the process.
Page 64
MGate 5109 Web Console Configuration and Troubleshooting ATTENTION DO NOT turn off the MGate power before the firmware upgrade process is completed. The MGate will be erasing the old firmware to make room for the new firmware to flash memory. If you power off the MGate and terminate the progress, the flash memory will contain corrupted firmware and the MGate will fail to boot.
Web Console Configuration and Troubleshooting System Monitoring (Troubleshooting) MGate 5109 provides easy-to-use and useful troubleshooting tools. If a communication issue occurs, we suggest that you first check the Protocol Status > Diagnosis page for the status of the protocol. To analyze the Modbus/DNP serial traffic in detail, view the network logs available at Protocol Status >...
MGate 5109 Web Console Configuration and Troubleshooting System Monitoring—System Status—LLDP Table You can see LLDP related information, including Port, Neighbor ID, Neighbor Port, Neighbor Port Description, and Neighbor System. System Monitoring—Protocol Status System Monitoring—Protocol Status—I/O Data View This page displays the internal memory information for input and output data transfers. View updated values for communication verification here.
Page 68
MGate 5109 Web Console Configuration and Troubleshooting DNP3 Serial Master Diagnose DNP3 Serial Outstation Diagnose 4-47...
Page 69
MGate 5109 Web Console Configuration and Troubleshooting DNP3 TCP/UDP Master Diagnose DNP3 TCP/UDP Outstation Diagnose 4-48...
Page 70
For troubleshooting or management purposes, you can monitor the Modbus RTU/ASCII data passing through the MGate 5109 on the network. Rather than simply echoing the data, MGate Manager presents the data in an intelligent, easy-to-understand format with clearly designated fields, including source, type, destination, contents, and more.
MGate 5109 Web Console Configuration and Troubleshooting Status Monitoring Status Monitoring helps users monitor slave device communication status by PLC/SCADA master. (See schematic diagram below.) The status monitoring only works when the MGate acts as the “Master”. This function always works in the background while the MGate is operating. If there are no issues, MGate will not list any monitored information.
Page 72
MGate 5109 Web Console Configuration and Troubleshooting Modbus Master Error: Information Group Protocol Information 1 byte 1 byte 1 byte 1 byte 0x02 Reserved Modbus Modbus (should be all 0) Function code Exception code For details regarding the Modbus function code and exception code, refer to Modbus protocol specification.
Configuration (Text Mode Console) The MGate 5109 supports a text-mode console with serial interface, telnet, and SSH protocol. The user interface is the same in all text mode consoles. Note that the text mode console does not support all configuration items. Some parameters must be configured through the web console.
Network Management Tool (MXstudio) This chapter provides an overview of Moxa’s MXstudio industrial network management suite. The following topics are covered in this chapter: Overview...
MXconfig industrial network configuration tool, MXview industrial management software, and N-Snap industrial network snapshot tool. The MXstudio suite in MGate 5109 includes MXconfig and MXview, which are used for mass configuration of network devices and monitoring network topology, respectively.
Need help?
Do you have a question about the MGate 5109 and is the answer not in the manual?
Questions and answers