A Reactive Modbus implementation based on NModbus4
ModbusRx has been developed using the NModbus4 library as a base ModbusRx is a reactive implementation of the Modbus protocol. It is designed to be used with the Reactive Extensions library (Rx.NET) and provides a simple and easy to use API for reading and writing Modbus data. a. Modbus/RTU Master/Slave b. Modbus/ASCII Master/Slave c. Modbus/TCP Master/Slave d. Modbus/UDP Master/Slave
Create Master, Set Retries, Set ReadTimeout, Master.Read, Update to UI, Master.Dispose, CreateRtu, CreateAscii, CreateIp(TcpClient), CreateIp(UdpClient), Retries [Property], ReadTimeout[Property], Master.ReadCoils, Master.ReadInputs, Master.ReadHoldingRegisters, Master.ReadInputRegisters, WriteSingleCoil, WriteSingleRegisterSet Retries
RTU master create connection to serial port.
Ascii master create connection to serial port.
IP master create connection to TCP.
IP master create connection to UDP.
Gets or sets the number of milliseconds before a timeout occurs when a read operation does not finish.
Read coils status.
Read input status.
Read holding registers value.
Read input registers value.
Write a coil value.
Write a holding register value.
Create Slave
Create a RTU slave connection.
Create an Ascii slave connection.
Create a TCP slave connection. Max value of TCP slave from master is 50.
Create a UDP slave connection.
Create memory space in Datastore. AI and AO’s Datastore set to 0. DI and DO’s Datastore set to false. For each memory default size is 65535 and range is 1 to 65535.
Occurs when a modbus slave receives a request. You can disassemble request packet and set particular action here.
Occurs when a slave receive write AO or DO command to Datastore from master via a Modbus command. Address starts from 1 to 65535.
Remarks “slave” is defined by ModbusSlave and create slave connection. For example: To create TCP slave connection, syntax is = Create.TcpIpSlave("127.0.0.1").
Slave starts listening for requests.
Data array of DO values. Address starts from 1 to 65535.
Data array of DI values. You can store DI values in the array. Address starts from 1 to 65535.
Data array of AO values. Address starts from 1 to 65535.
Data array of AI values. You can store AI values in the array. Address starts from 1 to 65535.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.