Skip to content

Commit afe8734

Browse files
add examples to documentation
1 parent 2437579 commit afe8734

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/index.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,31 @@ The application requires a serial device (```--device```) and a client id (```--
2626
By using the command line argument ```--monitor``` all incoming and outgoing packets are printed on stdout.
2727
This option should be used carefully, as it generates large amounts of output depending on the masters polling cycle and the number of used registers.
2828

29-
The client creates four shared memories and names them ```modbus_DO```, ```modbus_DI```, ```modbus_AO``` and `````` by default.
30-
The prefix modbus_ can be changed via the argument ```--name-prefix```. The suffixes for the register type (DO, DI, AO, AI) cannot be changed and will always be appended to the prefix.
29+
The client creates four shared memories and names them ```modbus_DO```, ```modbus_DI```, ```modbus_AO``` and ```modbus_AI``` by default.
30+
The prefix modbus_ can be changed via the argument ```--name-prefix```.
31+
The suffixes for the register type (DO, DI, AO, AI) cannot be changed and will always be appended to the prefix.
3132

3233
By default, the client starts with the maximum possible number of modbus registers (65536 per register type).
3334
The number of registers can be changed using the ```--xx-registers``` (replace xx with the register type) command line arguments.
3435

36+
### Examples
37+
38+
Connect as device with id ```1``` using serial device ```/dev/ttyS0```:
39+
```
40+
modbus-rtu-client-shm -d /dev/ttyS0 -i 1
41+
```
42+
43+
44+
Connect as device with id ```1``` using serial device ```/dev/ttyS0``` with a baud rate of ```115200``` and a odd parity bit:
45+
```
46+
modbus-rtu-client-shm -d /dev/ttyS0 -i 1 -b 115200 -p O
47+
```
48+
49+
Connect as device with id ```1``` using serial device ```/dev/ttyS0``` and enforce rs232 mode:
50+
```
51+
modbus-rtu-client-shm -d /dev/ttyS0 -i 1 --rs232
52+
```
53+
3554
## Using the Flatpak package
3655
The flatpak package can be installed via the .flatpak file.
3756
This can be downloaded from the GitHub [projects release page](https://github.com/NikolasK-source/modbus_rtu_client_shm/releases):

0 commit comments

Comments
 (0)