AMWD.Protocols.Modbus.Serial 0.2.0
Modbus Protocol for .NET | Serial
The Modbus Serial protocol implementation.
Example
A simple example which reads the voltage between L1 and N of a Janitza device.
string serialPort = "COM5";
using var client = new ModbusSerialClient(serialPort);
await client.ConnectAsync(CancellationToken.None);
byte unitId = 5;
ushort startAddress = 19000;
ushort count = 2;
var registers = await client.ReadHoldingRegistersAsync(unitId, startAddress, count);
float voltage = registers.GetSingle();
Console.WriteLine($"The voltage of device #{unitId} between L1 and N is: {voltage:N2}V");
Sources
Published under MIT License (see tl;drLegal)
No packages depend on AMWD.Protocols.Modbus.Serial.
.NET 6.0
- AMWD.Protocols.Modbus.Common (>= 0.2.0)
- System.IO.Ports (>= 6.0.0)
.NET 8.0
- AMWD.Protocols.Modbus.Common (>= 0.2.0)
- System.IO.Ports (>= 8.0.0)
.NET Standard 2.0
- AMWD.Protocols.Modbus.Common (>= 0.2.0)
- System.IO.Ports (>= 4.7.0)
Version | Downloads | Last updated |
---|---|---|
0.2.0 | 6 | 02.04.2024 |
0.1.0 | 133 | 28.08.2022 |
0.0.1-19 | 6 | 02.04.2024 |
0.0.1-18 | 5 | 02.04.2024 |
0.0.1-17 | 6 | 02.04.2024 |
0.0.1-14 | 5 | 31.03.2024 |
0.0.1-13 | 7 | 28.03.2024 |
0.0.1-12 | 5 | 28.03.2024 |
0.0.1-11 | 5 | 27.03.2024 |
0.0.1-10 | 5 | 26.03.2024 |
0.0.1-9 | 2 | 25.03.2024 |
0.0.1-7 | 5 | 09.03.2024 |
0.0.1-6 | 6 | 09.03.2024 |