Go to Post ...if you say "AndyMark" three times we show up... - Billfred [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 20-04-2011, 07:39
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 453
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: Comming soon: 2CAN Simple Analyzing Monitor

Actually all of the information needed is contained in the open-source project located on our web site. Also a free Android apk is also available. The apk is called uCANdrive, unlike the RCS the uCANdrive is closed source.

www.crosstheroadelectronics.com
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions
Reply With Quote
  #2   Spotlight this post!  
Unread 20-04-2011, 08:44
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Comming soon: 2CAN Simple Analyzing Monitor

Well if its open source then here I go:

I pull data from ip/status.xml which contains xml with all of the individual jag data. I found it by stumbling through the index pages html for a couple of minutes.

The main XML container is a response tag

Each jag has the following tags
voltout#
current#
temp#
fault#
voltbus#
descript#
firmware#

Using the xpath library (java.xml.xpath.*) I can then retrieve the appropriate values via a simple path such as getting the voltout for jag number 7 like this
"response/voltout7" While that will work for jag number 7, i put in a loop to read all of the information from all of the jags so in reality its "response/voltout" + loop_counter but that is just logistics ...

To do it without xml and save memory you should think along this line
Open a stream over http to ip/status.xml read the response line for line looking for patterns. (eg <v* can only be 1 of 2 bits of information voltout or voltbus) find the first > character go 1 or 2 characters left to get the jag number then take the data from the right of the > character until you reach a < character

If you think it will help I will release source for 0.5 when I get it done.

BEFORE I FORGET the little problem I ran into was that the 2CAN doesn't log information unless the index page is loaded with POST data. Using the same http stream open ip/index.htm?enables=65535 and data should start rolling.
Reply With Quote
  #3   Spotlight this post!  
Unread 20-04-2011, 14:46
mjcoss mjcoss is offline
Registered User
FRC #0303
 
Join Date: Jan 2009
Location: Bridgewater,NJ
Posts: 70
mjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the rough
Re: Comming soon: 2CAN Simple Analyzing Monitor

I downloaded the uCANdrive app about a week ago, when one of the students showed me the iPhone driver station app. It was cool to be able to drive the bot via his iPhone, although our controls are really too complicated for the interface so I went to see if there was anything similar for Android. I saw the uCANdrive and put it on my phone but it really does more than I want, and not enough of what I really want. I'll take a crack at coming up with an app that does something similar to your monitor which is really all I want. Of course I could just point my browser at the 2CAN and use the web interface but would be the fun in that.
Reply With Quote
  #4   Spotlight this post!  
Unread 23-04-2011, 15:07
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Comming soon: 2CAN Simple Analyzing Monitor

0.5 is nearly ready I will be conducting testing today to make sure everything is in order. I want to do some cleanup of the gui first (menus appear not where menus should) then I can release.


Currently the log spits out the description then each value in the log (currently capped at 500 items updated at every 0.5 second which should amount to a bit over four minutes of log. I want to add a flag to log every 0.25 seconds which would make the logs a little over 2 minutes long. The values will be printed in order from the oldest value to the most current value. Id advise you to pause the log before saving because it will continue to log even while you have the save dialog open!

If you left click on a log it will pause it. Right click and the value at that point in time will be displayed

I also added a menu item on each log view to pause all of the values at once.
Reply With Quote
  #5   Spotlight this post!  
Unread 24-04-2011, 00:18
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Comming soon: 2CAN Simple Analyzing Monitor

Here is version 0.5 Still have not had the chance to test it on my rig. Anyone who wants to test it before I get the chance let me know how it goes.


See the above post for the update listing

Next Update:
Log rate switcher (1/0.5/0.25 second intervals)
Executable jar?
Aesthetics?

Please suggest features if you know of anything you would like to see!
Attached Thumbnails
Click image for larger version

Name:	twocansam0.5teaser.png
Views:	21
Size:	13.2 KB
ID:	10629  
Attached Files
File Type: zip 2CANSAM 0.5.zip (18.0 KB, 0 views)
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 15:31.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi