• Have you tried out dark mode?! Scroll to the bottom of any page to find a sun or moon icon to turn dark mode on or off!

diy solar

diy solar

Schneider XW Pro Modbus

Cataract2

New Member
Joined
Jul 31, 2024
Messages
51
Location
CO
So I finally got the PV Meter for my 17.66kW PV system which includes 3 Scneider XW Pro inverters, 2 MPPT 100 600 and 1 MPPT 80 600 along with a 30kWh EG4-LL Battery storage.

Anyway, I'm in the process of trying to control my XW Pros (and anything else) through the Modbus over TCP/IP. Two of my XW Pro accept write commands with no issue, but 1 does not. I opened a ticket with Schendier support just in case the one needs to be warrantied, and I sent them an e-mail detailing the issue. But maybe someone on here might know what the issue is or if there's maybe a setting preventing writes or something. But anyway, what I sent them with screen grabs.

At 1500 my time I have an automation to adjust the Grid Support Voltage from the normal 53.5V to 51V. For my Primary XW Pro it adjusts via the Modbus command as seen in the screen grab.


1731627677668.png


On the Secondary XW Pro that the modbus issue exists it does not seem to take the command via Modbus as it is still 53.5V.


1731627677688.png


For the secondary XW Pro the Modbus settings are as shown below


1731627677705.png


The command I created in NodeRed to change the voltage for the Primary XW Pro and this XW Pro is accepting the change sent to it via Modbus. Also the Modbus Flex Write which include the IP, Port and Unit ID for the Modbus address.


1731627677723.png1731627852192.png





For the Secondary XW Pro that is not accepting commands via Modbus the command and write screen grabs for it. This shows the Modbus address is correct for each and is also the only piece changed for what is being sent and it still is not reacting to the message.


1731627677757.png1731627821710.png





I also created just a simple read command to test going to the same 376 address in both the Primary XW Pro and Secondary XW Pro just to show the difference. I also have a 3rd Secondary XW Pro that is working like the Primary and I included it to show that this is isolated only to the one. What is interesting is I can read addresses over Modbus as shown. But for some reason the XW Pro #2 is not accepting writing to it via Modbus.


1731627677799.png
 

Attachments

  • 1731627677773.png
    1731627677773.png
    21 KB · Views: 4
  • 1731627677739.png
    1731627677739.png
    20.7 KB · Views: 4
I believe I discovered something that may be helpful here. When using Node-Red with both the Combox and an InsightHome connected to an XW+ I set up Read & Write commands for the XW+ Force Charge register (which is the same on both gateway devices) ComBox uses port 502 while Insight uses port 503. The permissible values are 1, 2, 3. Bulk, Float, No-Float.

it is possible to read and/or write XW+ Force Charge register via either the Combox or Insight. I noticed that if I sent a 2 to initiate a Float charge, indeed Float would start and if the register was read by either the Combox or Insight it returned the expected 2 value. Then something interesting happened.

The ComBox overnight will clear the Force Charge Register and insert a 0. The next day if the Register is Read via the ComBox it returns 0 BUT if the Register is Read via the Insight it still shows the 2 from yesterday.

What this indicates is that the entire Modbus functionality resides within the Gateway device NOT the Inverter. In other words it doesn't appear that Read/Write commands are passing through the Gateway into a Modbus register physically located in the inverter.

Which actually makes sense. The native communication protocol is Xanbus. So Modbus is simply used to communicate with Insight which then translates commands to Xanbus then sends the message to the Inverter or Charge Controller.

Sorry, Long story with a happy ending. There is probably nothing wrong with Inverter #2 itself, it may be an issue with Insight. Maybe try changing the register address??

If you log into the Insight menu via your network, I assume you can change Grid Support Voltage that way. If so Xanbus and the Inverter are working properly.
 
