Skip to content

Commit c0e70f0

Browse files
add examples to documentation
1 parent fb4cdb1 commit c0e70f0

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

docs/index.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,29 @@ This option should be used carefully, as it generates large amounts of output de
3030

3131
The ```--reconnect``` option can be used to specify that the application is not terminated when the master disconnects, but waits for a new connection.
3232

33-
The client creates four shared memories and names them ```modbus_DO```, ```modbus_DI```, ```modbus_AO``` and `````` by default.
34-
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.
33+
The client creates four shared memories and names them ```modbus_DO```, ```modbus_DI```, ```modbus_AO``` and ```modbus_AI``` by default.
34+
The prefix modbus_ can be changed via the argument ```--name-prefix```.
35+
The suffixes for the register type (DO, DI, AO, AI) cannot be changed and will always be appended to the prefix.
3536

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

40+
### Examples
41+
Start client and listen to all incoming connections on the modbus standard port:
42+
```
43+
modbus-tcp-client-shm
44+
```
45+
46+
Start client and listen to all incoming connections on port 10000 and wait for a new connection if the connection is lost:
47+
```
48+
modbus-tcp-client-shm -p 10000 -r
49+
```
50+
51+
Start client and listen to incoming connections on ip 127.0.0.1 on port 10000:
52+
```
53+
modbus-tcp-client-shm -p 10000 -i 127.0.0.1
54+
```
55+
3956
### Use privileged ports
4057
Ports below 1024 cannot be used by standard users.
4158
Therefore, the default modbus port (502) cannot be used without further action.

0 commit comments

Comments
 (0)