FluentModbus 1.2.0
See the version list below for details.
dotnet add package FluentModbus --version 1.2.0
NuGet\Install-Package FluentModbus -Version 1.2.0
<PackageReference Include="FluentModbus" Version="1.2.0" />
paket add FluentModbus --version 1.2.0
#r "nuget: FluentModbus, 1.2.0"
// Install FluentModbus as a Cake Addin #addin nuget:?package=FluentModbus&version=1.2.0 // Install FluentModbus as a Cake Tool #tool nuget:?package=FluentModbus&version=1.2.0
FluentModbus is a .NET Standard library that provides a Modbus TCP server and client implementation for easy process data exchange. Support for Modbus RTU and ASCII mode is planned for the next major version. Both, the server and the client, implement class 0 and class 1 functions of the specification. Namely, these are:
Class 0:
- FC03: ReadHoldingRegisters
- FC16: WriteMultipleRegisters
Class 1:
- FC01: ReadCoils
- FC02: ReadDiscreteInputs
- FC04: ReadInputRegisters
- FC05: WriteSingleCoil
- FC06: WriteSingleRegister
Please see the introduction and the sample application, to get started with FluentModbus.
Quick start
Client
var unitIdentifier = (byte)0xFF;
var startingAddress = (ushort)0;
var count = (ushort)10;
var client = new ModbusTcpClient();
var endPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 502);
client.Connect(endPoint)
// read data
var shortData = client.ReadHoldingRegisters<short>(unitIdentifier, startingAddress, count);
// write data
var intData = new int[] { 4263, 4554 };
client.WriteMultipleRegisters(unitIdentifier, startingAddress, intData);
Server
var cts = new CancellationTokenSource();
var random = new Random();
var server = new ModbusTcpServer();
server.Start();
while (!cts.IsCancellationRequested)
{
var intData = server.GetHoldingRegisterBuffer<int>();
// lock is required to synchronize buffer access between
// this application and one or more Modbus clients
lock (server.Lock)
{
intData[20] = random.Next(0, 100);
}
// update server buffer content only once per second
Thread.Sleep(TimeSpan.FromSeconds(1));
}
server.Dispose();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Logging.Abstractions (>= 2.2.0)
- System.Memory (>= 4.5.2)
NuGet packages (10)
Showing the top 5 NuGet packages that depend on FluentModbus:
Package | Downloads |
---|---|
IIoT.Architecture.Base
Package Description |
|
SMAModbusConnector
A Modbus Connector for SMA devices |
|
Iotatech.Weighings
Collection of weighing module abstractions for .NET commonly used in Iotatechnology projects. |
|
ECS.Crosser.Modules.Modbus.rtu.reader
Package Description |
|
VL.IO.Modbus
VL wrapper for the FluentModus libary |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on FluentModbus:
Repository | Stars |
---|---|
pkuehnel/TeslaSolarCharger
A software to let your Tesla charge with solar energy ☀
|
Version | Downloads | Last updated |
---|---|---|
5.3.1 | 1,098 | 1/2/2025 |
5.3.0 | 23,319 | 9/19/2024 |
5.2.0 | 50,765 | 4/23/2024 |
5.1.0 | 24,827 | 2/21/2024 |
5.0.3 | 50,100 | 8/3/2023 |
5.0.2 | 77,214 | 11/17/2022 |
5.0.1 | 3,110 | 11/14/2022 |
5.0.0 | 17,979 | 9/8/2022 |
4.1.0 | 2,580 | 8/17/2022 |
4.0.0 | 935 | 8/16/2022 |
4.0.0-preview.5 | 183 | 7/28/2022 |
4.0.0-preview.4.final | 215 | 6/20/2022 |
4.0.0-preview.3.final | 799 | 5/25/2022 |
4.0.0-preview.2.final | 1,010 | 10/19/2021 |
4.0.0-preview.1.final | 229 | 9/21/2021 |
3.2.2 | 7,730 | 7/28/2022 |
3.2.1 | 25,042 | 10/19/2021 |
3.2.0 | 2,627 | 9/14/2021 |
3.1.1 | 2,199 | 6/23/2021 |
3.1.0 | 4,330 | 4/13/2021 |
3.0.1 | 1,221 | 3/25/2021 |
3.0.1-preview.1.final | 535 | 2/15/2021 |
2.4.2 | 2,428 | 12/22/2020 |
2.4.1 | 1,289 | 11/27/2020 |
2.4.0 | 984 | 11/9/2020 |
2.3.0 | 1,363 | 11/6/2020 |
2.2.1 | 1,154 | 9/21/2020 |
2.2.0 | 1,024 | 9/1/2020 |
2.1.0 | 935 | 8/6/2020 |
2.0.0 | 4,202 | 12/9/2019 |
2.0.0-preview.3.final | 269 | 12/6/2019 |
2.0.0-preview.2.final | 301 | 12/4/2019 |
2.0.0-preview.1.final | 312 | 12/4/2019 |
1.4.1 | 1,051 | 11/23/2019 |
1.4.0 | 1,013 | 11/17/2019 |
1.4.0-alpha.1.final | 288 | 11/17/2019 |
1.3.0 | 1,004 | 11/13/2019 |
1.2.0 | 1,809 | 5/11/2019 |