AMWD.Protocols.Modbus.Serial 0.0.1-14

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 between L1 and N is: {voltage:N2}V");

Sources

  • Protocol Specification: v1.1b3
  • Modbus Serial line: v1.02

Published under MIT License (see tl;drLegal)

Showing the top 20 packages that depend on AMWD.Protocols.Modbus.Serial.

Packages Downloads
AMWD.Protocols.Modbus.Proxy
Plugging Modbus Servers and Clients together to create Modbus Proxies.
4

.NET 6.0

.NET 8.0

.NET Standard 2.0

Version Downloads Last updated
0.2.1-6 5 20.04.2024
0.2.1-5 6 20.04.2024
0.2.1-3 3 20.04.2024
0.2.0 8 02.04.2024
0.1.0 134 28.08.2022
0.0.1-19 7 02.04.2024
0.0.1-18 7 02.04.2024
0.0.1-17 8 02.04.2024
0.0.1-14 5 31.03.2024
0.0.1-13 8 28.03.2024
0.0.1-12 7 28.03.2024
0.0.1-11 6 27.03.2024
0.0.1-10 5 26.03.2024
0.0.1-9 2 25.03.2024
0.0.1-7 7 09.03.2024
0.0.1-6 10 09.03.2024