MGate-4101-MB-PBS Modbus Serial-to-PROFIBUS Slave Gateway User’s Manual First Edition, October 2011 www.moxa.com/product © 2011 Moxa Inc. All rights reserved.
MGate-4101-MB-PBS Modbus Serial-to-PROFIBUS Slave Gateway User’s Manual The software described in this manual is furnished under a license agreement and may be used only in accordance with the terms of that agreement. Copyright Notice © 2011 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.
Table of Contents 1. Introduction ...................................................................................................................................... 1-1 Overview ........................................................................................................................................... 1-2 Package Checklist ............................................................................................................................... 1-2 Product Features ..................
1 1. 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.
MGate 4101-MB-PBS UM 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. Siemens S400, S300) with remote maintenance capability.
2 2.
MGate 4101-MB-PBS UM 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. Plug the power adapter into an electrical outlet. Follow these instructions to connect a power source to the terminal block: 1. Loosen or remove the screws on the terminal block. 2.
3 3.
MGate 4101-MB-PBS UM Hardware Function Block Power Input and Relay Output Pinouts V2+ V2- V1+ Shielded DC Power DC Power Relay Ground Input 2 Input 2 output Common Relay DC Power output Input 1 V1DC Power Input 1 LED Indicators LED Color Function PWR1 Green Power is on. Off Power is off. Green Power is on. Off Power is off. PWR2 Ready P1 Tx/Rx (Modbus Serial) P2 Status (PROFIBUS) Green Gateway is operational. Red Gateway has wrong settings.
MGate 4101-MB-PBS UM Hardware Orange Steady: Error in Configuration. Blinking: Error in Parameter data Off PROFIBUS offline or Slave ID wrong. Dimensions Pin Assignments Modbus P1 Pin Assignment The MGate 4101-MB-PBS series use DB9 (male) serial port to connect to Modbus devices.
MGate 4101-MB-PBS UM 6 5V 7 N.C. 8 PROFIBUS D- 9 N.C. Hardware Console (RS-232) Pin Assignment The MGate 4101-MB-PBS series use RJ45 serial port to connect to PC to configure device. PIN RS-232 1 DTR 2 RTS 3 GND 4 TXD 5 RXD 6 DCD 7 CTS 8 DTR Mounting the Unit The unit can be mounted on the wall or mounted 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.
MGate 4101-MB-PBS UM Hardware Specifications Power Input Input Voltage 12 to 48 VDC Connector 8-pin terminal block (GND, V1+, V1-, Relay NC, Relay NC, V2+, V2-), screw mounting Modbus Serial Interface Protocol Modbus ASCII/RTU, Master/Slave Number of Ports 1 Serial Standards RS-232/422/485, software selectable Data Bits 7, 8 Stop Bits 1, 2 Parity None, Even, Odd, Space, Mark Flow Control RTS/CTS, XON/XOFF Baudrate 50 bps to 921.
MGate 4101-MB-PBS UM Warranty Hardware 5 years Adjustable Pull High/Low Resistors for the Modbus Port (P1) in RS-485 Mode SW Default 1 2 3 Pull High Pull Low Terminator ON 1KΩ 1KΩ 120Ω OFF 150Ω 150KΩ --- In some critical environments, you may need to add termination resistors to prevent the reflection of serial signals. When using termination resistors, it is important to set the pull high/low resistors correctly so that the electrical signal is not corrupted.
MGate 4101-MB-PBS UM Hardware 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. If you would like to assign an address which is over 99, you must set it in the MGate utility.
4 4.
MGate 4101-MB-PBS UM 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 Document and Software CD into the CD-ROM drive. Locate and run the following setup program to begin the installation process: MGM_Setup_[Version]_Build_[DateTime].exe The latest version might be named MGM_Setup_Ver1.5_Build_xxxxxxxx.exe. 2. You will be greeted by the Welcome window.
MGate 4101-MB-PBS UM 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.
MGate 4101-MB-PBS UM 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 UM Configuration 7. A message will indicate that MGate Manager is successfully installed. You may choose to run it immediately by selecting Launch MGate Manager. 8. You may also open MGate Manager through Start Programs MGate Manager MGate Manager, as shown below.
MGate 4101-MB-PBS UM Configuration 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. Please refer to Chapter 2 for more details. You may open MGate Manager from the Windows Start menu by clicking Start Programs MGate Manager MGate Manager. The MGate Manager window should appear as shown below.
MGate 4101-MB-PBS UM Configuration 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. For example, the above picture is shown in traditional Chinese. However, no matter what language you choose, it won’t change the label on the language button. ATTENTION Set your MGate Manager to “Default Language” before contacting Moxa Technical Support.
MGate 4101-MB-PBS UM Configuration Specify by IP Address Specify by IP Address is used for MGate Ethernet Gateways, such as the MGate MB3000 and MGate EIP3000 series, which are discovered via Ethernet by using a specific IP address. Click Specify by IP Address if you know the IP address of the unit and wish to connect to it directly. ATTENTION If Search by IP Address fails to locate the MGate MB3000 or MGate EIP3000 series, the IP address that you entered might be incorrect.
MGate 4101-MB-PBS UM Configuration 4-9
MGate 4101-MB-PBS UM 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 UM 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. Password (an alphanumeric string) You can set a password to prevent unauthorized users from configuring the unit.
MGate 4101-MB-PBS UM 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.
MGate 4101-MB-PBS UM Max. Retry Configuration Master mode only, the number of times the master will retry the same request when response time out. Response Time-out According to the Modbus standard, the time that it takes for a slave device to respond to a request is defined by the device manufacturer (please refer to Appendix A of MGate MB3000 series User Manual for details). Based on this response time, a master can be configured to wait a certain amount of time for a slave’s response.
MGate 4101-MB-PBS UM 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. Click Add to create each Modbus request.
MGate 4101-MB-PBS UM 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” parameter.
MGate 4101-MB-PBS UM 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. Click OK to record this IO module.
MGate 4101-MB-PBS UM NOTE Configuration 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. By using the QuickLink function, the MGate 4101-MB-PBS will learn Modbus requests automatically, to save time in deployment.
MGate 4101-MB-PBS UM 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. Moreover, based on these learned requests, the I/O module blocks are allocated intelligently by MGate Manager. To complete the process, click the Finish button to make the settings work.
MGate 4101-MB-PBS UM 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. Therefore, gateway internal memory is divided into two blocks. The input memory address starts from 0x00000 and the out memory starts from 0x40000.
MGate 4101-MB-PBS UM 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. The output I/O module, which is called P1, is used to change the page number to the specified one.
MGate 4101-MB-PBS UM 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.
MGate 4101-MB-PBS UM 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. If not, click Cancel.
MGate 4101-MB-PBS UM 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 UM 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 UM 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.
MGate 4101-MB-PBS UM 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.
MGate 4101-MB-PBS UM 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.
MGate 4101-MB-PBS UM Output Configuration 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 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 UM 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.
MGate 4101-MB-PBS UM 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 UM 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. Your MGate should reappear in the list of units.
A A.
MGate 4101-MB-PBS UM 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. After MGate 4101-MB-PBS connects to Modbus master, the MGate 4101-MB-PBS acts as a Modbus slave to learn Modbus requests from the master automatically.
MGate 4101-MB-PBS UM 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-MB-PBS UM 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. Devices are Either Masters or Slaves All Modbus devices are classified as either a master or a slave.
MGate 4101-MB-PBS UM 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 UM Quick Configuration Integrate Modbus Serial and Ethernet with Gateways 7 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.