Moxa Mgate 5103 Series Manual v1.1
Moxa Mgate 5103 Series Manual v1.1
www.moxa.com/products
Copyright Notice
© 2023 Moxa Inc. All rights reserved.
Trademarks
The MOXA logo is a registered trademark of Moxa Inc.
All other trademarks or registered marks in this manual belong to their respective manufacturers.
Disclaimer
• Information in this document is subject to change without notice and does not represent a commitment
on the part of Moxa.
• Moxa provides this document as is, without warranty of any kind, either expressed or implied, including,
but not limited to, its particular purpose. Moxa reserves the right to make improvements and/or
changes to this manual, or to the products and/or the programs described in this manual, at any time.
• Information provided in this manual is intended to be accurate and reliable. However, Moxa assumes no
responsibility for its use, or for any infringements on the rights of third parties that may result from its
use.
• This product might include unintentional technical or typographical errors. Changes are periodically
made to the information herein to correct such errors, and these changes are incorporated into new
editions of the publication.
www.moxa.com/support
Table of Contents
1. Introduction ......................................................................................................................................... 5
Overview .............................................................................................................................................. 5
Package Checklist .................................................................................................................................. 5
Product Features ................................................................................................................................... 6
2. Hardware .............................................................................................................................................. 7
Power Input and Relay Output Pinouts...................................................................................................... 7
LED Indicators ....................................................................................................................................... 7
Dimensions ........................................................................................................................................... 8
Pin Assignments .................................................................................................................................... 8
Mounting the Unit .................................................................................................................................. 9
Specifications ........................................................................................................................................ 9
Reset Button ......................................................................................................................................... 9
Pull-Up, Pull-Down, and Terminator for RS-485 ....................................................................................... 10
MicroSD.............................................................................................................................................. 10
3. Getting Started ................................................................................................................................... 12
Connecting the Power .......................................................................................................................... 12
Connecting Serial Devices ..................................................................................................................... 12
Connecting to a Network ...................................................................................................................... 12
Installing DSU Software ........................................................................................................................ 13
Logging in to the Web Console .............................................................................................................. 14
Quick Setup ........................................................................................................................................ 14
Quick Setup—System Setting......................................................................................................... 15
Quick Setup—Select Protocol ......................................................................................................... 15
Quick Setup—Role 1 and Role 2 of MGate 5103 ................................................................................ 15
Quick Setup—Finish ...................................................................................................................... 17
4. Web Console Configuration and Troubleshooting ...............................................................................18
Overview ............................................................................................................................................ 18
Basic Settings ..................................................................................................................................... 18
Network Settings ................................................................................................................................. 19
Serial Settings ..................................................................................................................................... 20
Protocol Settings (Agent Mode) ............................................................................................................. 20
Protocol Settings—Protocol Conversion ........................................................................................... 21
Protocol Settings—Modbus TCP Client (Master) Settings .................................................................... 22
Protocol Settings—Modbus RTU/ASCII Master Settings ...................................................................... 25
Protocol Settings—Modbus TCP Server (Slave) Settings .................................................................... 27
Protocol Settings—Modbus RTU/ASCII Slave Settings........................................................................ 27
Protocol Settings—PROFINET IO Device Settings .............................................................................. 28
Protocol Settings—EtherNet/IP Adapter Settings .............................................................................. 29
Protocol Settings—I/O Data Mapping .............................................................................................. 29
System Management............................................................................................................................ 31
System Management—Accessible IP List.......................................................................................... 31
System Management—DoS Defense ............................................................................................... 32
System Management—System Log Settings ..................................................................................... 32
System Management—Auto Warning Settings .................................................................................. 33
System Management—Email Alert .................................................................................................. 34
System Management—SNMP Trap .................................................................................................. 34
System Management—SNMP Agent ................................................................................................ 35
System Management—LLDP Settings .............................................................................................. 36
System Management—Certificate ................................................................................................... 36
System Management—Misc. Settings .............................................................................................. 37
System Management—Maintenance ................................................................................................ 39
System Monitoring (Troubleshooting) ..................................................................................................... 41
System Monitoring—System Status ................................................................................................ 41
System Monitoring—Protocol Status................................................................................................ 43
Status Monitoring ................................................................................................................................ 46
5. Configuration (Text Mode Console) .................................................................................................... 48
6. Network Management Tool (MXstudio)............................................................................................... 49
A. SNMP Agents with MIB II and RS-232-Like Groups ............................................................................50
RFC1213 MIB-II Supported SNMP Variables ............................................................................................ 50
RFC1317 RS-232-Like Groups ............................................................................................................... 51
1. Introduction
Welcome to the MGate 5103 line of Modbus/EtherNet/IP-to-PROFINET gateways. All models feature easy
protocol conversion between Modbus RTU/ASCII/TCP, EtherNet/IP, and PROFINET protocols. This chapter is
an introduction to the MGate 5103.
Overview
The MGate 5103 is an industrial Ethernet gateway for Modbus RTU/ASCII/TCP, EtherNet/IP, and PROFINET
network communications. To integrate existing Modbus devices and an EtherNet/IP control system into a
PROFINET network, use the MGate 5103 as a Modbus client/master/server/slave or EtherNet/IP adapter to
collect data and exchange data with PROFINET I/O controllers. The latest exchange data will be stored in
the gateway. The gateway converts stored Modbus or EtherNet/IP data into PROFINET packets so the
PROFINET IO controller can control or monitor field devices.
Package Checklist
All models of the MGate 5103 Series are shipped with the following items:
Standard Accessories:
• MGate 5103 gateway
• Serial cable: DBL-RJ45F9-150
• Quick installation guide (printed)
• Warranty card
NOTE
Please notify your sales representative if any of the above items are missing or damaged.
LED Indicators
Agent Mode:
LED Color Description
Off 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
Ready
Blinking slowly: Indicates an IP conflict, or the DHCP or BOOTP server is not
Red
responding properly
Flashing quickly: microSD card failed
Modbus: No communication with Modbus device
Off
EtherNet/IP: No I/O data exchange
Modbus: Communication is in progress
Green (Blinking)
EtherNet/IP: I/O data is exchanging
Communication error
When the MGate 5103 acts as a Modbus Client/Master:
1. Server/Slave device returned an error (exception)
2. Received a frame error (parity error, checksum error)
MB/EIP 3. Timeout (server/slave device is not responding or the TCP connection
timed out)
Red (Blinking)
When the MGate 5103 acts as a Modbus Server/Slave:
1. Received invalid function code
2. Client/Master accessed invalid register address or coil addresses
3. Received frame error (parity error, checksum error)
Pin Assignments
Serial Port (Male DB9)
Pin RS-232 RS-422/RS-485 (4W) RS-485 (2W)
1 DCD TxD-(A) –
2 RXD TxD+(B) –
3 TXD RxD+(B) Data+(B)
4 DTR RxD-(A) Data-(A)
5* GND GND GND
6 DSR – –
7 RTS – –
8 CTS – –
9 – – –
*Signal ground
The MGate 5103 Series can use an RJ45 serial port to connect to a PC for device configuration.
Pin RS-232
1 DSR
2 RTS
3 GND
4 TXD
5 RXD
6 DCD
7 CTS
8 DTR
Specifications
NOTE
The latest specifications for Moxa's products can be found at https://www.moxa.com.
Reset Button
Restore the MGate to factory default settings by using a pointed object (such as a straightened paper clip)
to hold the reset button down until the Ready LED stops blinking (approx. five seconds).
SW 1 2 3
Pull-up resistor Pull-down resistor Terminator
ON 1 kΩ 1 kΩ 120 Ω
OFF 150 kΩ* 150 kΩ* –*
*Default
MicroSD
The MGate 5103 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.
First time using the MGate gateway with a new microSD card
1. Format the microSD card as FAT file system through a PC.
2. Power off the MGate and insert the microSD card (ensure that the microSD card is empty).
3. Power on the MGate. The default settings will be copied to the microSD card.
4. Manually configure the MGate via web console, and all the stored changes will copy to the microSD card
for synchronization.
First time using the MGate with a microSD card containing a configuration file
1. Power off the MGate and insert the microSD card.
2. Power on the MGate.
3. The configuration file stored in the microSD card will automatically copy to the MGate.
1. The microSD card has less than 20 Mbytes of free space remaining.
2. The microSD card is write-protected.
3. The file system is corrupted.
4. The microSD card is damaged.
The MGate will stop working in case of the above events, accompanied by a flashing Ready LED and beeping
alarm. When you replace the MGate gateway’s microSD card, the microSD card will synchronize the
configurations stored on the MGate gateway. Note that the replacement microSD card should not contain
any configuration files on it; otherwise, the out-of-date configuration will copy to the MGate device.
NOTE
The unit does not have an on/off switch. It automatically turns on when it receives power. The PWR LED
on the top panel will glow to indicate that the unit is receiving power. For power terminal block pin
assignments, refer to the Power Input and Relay Output Pinouts section in chapter 2.
Connecting to a Network
Connect one end of the Ethernet cable to the MGate’s 10/100M Ethernet port and the other end of the cable
to the Ethernet network. The MGate will indicate a valid connection to the Ethernet in the following ways:
• The Ethernet LED maintains a solid green color when connected to a 100 Mbps Ethernet network.
• The Ethernet LED maintains a solid orange color when connected to a 10 Mbps Ethernet network.
• The Ethernet LED will flash when Ethernet packets are being transmitted or received.
The following instructions explain how to install the DSU, a utility to search for MGate 5103 units on a
network.
1. Insert the Document and Software CD into the CD-ROM drive. Locate and run the following setup
program to begin the installation process:
dsu_setup_[Version]_Build_[DateTime].exe
This version might be named dsu_setup_Ver2.x_Build_xxxxxxxx.exe
2. You will be greeted by the Welcome window. Click Next to continue.
3. When the Select Destination Location window appears, click Next to continue. You may change the
destination directory by first clicking on Browse....
4. When the Select Additional Tasks window appears, click Next to continue. You may select Create a
desktop icon if you would like a shortcut to the DSU on your desktop.
5. Click Install to start copying the software files.
6. A progress bar will appear. The procedure should take only a few seconds to complete.
7. A message will indicate that the DSU is successfully installed. You may choose to run it immediately by
selecting Launch DSU.
8. You may also open the DSU through Start > Programs > MOXA > DSU.
When the MGate gateway appears on the DSU device list, select the gateway and use the right-click the
mouse button to open a web console to configure the gateway.
On the first page of the web console, enter admin for the default Account name and moxa for the default
Password.
When you log in the web console for the first time, a message will pop up. Emphasizing a higher security
level, we suggest you to change the password. The password can be changed in the following path:
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:
Device 1 Device 2
PROFINET IO controller Modbus RTU/ASCII slave
PROFINET IO controller Modbus RTU/ASCII master
PROFINET IO controller Modbus TCP client
PROFINET IO controller Modbus TCP server
PROFINET IO controller EtherNet/IP scanner
Modbus RTU/ASCII settings: Set Mode selection, Serial Parameters Settings and Modbus Commands.
This chapter provides a quick overview of how to configure the MGate 5103 by web console.
Overview
This section gives an overview of the MGate 5103 status.
Basic Settings
On this webpage, you can change the name of the device and time zone settings.
Server Setting
Parameter Value Description
You can enter a name to help you identify the unit, such as
Server Name (an alphanumeric string)
the function, etc.
You can enter a name to help you identify the unit location.
Server Location (an alphanumeric string)
Such as “Cabinet A001.”
The MGate 5103 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. The console will display the “real time” according to the
time zone relative to GMT. If you would like to modify the real-time clock, select Local time. MGate’s
firmware will modify the GMT time according to the Time Zone.
ATTENTION
If the dispersion of the time server is higher than the client (MGate), the client will not accept NTP
messages from the time server. MGate's dispersion is 1 second. You must configure your time server with
a dispersion value lower than 1 sec for the NTP process to complete.
Network Settings
The Network Settings is where the unit’s network settings are configured. You can modify the IP
Configuration, IP Address, Netmask, Default Gateway, and DNS.
RTS Toggle
The RTS Toggle function is used for RS-232 mode only. This flow-control mechanism is achieved by
toggling the RTS pin in the transmission direction. When activated, data will be sent after the RTS pin is
toggled ON for the specified time interval. After the data transmission is finished, the RTS pin will toggle
OFF for the specified time interval.
1. Select the correct protocols in the Protocol Conversion setting after which the details of both sides of
the MGate’s role is shown below the selection.
2. Configure MGate’s roles for both sides. Configure the master side first followed by the slave side.
3. After the MGate configuration is completed, click I/O data mapping to view details on exchanging
data with the SCADA/PLC.
Device 1 Device 2
PROFINET IO controller Modbus TCP client
PROFINET IO controller Modbus TCP server
PROFINET IO controller Modbus RTU/ASCII master
PROFINET IO controller Modbus RTU/ASCII slave
PROFINET IO controller EtherNet/IP scanner
The MGate 5103 runs agent mode when it is used for various different protocol conversions. In agent mode,
the MGate 5103 uses an internal memory to exchange data.
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.
Client Settings
Parameter Value Default Description
Some Modbus servers/slaves may take more time to boot up than
other devices. In some environments, this may cause the entire
Initial delay 0-30000 ms 0 system to suffer from repeated exceptions during the initial boot-up.
After booting up, you can force the MGate to wait before sending the
first request with the Initial Delay setting.
This is used to configure how many times the MGate will try to
Max. retry 0-5 3
communicate with the Modbus server/slave.
The time taken by a server/slave device to respond to a request is
defined by the device manufacturer based on the Modbus standard.
A Modbus client/master can be configured to wait a certain amount
of time for a server/slave’s response. If no response is received
within the specified time, the client/master will disregard the request
Response
10-120000 ms 1000 and continue operation. This allows the Modbus system to continue
timeout
the operation even if a server/slave device is disconnected or faulty.
On the MGate 5103, the Response timeout field is used to
configure how long the gateway will wait for a response from a
Modbus server/slave. Refer to your device manufacturer’s
documentation to manually set the response timeout
Master Settings
Parameter Value Default Description
Mode RTU or ASCII RTU The Modbus protocol type
Some Modbus servers/slaves may take more time to boot
up than other devices. In some environments, this may
cause the entire system to suffer from repeated
Initial delay 0-30000 ms 0
exceptions during the initial boot-up. After booting up,
you can force the MGate to wait before sending the first
request with the Initial Delay setting.
The number of times the client/master will retry the same
Max. retry 0-5 3
request when the response times out.
According to the Modbus standard, the time it takes for a
server/slave device to respond to a request is defined by
the device manufacturer. Based on this response time, a
client/master can be configured to wait a certain amount
of time for a server/slave’s response. If no response is
received within the specified time, the client/master will
disregard the request and continue operation. This allows
Response timeout 10-120000 ms 1000
the Modbus system to continue operations even if a
server/slave device is disconnected or faulty. On the
MGate 5103, the Response timeout field is used to
configure how long the gateway will wait for a response
from a Modbus ASCII or RTU server/slave. Refer to your
device manufacturer’s documentation to manually set the
response time.
Server Settings
Parameter Value Default Description
The Modbus slave ID that this server/slave module will
Unit ID 1-255 1
accept.
TCP port 1-65535 502 The TCP port number.
Slave Settings
Parameter Value Default Description
Mode RTU or ASCII RTU The Modbus protocol type
The Modbus slave ID that this server/slave module will
Slave ID 1-255 2
accept.
The function of Export GSDML is used for easy configuration when setting the PROFINET IO controller
system. Typically, users waste lots of time in importing MGate 5103 general GSDML files and then setting
the IO modules, respectively. If we import the specified GSDML, which is based on Modbus settings, we just
need to pull the module to the PROFINET system. Then the IO modules will be set, and you can run the
communication.
Example - MGate 5103 as PROFINET IO Device (Role 1) and Modbus RTU/ASCII Master (Role 2)
If the PROFINET IO controller wants to set the Modbus RTU command, Room1_Breaker2, the PROFINET IO
controller must use the second byte to do the changes. The MGate will then trigger a Room1_Breaker2 write
request to the Modbus RTU server/slave device.
Likewise, if the PROFINET IO controller wants to read the Modbus RTU command, Room1_Voltage1, the
PROFINET IO controller must use the first two bytes to collect the data. The other side of the MGate will
periodically update the value in the internal memory through cyclic polling to the Modbus RTU server/slave
device.
These settings are used to restrict access to the module by the IP address. Only IP addresses on the list will
be allowed access to the device. You may add a specific address or range of addresses by using a
combination of an IP address and a netmask as follows:
To allow access to a specific IP address: Enter the IP address in the corresponding field; enter
255.255.255.255 for the netmask.
To allow access to hosts on a specific subnet: For both the IP address and netmask, use 0 for the last
digit (e.g., “192.168.1.0” and “255.255.255.0”).
To allow access to all IP addresses: Make sure that Enable the accessible IP list is not checked.
Auto Warning is triggered by different events. When a checked trigger condition occurs, the MGate can send
email alerts, SNMP Trap messages, or open/close the circuit of the relay output and trigger the Fault LED to
start blinking. To enable an email alert, configure the email address on the Email Alert page. Likewise, to
enable SNMP trap alerts, configure SNMP trap server on the SNMP Trap page.
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.
From email address This is the email address from which automatic email warnings will be sent.
To email address 1 to 4 Email addresses to which automatic email warnings will be sent.
Parameters Description
SNMP trap server IP Use this field to indicate the IP address to use for receiving SNMP traps.
Trap version Use this field to select the SNMP trap version.
Trap community Use this field to designate the SNMP trap community.
Parameters Description
To enable the SNMP Agent function, select the Enable option, and enter a
SNMP
community name (e.g., public).
The optional SNMP contact information usually includes an emergency contact
Contact name
name and telephone number.
This is a text password mechanism that is used to weakly authenticate queries
Read community string
to agents of managed network devices.
This is a text password mechanism that is used to weakly authenticate changes
Write community string
to agents of managed network devices.
SNMP agent version The MGate 5103 supports SNMP V1, V2c, and V3.
Parameters Description
User name Use this optional field to identify the user name for the specified level of access.
Use this field to select MD5 or SHA as the method of password encryption for the
Authentication mode
specified level of access, or to disable authentication.
Use this field to enable or disable DES_CBC data encryption for the specified level
Privacy mode
of access.
Password Use this field to set the password for the specified level of access.
Privacy Use this field to define the encryption key for the specified level of access.
The MGate web interface lets you enable or disable LLDP, and set the LLDP transmit interval. In addition,
you can go to System Monitoring—System Status—LLDP Table to view the MGate’s neighbor-list, which is
created based on the information reported by neighboring devices on the network.
System Management—Certificate
Use this function to load the Ethernet SSL certificate. Select or browse for the certificate file in the Select
SSL certificate/key file field. This function is only available in the web console
Users can input a message for Login or for Login authentication failure message.
System Management—Maintenance
System Management—Maintenance—Ping
This network testing function is available only in the web console. The MGate gateway will send an ICMP
packet through the network to a specified host, and the result can be viewed in the web console
immediately.
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. If this happens, call Moxa RMA services.
• Applying the same configuration to multiple units. The Import/Export configuration function is a
convenient way to apply the same settings to units located in different sites. You can export the
configuration as a file and then import the configuration file onto other units at any time.
• Backing up configurations for system recovery. The export function allows you to export
configuration files that can be imported onto other gateways to restore malfunctioning systems within
minutes.
• Troubleshooting. Exported configuration files can help administrators to identify system problems that
provide useful information for Moxa’s Technical Service Team when maintenance visits are requested.
ATTENTION
Load Default will completely reset the configuration of the unit, and all of the parameters you have saved
will be discarded. Do not use this function unless you are sure you want to completely reset your unit.
The MGate can set up to 128 Modbus commands. The MGate 5103 allocates one bit of the gateway’s
specified memory address to indicate the status of each Modbus command as being normal or abnormal. In
other words, the MGate allocates 128 bits of memory to indicate the status of all Modbus commands. If a
command has run successfully, the status value will continue to be 1. On the contrary, if a command has
failed, the status will be set to 0. These statuses can be monitored by the PROFINET IO controller, using the
way of acyclic read. On how to monitor the status, we take SIMATIC STEP 7 Engineering Software as an
example.
Step 2: We want to monitor the command status through STEP 7. In STEP 7 OB1, we use SFB52 to read
the status of the Modbus commands as below.
The MGate 5103 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.
You must use a DB9-to-RJ45 cable to connect the serial console port on the MGate gateway’s front panel to
the serial port on the host. The serial console parameters are 115.2 kbps; parity: none; 8 data bits; and
one stop bit.
For telnet and SSH, use HyperTerminal or PuTTY to connect to the MGate. Note that the telnet protocol will
transfer the account and password information over the Internet using plain text, so telnet is essentially
obsolete and should be replaced by the SSH protocol.
To connect to the MGate telnet/SSH console, load the telnet/SSH program and connect to the MGate IP
address.
For the serial interface, use a null modem (crossover) cable to connect the serial port on the host to the
serial console port on the MGate’s front of panel. The serial console parameters are 115.2kbps, none for
parity, 8 data bits, and one stop bit. You can use a terminal program such as PComm Terminal Emulator or
PuTTY to connect to the MGate serial console.
On the first page, input the account and password. The account supports two types of users: admin and
user. An “admin” account can modify all of the settings, but a “user” account can only review the settings.
A “user” account cannot modify the configuration. The default password for admin is moxa.
The text mode console will display the menu driven interface. Users can use arrow key to move the menu
bar. To select the option, press the “Enter” key to go next level menu. To go previous level menu, press
“Esc” key to quit. If necessary, MGate will need to restart to activate the setting.
Moxa’s MXstudio industrial network management suite includes tools such as MXconfig, MXview and N-
Snap. MXconfig is for industrial network configuration; MXview is for industrial management software; and
N-Snap is for industrial network snapshot. The MXstudio suite in MGate 5103 includes MXconfig and
MXview, which are used for mass configuration of network devices and monitoring network topology,
respectively. The following functions are supported:
** Security View can check the security level of devices in accordance with the IEC62443-4-2 standard.
MGate 5103 supports Level 2 of the IEC-62443-4-2 standard.
The MGate 5103 has built-in Simple Network Management Protocol (SNMP) agent software that supports
SNMP Trap, RFC1317 and RS-232-like groups, and RFC 1213 MIB-II.