in reply to Re: Need help with Modbus
in thread Need help with Modbus
Thank you! However, could you please elaborate:
if my IP is 192.168.0.57 port 502, then do I format the like this? $proto = Protocol::Modbus->new( driver => 'TCP', transport => 'TCP', ip=>'192.168.0.57', port=>'502' );
if in c ret = read_input_registers(&mb_param, SUNSAVERMPPT, 0x0000, 75, data);
Then Which are the function, address and quantity? in my $request4 = $proto->request( function => 4, address => 1, quantity => 1, );
Which handle/variable gets the modbus reply?