Here
OK. That must be a different doc than the one in Craigâs post. (the one Iâve been looking at)
Looks like youâve got the right one, since it agrees with what youâre seeing from your inverter.
What data do you get when you try read the line frequency?
So it seems like the python doesnât simply need the extra 3 in front as that doesnât seem to match the doc:
i.e. Realtime_ACW = instrument.read_long(33004, functioncode=4, signed=False) #Read AC Watts as Unsigned 32-Bit
Which is the line frequency?
Not quite sure what you mean there, as the doc shows a 5 digit address.
The doc that I have says 3043 is the line freq register. Youâd have to look at the doc you have.
If you could, attach it to a post and Iâll have a look at it.
Good news is that the pi rs485 hat is also getting back data via python code once adding the 3 in front but need to find the correct values
The problem is I would have no clue how to convert them as in the python code:
A1 = Realtime_ACW % 256
A2 = (Realtime_ACW >> 8) % 256
A3 = (Realtime_ACW >> 16) % 256
A4 = (Realtime_ACW >> 24) % 256
Thanks for posting that. Helps a lot.
It says register 33094 holds the grid frequency value.
Registers 33257, 259, 261 and 263 hold the active power values. To convert them to kW,
simply divide by 1000. They are Signed 32-bit values vice the Unsigned 16-bit values
we dealt with earlier.
Value is 327876611 via instrument.read_long(33094, functioncode=4, signed=False)
from python but I assume that value needs converting
Itâs signed, so that parameter needs to be set to True.
327614467 with it as signed=True
OK. Hopefully, this will point you in the right direction:
Thanks, will check it out.
Itâs just strange that the read register doesnât work instrument.read_register(33094, functioncode=4, signed=True)
Youâre referring to minimalmodbus, correct?
Yeah but also tried 33035 which is a U16 and still didnât work whereas read_long did return a vlaue
What results did you get when you tried to read register 33035 with read_register
?
Nothing goes into an exception
Iâm thinking we still donât have the addressing quite right yet.
The line freq value is a 16-bit number, which means there should be no problems reading it
with the read_register
function.