I've managed to write up a number of flows that communicate successfully in reading from my Fronius Primo 501 using both API v1 as well as MODBUS reads, but I can't seem to successfully write a change into the inverter. I'm aiming to control the WMaxLimPct register #40243 (== MODBUS address 40242), in conjunction with the WMaxLimPct_SF scale factor (Register #40261 which is at MODBUS address 40260).
I want to be able to turn up or turn down the power output to/from 100%, 50% and 2%.
Although I've got my maths right, when I issue the write register MODBUS command, using fc 0x06, value of '5000' written into a buffer.alloc(2) as a writeUInt16BE(), the response message I get from the Fronius, in the debug node is as per the picture attached.
Any hints to what logging the Fronius is talking about? I've checked all debug output from each node, can't find a thing....
HI @craigcurtin, yes it is over TCPIP (not serial). My inverter and data manager firmware versions are the latest for my model (3.16.7-1 for data manager, and 31331 for the inverter), as per here from solar web.com
I can't be sure - I haven't been able to write a register just yet. What I am trying to do though, is write in a similar fashion to what is read from the same registers. (they are RW).
So for example, if I read the values right now, they show as (10000, which is == 0x2710 as an unsignedInt16BE) for the 'WMaxLimPct' register, and (-2, which == 0xfffe as a signedInt16BE) for the WMaxLimPct_SF register. (see pic).
When I then try to write the value of 5000, (which is == 0x1388 for the same unsignedInt16BE), I get the error that I'm taking about... (I don't even write the SF, as I'm keeping it the same). I must say though, it takes a few seconds for that error to come up - i.e. it is not immediate. I took that as a hint that I may need to write 0xFFFF into the F_Store_Data uint16 register. But even then, it doesn't appear to work...... Am I supposed to write into the F_Store_Data register without waiting for the real register to return??
There were a few things incorrectly configured on the Fronius inverter, which once fixed, my node red controls started working perfectly. With many thanks for the Fronius Support team in Melbourne Australia for solving this!!
'Service' level login was required to promote MODBUS control protocol to be priority 1 (above Dynamic Power control, and IO)
IP Address mask needed to be changed from 192.168.0.1/24 to 192.168.0.0/24 (shame on me for missing that - rookie error)
Don't know if this one was a must, but I took their advice anyway - changed from 'Float' type to 'Int+SF' type, and also adjusted my register addresses to match that change.
Writing multiple addresses at once instead of one at a time is also required. ie. for my case, WMaxLimPct, WMaxLimPct_WinTms, WMaxLimPct_RvrtTms, WMaxLimPct_RmpTms, as well as WMaxLim_Ena = 1 was crucial in getting the inverter to make the control setting stick.
Again, thanks to Fronius Melbourne Australia for troubleshooting (looking at you Illiev )