@@ -35,21 +35,44 @@ For .e.g
35
35
#### Run Server
36
36
```
37
37
(pymodbus3.8)
38
- pymodbus/repl/server on repl-server-startup [!?] via 🐍 v3.8.13 (pymodbus3.8)
39
38
❯ 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.
43
42
44
43
__________ .______. _________
45
44
\______ \___.__. _____ ____ __| _/\_ |__ __ __ ______ / _____/ ______________ __ ___________
46
45
| ___< | |/ \ / _ \ / __ | | __ \| | \/ ___/ \_____ \_/ __ \_ __ \ \/ // __ \_ __ \\
47
46
| | \___ | Y Y ( <_> ) /_/ | | \_\ \ | /\___ \ / \ ___/| | \/\ /\ ___/| | \/
48
47
|____| / ____|__|_| /\____/\____ | |___ /____//____ > /_______ /\___ >__| \_/ \___ >__|
49
48
\/ \/ \/ \/ \/ \/ \/ \/
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
50
75
51
-
52
- SERVER >
53
76
```
54
77
55
78
#### Run client
@@ -64,36 +87,31 @@ __________ _____ .___ __________ .__
64
87
| | \___ / Y ( <_> ) /_/ | | | \ ___/| |_> > |__
65
88
|____| / ____\____|__ /\____/\____ | /\ |____|_ /\___ > __/|____/
66
89
\/ \/ \/ \/ \/ \/|__|
67
- v1.3.1 - 3.6.4
90
+ v2.0.2 - Pymodbus-3.7.0dev
68
91
----------------------------------------------------------------------------
69
92
70
- > client.read_input_registers address 1 count 1 slave 4
71
- {
72
- "registers": [
73
- 34518
74
- ]
75
- }
76
-
77
93
> client.read_input_registers address 1 count 1 slave 1
78
94
{
79
95
"registers": [
80
- 32198
96
+ 50556
81
97
]
82
98
}
83
99
84
- > client.read_input_registers address 1 count 1 slave 2
100
+ > client.read_input_registers address 1 count 1 slave 4
85
101
{
86
102
"registers": [
87
- 51557
103
+ 51134
88
104
]
89
105
}
90
106
91
- > client.read_input_registers address 1 count 1 slave 3
107
+ > client.read_input_registers address 1 count 1 slave 5
92
108
{
93
109
"original_function_code": "4 (0x4)",
94
110
"error": "[Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)"
95
111
}
96
112
113
+ >
114
+
97
115
```
98
116
99
117
@@ -112,10 +130,10 @@ This will create distribution packages in the dist/ directory.
112
130
## Usage
113
131
114
132
### Pymodbus Client
115
- Refer [ REPL Client] ( ./pymodbus/repl/ client/README.rst )
133
+ Refer [ REPL Client] ( ./pymodbus_repl/ client/README.md )
116
134
117
135
### Pymodbus Server
118
- Refer [ REPL Server] ( ./pymodbus/repl/ server/README.rst )
136
+ Refer [ REPL Server] ( ./pymodbus_repl/ server/README.md )
119
137
120
138
## Contributing
121
139
* Fork the repository.
0 commit comments