I believe I discovered something that may be helpful here. When using Node-Red with both the Combox and an InsightHome connected to an XW+ I set up Read & Write commands for the XW+ Force Charge register (which is the same on both gateway devices) ComBox uses port 502 while Insight uses port 503. The permissible values are 1, 2, 3. Bulk, Float, No-Float.

it is possible to read and/or write XW+ Force Charge register via either the Combox or Insight. I noticed that if I sent a 2 to initiate a Float charge, indeed Float would start and if the register was read by either the Combox or Insight it returned the expected 2 value. Then something interesting happened.

The ComBox overnight will clear the Force Charge Register and insert a 0. The next day if the Register is Read via the ComBox it returns 0 BUT if the Register is Read via the Insight it still shows the 2 from yesterday.

What this indicates is that the entire Modbus functionality resides within the Gateway device NOT the Inverter. In other words it doesn't appear that Read/Write commands are passing through the Gateway into a Modbus register physically located in the inverter.

Which actually makes sense. The native communication protocol is Xanbus. So Modbus is simply used to communicate with Insight which then translates commands to Xanbus then sends the message to the Inverter or Charge Controller.

Sorry, Long story with a happy ending. There is probably nothing wrong with Inverter #2 itself, it may be an issue with Insight. Maybe try changing the register address??

If you log into the Insight menu via your network, I assume you can change Grid Support Voltage that way. If so Xanbus and the Inverter are working properly.
I can in fact change it through Insight. Forgot to mention I have an Insight Facility. I kind of figured after I tested the read that Modbus was working and it's pulling a value. I wasn't sure if Modbus went over the Xanbus or not. The address may just be to identify each on Modbus, but Xanbus handles all of it. I will try maybe a Force Single write or honestly, any of them just to see if it takes. I wouldn't call myself a Modbus expert, just learning it quickly.
 
Well, tried the other FC options for write with Modbus but no change on the issue. I might see if I can just put this inverter directly to the Insight and keep the rest connected. Maybe Pro #1 and 3 with 2 on the other port.
 
The Schneider Modbus implementation definitely has its quirks. I was working with Pymodbus on a home automation controller with FreeBSD. Did a lot of experimenting. Found that 32bit data is formatted in BE but Little WordOrder. At least with the ComBox. Also found out that Modbus Registers will accept values outside the permissible range. The system ignores them and doesn't seem to throw an error.

Speaking of being a Modbus expert, I don't think there is such a thing. Not being a computer guy, was kind of shocked at how sparse and poorly documented Pymodbus seems to be. Perhaps I just don't know where to search.

I suffered a couple of days on this one. Literally everything I read implied that Unit ID was the new "politically" correct terminology for Slave ID and were essentially identical. Although my first clue should have been that no were was it stated that Slave ID was deprecated or eliminated and replaced so I suppose by inference was still relevant. Turns out its super relevant as in the Pymodbus script doesn't work without using Slave ID.
 
The Schneider Modbus implementation definitely has its quirks. I was working with Pymodbus on a home automation controller with FreeBSD. Did a lot of experimenting. Found that 32bit data is formatted in BE but Little WordOrder. At least with the ComBox. Also found out that Modbus Registers will accept values outside the permissible range. The system ignores them and doesn't seem to throw an error.

Speaking of being a Modbus expert, I don't think there is such a thing. Not being a computer guy, was kind of shocked at how sparse and poorly documented Pymodbus seems to be. Perhaps I just don't know where to search.

I suffered a couple of days on this one. Literally everything I read implied that Unit ID was the new "politically" correct terminology for Slave ID and were essentially identical. Although my first clue should have been that no were was it stated that Slave ID was deprecated or eliminated and replaced so I suppose by inference was still relevant. Turns out its super relevant as in the Pymodbus script doesn't work without using Slave ID.
Interesting. Don't suppose that ID is the Unique ID on the XW Pro. Also curious what Schneider Engineering might come back with. Could just be there's a quirk in the unit and they just warranty it. Still will trying modifiying the Xanbus wiring, Just in case the command is getting caught by Unit 1 XW Pro for some odd reason.
 
