Table of Contents Introduction ............................1-1 Overview ............................1-2 Package Checklist ..........................1-2 Product Features ..........................1-2 Getting Started ..........................2-1 Connecting Power ..........................2-2 Connecting PROFIBUS Devices ......................2-2 Connecting Modbus Serial Devices ......................2-2 Connecting to a Host via Serial Console Cable ..................2-2 Hardware ............................
Introduction Welcome to the MGate 4101-MB-PBS line of Modbus to PROFIBUS gateways. All models feature easy protocol conversion from Modbus to PROFIBUS, and RS-232/422/485 port for Modbus communication. This chapter is an introduction to the MGate 4101-MB-PBS and includes the following sections: ...
MGate 4101-MB-PBS Introduction Overview The MGate 4101-MB-PBS is a line of protocol gateways that provides users with the following features: Protocol conversion between Modbus and PROFIBUS MGate 4101-MB-PBS series products can be used to connect Modbus devices and PROFIBUS devices to provide PLCs (ex.
Getting Started The following topics are covered in this chapter: Connecting Power Connecting PROFIBUS Devices Connecting Modbus Serial Devices Connecting to a Host via Serial Console Cable...
MGate 4101-MB-PBS Getting Started Connecting Power The unit can be powered using the AC adaptor or by connecting a power source to the terminal block, depending on the model. The following instructions are for the AC adaptor: 1. Plug the connector of the power adapter into the DC-IN jack on the back of the unit. 2.
Hardware The following topics are covered in this chapter: Power Input and Relay Output Pinouts LED Indicators Dimensions Pin Assignments Mounting the Unit Specifications Adjustable Pull High/Low Resistors for the Modbus Port (P1) in RS-485 Mode ...
MGate 4101-MB-PBS Hardware Power Input and Relay Output Pinouts Shielded Power Power N.O. Common N.C. Power Power Ground Input 2 Input 2 Input 1 Input 1 LED Indicators Color Function Green Power is on. PWR1 Power is off. Green Power is on. PWR2 Power is off.
MGate 4101-MB-PBS Hardware Pin Assignments Modbus P1 Pin Assignment The MGate 4101-MB-PBS series use DB9 (male) serial port to connect to Modbus devices. RS-422/ RS-232 RS-485 (2W) RS-485 (4W) TxD-(A) TxD+(B) RxD+(B) Data+(B) RxD-(A) Data-(A) PROFIBUS P2 Pin Assignment The MGate 4101-MB-PBS series use DB9 (female) serial port to connect to PROFIBUS devices. Signal Name N.C.
MGate 4101-MB-PBS Hardware Mounting the Unit The unit can be mounted on the wall or on a DIN-rail. The MGate 4101-MB-PBS/4101I-MB-PBS series 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”...
MGate 4101-MB-PBS Hardware Adjustable Pull High/Low Resistors for the Modbus Port (P1) in RS-485 Mode Pull High Pull Low Terminator 1 KΩ 1 KΩ 120 Ω Default 150 KΩ 150 KΩ – In some critical environments, you may need to add termination resistors to prevent the reflection of serial signals.
MGate 4101-MB-PBS Hardware Reset Button To reset the MGate to the factory default settings, hold down the reset button for about 5 seconds. The MGate will restart and be reset to factory default settings. Rotary Switch Before communication, you must assign a slave ID to the PROFIBUS slave, If you would like to assign an address between 0 to 99, you need to change the rotary switch to the desired address.
Configuration The following topics are covered in this chapter: Installing the Software Starting MGate Manager Connecting to the Unit Modifying the Configuration Configure Device Configure Modbus Settings Set Up PROFIBUS IO Mapping Setup ...
MGate 4101-MB-PBS Configuration Installing the Software The following instructions explain how to install MGate Manager, a utility for configuring and monitoring MGate 4101-MB-PBS units over the network. 1. Insert the Documentation and software CD into the CD-ROM drive, and then locate and run the following setup program to begin the installation process: MGM_Setup_[Version]_Build_[DateTime].exe (The latest version could have the following format: MGM_Setup_Verx.x.x_Build_xxxxxxxx.exe.)
Page 17
MGate 4101-MB-PBS Configuration 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 MGate Manager on your desktop.
Page 18
MGate 4101-MB-PBS Configuration 5. Click Next to start copying the software files. 6. A progress bar will appear. The procedure should take only a few seconds to complete.
MGate 4101-MB-PBS Configuration 7. A message will indicate that MGate Manager is successfully installed. You may choose to run it immediately by selecting Launch MGate Manager. Starting MGate Manager MGate Manager is a Windows-based utility that is used to configure the MGate 4101-MB-PBS. Before running MGate Manager, make sure that the MGate 4101-MB-PBS is connected to your PC.
Page 20
MGate 4101-MB-PBS Configuration Change Language Setting If you wish to run MGate Manager in a different language, you may click Language to change the language setting. A dialog box showing the available languages should appear as shown below. When you click OK, MGate Manager will immediately reflect your chosen language. After changing to a different language, you will find that all strings on MGate Manager are replaced in your chosen language.
MGate 4101-MB-PBS Configuration ATTENTION Set your MGate Manager to “Default Language” before contacting Moxa Technical Support. With support for multiple languages, MGate Manager is more user-friendly and accessible. However, if you need assistance from Moxa Technical Support, please change the language to “Default Language”. This will prevent any misunderstandings or confusion about MGate Manager menu items and commands as our engineers assist you.
Page 22
MGate 4101-MB-PBS Configuration Search Click Search to begin searching the serial console for the MGate 4101-MB-PBS units. A dialog box will appear. Click Connect through COM Port and choose which COM port is used to connect to MGate 4101-MB-PBS.
MGate 4101-MB-PBS Configuration Modifying the Configuration Once your unit is displayed in MGate Manager, select it by clicking on it. The Configuration button will become available. Click Configuration to open the configuration window.
MGate 4101-MB-PBS Configuration Configure Device In first page, you can change device name and select a password to protect the unit from unauthorized access. Parameter Value Notes Name (an alphanumeric string) You can enter a name to help you identify the unit, such as the location, function, etc.
MGate 4101-MB-PBS Configuration Configure Modbus Settings The Serial tab is where Modbus serial port’s communication parameters are configured. You can configure Baud Rate, Parity, Stop Bit, Flow Control, FIFO, and Interface Mode. Mode Description RTU Master Modbus RTU slave(s) will be connected to the serial port RTU Slave A Modbus RTU master will be connected to the serial port ASCII Master...
MGate 4101-MB-PBS Configuration Protocol Description Slave ID Slave mode only, Modbus slave identification number of the MGate 4101-MB-PBS Response Time-out Master mode only, the time master will wait for a response after sending a request. (ms) See detailed description below. Max.
MGate 4101-MB-PBS Configuration IO Mapping Setup In this page, you should define all commands that Modbus uses and all I/O modules PROFIBUS slave provides. If you choose MGate 4101-MB-PBS as Modbus Master, you should designate all Modbus Read or Write requests in the table on the left.
Page 28
MGate 4101-MB-PBS Configuration Each Modbus request includes Name, Enable, Modbus slave ID, Function Code, Address, Length, Internal Address, Poll Interval, Swap, Fault Protection, Fault Timeout. Please refer to datasheets or manuals of Modbus slave devices to fill out these fields. Parameter Description Name...
Page 29
MGate 4101-MB-PBS Configuration Parameter Description Swap Data Byte Swapping None: Don't need to swap Byte: 0x0A, 0x0B, 0x0C, 0x0D becomes 0x0D, 0x0C, 0x0B, 0x0A. Word: 0x0A, 0x0B, 0x0C, 0x0D becomes 0x0C, 0x0D, 0x0A, 0x0B. ByteWord: 0x0A, 0x0B, 0x0C, 0x0D becomes 0x0D, 0x0C, 0x0B, 0x0A. There are two phases in changing ByteWord 1).
Page 30
MGate 4101-MB-PBS Configuration After all Modbus requests finish, all the data collected from Modbus should be mapped to PROFIBUS I/O modules for the PROFIBUS Master to use. Click Add to create each PROFIBUS I/O module in the table on the right. 4-16...
Page 31
MGate 4101-MB-PBS Configuration Then, a dialog which is used to set up the IO module will appear, please adjust the parameters which correspond with the Modbus requests you set before. lick OK to record this IO module. Parameter Description Name Enter a name to help identify the module, such as the location, function etc.
MGate 4101-MB-PBS Configuration If you would like to check if the I/O map is totally correct, you could click PROFIBUS I/O module that will show what Modbus commands are included in the table on the right. After finishing the configuration, MGate 4101-MB-PBS can communicate between the PROFIBUS and Modbus protocols.
MGate 4101-MB-PBS Configuration Click the Auto Mapping function. Then, a dialog box that is used to select the package types will appear. Please select one of them to map Modbus commands. Click OK to produce PROFIBUS I/O modules. Package Type Description All-in-one Combine all the Modbus read/write commands to PROFIBUS one input/output...
Page 34
MGate 4101-MB-PBS Configuration It takes some time to learn the Modbus requests. Begin by clicking the Start button, which will change the status to On Learning. The number of Learned Requests will increase as the MGate 4101-MB-PBS learns each request. When you are sure all the requests have been learned by the MGate 4101-MB-PBS, click the Stop button, then click the Next button to continue QuickLink.
MGate 4101-MB-PBS Configuration The interface of the next dialogue box is divided into two sections. The upper section is labeled Modbus and will display the details of the Modbus requests which have been learned by the MGate 4101-MB-PBS. The lower section is labeled PROFIBUS Slave and will display the I/O module.
Page 36
MGate 4101-MB-PBS Configuration read these Modbus data stored at the gateway’s input memory. Users can choose internal memory address between 0 to 224. Output refers to the dataflow from the PROFIBUS master to the Modbus devices. The PROFIBUS data that are being written to the Modbus device will be stored at the gateway’s output memory area, and then the Modbus device will write those data stored at the gateway’s output memory area.
MGate 4101-MB-PBS Configuration The output I/O module, which is called P1, is used to change the page number to the specified one. The first byte of module P1 attempts to switch input page number, and the second byte attempts to change output page number.
MGate 4101-MB-PBS Configuration After MGate Manager resets completely, it will automatically execute a Broadcast Search for all MGate units on the LAN and the recording COM port. Your MGate should reappear in the list of units. ATTENTION Load Default will completely reset the configuration of the unit, and all of the parameters you have saved will be discarded.
Page 39
MGate 4101-MB-PBS Configuration Open Traffic Monitor Window Select the unit that you wish to monitor and click Monitor to open the Traffic Monitor window. In the Traffic Monitor window, click Start to begin live monitoring of the data passing through the selected MGate 4101-MB-PBS unit.
Page 40
MGate 4101-MB-PBS Configuration To stop capturing the log, press the Stop button. Save Log to File To save the data log to a file, click Save. You may retrieve a saved log by clicking Load. 4-26...
MGate 4101-MB-PBS Configuration Diagnose Diagnose is a powerful function to identify communications problems and assist in troubleshooting when setting up a PROFIBUS and Modbus environment. Select the desired unit from the list in MGate Manager and click Diagnose to check the communication status. The dialog box will show the details of the communication status of Modbus, PROFIBUS, and I/O Data View.
Page 42
MGate 4101-MB-PBS Configuration There are two parts. In Modbus tab, the first part is the information regarding Modbus. These details will help you to analyze the Modbus communication. Modbus Description State The communication state of Modbus side Type RTU Slave / RTU Master / ASCII Slave / ASCII Master Slave ID The Slave ID for Modbus Valid Requests...
MGate 4101-MB-PBS Configuration The I/O Data View tab is designed to check all exchanging data in MGate's internal memory. Select PROFIBUS I/O module/Modbus command to obtain the correct data. Upgrading Firmware Firmware updates for the MGate 4101-MB-PBS are located at www.moxa.com. After you have downloaded the new firmware onto your PC, you can use MGate Manager to write it onto your MGate 4101-MB-PBS.
MGate 4101-MB-PBS Configuration The dialog boxes will guide you through the process. You will need to browse your PC for the firmware file. Make sure that it matches your model. As the firmware is written to the unit, progress is displayed in the window. Once the firmware has been successfully written onto the unit, click Exit to close the Upgrade Firmware window.
Page 45
MGate 4101-MB-PBS Configuration To begin, click the Export button. Type in a file name and use the Browse button to set the save file to a specific path. Then, click the OK button. If you export the configuration/GSD file successfully, a confirmation message will pop up. After that, the configuration file will be saved as an .INI file 4-31...
Page 46
MGate 4101-MB-PBS Configuration The GSD file will be saved as a .zip file. The exported GSD file is used for easy configuration when setting PLC. Typically, users waste lots of time in importing MGate 4101 general GSD files and then set the I/O modules respectively. If we import the specified GSD coming from MGate 4101, a user just needs to pull the module to the PROFIBUS system.
Page 47
MGate 4101-MB-PBS Configuration Select the file you want to import, then click the OK button Please be patient and wait as MGate Manager configures the target device. If you import the configuration file successfully, a confirmation message will pop up. After closing the message dialog box, MGate Manager will automatically execute a Broadcast Search for all MGate units on the LAN and the recording COM port.
MGate 4101-MB-PBS Configuration Off-Line Configuration Users can create or modify the configuration file manually through MGate Manager. To use this function, users can click on the Off-Line Configuration button to load the configuration window. A dialog box will appear. Choose the correct model and series. Click the OK button for the desired MGate device to proceed to the next step.
Page 49
MGate 4101-MB-PBS Configuration A dialog box to store the configuration file as *.INI file is displayed. The file for “Load existing configuration” can be generated from the Export function, or loaded from the file stored when “Create new configuration.” 4-35...
MGate 4101-MB-PBS Quick Configuration Typical Applications Here is a typical application to demonstrate how to use the Quick Link function and explain how QuickLink works. First, we are assuming a legacy Modbus master is in the original application, and the Modbus master is running. After MGate 4101-MB-PBS connects to the Modbus master, the MGate 4101-MB-PBS acts as a Modbus slave to learn Modbus requests from the master automatically.
MGate 4101-MB-PBS Quick Configuration Quick Configuration Steps MGate 4101-MB-PBS provides an innovative function which can automatically and quickly finish the configuration. Two typical architectures are illustrated below. Confirm which architecture is used in your application and then follow the steps to finish the configuration. MGate 4101 is Modbus Master MGate 4101 is Modbus Slave PROFIBUS Overview...
MGate 4101-MB-PBS Quick Configuration Topology PROFIBUS uses the bus topology. In this topology, a central line, or bus, is wired throughout the system. Devices are attached to this central bus. One bus eliminates the need for a full-length line going from the central controller to each individual device.
Page 54
MGate 4101-MB-PBS Quick Configuration Normal The master sends a request to the slave. The slave responds with the requested information. Exception The master sends a request to the slave. The slave may not support the command or an error is detected, so it sends an exception to the master.
MGate 4101-MB-PBS Quick Configuration Modbus Ethernet vs. Modbus Serial Although Modbus is intended as an application layer messaging protocol, the data format and communication rules for Ethernet-based Modbus TCP are different from serial-based Modbus ASCII and RTU. The major difference between the Ethernet and serial Modbus protocols is the behavior of the communication model.
Need help?
Do you have a question about the 4101I-MB-PBS-T and is the answer not in the manual?
Questions and answers