Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Update to modbusclient.rb to use modbus read functions 2 and 4 #12288
The existing modbus client only reads coils and holding registers (function codes 1 and 3)
Copied existing code for reading coils/registers and added function codes 2 and 4.
Running OPENPLCPROJECT on a raspberry pi, setup test values for each function call
msf5 auxiliary(scanner/scada/modbusclient) > run
 192.168.1.124:502 - Sending READ HOLDING REGISTERS...
 192.168.1.124:502 - Sending READ DISCRETE INPUTS...
 192.168.1.124:502 - Sending READ COILS...
 192.168.1.124:502 - Sending READ INPUT REGISTERS...