New information as I am doing a little bit of troubleshooting this morning. I noticed for my XW Pro #2 that I am getting this error
Error: Quantity should be less or equal to register payload array length: undefined Addr: 376 Q: 2

The undefined address is what caught my eye.
 
Sounds like the one of the Modbus Registers may be corrupted. I remember reading somewhere that both registers need to be written even if one of them is all zeros. Since the Schneider format is WordOrder = Little, the second register, 377 has all zeros unless the value in 376 goes above 65535 (65.5V).

Maybe you could get lucky and the system will ignore Reg 377 if its corrupted. Try writing to 376 only as a 16uint(BE). Worth a try?
 
Does each XW have a unique Modbus and Device ID?
1731785547263.png

Have you tried changing the Modbus ID on the effected XW?

Do you run different Modbus ID's for 502 and 503 on all 3 inverters? I run my one inverter as the same device ID on each port.
If none of that helps, I'd flash the firmware to that inverter again and try disconnecting everything else and connecting Xanbus to just that one inverter.
 
New information as I am doing a little bit of troubleshooting this morning. I noticed for my XW Pro #2 that I am getting this error
Error: Quantity should be less or equal to register payload array length: undefined Addr: 376 Q: 2

The undefined address is what caught my eye.
I get a similar error when I send bad data. In this case, I just sent a 1
Can you share more info on what you are sending?

1731786181320.png
 
Sounds like the one of the Modbus Registers may be corrupted. I remember reading somewhere that both registers need to be written even if one of them is all zeros. Since the Schneider format is WordOrder = Little, the second register, 377 has all zeros unless the value in 376 goes above 65535 (65.5V).

Maybe you could get lucky and the system will ignore Reg 377 if its corrupted. Try writing to 376 only as a 16uint(BE). Worth a try?
Right now the value I'm sending to it is 54000 and 51000 to change the Grid Support Voltage. Although after testing the system via voltage control I found that I prefer SOC control and will likely change that to having the SOC % change. But for now as I'm troubleshooting I could try that. Now, my ignorance is, how would I format it for 16unit?
 
Does each XW have a unique Modbus and Device ID?
View attachment 256330

Have you tried changing the Modbus ID on the effected XW?

Do you run different Modbus ID's for 502 and 503 on all 3 inverters? I run my one inverter as the same device ID on each port.
If none of that helps, I'd flash the firmware to that inverter again and try disconnecting everything else and connecting Xanbus to just that one inverter.
Modbus address for XW Pro #1 is 12 for both 502 and 503. #2 is 11 for both and #3 is 10 for both. I did try setting XW Pro #2 to 100, 15 and 25 on port 503 just to see if there was any change. Also reflashed the firmware on it with a fresh copy downloaded from Schneider.
 
I get a similar error when I send bad data. In this case, I just sent a 1
Can you share more info on what you are sending?

View attachment 256332
No problem.
So, using Bigtimer I am sending over a voltage change for the Gird Support Voltage.
1731796959719.png

