Solar Guppy - All Things Solar Forum

It is currently Thu Mar 28, 2024 12:47 pm GMT EthGMT

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Corrupted data stream from STXR?
PostPosted: Mon Jan 30, 2006 4:24 pm GMT EthGMT 
Offline
Fish Eggs
Fish Eggs

Joined: Tue Oct 11, 2005 11:05 pm GMT EthGMT
Posts: 3
Location: Ridgecrest
Hi,

I'm new to this forum, but a long time computer guy. I have two STXR2500 (not UPG) connected thru opto-isolators to a Serial-Lan WiFi interface, then to HW Virtual Serial Port on my PC. I can connect to the virtual serial port with HyperTerminal and watch data from the STXR go by. Unfortunately, when I connect FishBowl to the virtual serial port, it claims that the port is "offline". I have configured FishBowl with and without XR-GP (UPG) with no change. I suspect the data is getting corrupted somewhere in the pipe. I have connected a scope to the output of the STXR and the output of the opto-isolator, and as nearly as I can determine, the data is good at that stage. (Kinda hard to tell with my old non-storage scope.) Is there someway I can verify the data stream?

Thanks, this forum has been a big help with suggestions on how to put this system together.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 4:50 pm GMT EthGMT 
Offline
Red Cobra Delta Guppy
Red Cobra Delta Guppy
User avatar

Joined: Sun Jun 02, 2002 1:01 am GMT EndGMT
Posts: 1159
Location: Lakeland Florida
Fishbowl is timing dependent and looks for a idle time of about 2-300 ms before reseting for the next data frame and is how its syncs with the inverter. The WiFi stuff is probably packing and delaying the data which would then confuse Fishbowl. You might have setting you can tweak on the wifi?

If you look at the data at the inverter, you should see about 400ms of data then nothing every second. Then look at the stream comming into the PC to verify this is your issue

You can hook-up the PC at the opto to verifty all is well.

Also, The ST's are very noisy RF wise, this might be trashing the wireless data. You can also verify that the numebr of bytes sent per second (hyperterm) is the same on both ends, off the top of my head I beleieve its 34

Hope this helps


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 04, 2006 5:16 pm GMT EthGMT 
Offline
Fish Eggs
Fish Eggs

Joined: Tue Oct 11, 2005 11:05 pm GMT EthGMT
Posts: 3
Location: Ridgecrest
I took a battery powered portable to the inverter and logged the data with a serial analyzer and logger program. (A temporary test, with no ground except the inverter.) The data from the inverter comes as 32 characters, one about every 15 ms; then about 480 ms of nothing. Fishbowl works just fine in this environment.

Unfortunately, you're right, the WiFi stuff is packing the characters into packets of arbitrary length, and I can't find the setup parameters that will cause it to put the 32 char messages from the inverter into one packet. I've tried sending 1 character packets, but they still get combined.

It looks like the only way I'm going to make this work is to write a program to read the packets from the WiFi stuff and send the characters out on a com port to be read in by Fishbowl. I've done this sort of thing in the past. The critical information I need is if there is some unique bit stream in each message from the inverter that I can use as a frame sync. Maybe a serial number?

I have noticed that you don't give out Xantrex IP in general, but perhaps this isn't too much. Also, these inverters don't seem to be supported by Xantrex anymore, so maybe they wouldn't mind. Should I contact Xantrex directly?

Thanks,
Tom


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 19, 2006 2:41 pm GMT EthGMT 
Offline
Red Cobra Delta Guppy
Red Cobra Delta Guppy
User avatar

Joined: Sun Jun 02, 2002 1:01 am GMT EndGMT
Posts: 1159
Location: Lakeland Florida
Hi Tom,

Thats the issue with the old Suntie's (pre V5.0 aka UPG), there is no Sync data you can use figure out where the stream starts, its totally timing based.

The UPG's DO have sync data, I added this when I did the redesign back in 2002, as the timing method is unreliable at best :shock:

As for the data, I posted on the Xantrex site a while back and didn't catch any flack, so I guess is not a state secret anymore :roll:

This thread should answer your questions

http://www.xantrex.com/forum/forum_posts.asp?TID=239&KW=STXR


The older STXR's do not report dc amps, mppt or power limit:

