B&B Electronics MES1A, MES1B manual Modbus Basics, Modbus ASCII/RTU

Page 57

Modbus Basics

Chapter 6: Modbus Basics

If you are reading this manual you are probably in the process of interfacing legacy Modbus ASCII/RTU devices to a network. Chances are you already have some knowledge and familiarity with Modbus ASCII/RTU but possibly somewhat less knowledge of Modbus/TCP and/or networking in general. Most likely your biggest questions relate to what is involved in bringing the two together.

This section provides:

a basic introduction to Modbus

some information on Modbus/TCP

some tips and suggestions for ensuring success

Modbus ASCII/RTU

The Modbus protocol emerged in the mid-1970s as an early protocol for linking terminals with Modicon PLCs using a master/slave (sometimes called a master/client) relationship. A simple, open, message-based protocol, it caught on quickly and became a defacto standard in the industry. It supports asynchronous point-to-point and multidrop communications and can be used with a variety of serial interfaces (RS-232, RS-422, RS-485, modems, etc).

The original Modbus specification included two possible transmission modes: ASCII and RTU. Modbus RTU mode is the most common implementation, using binary coding and CRC error-checking. Modbus ASCII messages, though somewhat more readable because they use ASCII characters, is less efficient and uses less effective LRC error checking. ASCII mode uses ASCII characters to begin and end messages whereas RTU uses time gaps (3.5 character times) of silence for framing. The two modes are incompatible so a device configured for ASCII mode cannot communicate with one using RTU.

All Modbus communications are initiated by Modbus masters using a polling, query/response format. The master can send broadcast messages (using a slave address of 0), which all slaves accept, but do not reply to. More commonly the master polls individual slaves sequentially. In each poll

Manual Documentation Number: MES1A/MES1B-2106m

PN7138-rev001

B&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104www.bb-elec.com

B&B Electronics Ltd – Westlink Commercial Park – Oranmore, Galway, Ireland – Ph +353 91-792444 – Fax +353 91-792445www.bb-europe.com

47

Image 57
Contents Models MES1A, MES1B Modbus TCP Modbus Ascii / RTU ConvertersManual Documentation Number MES1A/MES1B-2106m International Headquarters Page Manual Documentation Number MES1A/MES1B-2106m PN7138-rev001 Page Table of Contents Configuring the MES1A/B Modbus Basics Manual Documentation Number MES1A/MES1B-2106m Introduction About this ManualSupport About Your MES1A/B Converter Features Indicators, Switches and Connectors Package ChecklistPower LED Hardware OverviewReset Switch Link LEDActivity LED Ethernet Port Connector RS-422/485 Switch MES1B onlyDB-9M Serial Port Connector MES1A only RS-422/485 Connector MES1B onlyRS-485 Two-Wire Mode RS-422/485 Four-Wire ModePower Connector Connecting the HardwareMES1A Connections MES1B Connections Hardware Overview QuickStart Getting StartedDiscover the MES1A/B on the Network Using the Device Installer Software Installing the Device InstallerSystem Requirements Discovering Devices Starting the Device InstallerGetting Device Details Device Installer Main WindowPress Enter to go into Setup Mode Connecting to the MES1A/BTelnet Configuration Tab with Settings Getting Started Telnet Configuration Tab Configuring the MES1A/BUnit ID to IP Address Table Navigating the Configuration MenuReconfiguring to Factory Settings Saving Configuration SettingsTo Reconfigure the MES1A to Factory Settings To Reconfigure the MES1B, to Factory SettingsIP Address Network/IP SettingsDefault Gateway Auto-IPStatic IP Address Serial and Mode Settings Telnet Configuration PasswordNetmask Protocol Attached DeviceSerial Protocol Serial Interface MES1A Serial InterfaceMES1B Serial Interface Serial Parameters Modem/Configurable Pin SettingsAdvanced Modbus Protocol Settings Menu Advanced Modbus Protocol SettingsSlave Address / Unit ID Source For Auto…255 Use MB/TCP 00BH/00AH Exception Responses Allow Modbus Broadcasts= No = YesDisable Modbus/TCP Pipeline Character TimeoutMessage Timeout Serial TX Delay after RX Unit ID to IP Address Lookup Table SettingsSwap 4x/0H to Get 3x/1x Close Idle TCP Sockets AfterRedundant Entry Retries After Add, Delete, Exit Select FunctionModbus Address From/To Slave IP Address Using Other Device Installer Features Managing Device ListsCreating a New Device List Saving Device Lists Display Devices Using IconsOpening Device Lists Device List Display OptionsAdding a Device Manually Display the Hardware MAC AddressDisplay the Device Name Using Device Installer to Assign an IP Address Assigning an IP Address using Device InstallerUsing the Devices Details Tab Adding Info to the Device Details Tab Upgrading FirmwareSaving Setup Records Installing Pre-Saved Configuration FilesSave Setup Records Dialog Box Installing Setup RecordsLogging Search and Upgrade Data Options Window, Customization Tab Using Help Using PingUsing Other Device Installer Features Modbus ASCII/RTU Modbus BasicsModbus/TCP Hints and Tips Modbus Basics Swap 4x/0H to get 3x/1x Appendix a Default Configuration SettingsDefault Configuration Settings Manual CD-ROM disc Appendix B Product SpecificationsProduct Specifications Dimensional Diagram of the MES1A Appendix C Dimensional DiagramsDimensional Diagram of the MES1B DTE Appendix D Serial ConnectionsMES1B Terminal Block Pin-out for RS-485 Two-Wire Operation Appendix E Network Connections RJ-45 Pin Signal Wire ColorNetwork Connections Declaration of Conformity