.NET ModbusServer – Properties

Namespace:  EasyModbus
Class:  ModbusServer

public HoldingRegisters holdingRegisters

provides access to the Holding Registers e.g. holdingRegisters[5]


public InputRegisters inputRegisters

provides access to the Input Registers e.g. inputRegisters[10]


public Coils coils

provides access to the coils


public DiscreteInputs discreteInputs

provides access to the discrete Inputs e.g. discreteInputs[8]

public int NumberOfConnections

returns the number of connected Clients

public ModbusProtocol[] ModbusLogData

returns some protocol data about Modbus communication

public int Port

gets or sets the Port the Server listens to in case of Modbus-TCP or Modbus-RTU (Standard is 502)

public bool UDPFlag

Enables Modbus-UDP and Disables Modbus-TCP if TRUE

public bool SerialFlag

Enables Modbus-RTU and Disables Modbus-TCP if TRUE

public int Baudrate

gets or sets the Baudrate for serial connection if Modbus-RTU is enabled (Standard: 9600)


public System.IO.Ports.Parity Parity

gets or sets the parity for serial connection if Modbus-RTU is enabled (Standard: even)

public System.IO.Ports.StopBits StopBits

gets or sets the Stopbits for serial connection if Modbus-RTU is enabled (Standard: one)

public string SerialPort

gets or sets the serial port for Modbus-RTU. Providing a serial port automatically enables Modbus-RTU and disables Modbus-TCP


public byte UnitIdentifier

gets or sets the unit identifier (Slave-ID). Normally only nessesary for Modbus-RTU (Standard is 1)


public string LogFileFilename

gets or sets the Filename to Log data for troubleshooting. Providing a Filename automatically enables logging