Skip to content

Commit

Permalink
Merge pull request #1 from mbalous/patch-1
Browse files Browse the repository at this point in the history
Update README.md with sample usage
  • Loading branch information
ashneilson committed Apr 26, 2021
2 parents 0e4d860 + e5e254b commit fa437a9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# RICADO.Modbus
A Modbus Communication Library for .NET 5 Applications


## Sample usage

```csharp
using RICADO.Modbus;

using (ModbusRTUDevice device = new ModbusRTUDevice(1, ConnectionMethod.TCP, "10.1.4.205", 8000, 5000, 3))
{
await device.InitializeAsync(CancellationToken.None);
ReadRegistersResult data = await device.ReadHoldingRegistersAsync(2000, 7, CancellationToken.None);
foreach (var value in data.Values)
{
Console.Write(value);
}
}
```

0 comments on commit fa437a9

Please sign in to comment.