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 Adjustable Pull High/Low Resistors for the Modbus Port (P1) in RS-485 Mode Pull High Pull Low Terminator 1KΩ 1KΩ 120Ω Default 150Ω 150KΩ 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 rest 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 - 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.
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 upper table.
MGate 4101-MB-PBS Configuration Each Modbus request includes Enable, Modbus slave ID, Function Code, Address, Length, Internal Address, Poll Interval, Swap. Please refer to datasheets or manuals of Modbus slave devices to fill out these fields. Parameter Description Enable The Enable for the transaction: Disable: The transaction is never sent Cyclic: The transaction is sent cyclically at the interval specified in the “Poll Interval”...
Page 29
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 lower table. 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.
MGate 4101-MB-PBS Configuration NOTE Each “ID” of the commands must be mapped, that is, the commands in Modbus will correspond with the I/O module in PROFIBUS QuickLink The QuickLink is an innovative function to let you configure more quickly and easily, Typically, most PROFIBUS users must spend a lot of time to set up Modbus commands in a PROFIBUS application.
Page 31
MGate 4101-MB-PBS Configuration The interface of next dialog 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.
MGate 4101-MB-PBS Configuration IO Map The IO Map is a mechanism which is applied when data from different networks are exchanged via the gateway’s internal memory, so you must define a memory map in the gateway before starting data exchange. Moreover, two networks access the same memory block in a gateway.
Page 33
MGate 4101-MB-PBS Configuration The I/O Map function shows the basic I/O mapping relation between Modbus and PROFIBUS. Note that the Modbus related information is marked in <> signs, while PROFIBUS related information is marked in [ ] signs. The I/O Map will show as below figure. Since we set Modbus request with packet length 2 word byte and internal address start from 0;...
Page 34
MGate 4101-MB-PBS Configuration Since we set Modbus request with pack size 2 word byte and internal address start from 40000, hence, the MGate will allocate the first 4 bytes from internal memory address (40000~40003). In summary, the Input or Output memory being allocated is depended on the type of Modbus command (read or write). For the PROFIBUS side (I/O module), since the PROFIBUS master are going to access the Modbus data we assigned through the memory areas in the gateway.
Page 35
MGate 4101-MB-PBS Configuration The first command is to read Modbus device’s command with function code 03 and the acquired data is to be read by the PROFIBUS master; hence, these data are being placed at Input memory area. Therefore, we set I/O type as Input, and with total 4 bytes data length.
Page 37
MGate 4101-MB-PBS Configuration In addition you can select the Paging checkbox to enable the page function, so the utility will insert two I/O word modules into the starting location of the input/output memory bank for separate page functionality. Basically, because one I/O module supports 244 bytes only, the paging function can be used to break through this limit.
Page 38
MGate 4101-MB-PBS Configuration The IO map interface shows input and output memory array. The row unit is internal address and the column unit is byte number. Each column has a length of 20 bytes. Each cell is showed as the following table: Modbus Mode Command The Format Meaning...
MGate 4101-MB-PBS Configuration Load Default If for some reason you would like to clear all the settings of the unit, the load default button will reset the unit to its initial factory default values. Click Load Default and review the confirmation message. If you are sure you would like to reset the configuration to the factory default, click the OK button.
MGate 4101-MB-PBS Configuration Monitoring Modbus Activity For troubleshooting or management purposes, you can monitor the data passing through any MGate 4101-MB-PBS on the Modbus side. Data events will be logged as they pass through the gateway. Rather than simply echoing the data, MGate Manager presents the data in an intelligent, easily-understood format, with clearly designated fields including source, type, destination, contents, and more.
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.
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-28...
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 detailed of communication status of both Modbus and PROFIBUS, in addition it contains serial parameters.
Page 44
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 PROFIBUS Description State The communication state of PROFIBUS side Baudrate The baudrate of PROFIBUS side Address The PROFIBUS segment ID Output The output bytes Input The input bytes Illegal I/O Config The number of illegal I/O configs Restart Data Exchange The number of restarted data exchanges Upgrading Firmware...
MGate 4101-MB-PBS Configuration Once the firmware has been successfully written onto the unit, click Exit to close the Upgrade Firmware window. MGate Manager 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. Import/Export The Import/Export configuration function is a convenient way to apply the same settings to units which are located in different sites.
Page 47
MGate 4101-MB-PBS Configuration If you export the configuration file successfully, a confirmation message will pop up. After that, the configuration file will be saved as an .ini file Once the file is saved, it can be imported into your target unit to duplicate the same settings. Select the target unit first and click the Import button to import.
MGate 4101-MB-PBS Configuration 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, MGate Manager will automatically execute a Broadcast Search for all MGate units on the LAN and the recording COM port.
Page 49
MGate 4101-MB-PBS Configuration 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. Users can choose “Create new configuration” or “Load existing configuration” to create or modify configurations.
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 of all, we are assuming there is a legacy Modbus master in the original application and the Modbus master is running.
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 Modbus Overview Introduction Modbus is one of the most popular automation protocols in the world. It supports both serial and Ethernet devices. Many industrial devices, such as PLCs, DCSs, HMIs, instruments, meters, motors, and drivers, use Modbus as their communication standard.
MGate 4101-MB-PBS Quick Configuration 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. Broadcast The master sends a broadcast command, such as a reset command. Every slave on the network complies with the command, and no response is sent to the master.
MGate 4101-MB-PBS Quick Configuration Integrate Modbus Serial and Ethernet with Gateways Ordinarily, Modbus TCP and Modbus ASCII/RTU are unable to communicate with each other. However, with a Modbus gateway in between the Modbus serial network and the Modbus Ethernet network, TCP masters are able to communicate with serial slaves and serial masters are able to communicate with TCP slaves.
Need help?
Do you have a question about the MGate-4101-MB-PBS and is the answer not in the manual?
Questions and answers