@@ -35,21 +35,44 @@ For .e.g
3535#### Run Server
3636```
3737(pymodbus3.8)
38- pymodbus/repl/server on repl-server-startup [!?] via 🐍 v3.8.13 (pymodbus3.8)
3938❯ python3 main.py --host 0.0.0.0 --verbose run --modbus-config default_config.json --modbus-server tcp --modbus-framer socket --modbus-port 5020 --unit-id 1 --unit-id 2 -u 4 -r 1 --timeout 2
40- 2024-02-17 13:27:17,218 INFO logging:97 Modbus server started
41- 2024-02-17 13:27:17,219 DEBUG logging:103 Awaiting connections server_listener
42- 2024-02-17 13:27:17,219 INFO logging:97 Server listening.
39+ 2024-02-28 14:38:24,952 INFO logging:97 Modbus server started
40+ 2024-02-28 14:38:24,952 DEBUG logging:103 Awaiting connections server_listener
41+ 2024-02-28 14:38:24,952 INFO logging:97 Server listening.
4342
4443__________ .______. _________
4544\______ \___.__. _____ ____ __| _/\_ |__ __ __ ______ / _____/ ______________ __ ___________
4645 | ___< | |/ \ / _ \ / __ | | __ \| | \/ ___/ \_____ \_/ __ \_ __ \ \/ // __ \_ __ \\
4746 | | \___ | Y Y ( <_> ) /_/ | | \_\ \ | /\___ \ / \ ___/| | \/\ /\ ___/| | \/
4847 |____| / ____|__|_| /\____/\____ | |___ /____//____ > /_______ /\___ >__| \_/ \___ >__|
4948 \/ \/ \/ \/ \/ \/ \/ \/
49+ v2.0.2-Pymodbus3.7.0dev
50+
51+
52+ SERVER > 2024-02-28 14:39:15,352 DEBUG logging:103 Connected to server
53+ 2024-02-28 14:39:15,352 DEBUG logging:103 recv: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x4 0x0 0x1 0x0 0x1 old_data: addr=None
54+ 2024-02-28 14:39:15,352 DEBUG logging:103 Handling data: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x4 0x0 0x1 0x0 0x1
55+ 2024-02-28 14:39:15,352 DEBUG logging:103 Processing: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x4 0x0 0x1 0x0 0x1
56+ 2024-02-28 14:39:15,352 DEBUG logging:103 Factory Request[ReadInputRegistersRequest': 4]
57+ 2024-02-28 14:39:15,352 DEBUG logging:103 validate: fc-[4] address-1: count-1
58+ 2024-02-28 14:39:15,352 DEBUG logging:103 getValues: fc-[4] address-1: count-1
59+ 2024-02-28 14:39:15,352 DEBUG logging:103 send: 0x0 0x1 0x0 0x0 0x0 0x5 0x1 0x4 0x2 0xc5 0x7c
60+ 2024-02-28 14:39:37,029 DEBUG logging:103 recv: 0x0 0x2 0x0 0x0 0x0 0x6 0x4 0x4 0x0 0x1 0x0 0x1 old_data: addr=None
61+ 2024-02-28 14:39:37,029 DEBUG logging:103 Handling data: 0x0 0x2 0x0 0x0 0x0 0x6 0x4 0x4 0x0 0x1 0x0 0x1
62+ 2024-02-28 14:39:37,029 DEBUG logging:103 Processing: 0x0 0x2 0x0 0x0 0x0 0x6 0x4 0x4 0x0 0x1 0x0 0x1
63+ 2024-02-28 14:39:37,029 DEBUG logging:103 Factory Request[ReadInputRegistersRequest': 4]
64+ 2024-02-28 14:39:37,029 DEBUG logging:103 validate: fc-[4] address-1: count-1
65+ 2024-02-28 14:39:37,029 DEBUG logging:103 getValues: fc-[4] address-1: count-1
66+ 2024-02-28 14:39:37,029 DEBUG logging:103 send: 0x0 0x2 0x0 0x0 0x0 0x5 0x4 0x4 0x2 0xc7 0xbe
67+ 2024-02-28 14:39:41,010 DEBUG logging:103 recv: 0x0 0x3 0x0 0x0 0x0 0x6 0x5 0x4 0x0 0x1 0x0 0x1 old_data: addr=None
68+ 2024-02-28 14:39:41,010 DEBUG logging:103 Handling data: 0x0 0x3 0x0 0x0 0x0 0x6 0x5 0x4 0x0 0x1 0x0 0x1
69+ 2024-02-28 14:39:41,010 DEBUG logging:103 Processing: 0x0 0x3 0x0 0x0 0x0 0x6 0x5 0x4 0x0 0x1 0x0 0x1
70+ 2024-02-28 14:39:41,010 DEBUG logging:103 Not a valid slave id - 5, ignoring!!
71+ 2024-02-28 14:39:41,010 DEBUG logging:103 Resetting frame - Current Frame in buffer - 0x0 0x3 0x0 0x0 0x0 0x6 0x5 0x4 0x0 0x1 0x0 0x1
72+ 2024-02-28 14:39:44,015 DEBUG logging:103 -> transport: received eof
73+ 2024-02-28 14:39:44,015 DEBUG logging:103 Connection lost server due to None
74+ 2024-02-28 14:39:44,015 DEBUG logging:103 Handler for stream [server] has been canceled
5075
51-
52- SERVER >
5376```
5477
5578#### Run client
@@ -64,36 +87,31 @@ __________ _____ .___ __________ .__
6487 | | \___ / Y ( <_> ) /_/ | | | \ ___/| |_> > |__
6588 |____| / ____\____|__ /\____/\____ | /\ |____|_ /\___ > __/|____/
6689 \/ \/ \/ \/ \/ \/|__|
67- v1.3.1 - 3.6.4
90+ v2.0.2 - Pymodbus-3.7.0dev
6891----------------------------------------------------------------------------
6992
70- > client.read_input_registers address 1 count 1 slave 4
71- {
72- "registers": [
73- 34518
74- ]
75- }
76-
7793> client.read_input_registers address 1 count 1 slave 1
7894{
7995 "registers": [
80- 32198
96+ 50556
8197 ]
8298}
8399
84- > client.read_input_registers address 1 count 1 slave 2
100+ > client.read_input_registers address 1 count 1 slave 4
85101{
86102 "registers": [
87- 51557
103+ 51134
88104 ]
89105}
90106
91- > client.read_input_registers address 1 count 1 slave 3
107+ > client.read_input_registers address 1 count 1 slave 5
92108{
93109 "original_function_code": "4 (0x4)",
94110 "error": "[Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)"
95111}
96112
113+ >
114+
97115```
98116
99117
@@ -112,10 +130,10 @@ This will create distribution packages in the dist/ directory.
112130## Usage
113131
114132### Pymodbus Client
115- Refer [ REPL Client] ( ./pymodbus/repl/ client/README.rst )
133+ Refer [ REPL Client] ( ./pymodbus_repl/ client/README.md )
116134
117135### Pymodbus Server
118- Refer [ REPL Server] ( ./pymodbus/repl/ server/README.rst )
136+ Refer [ REPL Server] ( ./pymodbus_repl/ server/README.md )
119137
120138## Contributing
121139* Fork the repository.
0 commit comments