FieldTalk Modbus Master Library for .NET
FieldTalk Modbus Master Library for .NET
Namespaces
FieldTalk.Modbus.Master
MbusMasterFunctions Class
MbusMasterFunctions Properties
MbusMasterFunctions Methods

# MbusMasterFunctions Class

Base class which implements Modbus data and control functions
Inheritance Hierarchy
System
Object
FieldTalk.Modbus.Master
MbusMasterFunctions
FieldTalk.Modbus.Master
MbusIpClientBase
FieldTalk.Modbus.Master
MbusSerialClientBase

Namespace: FieldTalk.Modbus.Master
Assembly: FieldTalk.Modbus.Master (in FieldTalk.Modbus.Master.dll) Version: 2.15.2-eval+3d8362b4bb861c05760d48b11d303e954bb8597c
Syntax
C#
VB
C++
Copy

    public abstract class MbusMasterFunctions : IDisposable

    Public MustInherit Class MbusMasterFunctions
    	Implements IDisposable

    public ref class MbusMasterFunctions abstract : IDisposable

The MbusMasterFunctions type exposes the following members.

Properties

| Name | Description
--- | --- | ---
| pollDelay | Poll delay property
| retryCnt | Retry count property
| timeout | Time-out port property

Top
Methods

| Name | Description
--- | --- | ---
| closeProtocol | Closes an open protocol including any associated communication resources (COM ports or sockets).
| configureBigEndianInts | Configures 32-bit int data type functions to do a word swap
| configureBigEndianInts(Int32) | Configures 32-bit int data type functions to do a word swap on a per slave basis
| configureCountFromOne | Configures the reference counting scheme to start with one for all slaves.
| configureCountFromOne(Int32) | Configures the reference counting scheme to start with one for a slave.
| configureCountFromZero | Configures the reference counting scheme to start with zero for all slaves.
| configureCountFromZero(Int32) | Configures the reference counting scheme to start with zero for a slave.
| configureEnron32BitMode | Configures all slaves for Daniel/ENRON 32-bit Mode.
| configureEnron32BitMode(Int32) | Configures a slave for Daniel/ENRON 32-bit Mode.
| configureIeeeFloats | Configures float data type functions NOT to do a word swap
| configureIeeeFloats(Int32) | Configures float data type functions NOT to do a word swap on a per slave basis
| configureLittleEndianInts | Configures 32-bit int data type functions NOT to do a word swap
| configureLittleEndianInts(Int32) | Configures 32-bit int data type functions NOT to do a word swap on a per slave basis
| configureStandard32BitMode | Configures all slaves for Standard 32-bit Mode.
| configureStandard32BitMode(Int32) | Configures a slave for Standard 32-bit Mode.
| configureSwappedFloats | Configures float data type functions to do a word swap
| configureSwappedFloats(Int32) | Configures float data type functions to do a word swap on a per slave basis
| customFunction | User Defined Function Code
| Dispose | Releases any associated communication resources (serial ports or sockets).
| forceMultipleCoils(Int32, Int32, Boolean ) | Modbus function 15 (0F hex), Force Multiple Coils.
| forceMultipleCoils(Int32, Int32, Boolean , Int32) | Modbus function 15 (0F hex), Force Multiple Coils.
| getPackageVersion | Returns the package version number.
| getPollDelay | Returns the poll delay time
| getRetryCnt | Returns the automatic retry count
| getSuccessCounter | Returns how often a message transfer was successful
| getTimeout | Returns the current time-out setting
| getTotalCounter | Returns how often a message transfer has been executed
| isOpen | Returns whether the protocol is open or not.
| maskWriteRegister | Modbus function 22 (16 hex), Mask Write Register.
| readCoils(Int32, Int32, Boolean ) | Modbus function 1 (01 hex), Read Coil Status/Read Coils.
| readCoils(Int32, Int32, Boolean , Int32) | Modbus function 1 (01 hex), Read Coil Status/Read Coils.
| readDeviceIdentification | Modbus function 43 (hex 2B) subfunction 14 (hex 0E), Read Device Identification
| readExceptionStatus | Modbus function 7 (07 hex), Read Exception Status.
| readFileRecord(Int32, MbusMasterFunctions FileSubRequest ) | Modbus function 20, Read File Record.
| readFileRecord(Int32, Int32, Int32, Int32, Int16 ) | Modbus function 20, Read File Record.
| readInputDiscretes(Int32, Int32, Boolean ) | Modbus function 2 (02 hex), Read Inputs Status/Read Input Discretes.
| readInputDiscretes(Int32, Int32, Boolean , Int32) | Modbus function 2 (02 hex), Read Inputs Status/Read Input Discretes.
| readInputMod10000(Int32, Int32, Int32 ) | Modbus function 4 (04 hex) for 32-bit modulo-10000 long int data types, Read Input Registers as modulo-10000 long int data.
| readInputMod10000(Int32, Int32, Int32 , Int32) | Modbus function 4 (04 hex) for 32-bit modulo-10000 long int data types, Read Input Registers as modulo-10000 long int data.
| readInputRegisters(Int32, Int32, Array) | Modbus function 4 (04 hex), Read Input Registers (16-bit, 32-bit, 64-bit and floating point single and double).
| readInputRegisters(Int32, Int32, Array, Int32) | Modbus function 4 (04 hex), Read Input Registers (16-bit, 32-bit, 64-bit and floating point single and double).
| readMultipleMod10000(Int32, Int32, Int32 ) | Modbus function 3 (03 hex) for 32-bit modulo-10000 long int data types, Read Holding Registers/Read Multiple Registers as modulo-10000 long int data.
| readMultipleMod10000(Int32, Int32, Int32 , Int32) | Modbus function 3 (03 hex) for 32-bit modulo-10000 long int data types, Read Holding Registers/Read Multiple Registers as modulo-10000 long int data.
| readMultipleRegisters(Int32, Int32, Array) | Modbus function 3 (03 hex), Read Holding Registers (16-bit, 32-bit, 64-bit and floating point single and double).
| readMultipleRegisters(Int32, Int32, Array, Int32) | Modbus function 3 (03 hex), Read Holding Registers (16-bit, 32-bit, 64-bit and floating point single and double).
| readWriteRegisters(Int32, Int32, Int16 , Int32, Int16 ) | Modbus function 23 (17 hex), Read/Write Registers.
| readWriteRegisters(Int32, Int32, Int16 , Int32, Int32, Int16 , Int32) | Modbus function 23 (17 hex), Read/Write Registers.
| resetSuccessCounter | Resets successful message transfer counter
| resetTotalCounter | Resets total message transfer counter
| restartCommunicationsOption | Modbus function code 8, sub-function 01, Restart Communications Option
| returnQueryData | Modbus function code 8, sub-function 00, Return Query Data.
| setPollDelay | Poll delay property
| setRetryCnt | Configures the automatic retry setting
| setTimeout | Configures time-out
| writeCoil | Modbus function 5 (05 hex), Force Single Coil/Write Coil.
| writeFileRecord(Int32, MbusMasterFunctions FileSubRequest ) | Modbus function 21, Write File Record.
| writeFileRecord(Int32, Int32, Int32, Int32, Int16 ) | Modbus function 21, Write File Record.
| writeMultipleMod10000(Int32, Int32, Int32 ) | Modbus function 16 (10 hex) for 32-bit modulo-10000 long int data types, Preset Multiple Registers/Write Multiple Registers with modulo-10000 long int data.
| writeMultipleMod10000(Int32, Int32, Int32 , Int32) | Modbus function 16 (10 hex) for 32-bit modulo-10000 long int data types, Preset Multiple Registers/Write Multiple Registers with modulo-10000 long int data.
| writeMultipleRegisters(Int32, Int32, Array) | Modbus function 16 (10 hex), Write Multiple Registers (16-bit, 32-bit, 64-bit and floating point single and double).
| writeMultipleRegisters(Int32, Int32, Array, Int32) | Modbus function 16 (10 hex), Write Multiple Registers (16-bit, 32-bit, 64-bit and floating point single and double).
| writeSingleRegister(Int32, Int32, Int16) | Modbus function 6 (06 hex), Preset Single Register/Write Single Register.
| writeSingleRegister(Int32, Int32, UInt16) | Modbus function 6 (06 hex), Preset Single Register/Write Single Register.

Top
Remarks
The functions provided by this base class apply to all protocol flavours via inheritance. For a more detailed description see section @ref mbusmaster.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

#### Reference

FieldTalk.Modbus.Master Namespace

#### Other Resources

Data and Control Functions for all Modbus Protocol Flavours
Serial Protocols
IP based Protocols
FieldTalk Modbus Master Library for .NET
Library version 2.15.2