Skip to content

Commit 2a258cc

Browse files
committed
v2.1.0 release
1 parent 8447e3d commit 2a258cc

File tree

4 files changed

+164
-9
lines changed

4 files changed

+164
-9
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
Version 2.0.2
1+
Version 2.1.0
22
-----------------------------------------------------------
33
* Fix Issues with Serial client where in partial data was read when the response size is unknown.
44
* Fix Infinite sleep loop in RTU Framer.
55
* Add pygments as extra requirement for repl.
6+
* Add support to modify modbus client attributes via repl.
7+
* Update modbus repl documentation.
68
* More verbose logs for repl.
79

810
Version 2.0.1

doc/source/library/REPL.md

Lines changed: 80 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Options:
4848
4949
```
5050

51-
RTU Options
51+
SERIAL Options
5252
```
5353
bash-3.2$ pymodbus.console serial --help
5454
Usage: pymodbus.console serial [OPTIONS]
@@ -79,6 +79,7 @@ Options:
7979

8080
To view all available commands type `help`
8181

82+
TCP
8283
```
8384
$ pymodbus.console tcp --host 192.168.128.126 --port 5020
8485
@@ -129,6 +130,76 @@ client.write_register Write `value` to register at `addre
129130
client.write_registers Write list of `values` to registers starting at `address`.
130131
```
131132

133+
SERIAL
134+
```
135+
$ pymodbus.console serial --port /dev/ttyUSB0 --baudrate 19200 --timeout 2
136+
> help
137+
Available commands:
138+
client.baudrate Read Only!
139+
client.bytesize Read Only!
140+
client.change_ascii_input_delimiter Diagnostic sub command, Change message delimiter for future requests.
141+
client.clear_counters Diagnostic sub command, Clear all counters and diag registers.
142+
client.clear_overrun_count Diagnostic sub command, Clear over run counter.
143+
client.close Closes the underlying socket connection
144+
client.connect Connect to the modbus serial server
145+
client.debug_enabled Returns a boolean indicating if debug is enabled.
146+
client.force_listen_only_mode Diagnostic sub command, Forces the addressed remote device to its Listen Only Mode.
147+
client.get_baudrate Serial Port baudrate.
148+
client.get_bytesize Number of data bits.
149+
client.get_clear_modbus_plus Diagnostic sub command, Get or clear stats of remote modbus plus device.
150+
client.get_com_event_counter Read status word and an event count from the remote device's communication event counter.
151+
client.get_com_event_log Read status word, event count, message count, and a field of event bytes from the remote device.
152+
client.get_parity Enable Parity Checking.
153+
client.get_port Serial Port.
154+
client.get_serial_settings Gets Current Serial port settings.
155+
client.get_stopbits Number of stop bits.
156+
client.get_timeout Serial Port Read timeout.
157+
client.idle_time Bus Idle Time to initiate next transaction
158+
client.inter_char_timeout Read Only!
159+
client.is_socket_open c l i e n t . i s s o c k e t o p e n
160+
client.mask_write_register Mask content of holding register at `address` with `and_mask` and `or_mask`.
161+
client.method Read Only!
162+
client.parity Read Only!
163+
client.port Read Only!
164+
client.read_coils Reads `count` coils from a given slave starting at `address`.
165+
client.read_device_information Read the identification and additional information of remote slave.
166+
client.read_discrete_inputs Reads `count` number of discrete inputs starting at offset `address`.
167+
client.read_exception_status Read the contents of eight Exception Status outputs in a remote device.
168+
client.read_holding_registers Read `count` number of holding registers starting at `address`.
169+
client.read_input_registers Read `count` number of input registers starting at `address`.
170+
client.readwrite_registers Read `read_count` number of holding registers starting at `read_address` and write `write_registers` starting at `write_address`.
171+
client.report_slave_id Report information about remote slave ID.
172+
client.restart_comm_option Diagnostic sub command, initialize and restart remote devices serial interface and clear all of its communications event counters .
173+
client.return_bus_com_error_count Diagnostic sub command, Return count of CRC errors received by remote slave.
174+
client.return_bus_exception_error_count Diagnostic sub command, Return count of Modbus exceptions returned by remote slave.
175+
client.return_bus_message_count Diagnostic sub command, Return count of message detected on bus by remote slave.
176+
client.return_diagnostic_register Diagnostic sub command, Read 16-bit diagnostic register.
177+
client.return_iop_overrun_count Diagnostic sub command, Return count of iop overrun errors by remote slave.
178+
client.return_query_data Diagnostic sub command , Loop back data sent in response.
179+
client.return_slave_bus_char_overrun_count Diagnostic sub command, Return count of messages not handled by remote slave due to character overrun condition.
180+
client.return_slave_busy_count Diagnostic sub command, Return count of server busy exceptions sent by remote slave.
181+
client.return_slave_message_count Diagnostic sub command, Return count of messages addressed to remote slave.
182+
client.return_slave_no_ack_count Diagnostic sub command, Return count of NO ACK exceptions sent by remote slave.
183+
client.return_slave_no_response_count Diagnostic sub command, Return count of No responses by remote slave.
184+
client.set_baudrate Baudrate setter.
185+
client.set_bytesize Byte size setter.
186+
client.set_parity Parity Setter.
187+
client.set_port Serial Port setter.
188+
client.set_stopbits Stop bit setter.
189+
client.set_timeout Read timeout setter.
190+
client.silent_interval Read Only!
191+
client.state Read Only!
192+
client.stopbits Read Only!
193+
client.timeout Read Only!
194+
client.write_coil Write `value` to coil at `address`.
195+
client.write_coils Write `value` to coil at `address`.
196+
client.write_register Write `value` to register at `address`.
197+
client.write_registers Write list of `values` to registers starting at `address`.
198+
result.decode Decode the register response to known formatters.
199+
result.raw Return raw result dict.
200+
201+
```
202+
132203
Every command has auto suggetion on the arguments supported , supply arg and value are to be supplied in `arg=val` format.
133204
```
134205
@@ -164,9 +235,14 @@ For Holding and Input register reads, the decoded value could be viewed with `re
164235
>
165236
```
166237

