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

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