I was then sending it to a Modbus Write (although I can't seem to get the Modbus Write to work for any so far).
1731797048895.png
And it was throwing that error.

I can get all but #2 to work writing a value for Modbus Flex Write and the function. But the undefined error got my attention.
 
I found that I prefer SOC control and will likely change that to having the SOC % change.
That would probably solve the issue since SoC is a totally different register.
Now, my ignorance is, how would I format it for 16unit?
Probably will not work, just throwing it out there. Since its only 1 register, could probably use client.write_register(1,2,3) or use one of the other nodes and dispense with the buffer function.
 
So, I thought maybe I should see if there's any logs of this. I didn't find anything in the XW Pro #2 event logs, but I did find a log in the Insight Facility.
1731798449395.png
The unique ID is the one for the XW Pro #2 and it appears that he Insight is reporting it can't set that value. I find that interesting.
 
That would probably solve the issue since SoC is a totally different register.

Probably will not work, just throwing it out there. Since its only 1 register, could probably use client.write_register(1,2,3) or use one of the other nodes and dispense with the buffer function.
I certainly haven't tried to set that yet as this issue has my curiosity, although I might just try and if it works, great. Just odd. Though I think I'll try reloading the Insight Facility firmware since I see that log error in it. Figure, can't hurt. Although I tend to get hesitant doing things with that since the XW Pro is REALLY sensitive to anything messing with communication with the BCS.
 
Maybe I missed it, but can you write any values (via modbus) to XW#2?
To Grid Support Voltage (376). I can read but not write. Haven't tried another address yet, but after seeing the logs on the Insight saying it's can't write to XW#2 I think I'll try reflashing that firmware. Maybe the issue is with the Insight.
 
I have modbus comms working with my Conext system. 3x XWPro, 4x MPPT 100 600, BMS. I recommend trying this program for troubleshooting purposes. This is how I figure out how to interface with the system.


I have a Schnieder M221 PLC which automates loads and more using modbus with my system. Just ensure:
1. Conext Modbus tables start with 1. Using this program you must - 1 from every modbus address, since the protocol actually starts at address 0.
2. 32bit registers must be read and written contiguously. If you're interacting with a 32 bit register you must read or write both registers, whether or not youre only writing or reading a single register.

In any case this is a great tool to figure out where the comms are going wrong.
 
I have modbus comms working with my Conext system. 3x XWPro, 4x MPPT 100 600, BMS. I recommend trying this program for troubleshooting purposes. This is how I figure out how to interface with the system.


I have a Schnieder M221 PLC which automates loads and more using modbus with my system. Just ensure:
1. Conext Modbus tables start with 1. Using this program you must - 1 from every modbus address, since the protocol actually starts at address 0.
2. 32bit registers must be read and written contiguously. If you're interacting with a 32 bit register you must read or write both registers, whether or not youre only writing or reading a single register.

In any case this is a great tool to figure out where the comms are going wrong.
I'll give that a look. Thanks.
 
I have modbus comms working with my Conext system. 3x XWPro, 4x MPPT 100 600, BMS. I recommend trying this program for troubleshooting purposes. This is how I figure out how to interface with the system.


I have a Schnieder M221 PLC which automates loads and more using modbus with my system. Just ensure:
1. Conext Modbus tables start with 1. Using this program you must - 1 from every modbus address, since the protocol actually starts at address 0.
2. 32bit registers must be read and written contiguously. If you're interacting with a 32 bit register you must read or write both registers, whether or not youre only writing or reading a single register.

In any case this is a great tool to figure out where the comms are going wrong.
So playing with the QModMaster and while I can get it to show that it's connected to the Modbus TCP Port 503. I can't seem to get it to read or write anything. Get an error. Wonder if you might be able to get a screen grab of your settings with it showing a connection. Might give me a point to start at with figuring out how to use and utilize the tool.
 
Well, playing a bit more with QModMaster and it looks like what I was missing was changing the Max Number of Bus Monitor Lines from the default of 60 to 1. Did that and one read command bring in values. Interestingly repeated reads doesn't, but that might be the frequency of read commands being more than what the Insight allows.
 
So it would appear that I must connect and disconnect with QModMaster, but otherwise I am getting the hang of it.

Anyway, went and did some testing with reading from XW Pro #1 and writing with QModMaster. As long as I have both registered filled in with Reg 1 (+00) Value 0 and Reg 2 (+01) Value 51000 it will change the Grid support Voltage to 51V. I tested it with XW Pro 2 and sure enough, as long as BOTH Registers are filled it actually changes the Grid Support Voltage. I'm guessing the issue going back to what was said above. I need both values for XW Pro #2 to be filled in with something. Now I just need to figure out how to send that in NodeRed.
 
Yes I forgot to mention you must disconnect and reconnect each time you try to write or read values. Glad you got it figured out!
 

diy solar

diy solar
Back
Top