167-
Client settings could be retrived and altered as well.
238+
Client settings could be retrieved and altered as well.
168239
```
169240
> # For serial settings
241+
242+
> # Check the serial mode
243+
> client.method
244+
"rtu"
245+
170246
> client.get_serial_settings
171247
{
172248
"t1.5": 0.00171875,
@@ -198,7 +274,7 @@ null
198274
199275
```
200276

201-
#DEMO
277+
## DEMO
202278

203279
[![asciicast](https://asciinema.org/a/y1xOk7lm59U1bRBE2N1pDIj2o.png)](https://asciinema.org/a/y1xOk7lm59U1bRBE2N1pDIj2o)
204-
280+
[![asciicast](https://asciinema.org/a/edUqZN77fdjxL2toisiilJNwI.png)](https://asciinema.org/a/edUqZN77fdjxL2toisiilJNwI)

pymodbus/repl/README.md

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Options:
4848
4949
```
5050

51-
RTU Options
51+
SERIAL Options
5252
```
5353
bash-3.2$ pymodbus.console serial --help
5454
Usage: pymodbus.console serial [OPTIONS]
@@ -79,6 +79,7 @@ Options:
7979

8080
To view all available commands type `help`
8181

82+
TCP
8283
```
8384
$ pymodbus.console tcp --host 192.168.128.126 --port 5020
8485
@@ -129,6 +130,76 @@ client.write_register Write `value` to register at `addre
129130
client.write_registers Write list of `values` to registers starting at `address`.
130131
```
131132

133+
SERIAL
134+
```
135+
$ pymodbus.console serial --port /dev/ttyUSB0 --baudrate 19200 --timeout 2
136+
> help
137+
Available commands:
138+
client.baudrate Read Only!
139+
client.bytesize Read Only!
140+
client.change_ascii_input_delimiter Diagnostic sub command, Change message delimiter for future requests.
141+
client.clear_counters Diagnostic sub command, Clear all counters and diag registers.
142+
client.clear_overrun_count Diagnostic sub command, Clear over run counter.
143+
client.close Closes the underlying socket connection
144+
client.connect Connect to the modbus serial server
145+
client.debug_enabled Returns a boolean indicating if debug is enabled.
146+
client.force_listen_only_mode Diagnostic sub command, Forces the addressed remote device to its Listen Only Mode.
147+
client.get_baudrate Serial Port baudrate.
148+
client.get_bytesize Number of data bits.
149+
client.get_clear_modbus_plus Diagnostic sub command, Get or clear stats of remote modbus plus device.
150+
client.get_com_event_counter Read status word and an event count from the remote device's communication event counter.
151+
client.get_com_event_log Read status word, event count, message count, and a field of event bytes from the remote device.
152+
client.get_parity Enable Parity Checking.
153+
client.get_port Serial Port.
154+
client.get_serial_settings Gets Current Serial port settings.
155+
client.get_stopbits Number of stop bits.
156+
client.get_timeout Serial Port Read timeout.
157+
client.idle_time Bus Idle Time to initiate next transaction
158+
client.inter_char_timeout Read Only!
159+
client.is_socket_open c l i e n t . i s s o c k e t o p e n
160+
client.mask_write_register Mask content of holding register at `address` with `and_mask` and `or_mask`.
161+
client.method Read Only!
162+
client.parity Read Only!
163+
client.port Read Only!
164+
client.read_coils Reads `count` coils from a given slave starting at `address`.
165+
client.read_device_information Read the identification and additional information of remote slave.
166+
client.read_discrete_inputs Reads `count` number of discrete inputs starting at offset `address`.
167+
client.read_exception_status Read the contents of eight Exception Status outputs in a remote device.
168+
client.read_holding_registers Read `count` number of holding registers starting at `address`.
169+
client.read_input_registers Read `count` number of input registers starting at `address`.
170+
client.readwrite_registers Read `read_count` number of holding registers starting at `read_address` and write `write_registers` starting at `write_address`.
171+
client.report_slave_id Report information about remote slave ID.
172+
client.restart_comm_option Diagnostic sub command, initialize and restart remote devices serial interface and clear all of its communications event counters .
173+
client.return_bus_com_error_count Diagnostic sub command, Return count of CRC errors received by remote slave.
174+
client.return_bus_exception_error_count Diagnostic sub command, Return count of Modbus exceptions returned by remote slave.
175+
client.return_bus_message_count Diagnostic sub command, Return count of message detected on bus by remote slave.
176+
client.return_diagnostic_register Diagnostic sub command, Read 16-bit diagnostic register.
177+
client.return_iop_overrun_count Diagnostic sub command, Return count of iop overrun errors by remote slave.
178+
client.return_query_data Diagnostic sub command , Loop back data sent in response.
179+
client.return_slave_bus_char_overrun_count Diagnostic sub command, Return count of messages not handled by remote slave due to character overrun condition.
180+
client.return_slave_busy_count Diagnostic sub command, Return count of server busy exceptions sent by remote slave.
181+
client.return_slave_message_count Diagnostic sub command, Return count of messages addressed to remote slave.
182+
client.return_slave_no_ack_count Diagnostic sub command, Return count of NO ACK exceptions sent by remote slave.
183+
client.return_slave_no_response_count Diagnostic sub command, Return count of No responses by remote slave.
184+
client.set_baudrate Baudrate setter.
185+
client.set_bytesize Byte size setter.
186+
client.set_parity Parity Setter.
187+
client.set_port Serial Port setter.
188+
client.set_stopbits Stop bit setter.
189+
client.set_timeout Read timeout setter.
190+
client.silent_interval Read Only!
191+
client.state Read Only!
192+
client.stopbits Read Only!
193+
client.timeout Read Only!
194+
client.write_coil Write `value` to coil at `address`.
195+
client.write_coils Write `value` to coil at `address`.
196+
client.write_register Write `value` to register at `address`.
197+
client.write_registers Write list of `values` to registers starting at `address`.
198+
result.decode Decode the register response to known formatters.
199+
result.raw Return raw result dict.
200+
201+
```
202+
132203
Every command has auto suggetion on the arguments supported , supply arg and value are to be supplied in `arg=val` format.
133204
```
134205
@@ -164,9 +235,14 @@ For Holding and Input register reads, the decoded value could be viewed with `re
164235
>
165236
```
166237

167-
Client settings could be retrived and altered as well.
238+
Client settings could be retrieved and altered as well.
168239
```
169240
> # For serial settings
241+
242+
> # Check the serial mode
243+
> client.method
244+
"rtu"
245+
170246
> client.get_serial_settings
171247
{
172248
"t1.5": 0.00171875,
@@ -198,7 +274,8 @@ null
198274
199275
```
200276

201-
#DEMO
277+
## DEMO
202278

203279
[![asciicast](https://asciinema.org/a/y1xOk7lm59U1bRBE2N1pDIj2o.png)](https://asciinema.org/a/y1xOk7lm59U1bRBE2N1pDIj2o)
280+
[![asciicast](https://asciinema.org/a/edUqZN77fdjxL2toisiilJNwI.png)](https://asciinema.org/a/edUqZN77fdjxL2toisiilJNwI)
204281

pymodbus/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __str__(self):
4141
return '[%s, version %s]' % (self.package, self.short())
4242

4343

44-
version = Version('pymodbus', 2, 0, 2)
44+
version = Version('pymodbus', 2, 1, 0)
4545

4646

4747
version.__name__ = 'pymodbus' # fix epydoc error

0 commit comments

Comments
 (0)