28.03.2024, 07:09
(27.03.2024, 16:08)Daniel Wrote: https://forum.logicmachine.net/showthrea...7#pid16657
Thanks, that works great for me. But now i have all readable values from the inverter. I like to control the output from the inverter as described in:
photovoltaikforum.com/core/attachment/88445-power-control-open-protocol-for-solaredge-inverters-pdf/
Question 1: On Page 3 i see some info, but don't know how to start.
Register 61442, 61443, 61762 and 61700 doesn't return any value.
Question 2: Is there an easy way to display the returned values as readable text?
Code:
require('luamodbus')
mb = luamodbus.tcp()
mb:open('x.x.x.x', 1502)
res, err = mb:connect()
if res then
log("connected!")
mb:setslave(1)
r0 = mb:readregisters(40069) -- 101 = single phase, 102 = split phase, 103 = three phase
r1 = mb:readregisters(61440) -- RRCR State
r2 = mb:readregisters(61441) -- Active Power Limit
r3a = mb:readregisters(61442) -- CosPhi 1/2
r3b = mb:readregisters(61443) -- CosPhi 2/2
log(r1, r2, r3a, r3b)
--To enable the dynamic power control mode, set the following:
-- AdvancedPwrControlEn on address 0xF142 to 1 (enable). It is disabled (0) by default. -1.0 - 1.0 (61762)
-- ReactivePwrConfig on address 0xF104 to 4 (RRCR mode). It is set by default to 0 (Fixed CosPhi mode). (61700)
-- Issue a Commit Power Control Settings command on address 0xF100 in order to make this setting effective. (61696)
r4 = mb:readregisters(61762) -- AdvancedPwrControlEn
r5 = mb:readregisters(61700) -- ReactivePwrConfig
r6 = mb:readregisters(61696) -- Commit Power
log(r4, r5, r6)
else
log('connect failed', err)
end
mb:close()