Go to Post Doesn't make sense, Karthik. ...... You don't scare me, other than the way 1114 normally does. - EricH [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 04-15-2011, 06:32 PM
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
Comming soon: 2CAN Simple Analyzing Monitor

I have made a simple java application that retrieves the status from the 2CAN. This can be launched in place of or along side of the dashboard.

To run from command line:
java <path to class file>twocansam [ip] [mode]
- - - Where IP is the ip address of the 2CAN.
- - - Where [mode] is the mode of monitoring

Example:
If the class is in a folder on the c drive called frc and the IP of the 2CAN is 10.99.99.10 with one Jaguar
java c:\frc\twocansam 10.99.99.10 T

Example Result
547 21.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00

The line updates every 1 second

NOTE
The release for today will only show temperatures. I will add the other modes tonight and release tomorrow. Sunday I will add a gui so it can actually be seen with the dashboard.

Please post a reply with problems and comments

You can download on this page
http://www.satanicspider.com/frc.php

EDIT:: Haha don't mind the site, just something I was playing with a while ago!

Last edited by drakesword : 04-15-2011 at 06:51 PM. Reason: Fixed link
Reply With Quote
  #2   Spotlight this post!  
Unread 04-16-2011, 01:11 AM
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

Attached first version. Host is down again ...
Attached Files
File Type: zip twocansam0.1.zip (1.8 KB, 3 views)
Reply With Quote
  #3   Spotlight this post!  
Unread 04-17-2011, 12:59 PM
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

Update:

Added preliminary gui
Each jag appears in the window. The description (set on the 2CAN) VBus Vout Iout Firmware Version and active status is displayed
If the program thinks the jag is alive the circle and subsequent text will appear in green to give a quick visual cue. Otherwise the alive circle and subsequent text will be red.

--See image attached for overview

--New zip file added with gui. Extract all files to same folder. Run it the same as before.

Next Update:
Automatic reconnection to 2CAN if it gets disconnected
2CAN Status below jag status

Further update:
Logging?
Attached Thumbnails
Click image for larger version

Name:	twocansamdemo.png
Views:	54
Size:	18.1 KB
ID:	10598  
Attached Files
File Type: zip twocansam0.2.zip (6.5 KB, 1 views)

Last edited by drakesword : 04-17-2011 at 01:45 PM.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-17-2011, 03:08 PM
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Comming soon: 2CAN Simple Analyzing Monitor

Nice!
I would recommend changing the green text to a darker color to improve contrast.
__________________
-- Marshal Horn
Reply With Quote
  #5   Spotlight this post!  
Unread 04-17-2011, 04:07 PM
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

Quote:
Originally Posted by kamocat View Post
Nice!
I would recommend changing the green text to a darker color to improve contrast.
Will take that into consideration. I will bold the text. May just make all the text black and have the active circle change green or red.

To launch it with your dashboard you need to go to users\public\public documents\. Make a backup of "frc ds data storage.ini" then change the cmd line to java c:\frc\twocansam 10.99.99.10 TVCB changing the variables to your needs.


Also next update:
Set monitoring to all for default if no parameters are passed
Display faults
Throw a flag if a fault occurs or if a jag disconnects
Reply With Quote
  #6   Spotlight this post!  
Unread 04-17-2011, 06:48 PM
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

Update 0.3:
Added - auto reconnect
2CAN status - in separate window (can be closed without stopping program)
*FIXED* All text is now black and tho only color changing is the circles
All monitoring enabled if no mode parameters are passed
Displays Faults
Fault indicator (Green if no fault has occurred. Red if it has.)
Jag Communications Lost Indicator (Green if communication was constant, Red if it was lost)

That's all for tonight. Will start cracking on logging tomorrow. Let me know if there are any features I should add.

EDIT:

JUST KIDDING. Got stuck in a tight spot today and had nothing better to do. Got logging running. Gotta test when I am back at the lab. Once tested I will release 0.4
Attached Files
File Type: zip 2CANSAM0.3.zip (9.7 KB, 0 views)

Last edited by drakesword : 04-18-2011 at 12:41 AM.
Reply With Quote
  #7   Spotlight this post!  
Unread 04-18-2011, 09:50 AM
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

-------------------------------------------
Update
-------------------------------------------
Added logging
---Data appears as bar graph. Blue is normal red is if a fault is detected
---The red line is the front of the log
---Windows are shown only when that particular logging is enabled
---Example if you put B in the mode a window will pop up with v-Bus logging
---NOTE VOLTAGE IS SET TO A 24V SCALE
Added 2CAN Debug Window
---Enable it by adding a D in the mode parameter
Fixed Bug where main page would need to be open in browser
Fixed Bug where only logged data was being shown on the main window

Next Update
Menu to show/hide logging
Pause/Resume logging
Labels for scales
Ability to save logs
Attached Thumbnails
Click image for larger version

Name:	twocansam0.4teaser.png
Views:	29
Size:	17.8 KB
ID:	10606  
Attached Files
File Type: zip 2CANSAM0.4.zip (12.9 KB, 3 views)

Last edited by drakesword : 04-18-2011 at 10:39 AM. Reason: Updated software
Reply With Quote
  #8   Spotlight this post!  
Unread 04-18-2011, 06:41 PM
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Comming soon: 2CAN Simple Analyzing Monitor

Since this is Java-based, will it run under any OS with a JRE?

Also, I see three dots for each motor. What do those mean?
__________________
-- Marshal Horn
Reply With Quote
  #9   Spotlight this post!  
Unread 04-18-2011, 09:44 PM
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

Quote:
Originally Posted by kamocat View Post
Since this is Java-based, will it run under any OS with a JRE?

Also, I see three dots for each motor. What do those mean?
Yes this should run under any os with the JRE.

The left dot signifies if the jag is seen as active
The middle dot signifies if a fault was detected (untested though)
---If at any point a fault is detected the dot will become and stay red
the right dot signifies if communications have been constant
---If at any point communications appears to have been lost the dot will become and stay red
Reply With Quote
  #10   Spotlight this post!  
Unread 04-19-2011, 07:59 PM
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 could probably figure out how you're gathering the info from the 2CAN but ...

Any chance of getting the code? I have an android phone, the SDK, and some time between now and St. Louis and have been itching to write my first app. And this would be a cool app to have on my phone
Reply With Quote
  #11   Spotlight this post!  
Unread 04-20-2011, 12:22 AM
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

Quote:
Originally Posted by mjcoss View Post
I could probably figure out how you're gathering the info from the 2CAN but ...

Any chance of getting the code? I have an android phone, the SDK, and some time between now and St. Louis and have been itching to write my first app. And this would be a cool app to have on my phone
Ill consider the release for the code shortly. The problem with going to the android phone is I do no think the same libraries are supported.

It was simple reverse engineering and parsing info. I don't see the harm with releasing the info but let me check with crosstheroadelectronics first ok?
Reply With Quote
  #12   Spotlight this post!  
Unread 04-20-2011, 07:39 AM
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
  #13   Spotlight this post!  
Unread 04-20-2011, 08:44 AM
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
  #14   Spotlight this post!  
Unread 04-20-2011, 02:46 PM
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
  #15   Spotlight this post!  
Unread 04-23-2011, 03:07 PM
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
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 05:51 AM.

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