Closed aetasoul closed 3 years ago
You may try to set the output value as a list : output_value = [b'0', b'0', b'0', b'0'] I hope it helps
Hi, sorry for the very late reply.
I can confirm that change from master.execute(slaveID, cst.WRITE_MULTIPLE_REGISTERS, registers[4] - 1, output_value=b'0000', data_format='ssss')
to master.execute(slaveID, cst.WRITE_MULTIPLE_REGISTERS, registers[4] - 1, output_value=[b'0', b'0', b'0', b'0'], data_format='ssss')
works.
Hi, I'm trying to write string to the registers but I got the following exception with the code shown:
master.execute(slaveID, cst.WRITE_MULTIPLE_REGISTERS, registers[4] - 1, output_value=b'0000', data_format='ssss')
The code is running with python3.8, before the upgrade with python2.7 it work