background image

MGate-4101-MB-PBS   

Modbus Serial-to-PROFIBUS   

Slave Gateway User’s Manual 

Third Edition, July 2014 

www.moxa.com/product 

 

© 2014 Moxa Inc. All rights reserved. 

 

 

www.ipc2u.ru

www.moxa.pro

Summary of Contents for MGate-4101-MB-PBS

Page 1: ...MGate 4101 MB PBS Modbus Serial to PROFIBUS Slave Gateway User s Manual Third Edition July 2014 www moxa com product 2014 Moxa Inc All rights reserved www ipc2u ru www moxa pro ...

Page 2: ... 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 typograph...

Page 3: ...or the Modbus Port P1 in RS 485 Mode 3 6 Reset Button 3 7 Rotary Switch 3 7 4 Configuration 4 1 Installing the Software 4 2 Starting MGate Manager 4 5 Connecting to the Unit 4 7 Modifying the Configuration 4 9 Configure Device 4 10 Configure Modbus Settings 4 11 Set up PROFIBUS 4 12 IO Mapping Setup 4 13 QuickLink 4 16 IO Map 4 18 Load Default 4 25 Monitoring Modbus Activity 4 26 Diagnose 4 29 Upg...

Page 4: ...ays 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 Overview Package Checklist Product Features www ipc2u ru www moxa pro ...

Page 5: ...h the following items Standard Accessories 1 MGate 4101 MB PBS Modbus Serial to PROFIBUS Slave Gateway Documentation Software CD Quick Installation Guide Product warranty statement RJ45 to DB9 cable for console use Optional Accessories DR 4524 45W 2A DIN rail 24 VDC power supply with universal 85 to 264 VAC input DR 75 24 75W 3 2A DIN rail 24 VDC power supply with universal 85 to 264 VAC input DR ...

Page 6: ...ing 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 www ipc2u ru www moxa pro ...

Page 7: ...IBUS port s are located on the front panel Use a PROFIBUS cable to directly connect the unit to a PROFIBUS PLC or other PROFIBUS master For the PROFIBUS port pin assignments please refer to Chapter 3 This information can then be used to construct your own PROFIBUS cable Connecting Modbus Serial Devices The unit s Modbus port s are located on the front panel Use a Modbus cable to directly connect t...

Page 8: ...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 Reset Button Rotary Switch www ipc2u ru www moxa pro ...

Page 9: ...Green Gateway is operational Red Gateway has wrong settings Off Power is off or fault condition exists P1 Tx Rx Modbus Serial Green Serial device is transmitting data Orange Serial device is receiving data Off No data is flowing to or from the serial port P2 Status PROFIBUS Green Steady Gateway is waiting for data exchanging Blinking Data is exchanging Orange Steady Error in Configuration Blinking...

Page 10: ... N C 8 PROFIBUS D 9 N C 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 For DIN Rail moun...

Page 11: ... RTS CTS XON XOFF Baudrate 50 bps to 921 6 kbps Connector DB9 male Serial Line Protection ESD 15 kV protection for all signals Isolation 2 kV protection MGate 4101I MB PBS only RS 485 Data Direction Control ADDC automatic data direction control Pull High Low Resistor for RS 485 1 kΩ 150 KΩ switchable Terminal Resister 120 Ω for RS 485 Modbus Function 1 2 3 4 5 6 15 16 Modbus Serial Signals RS 232 ...

Page 12: ...Standard Temp Models 0 to 60 C 32 to 140 F Wide Temp Models 40 to 75 C 40 to 167 F Operating Humidity 5 to 95 RH Storage Temperature 40 to 85 C 40 to 185 F Standards and Certifications Safety UL 60950 1 EN 60950 1 Hazardous Location UL cUL Class 1 Division 2 Groups A B C D ATEX Zone 2 IECEx EMC CE FCC EMI EN 55022 Class A FCC Part 15 Subpart B Class A EMS EN 55024 EN 61000 4 2 ESD Level 3 EN 61000...

Page 13: ... is not corrupted The MGate uses jumper settings or DIP switches to set the pull high low resistor values for each serial port To set the pull high low resistors to 150 KΩ make sure that the two jumpers assigned to the serial port are not shorted by jumper caps This is the default setting To set the pull high low resistors to 1 KΩ make sure that the two jumpers assigned to the serial port are shor...

Page 14: ...start 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 www ipc2u ru www moxa pro ...

