Clearified/fixed description of different protocol implementations

This commit is contained in:
2024-07-17 18:00:16 +02:00
parent 6a63dbb739
commit e830e43c36
3 changed files with 18 additions and 11 deletions

View File

@@ -23,14 +23,14 @@ float voltage = registers.GetSingle();
Console.WriteLine($"The voltage of device #{unitId} between L1 and N is: {voltage:N2}V");
```
If you want to use the `RTU over TCP` protocol instead, you can do this on initialization:
If you have a device speaking `RTU` connected over `TCP`, you can use it as followed:
```csharp
// [...]
using var client = new ModbusTcpClient(host, port)
{
Protocol = new RtuOverTcpProtocol();
Protocol = new RtuProtocol()
};
// [...]