diy solar

diy solar

First attempt reading Modbus Register

srcorrecto

New Member
Joined
Jul 11, 2023
Messages
27
Location
Puerto Rico
I am using vb.net and Easymodbus dll to try to create an interface for the schneider equipments. In this first successful try i read register address 0x00 of slave id 70 ( my SCP) using Modbus over TCP, and it was great !. Posted a little picture of the event!

Do you think there is any future for this kind of app? Recommendations welcome
 

Attachments

  • first register.png
    first register.png
    15.3 KB · Views: 26
Can't speak for anyone else but I'd be a buyer of a reasonably priced modbus TCP interface (that is relatively simple to use and reliable) that I could program to automatically initiate a Float charge start once a week at a specified time so I don't have to keep doing it manually.
Since I'm not a computer or software guy, the obvious question is: how is your proposed solution better/easier than a simple low cost PLC like a NANO-10. I like the way you are thinking though.

I'd really love to see a working hack of the Schneider Xanbus system. Now I'm just talking crazy.
 
Can't speak for anyone else but I'd be a buyer of a reasonably priced modbus TCP interface (that is relatively simple to use and reliable) that I could program to automatically initiate a Float charge start once a week at a specified time so I don't have to keep doing it manually.
Since I'm not a computer or software guy, the obvious question is: how is your proposed solution better/easier than a simple low cost PLC like a NANO-10. I like the way you are thinking though.

I'd really love to see a working hack of the Schneider Xanbus system. Now I'm just talking crazy.
Thanks for the suggestion. This is my first attempt to this type of programming. I am not a professional programmer but like to make things work. I have done some applications in vb.net with sql database connections and client replication also. I am going to look for the nano-10 since i don't know what it does! Also I just follow the Modbus registers since the Xanbus is a proprietary protocol. I started with the SCP but now i will try the Inverter to look for those registers you asked.
 
Looks like the same list I have saved in my files.
I think that list was inherited from the original Xantrex product line. I first got into doing modbus for the newer products like XW-Pro. The modbus x-ref pdf's for those are now packaged under Schneider's network interface boxes Context Gateway and Insight Facility/Home under Downloads / Technical Publications.
Modbus Maps

That download is actually a zip file of several embedded pdf's for several inverters, etc., not just the gateway device.
 
Last edited:
I think that list was inherited from the original Xantrex product line. I first got into doing modbus for the newer products like XW-Pro. The modbus x-ref pdf's for those are now packaged under Schneider's network interface boxes Context Gateway and Insight Facility/Home under Downloads / documents.
You are a savior ! Thanks for pointing that out. I downloaded the file.!!!
 
You are a savior ! Thanks for pointing that out. I downloaded the file.!!!
Ahhh, but when you get to the point of beating your head against a wall trying to apply logic to explain why the separation between port 502 vs. port 503 and decimal vs. hexadecimal register displacement... Don't come cryin' to me! ;)
 
Ahhh, but when you get to the point of beating your head against a wall trying to apply logic to explain why the separation between port 502 vs. port 503 and decimal vs. hexadecimal register displacement... Don't come cryin' to me! ;)
I don't completely understand what you said but that is why I hate computer Geeks because in a way they are super smart but on the other hand have NO idea what common sense or usability means.
 
Too late ! I already cried a river trying to get the meaning of things, but not to worry, tomorrow is another day !!
 

Attachments

  • latest2.png
    latest2.png
    45.6 KB · Views: 16
Can't speak for anyone else but I'd be a buyer of a reasonably priced modbus TCP interface (that is relatively simple to use and reliable) that I could program to automatically initiate a Float charge start once a week at a specified time so I don't have to keep doing it manually.
Since I'm not a computer or software guy, the obvious question is: how is your proposed solution better/easier than a simple low cost PLC like a NANO-10. I like the way you are thinking though.
A cheap Raspberry Pi and Node-Red (software) will do what your looking for, I've got it running and commanding my XW. But if your not a computer or software guy, its not a good solution.
I'd really love to see a working hack of the Schneider Xanbus system. Now I'm just talking crazy.
I'd love it too, but the Modbus is easier and supported by Schneider.

That download is actually a zip file of several embedded pdf's for several inverters, etc., not just the gateway device.
I'm not sure it's clear for others, but you still need to send commands for each component. If you want the inverter to do something you send (or read) the register from the inverter Modbus map. Even though the gateway/insight is providing the information.

Ahhh, but when you get to the point of beating your head against a wall trying to apply logic to explain why the separation between port 502 vs. port 503 and decimal vs. hexadecimal register displacement... Don't come cryin' to me! ;)
Haha, painfully true. I gave up trying to get it right of the first try and everything is trial and error until I get it right. Lucky, there aren't that many combinations to attempt. My least favorite is that some devices start counting addresses at 0 and others at 1. Which means the register you want may be one lower or higher than that listed on the map.
 
A cheap Raspberry Pi and Node-Red (software) will do what your looking for, I've got it running and commanding my XW. But if your not a computer or software guy, its not a good solution.

I'd love it too, but the Modbus is easier and supported by Schneider.


I'm not sure it's clear for others, but you still need to send commands for each component. If you want the inverter to do something you send (or read) the register from the inverter Modbus map. Even though the gateway/insight is providing the information.


Haha, painfully true. I gave up trying to get it right of the first try and everything is trial and error until I get it right. Lucky, there aren't that many combinations to attempt. My least favorite is that some devices start counting addresses at 0 and others at 1. Which means the register you want may be one lower or higher than that listed on the map.
I have two raspberry pi 3+. Is your solution using node-red your own or openly available? I am interested in exploring all avenues. Thanks
 
Node-Red is free and easy to use.
What are your parameters you want to use to trigger a charge cycle? Just a clock, like every Sunday at 2:00am?
 
Node-Red is free and easy to use.
What are your parameters you want to use to trigger a charge cycle? Just a clock, like every Sunday at 2:00am?
Thanks for the tip: Yes, exactly just want to force a Float once a week for a few hours. The inverter Charge Block timer can be used to stop charging.

I actually already do have an RPi 3B+ fitted with a PiCAN Duo. Its picking up the CAN bus output from the ZEVA BMS and using Websocketd to push out a webpage that displays the BMS data.
Its not that I can't do some simple hardware/software integrations its just that it takes forever and always turns into a giant pain in the ass.
 
I was amazed at how simple it was to get Node-Red to integrate with Schneider/Modbus.

If you can get Node-Red installed and have your RPi on the same network, I'll help you get the flow set up.
 
Will try to look into Javascript then Node-Js and then Node-Red as apparently is the roadmap to understand this stuff. I have only used vb.net because it was the first one I learned about a century ago! Then a bit of html,css and asp, That is all !! Time to expand horizons !!!
 
Last edited:
I'm sitting at the computer now and the Node-Red GUI happened to be open.
Here's my old clock based charge command. It also has manual controls (in blue) and a debug output (in dark green)
All you really need is the light green timer node (disabled in the attached screenshot) and salmon color modbus node.
No code involved, all GUI.

1690667650033.png
 
My first connection from a xw6848pro using node-red with the modbus nodes. This is from the node-red dashboard. This is fun !!!
 

Attachments

  • nodered1.png
    nodered1.png
    26.9 KB · Views: 18
  • nodered2.png
    nodered2.png
    86.9 KB · Views: 17
Back
Top