Library version 2.6.2

The FieldTalk Modbus® Master Library, Delphi Edition provides connectivity to Modbus slave compatible devices and applications.


Typical applications are Modbus based Supervisory Control and Data Acquisition Systems (SCADA), Modbus data concentrators, Modbus gateways, User Interfaces and Factory Information Systems (FIS).


Library Structure

The library is implemented as a VCL class library. The VCL classes wrap around a libmbusmaster DLL which performs the core protocol functions. The libmbusmaster DLL is based on the FieldTalk Modbus Master C++ Library, a proven and industrial-strength Modbus driver implementation.

The library is organised into one class for each Modbus protocol flavour and a common base class, which applies to all Modbus protocol flavours. Because the two serial-line protocols Modbus ASCII and Modbus RTU share some common code, an intermediate base class implements the functions specific to the serial protocols.


The base class TMbusMasterFunctions contains all protocol unspecific functions, in particular the data and control functions defined by Modbus. All protocol flavours inherit from this base class.

The class TMbusAsciiMasterProtocol implements the Modbus ASCII protocol, the class TMbusRtuMasterProtocol implements the Modbus RTU protocol and the class TMbusTcpMasterProtocol implements the MODBUS/TCP protocol and the class TMbusRtuOverTcpMasterProtocol the Encapsulated Modbus RTU master protocol (also known as RTU over TCP or RTU/IP).

In order to use one of the four Modbus protocols, the desired Modbus protocol flavour class has to be instantiated:

TMbusRtuMasterProtocol mbusProtocol;

After a protocol object has been declared and opened, data and control functions can be used:

mbusProtocol.writeSingleRegister(slaveId, startRef, 1234);

FieldTalk Modbus Master Library, Delphi Edition
Library version 2.6.2