Page 15: ...arting MGate Manager Connecting to the Unit Modifying the Configuration Configure Device Configure Modbus Settings Set up PROFIBUS IO Mapping Setup QuickLink IO Map Load Default Monitoring Modbus Activity Diagnose Upgrading Firmware Import Export Off Line Configuration www ipc2u ru www moxa pro ...

Page 16: ... 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 2 You will be greeted by the Welcome window Click Next to continue www ipc2u ru www moxa pro ...

Page 17: ... 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 www ipc2u ru www moxa pro ...

Page 18: ...MGate 4101 MB PBS Configuration 4 4 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 www ipc2u ru www moxa pro ...

Page 19: ...e 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 www ipc2u ru www m...

Page 20: ...ges 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 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 www ipc2u r...

Page 21: ... discovered via Ethernet by using broadcast IP In addition whenever you add an MGate 4101 MB PBS via serial console the MGate Manager will automatically record the COM port s for the broadcast to search as well Note that restarting the MGate Manager will erase the COM port s record Specify by IP Address Specify by IP Address is used for MGate Ethernet Gateways such as the MGate MB3000 and MGate EI...

Page 22: ...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 www ipc2u ru www moxa pro ...

Page 23: ...n 4 9 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 www ipc2u ru www moxa pro ...

Page 24: ...c string You can set a password to prevent unauthorized users from configuring the unit The password will be required when anyone attempts to configure the unit over the network Modbus operation is not affected by the password Confirm password an alphanumeric string Re type the password again for confirmation ATTENTION To erase an existing password leave both the New Password and Confirm Password ...

Page 25: ...e connected to the serial port RTU Slave A Modbus RTU master will be connected to the serial port ASCII Master Modbus ASCII slave s will be connected to the serial port ASCII Slave A Modbus ASCII master will be connected to the serial port Serial Port Description Baud Rate 50 bps to 921600 bps Parity None Odd Even Mark Space Data Bits 8 Stop Bits 1 2 Flow Control None DTR DSR RTS CTS FIFO Enable D...

Page 26: ...S the Response Time out field is used to configure how long the gateway will wait for a response from a Modbus ASCII or RTU slave Please refer to your device manufacturer s documentation to manually set the response time out Set up PROFIBUS Every PROFIBUS slave device should be assigned a unique address in the same field If the address you would assign is lower than 99 please use the rotary switch...

Page 27: ...ould 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 www ipc2u ru www moxa pro ...

Page 28: ...ls 02 Read discrete inputs 03 Read holding registers 04 Read input register 05 Write single coil 06 Write single register 15 Write multiple coils 16 Write multiple registers Address Station Address The range is from 0 to 65535 Length The length field is a byte count of the following fields including the Unit Identifier and data fields The range is from 1 to 1953 Internal Address This parameter spe...

Page 29: ...s requests you set before Click OK to record this IO module Parameter Description I O Type Input Used to map into input memory Output Used to map into output memory Data Type The data type for this IO module Data Length The data length for this IO module The range is from 1 to 64 Finally you can see the IO module you configure before is put into PROFIBUS Slave list Follow the above steps you can m...

Page 30: ...ent However the function is only enabled in Modbus master mode Please refer to the Typical Application in the Appendix for more details Start QuickLink by clicking the QuickLink button It takes a period of 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...

Page 31: ...ls 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 www ipc2u ru www moxa pro ...

Page 32: ...IO map dialog with the IO Map button Input refers to the data flow from the Modbus device to the PROFIBUS master More specifically it means the gateway will read the Modbus device s data and store in its input memory area And the PROFIBUS mater will read these Modbus data stored at gateway s input memory User can choose internal memory address between 0 224 Output refers to the data flow from the ...

Page 33: ... Modbus request with packet length 2 word byte and internal address start from 0 hence the MGate will allocate the first 4 bytes from internal memory address 00 03 In other hands if the Modbus function code 05 06 15 and 16 is being chose that is write command the memory it used will be allocated in output memory area For example if we adopts function code 16 with packet length 2 word byte starting...

Page 34: ... 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 Hence the PROFIBUS I O Module setting is depended on the data it requires For example if the PROFIBUS master is going to access the Modbus requests we assigned in the...

Page 35: ...herefore we set I O type as Input and with total 4 bytes data length You may use data length of 2 with word data type or use data length of 4 with Byte data type For the second command in the Modbus side showed above the PROFIBUS master would write data to Modbus device through gateway Hence we set PROFIBUS I O Module with Output I O type with 2 Word byte types The I O Map shows as follows See sig...

