wewa00 / modbus-tk

Automatically exported from code.google.com/p/modbus-tk
Other
0 stars 0 forks source link

write multiple coils problem? #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

maybe the following behavior is not ok

1. setup a tcp modbus server and install a coils bank on address 1
2.try the following sequence of command with a client script:

print m.execute(1, cst.READ_COILS, 15, 4)
print m.execute(1, cst.WRITE_MULTIPLE_COILS, 15, 4, [1,1,1,1])
print m.execute(1, cst.READ_COILS, 15, 4)
print m.execute(1, cst.WRITE_MULTIPLE_COILS, 15, 2, [0,0])
print m.execute(1, cst.READ_COILS, 15, 4)

the final output is  (0,0,0,1) 
i think it should be (0,0,1,1)

maybe the problem is modbus.py  Slave._write_multiple_coils
the inner loop boundary set a bit more.

regards

franz

Original issue reported on code.google.com by dr.sh...@gmail.com on 14 Nov 2012 at 5:10

GoogleCodeExporter commented 8 years ago
It seems to be the same problem than #42. It has been fixed on github

Original comment by luc.jean@gmail.com on 29 Apr 2015 at 9:44