Author Topic: Node-Red to Classic Modbus for beginners  (Read 398 times)

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 1860
Re: Node-Red to Classic Modbus for beginners
« Reply #15 on: October 03, 2018, 07:39:38 PM »
Has someone gotten this to work over ethernet?  I have Node-Red running.  I have the client node using the IP# of the Classic as it appears from my router.  I can ping the Classic and within Node-Red have a ModBus-read node using  port 502, type TCP, and DEFAULT TCP Type.  It keeps displaying "Error: Modbus exception 1" and wondering what I am doing wrong.

What modbus registers are you trying to read from the Classic ?

Larry
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

David

  • Jr. Member
  • **
  • Posts: 64
Re: Node-Red to Classic Modbus for beginners
« Reply #16 on: October 03, 2018, 11:49:06 PM »
Thanks Larry.  I was able to figure out my issue(s) after much trial and error.
  • Use FC 3: Read Holding Registers (I was using FC 4)
  • Need to subtract 1 from Modbus address that Midnite specifies, i.e. 4114 for bat voltage not 4115
  • TCP Type should be RTU-BUFFERED

After those changes I now can see my battery voltage being dumped to debugger.

Now trying to figure out how to display in node-red-dashboard.
 

RossW

  • Sr. Member
  • ****
  • Posts: 347
Re: Node-Red to Classic Modbus for beginners
« Reply #17 on: October 04, 2018, 07:31:37 AM »
It keeps displaying "Error: Modbus exception 1" and wondering what I am doing wrong.

Silly question, but do you have anything else reading the classic at the same time?
Eg, the local-app?
The classic only supports one modbus connection at a time, and if something else is using it, that could explain your errors?
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 1860
Re: Node-Red to Classic Modbus for beginners
« Reply #18 on: October 04, 2018, 12:34:29 PM »
It keeps displaying "Error: Modbus exception 1" and wondering what I am doing wrong.

Silly question, but do you have anything else reading the classic at the same time?
Eg, the local-app?
The classic only supports one modbus connection at a time, and if something else is using it, that could explain your errors?

That is one advantage of hooking up the serial output since it will also work with the network side going too.

Larry
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 1860
Re: Node-Red to Classic Modbus for beginners
« Reply #19 on: October 04, 2018, 12:37:37 PM »
Thanks Larry.  I was able to figure out my issue(s) after much trial and error.
  • Use FC 3: Read Holding Registers (I was using FC 4)
  • Need to subtract 1 from Modbus address that Midnite specifies, i.e. 4114 for bat voltage not 4115
  • TCP Type should be RTU-BUFFERED

After those changes I now can see my battery voltage being dumped to debugger.

Now trying to figure out how to display in node-red-dashboard.

Glad to hear you got it going. Look forward to seeing how you go about getting the data to display. I have not worked on Node Red more than I had in the initial post just because it got to be summer - maybe this winter I can dig back into it. Hopefully by the time maybe you will have something worked out and shared and save me a lot of effort !
We need someone like Ricardo to get a Classic because he is a whiz at Node Red for what he did with it for his Kid controller.

Larry
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie