.NET ModbusClient – Properties

Namespace:  EasyModbus
Class:  ModbusClient


bool Connected

returns “TRUE” if client is connected to Server; otherwise “FALSE”


string IPAddress

Gets or Sets the IP-Address of the Server to be connected


int Port

Gets or Sets the Port were the Modbus-TCP Server is reachable (Standard is 502)


bool UDPFlag

Gets or Sets the UDP-Flag to activate Modbus UDP.


byte UnitIdentifier

Gets or Sets the Unit identifier in case of serial connection (Default = 0)


int Baudrate

Gets or Sets the Baudrate for serial connection (Default = 9600)


Parity Parity

Gets or Sets the of Parity in case of serial connection


StopBits StopBits

Gets or Sets the number of stopbits in case of serial connection


int ConnectionTimeout

Gets or Sets the connection Timeout in case of ModbusTCP connection


string LogFileFilename

Gets or Sets the Filename for the LogFile. If the Filename is set, the LogData are stored in that file, otherwise no Logdata will be written


string MqttRootTopic

Gets or Sets the RootTopic Mqtt messages are published. Standard is “easymodbusclient”


string MqttUserName

Gets or Sets the Username for the connection to a MQTT-Broker (if necessary)


string MqttPassword

Gets or Sets the Password for the connection to a MQTT-Broker (if necessary)


bool MqttPushOnChange

Enables to only Publish data to a MQTT-Broker if the data has been changed (Standard is TRUE)
If FALSE the values will be published after every response of the Server


int MqttBrokerPort

Gets or Sets the Port for the connection to a MQTT-Port (Standard 1883)


public bool MqttRetainMessages

Disables or Enables to Retain the Messages in the Broker – default is false (Enabled)