hafidz1977 / pymodbus

Automatically exported from code.google.com/p/pymodbus
0 stars 0 forks source link

Read input status #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
So I haven't dug into pymodbus very much but didn't find a convenient way to 
read input status (function code 2). Everything else seems to work. It would 
really help me if there was a read_input_status(...) function in the 
ModbusClient class.

Original issue reported on code.google.com by chris.fl...@gmail.com on 9 Feb 2012 at 9:27

GoogleCodeExporter commented 9 years ago
Chris,

This is actually read_discrete_inputs, sorry for the verbiage confusion.  I had 
seen that name being used by other libraries so I went with their model.  If 
you want to change it in your own code, you can easily monkey patch the code:

client.read_input_status = client.read_discrete_inputs

Or simply change the code in your installation.

Original comment by Bashw...@gmail.com on 26 Feb 2012 at 1:42