Help on Error on MODBUS Write to Fronius Primo 501

Hello,

Long time learner - first time poster here :slight_smile:

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....

thanks in advance for your help

fronius-error

Is this MOdbus over TCPIP (Modbus TCP) or Modbus over Serial (Modbus RTU) ?

In particular this page - which seems to hit exactly what you are trying to do - check your firmware revision to start with ?

https://www.fronius.com/en/photovoltaics/products/all-products/system-monitoring/open-interfaces/modbus-tcp

Craig

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

Regarding the product pages and manuals, yes, I have got those, and used them to retrieve all the meaningful data so far...

Cheers,
Sam

Are you sure you have your scale factors correct when writing as it is not straigthforward (as per the document)

Craig

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??

SOLVED!

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!!

  1. 'Service' level login was required to promote MODBUS control protocol to be priority 1 (above Dynamic Power control, and IO)
  2. 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)
  3. 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.
  4. 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 :slight_smile: )

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.