Page 36: ...MGate 4101 MB PBS Configuration 4 22 www ipc2u ru www moxa pro ...

Page 37: ...tion 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 The first byte of module P1 attempts to switch input page number and the second byte attempts to change output page number In addition the input I O module which is called P2 is used to read the current page number The first byte of module P2 indicates input ...

Page 38: ...s showed as the following table Modbus Mode Command The Format Meaning Master N A The Modbus ID The ID of I O module Slave 05 Write single coil 15 Write multiple coil The start bit The end bit The ID of I O module 01 Read coil 02 Read discrete inputs 06 Write single register 16 Write multiple register The start word The ID of I O module 03 Read holding register 04 Read input register www ipc2u ru ...

Page 39: ...n to the factory default click the OK button If not click Cancel After the MGate Manager resets completely 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 ATTENTION Load Default will completely reset the configuration of the unit and all of the parameters you have saved will be dis...

Page 40: ...ide 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 Events can be filtered in different ways and the complete log can be saved to a file for later analysis www ipc2u ru www moxa pro ...

Page 41: ... 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 www ipc2u ru www moxa pro ...

Page 42: ...101 MB PBS Configuration 4 28 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 www ipc2u ru www moxa pro ...

Page 43: ...roubleshooting 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 www ipc2u ru www moxa pro ...

Page 44: ... CRC LRC errors Invalid Requests The number of invalid requests The second part is the serial parameters It includes the serial communication about this serial port Serial Port Description Port Number The serial port number Interface The serial interface RS 232 RS 422 RS 485 2w RS 485 4w Settings The parameter includes baudrate parity start bit and stop bit for example 19200 None 8 1 Tx The transm...

Page 45: ...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 Select the desired unit from the list in MGate Manager and click Upgrade Firmware to begin the process The dialog boxes will guide you through the process You will need to browse your PC for the fir...

Page 46: ...port Export configuration function is a convenient way to apply the same settings to units which are located in different sites You can export the configuration as a file and then import that configuration file onto other units at any time The export function saves all the configuration settings and parameters of the MGate 4101 MB PBS will be saved in an ini file To begin click the Export button T...

Page 47: ...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 Select the file you want to import then click the OK button www ipc2u ru www moxa pro ...

Page 48: ...sage 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 Off Line Configuration Users can create or modify the configuration file manually through the MGate Manager To use this function users can click on the Off Line Configuration button to load the configuration window www ipc...

Page 49: ...y choosing create new configuration users can set each functions as on line setting Refer to the Modifying the Configuration section for detailed information When all configurations are finished click OK to update or store the configuration file It will pop out a diagram to store the configuration file as ini file The file for Load existing configuration can be generated from the Export function o...

Page 50: ... A Quick Configuration The following topics are covered in this appendix Typical Applications Quick Configuration Steps PROFIBUS Overview Modbus Overview Diagnose Packet Format www ipc2u ru www moxa pro ...

Page 51: ...r the MGate 4101 MB PBS acts as a Modbus slave to learn Modbus requests from the master automatically After some time MGate 4101 MB PBS will fully learn the requests from the Modbus master Through this QuickLink process the MGate 4101 MB PBS can replace the legacy Modbus master Moreover the MGate 4101 MB PBS can respond to all of the Modbus slaves correctly NOTE QuickLink is enabled with the MGate...

Page 52: ... standard for field bus communication in automation technology and was first promoted in 1989 by BMBF German department of education and research 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...

Page 53: ...e to a master s request Slaves are Identified by ID Each Modbus slave in a system is assigned a unique ID between 1 and 247 Whenever a master makes a request the request must include the ID of the intended recipient Master devices themselves have no ID 0 1 247 248 255 Broadcast address Slave individual address Reserved Communication is by Request and Response All Modbus communication is by request...

Page 54: ...rs to determine This allows the Modbus protocol to accommodate a wide range of devices and systems However this also makes it difficult for system integrators to know what response timeout value to use during configuration specially with older or proprietary devices The MGate MB3000 provides a patent pending function that tests all attached devices and recommends a response timeout value This func...

Page 55: ...r no responses the MGate will continue to send polling requests until three requests are sent without response Then it will enter diagnostic mode In this mode the MGate will send diagnose packets periodically Upon receiving the correct response MGate will go back to normal operations Refer to the diagnose packet format table to help identify why the MGate entered diagnostic mode Byte Parameter Not...

Reviews: