@@ -26,13 +26,13 @@ To initialize and use a Modbus client, you can do the following:
2626``` csharp
2727// Modbus Client
2828var client = new ModbusClient (" COM3" );
29- client .ReadTimeout = client .WriteTimeout = 2000 ;
29+ client .ReadTimeout = client .WriteTimeout = 2000 ;
3030
31- client .WriteMultipleRegisters (2 , 0x 5 , new ushort [] { 3 , 5 , 2 , 3 });
32- client .Raw (2 , FunctionCode .Diagnostics , new byte [] { 0x 01 , 0x 01 , 0x 01 , 0x 01 });
31+ client .WriteMultipleRegisters (2 ,0x 5 , new ushort [] {3 , 5 , 2 , 3 });
32+ client .Raw (2 , FunctionCode .Diagnostics , new byte [] {0x 01 ,0x 01 ,0x 01 ,0x 01 });
3333
34- var data1 = client .ReadHoldingRegisters (2 , 0x 7 , 4 );
35- var data2 = client .ReadCoils (2 , 0x 23 , 2 );
34+ var data1 = client .ReadHoldingRegisters (2 ,0x 7 ,4 );
35+ var data2 = client .ReadCoils (2 ,0x 23 ,2 );
3636```
3737
3838As shown in the sample, you have the possibility to write multiple registers, use raw function and also ready multiple registers.
@@ -44,7 +44,7 @@ A server implementation is also available:
4444``` csharp
4545// Modbus Server
4646var server = new ModbusServer (new Device (1 ), " COM2" );
47- server .ReadTimeout = server .WriteTimeout = 2000 ;
47+ server .ReadTimeout = server .WriteTimeout = 2000 ;
4848server .StartListening ();
4949```
5050
@@ -58,7 +58,7 @@ When using Modbus with an RS485, you can for example use a MAX485 to make the in
5858
5959## RS232 support
6060
61- You can change the ``` mode ``` parameter in constructor to 0 (SerialMode.Normal) if you're using Modbus over RS232
61+ You can change the ``` mode ``` parameter in constructor to0 (SerialMode.Normal) if you're using Modbus over RS232
6262``` csharp
6363// Modbus Client
6464var client = new ModbusClient (" COM3" ,SerialMode .Normal );
0 commit comments