News:

To visit MidNite Solar click this link www.midnitesolar.com

Main Menu

Modbus log files

Started by David, November 19, 2013, 02:29:56 AM

Previous topic - Next topic

David

When attempting to get log file over Modbus I believe I am getting a response from Classic (at least I am not getting a Modbus error, and I can read registers fine) but the response is always the same 9 bytes:
00 00 00 00 00 4A 40 68 05

any clue what this means? 

I am constructing the "raw" request for yesterdays daily kWh with the following:
    uint8_t raw_req[] = {  0xFF, 0x68, 0x05, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 };

TomW

David;

The serial data output is selectable as to what it dumps to the port.

On the MNGP go to MISC>>COMM>>USB MODE and try a few to see which one does the full register dump or whatever data you want.

There is a thread here on it with some info on which does what. I forget the details so will not attempt to confuse you by guessing.

Just set your application to read it and run through a few to see which is the one you want.

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

David

Hi Tom,
I am attempting this over ethernet.  Can't use USB without going down into the basement with the Troll.  I am able to get correct data from register addresses.  It is the log files that I am trying to get.  I have the classic register map PDF that explains how to get the log files but something must be slightly off and not quite sure how to debug it yet. 

Westbranch

David, take a beef Joint and a whip. ::) 
Throw the troll the bone if that doesn't work use the whip... or a crowbar... :P :o
KID FW1811 560W >C&D 24V 900Ah AGM
CL150 29032 FW V.2126-NW2097-GP2133 175A E-Panel WBjr, 3Px4s 140W > 24V 900Ah AGM,
2 Cisco WRT54GL i/c DD-WRT Rtr, NetGr DS104Hub
Cotek ST1500 Inv  want a 24V  ROSIE Inverter
OmniCharge3024  Eu1/2/3000iGens
West Chilcotin 1680+W to come

TomW

#4
Quote from: David on November 19, 2013, 05:38:22 PM
Hi Tom,
I am attempting this over ethernet.  Can't use USB without going down into the basement with the Troll.  I am able to get correct data from register addresses.  It is the log files that I am trying to get.  I have the classic register map PDF that explains how to get the log files but something must be slightly off and not quite sure how to debug it yet.

David;

Sorry I misunderstood. I am just requesting specific registers with Ross' newmodbus application over TCP/IP (ethernet).  Simply request a list of registers and it returns the values.


By "log files" do you mean "registers"? As far as I am aware there is no way to download a "log file" or if one even exists.

There is documentation but the last I looked at it it was rather dated and confusing, especially the address and register numeric labels being offset by one for some (historic?) reason. Perhaps that is what is vexing you?

Good luck with it.

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

zoneblue

I  think he means using small file transfer to download the accumalated log data. Ross obviously figured it out, because thats how you set the time.
6x300W CSUN, ground mount, CL150Lite, 2V/400AhToyo AGM,  Outback VFX3024E, Steca Solarix PL1100
http://www.zoneblue.org/cms/page.php?view=off-grid-solar

David

Quote from: zoneblue on November 19, 2013, 10:37:15 PM
I  think he means using small file transfer to download the accumalated log data. Ross obviously figured it out, because thats how you set the time.

Yes, that is correct.  The Modbus document is available on each charge controllers page, i.e. http://www.midnitesolar.com/documents.php?productCat_ID=21&productCatName=Charge%20Controllers%20for%20Solar,%20Wind,%20Hydro&model=CLASSIC%20200&product_ID=257

Or the direct link: http://www.midnitesolar.com/pdfs/classic_register_map_Rev-B3-May-28-2013.pdf

Near the bottom it explains how to get the log files that I can't get right.

TomW

Way beyond me, guys.

I just don't pick up on this stuff like I used to and I don't remember ever seeing that document before. I should just leave it to those who are more informed to sort things out.

Tom

Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

David

Anybody from Midnite care to help explain how to get the log files correctly over Modbus or explain why I am getting the results above?

zoneblue

Ask the guy who developed one of the android app,  he figured it out recently, Graham i think his name is.
6x300W CSUN, ground mount, CL150Lite, 2V/400AhToyo AGM,  Outback VFX3024E, Steca Solarix PL1100
http://www.zoneblue.org/cms/page.php?view=off-grid-solar

atop8918

Hi, David,
It's a little difficult to see what's going on without a little more detail. Your PDU with the device address of 0xFF looks okay but there's no CRC and the TCP/IP MBAP header is missing. Presumably this is added by whatever modbus or library you are using? If this is the case then the UNIT IDENTIFIER field should be set to 0xFF and not the first byte of the request packet.

The return packet is hard to decode since it's unclear whether this is just the PDU or the full ADU-with-MBAP header. Whatever it is I'm not really sure what it represents. Like you said, it's certainly not an error response.

If you can fill in some of the blanks then we might get a better idea of what's happening in there.

Thanks!
-A


Graham

Quote from: zoneblue on April 28, 2014, 04:00:55 AM
Ask the guy who developed one of the android app,  he figured it out recently, Graham i think his name is.

The code for my open source implementation of the android app is available in sourceforge at http://sourceforge.net/p/classicmonitor/code/HEAD/tree/
the code related to the file transfer is mainly in the following files
Classic/src/main/java/ca/farrelltonsolar/j2modlite/msg/ReadFileTransferRequest.java and ReadFileTransferResponse.java

hope this helps

Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

David

#12
Thanks for the input.  I'm attempting to write to register 4254 and then reading 4255 to get the daily log value the Classic should have written to it.  My other modbus calls are working correctly (watts, current, battery temp,  etc).   I will provide more details in the next day or so.

David