FieldTalk™ Modbus Master .NET Library

FieldTalk Namespace

This Modbus protocol driver implements the most commonly used Modbus data functions as well as some control functions. The functions to perform PLC program download and other device specific functions are outside the scope of this library.

All functions of conformance Class 0 and Class 1 have been implemented. In addition the most frequent used functions of conformance Class 2 have been implemented. This rich function set enables a user to solve nearly every Modbus data transfer problem. For a more detailed description of the data and control functions see section The Protocol Functions.

The two serial protocol flavours are implemented in the MbusRtuMasterProtocol and MbusAsciiMasterProtocol class. These classes provide functions to open and to close serial port as well as data and control functions which can be used at any time after a protocol has been opened.

See sections The RTU Protocol and The ASCII Protocol for some background information about the two serial line Modbus protocols.

The MODBUS/TCP master protocol is implemented in the class MbusTcpMasterProtocol. It provides functions to establish and to close a TCP/IP connection to the slave as well as data and control functions which can be used after a connection to a slave device has been established successfully.

The MODBUS/Encapsulated RTU master protocol is implemented in the class MbusRtuOverTcpMasterProtocol. It provides functions to establish and to close a TCP/IP connection to the slave as well as data and control functions which can be used after a connection to a slave device has been established successfully.

Note    When passing register numbers and discrete numbers to FieldTalk functions you have to use the the Modbus register and discrete numbering scheme. See The Register Model and Data Tables . (Internally the functions will deduct 1 from the start register value before transmitting the value to the slave device.)

Note    Most slave devices are limiting the amount of registers to be exchanged with the ASCII protocol to be 62 registers or 496 discretes. The limitation is based on the fact that the buffer must not exceed 256 bytes.

Note    Using multiple instances of a protocol class enables concurrent protocol transfers on multiple COM ports or TCP/IP connections (They should be executed in separate threads).

Namespace hierarchy

Classes

ClassDescription
BusProtocolErrors Protocol Errors and Exceptions
MbusAsciiMasterProtocol Modbus ASCII Master Protocol class
MbusMasterFunctions Base class which implements Modbus data and control functions
MbusRtuMasterProtocol Modbus RTU Master Protocol class
MbusRtuOverTcpMasterProtocol MODBUS/Encapsulated RTU (RTU emulated on TCP) Master Protocol class
MbusSerialMasterProtocol Base class for serial serial master protocols
MbusTcpMasterProtocol MODBUS/TCP Master Protocol class