modbus-tk icon indicating copy to clipboard operation
modbus-tk copied to clipboard

data gets lost by logger

Open gicking opened this issue 3 years ago • 0 comments

hi,

I have a small network of Arduinos controlled via RS485 and Modbus-RTU. The setup is working correctly, and registers can be written and read as expected. However, it seems that the logging function seems to prevent data from (at least) READ_INPUT_REGISTERS from being returned. Specifically:

result = master.execute(id, cst.READ_INPUT_REGISTERS, 0, 1)
print(result)

prints the expected register content, but

result = logger.info(id, cst.READ_INPUT_REGISTERS, 0, 1))
print(result)

prints None. Debugger also shown that nothing is returned. Short term solution is to delete logging completely, but I would really like to keep the logger in case of problems. Attached please find a minimal_example (change extension to .py). Any idea what I do wrong?

OS: Linux (Ubuntu 18.04) Python: 3.6 modbus-tk: 1.1.2 pyserial: 3.5

gicking avatar Feb 27 '21 07:02 gicking