B&B Electronics MES1B, MES1A manual Modbus/TCP

Page 58

Modbus Basics

it sends a message containing a device address, followed by a function code, any data that maybe required, and an error check field. The addressed slave responds with a similar message structure. Typically it repeats back its address and the function code, and then sends a field indicating the number of bytes of data it is sending, followed by the data and the error check field.

Slave addresses can range from 1 to 247. Function codes include several common ones typically used in all applications, and additional ones that may be implemented in specific cases. Common function codes include: Read Coil Status (01), Read Input Status (02), Read Holding Registers (03) and Read Input Registers (04).

When a master sends a message to a slave it expects to receive a valid response within certain length of time. If the slave does not receive the message, or if the slave receives the message but an error is detected, it does not respond. If the slave cannot respond appropriately for some other reason (e.g. it does not recognize the function code), it will return a message containing an exception response.

Modbus/TCP

Modbus/TCP is a much more recent development, created to allow Modbus ASCII/RTU protocol to be carried over TCP/IP-based networks. Modbus/TCP embeds Modbus messages inside TCP/IP frames. Although the implementation is fairly simple, characteristics associated with networking add some challenges. For example, because Modbus masters expect and require responses to their polls within a certain time frame, the non- deterministic (and other) aspects of TCP/IP networks have to be considered.

Modbus/TCP sets up connections between nodes on the network, sending requests via TCP in a half-duplex fashion. TCP allows multiple requests to be ‘pipelined’, or queued in a buffer waiting to be serviced. Modbus/TCP has the capability to use transaction identifiers (sequence numbers), but some early manufacturers of Modbus/TCP equipment did not use them. In some cases this can create problems for Modbus/RTU devices connected to the network through interfaces. If a request from a master is lost, or contains an improper function code, the slave does not respond. The master may re- initiate the request, or there may be other requests in the pipeline. Responses to later, or other, requests may become out of sync and the master may match the wrong response with a request. The resulting symptoms could range from appearing to receive wrong data from a slave, to slaves going off-line, to a gradually slowing down of response time.

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.comB&B Electronics Ltd – Westlink Commercial Park – Oranmore, Galway, Ireland – Ph +353 91-792444 – Fax +353 91-792445www.bb-europe.com

48

Image 58
Contents Modbus TCP Modbus Ascii / RTU Converters Models MES1A, MES1BManual 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 About this Manual IntroductionSupport About Your MES1A/B Converter Features Power LED Package ChecklistIndicators, Switches and Connectors Hardware OverviewLink LED Reset SwitchActivity LED DB-9M Serial Port Connector MES1A only RS-422/485 Switch MES1B onlyEthernet Port Connector RS-422/485 Connector MES1B onlyRS-422/485 Four-Wire Mode RS-485 Two-Wire ModeConnecting the Hardware Power ConnectorMES1A Connections MES1B Connections Hardware Overview Getting Started QuickStartDiscover the MES1A/B on the Network Installing the Device Installer Using the Device Installer SoftwareSystem Requirements Starting the Device Installer Discovering DevicesDevice Installer Main Window Getting Device DetailsConnecting to the MES1A/B Press Enter to go into Setup ModeTelnet Configuration Tab with Settings Getting Started Configuring the MES1A/B Telnet Configuration TabNavigating the Configuration Menu Unit ID to IP Address TableTo Reconfigure the MES1A to Factory Settings Saving Configuration SettingsReconfiguring to Factory Settings To Reconfigure the MES1B, to Factory SettingsNetwork/IP Settings IP AddressAuto-IP Default GatewayStatic IP Address Telnet Configuration Password Serial and Mode SettingsNetmask Attached Device ProtocolSerial Protocol MES1A Serial Interface Serial InterfaceMES1B Serial Interface Modem/Configurable Pin Settings Serial ParametersAdvanced Modbus Protocol Settings Advanced Modbus Protocol Settings MenuFor Auto Slave Address / Unit ID Source…255 = No Allow Modbus BroadcastsUse MB/TCP 00BH/00AH Exception Responses = YesCharacter Timeout Disable Modbus/TCP PipelineMessage Timeout Swap 4x/0H to Get 3x/1x Unit ID to IP Address Lookup Table SettingsSerial TX Delay after RX Close Idle TCP Sockets AfterAdd, Delete, Exit Select Function Redundant Entry Retries AfterModbus Address From/To Slave IP Address Managing Device Lists Using Other Device Installer FeaturesCreating a New Device List Opening Device Lists Display Devices Using IconsSaving Device Lists Device List Display OptionsDisplay the Hardware MAC Address Adding a Device ManuallyDisplay the Device Name Assigning an IP Address using Device Installer Using Device Installer to Assign an IP AddressUsing the Devices Details Tab Upgrading Firmware Adding Info to the Device Details TabInstalling Pre-Saved Configuration Files Saving Setup RecordsInstalling Setup Records Save Setup Records Dialog BoxLogging Search and Upgrade Data Options Window, Customization Tab Using Ping Using HelpUsing Other Device Installer Features Modbus Basics Modbus ASCII/RTUModbus/TCP Hints and Tips Modbus Basics Appendix a Default Configuration Settings Swap 4x/0H to get 3x/1xDefault Configuration Settings Appendix B Product Specifications Manual CD-ROM discProduct Specifications Appendix C Dimensional Diagrams Dimensional Diagram of the MES1ADimensional Diagram of the MES1B Appendix D Serial Connections DTEMES1B Terminal Block Pin-out for RS-485 Two-Wire Operation RJ-45 Pin Signal Wire Color Appendix E Network ConnectionsNetwork Connections Declaration of Conformity