shaddow
unread,Jun 21, 2012, 12:19:29 AM6/21/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libm...@googlegroups.com
Hello
I am trying to get to read my Growatt Solar Inverter via my usb/rs232 /dev/cuaU1 port on FreeBSD 8.2-RELEASE amd64.
I have got libmodbus installed with no problems.
I have been working on a modified version of sunsavertest by Tom Rinehart.
But where I am coming stuck is trying to get "modbus_read_input_registers" to work.
I see things transmitting but I am not getting any data back
I have used (On WindowsXP) modbuspoll, it sees the inverter on the com port,
speed 9600 Parity; None, Data; 8, Stop; one, Handshake; None
slave ID ; 1
Function; 04
Address; 1
I have in the script (main parts pasted).
modbus_t *ctx;
int rc;
uint16_t data[34];
ctx = modbus_new_rtu("/dev/cuaU1", 9600, 'N', 8, 1);
modbus_set_slave(ctx, 1);
rc = modbus_read_input_registers(ctx, 1, 4, data);
I have tried other settings in input_reg but no work :(
I am not a programer by trade so I am only going by other peoples examples.
I need it to read about 34 data points, and am going to get rrdtools & php to read it to create graphs.
BUT just getting it to read the input_registers would be great
Can some one help PLEASE.