Here is the text from the Xantrex Post

First, it is important is to know the rs232 port is Not Isolated. You MUST use an external RS232 opto isolator or you will damage a PC if one is connected

The Suntie only reports data, there is no command interface, the receive line has no connection

A Free PC based program ( FishBowl ) is available at FishBowl For Suntie Download

As for the comm protocol, it's 9600 baud, no parity and the data is raw binary.

Any reported value greater than 256 is split into a high/low byte. A 34 byte data stream, once a second is sent out of the RS232 port

Here is most of the values of that 34 byte stream

Byte 0 fault
Byte 1 modes
Byte 2 Version
Byte 3 Mppthigh
Byte 4 VAChigh
Byte 5 VAClow
Byte 6 FREQhigh
Byte 7 FREQlow
Byte 8 AC_WATTShigh
Byte 9 AC_WATTSlow
Byte 10 FAULTTIMER
Byte 11 DC_VOLTS
Byte 12 DC_AMPS_Hi
Byte 13 mpptlo
Byte 14 DC_VOLTS_LO
Byte 15 DC_AMPS_LO
Byte 16 Power_Limit_Hi
Byte 17 Power_Limit_Lo

Byte 25 AmbientTemp;
Byte 26 HeatSinkTemp;

For syncing to the stream the last 5 characters sent out are "XR/GP" , when this is sent, the next character is the beginning if a new 34 byte stream


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 19, 2006 3:32 pm GMT EthGMT 
Offline
Fish Eggs
Fish Eggs

Joined: Tue Oct 11, 2005 11:05 pm GMT EthGMT
Posts: 3
Location: Ridgecrest
Thanks for the info.

I assume the 34 byte stream you describe is from the UPG version. As mentioned earlier, my STXRs produce a 32 byte stream every second.

I have managed to figure out what most of the bytes of interest are in the message, and have written a C# .NET program to display them. I'm deriving sync from the faults, mode and version bytes (based on your description of bytes). I'll include the program module that defines the interpretation of the bytes.

The program is multi document based, where each inverter represents a document, so I can display both inverters in one program and also total system performance.

This program is in early alpha testing (it has been running on my system solidly for 4 days).

Here's the code module.

Code:
        #region Message intpretation constants
    // constants describing the buffer and its data
    public const int ACVoltsHi = 4;        // offset to byte from beginning of message
    public const double ACVoltsHiSlope = 256.0;
    public const double ACVoltsHiIntercept = 0.0;
    public const int ACVoltsLo = 5;
    public const double ACVoltsLoSlope = 1;
    public const double ACVoltsLoIntercept = 0;
    public const int ACFreq    = 7;
    public const double ACFreqSlope = 0.1;
    public const double ACFreqIntercept = 51.2;
    public const int ACWattsHi = 8;
    public const double ACWattsHiSlope = 256.0;
    public const double ACWattsHiIntercept = 0.0;
    public const int ACWattsLo = 9;
    public const double ACWattsLoSlope = 1.0;
    public const double ACWattsLoIntercept = 0.0;
    public const int SecTillOnline = 10;
    public const double SecTillOnlineSlope = 2.0;
    public const double SecTillOnlineIntercept = 0;
    public const int DCVolts = 11;
    public const double DCVoltsSlope = 1.0;
    public const double DCVoltsIntercept = 0.0;
    public const int FrameCount = 13;
    public const int AmbientTemp = 25;
    public const double AmbientTempSlope = -0.61;
    public const double AmbientTempIntercept = 165.0;
    public const int HeatSinkTemp = 26;
    public const double HeatSinkTempSlope = -0.61;
    public const double HeatSinkTempIntercept = 165;
    public const int FaultCode1 = 0;
    public const int FaultCode2 = 1;
    #endregion


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 19, 2006 4:25 pm GMT EthGMT 
Offline
Red Cobra Delta Guppy
Red Cobra Delta Guppy
User avatar

Joined: Sun Jun 02, 2002 1:01 am GMT EndGMT
Posts: 1159
Location: Lakeland Florida
Good that you got something working, Sorry my info was a bit late!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB © 2000 - 2020 phpBB Group

phpBB SEO

© SGT 2002 - 2020 Solar Guppy