The execute() method of WriteSingleCoilRequest attempts to call the
setValues() method with a boolean as last argument instead of a list.
Since setValues() expects a list of booleans in this case, the call
fails.
Please have a look at the following patch, and fix this problem.
Thanks,
Albert
Index: pymodbus/bit_write_message.py
===================================================================
--- pymodbus/bit_write_message.py (Revision 137)
+++ pymodbus/bit_write_message.py (Arbeitskopie)
@@ -78,7 +78,7 @@
if not context.validate(self.function_code, self.address, 1):
return self.doException(merror.IllegalAddress)
- context.setValues(self.function_code, self.address, self.value)
+ context.setValues(self.function_code, self.address, [self.value])
values = context.getValues(self.function_code, self.address, 1)
return WriteSingleCoilResponse(self.address, values[0])
Original issue reported on code.google.com by albert.k...@gmail.com on 21 Mar 2011 at 3:31
Original issue reported on code.google.com by
albert.k...@gmail.com
on 21 Mar 2011 at 3:31