Go to Post As mentors we need to be good role models for students. Because like it or not, we will be role models. - mathking [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 25-01-2010, 13:33
Dale's Avatar
Dale Dale is offline
Head Coach & Mentor
AKA: Dale Yocum
FRC #1540 (Flaming Chickens)
Team Role: Coach
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Portland, OR
Posts: 499
Dale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud of
Re: Black jaguars: not working

It may not be your problem, but we ordered a RJ11 cable tester to test our CAN cables. We have 9 Jaguars on our board and can't have one of those cables being marginal if we can help it! You can get one for anywhere between $7 and $100+.

We still don't have our first Jaguar working on CAN so we'll see if we get to use that spiffy tester. For what it's worth we're getting this one because of it's good reviews and middle range price.
__________________
2016 PNW Championship Chairman's; 2016 Winner Oregon City District, 2015 PNW Championship Chairman's; 2015 PNW District Engineering Inspiration; 2015 PNW District Finalist; 2014 PNW Championship Chairman's; 2014 Championship Innovation in Controls; 2013 Chairman's (Oregon); 2013 Finalist (OKC); 2012 Winner (OKC); 2012 Chairman's (OKC); 2012 Woody Flowers (Oregon); 2011 Volunteer of the Year (Oregon); 2011 Finalist & Captain (San Diego); 2011 Innovation in Control (San Diego); 2010 & 2007 Chairman's (Oregon); 2010 Regional Champions (Colorado); 2010 Innovation in Control (Colorado); 2009 & 2008 Engineering Inspiration (Oregon); 2008 Regional Champions (Oregon); 2007 Regional Finalist (Oregon); 2005 Rookie Inspiration (PNW)

Last edited by Dale : 25-01-2010 at 13:57. Reason: Removed for incorrect info on single terminators
Reply With Quote
  #17   Spotlight this post!  
Unread 25-01-2010, 13:46
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: Black jaguars: not working

Quote:
Originally Posted by Dale View Post
There should be just one terminator...at the end of the chain. Have a terminator inside the shell of the DB9 defeats the purpose of reducing reflections. See this article.
Two 120 ohm resistors are required on a CAN bus. One at each end of the BUS. The 2CAN contains one of the resistors internally that can be removed via a jumper. The second jumper needs to be placed by the user. My suggestion is to use the second RJ-11/12 connector on the Jag for this. I do not know if the Jaguar has an internal 120 ohm resistor or not. Maybe Scott Emley can answer this. If it does not, you will need to place one at the beginning of the BUS as well.
__________________
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
  #18   Spotlight this post!  
Unread 25-01-2010, 13:56
Dale's Avatar
Dale Dale is offline
Head Coach & Mentor
AKA: Dale Yocum
FRC #1540 (Flaming Chickens)
Team Role: Coach
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Portland, OR
Posts: 499
Dale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud of
Re: Black jaguars: not working

I stand corrected on the terminator! In re-reading page 29 of the Jaguar BDC24 getting started guide it clearly says you need a 100 ohm resistor at both ends. I wonder if that's our problem with getting the Jaguars to work via CAN! It would seem unlikely given that we only have one Jaguar in our test setup but it's certainly worth a try.
__________________
2016 PNW Championship Chairman's; 2016 Winner Oregon City District, 2015 PNW Championship Chairman's; 2015 PNW District Engineering Inspiration; 2015 PNW District Finalist; 2014 PNW Championship Chairman's; 2014 Championship Innovation in Controls; 2013 Chairman's (Oregon); 2013 Finalist (OKC); 2012 Winner (OKC); 2012 Chairman's (OKC); 2012 Woody Flowers (Oregon); 2011 Volunteer of the Year (Oregon); 2011 Finalist & Captain (San Diego); 2011 Innovation in Control (San Diego); 2010 & 2007 Chairman's (Oregon); 2010 Regional Champions (Colorado); 2010 Innovation in Control (Colorado); 2009 & 2008 Engineering Inspiration (Oregon); 2008 Regional Champions (Oregon); 2007 Regional Finalist (Oregon); 2005 Rookie Inspiration (PNW)
Reply With Quote
  #19   Spotlight this post!  
Unread 25-01-2010, 14:05
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
Re: Black jaguars: not working

Quote:
Originally Posted by Dale View Post
I stand corrected on the terminator! In re-reading page 29 of the Jaguar BDC24 getting started guide it clearly says you need a 100 ohm resistor at both ends. I wonder if that's our problem with getting the Jaguars to work via CAN! It would seem unlikely given that we only have one Jaguar in our test setup but it's certainly worth a try.
Dale,

The instructions in the Getting Started Guide show a 100 ohm connected between red and green (CAN_L and CAN_H) inside the RS-232 to CAN converter. If you did this, you should have the proper termination.

- Bryce

P.S. I wonder if the termination needs to occur closer the the black jag than at the converter. Our cable is only 5 inches or so, but maybe even that is too long?
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #20   Spotlight this post!  
Unread 25-01-2010, 14:11
Dale's Avatar
Dale Dale is offline
Head Coach & Mentor
AKA: Dale Yocum
FRC #1540 (Flaming Chickens)
Team Role: Coach
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Portland, OR
Posts: 499
Dale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud of
Re: Black jaguars: not working

We had a 100 ohm terminator in the empty RJ11 plug on the Jaguar but didn't have one in the left one where the serial data was coming in.
__________________
2016 PNW Championship Chairman's; 2016 Winner Oregon City District, 2015 PNW Championship Chairman's; 2015 PNW District Engineering Inspiration; 2015 PNW District Finalist; 2014 PNW Championship Chairman's; 2014 Championship Innovation in Controls; 2013 Chairman's (Oregon); 2013 Finalist (OKC); 2012 Winner (OKC); 2012 Chairman's (OKC); 2012 Woody Flowers (Oregon); 2011 Volunteer of the Year (Oregon); 2011 Finalist & Captain (San Diego); 2011 Innovation in Control (San Diego); 2010 & 2007 Chairman's (Oregon); 2010 Regional Champions (Colorado); 2010 Innovation in Control (Colorado); 2009 & 2008 Engineering Inspiration (Oregon); 2008 Regional Champions (Oregon); 2007 Regional Finalist (Oregon); 2005 Rookie Inspiration (PNW)
Reply With Quote
  #21   Spotlight this post!  
Unread 25-01-2010, 14:18
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
Re: Black jaguars: not working

That could do it...

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #22   Spotlight this post!  
Unread 25-01-2010, 22:11
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: Black jaguars: not working

If I understand you correctly, you only have one Jag on the BUS. The Black Jag. If this is the case you should be able to get away with only one resistor for test purposes. We have six jaguars on our Kit bot with only the resistor that is in the 2CAN. We have been driving it around for the last two days without issue. See the link to the pic. I suspect the problem is elsewhere possibly in your code.


http://www.crosstheroadelectronics.c...res/Kitbot.JPG
__________________
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
  #23   Spotlight this post!  
Unread 26-01-2010, 03:57
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Black jaguars: not working

Quote:
Originally Posted by ellisk View Post
(the last line is odd, considering that it's not in LabVIEW mode...)
That line simply means that the system is up and running. When initially developed, the cRIO only ran LabVIEW.

Quote:
Originally Posted by ellisk View Post
When I run the aforementioned program, I get the following error at startup, presumably from the call to Init of the CANJaguar in the constructor of the program:
Code:
>>>>ERROR: status == -63194 (0xFFFF0926) in InitJaguar() in C:/windriver/workspace/Spy/CANJaguar.cpp at line 32
That error message is kRIOStatusVersionMismatch. Likely it means that you haven't updated your Jaguar to the latest version.

-Joe
Reply With Quote
  #24   Spotlight this post!  
Unread 26-01-2010, 09:43
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
Re: Black jaguars: not working

BTW: NEW CANJag CODE IS AVAILABLE FOR DOWNLOAD!!!

Quote:
Originally Posted by Mike Copioli View Post
If I understand you correctly, you only have one Jag on the BUS. The Black Jag. If this is the case you should be able to get away with only one resistor for test purposes. We have six jaguars on our Kit bot with only the resistor that is in the 2CAN. We have been driving it around for the last two days without issue. See the link to the pic. I suspect the problem is elsewhere possibly in your code.


http://www.crosstheroadelectronics.c...res/Kitbot.JPG
If I were you, I'd add the termination resistor at the end. They aren't hard to make, and technically you're violating the spec of the CAN bus. If you drive under different circumstances, it isn't guaranteed to work...
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #25   Spotlight this post!  
Unread 26-01-2010, 09:49
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
Re: Black jaguars: not working

Quote:
Originally Posted by Bryscus View Post
I have been having an issue with intermittent signals getting to the Jags...
Guys, I think I was swamping the serial port with commands. This was causing the intermittent glitches. Everything appears to work extremely well now! Joe Hershberger is one awesome guy.

Someone has already been running with 6 Jags hooked together, but I'm going to hook up a bunch tonight and verify everything.

Also, Joe has released a new version of the Jag code that implements all the closed loop modes! He also said there was a TI firmware update available (Version 87). I'll be playing with that tonight too. Cheers!

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #26   Spotlight this post!  
Unread 26-01-2010, 11:51
Dale's Avatar
Dale Dale is offline
Head Coach & Mentor
AKA: Dale Yocum
FRC #1540 (Flaming Chickens)
Team Role: Coach
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Portland, OR
Posts: 499
Dale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud of
Re: Black jaguars: not working

We continued trying to get either the 2CAN or RS-232 to work last night, still without any success in C++. The RS-232 version still throws the error, even when the robot is enabled. The 2CAN just sits there with a flashing orange light (the boot loader). It's probably some setup issue because the 2CAN seems to be a quality product. Work continues but so far it's been pretty frustrating. We've tried various RJ11 cables.
__________________
2016 PNW Championship Chairman's; 2016 Winner Oregon City District, 2015 PNW Championship Chairman's; 2015 PNW District Engineering Inspiration; 2015 PNW District Finalist; 2014 PNW Championship Chairman's; 2014 Championship Innovation in Controls; 2013 Chairman's (Oregon); 2013 Finalist (OKC); 2012 Winner (OKC); 2012 Chairman's (OKC); 2012 Woody Flowers (Oregon); 2011 Volunteer of the Year (Oregon); 2011 Finalist & Captain (San Diego); 2011 Innovation in Control (San Diego); 2010 & 2007 Chairman's (Oregon); 2010 Regional Champions (Colorado); 2010 Innovation in Control (Colorado); 2009 & 2008 Engineering Inspiration (Oregon); 2008 Regional Champions (Oregon); 2007 Regional Finalist (Oregon); 2005 Rookie Inspiration (PNW)
Reply With Quote
  #27   Spotlight this post!  
Unread 26-01-2010, 11:51
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: Black jaguars: not working

Quote:
Originally Posted by Bryscus View Post
BTW: NEW CANJag CODE IS AVAILABLE FOR DOWNLOAD!!!



If I were you, I'd add the termination resistor at the end. They aren't hard to make, and technically you're violating the spec of the CAN bus. If you drive under different circumstances, it isn't guaranteed to work...
I am aware of that. The intent of my post was to inform Dale that his problem was elsewhere. I assure you it performs adequately without the termination resistor in our specific configuration. This does not mean that I think it is ok to leave the resistor out of the BUS. It simply means that using our tools to monitor CAN traffic there were absolutely no CAN frame errors in our particular configuration. The termination resistor is to reduce signal reflection. Signal reflection is not influenced by external factors as much as it is based on bus length. If you keep the bus short and the utilization low, you should not have any issues. In Dales example he was only connecting one Black Jaguar(as I understood it) and no gray Jags. Since the Black Jaguar is the beginning and the end of the Bus it would be pointless to place a resistor on each end of the device since the traces inside the jaguar are the entire BUS.
__________________
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
  #28   Spotlight this post!  
Unread 26-01-2010, 12:18
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: Black jaguars: not working

Quote:
Originally Posted by Dale View Post
We continued trying to get either the 2CAN or RS-232 to work last night, still without any success in C++. The RS-232 version still throws the error, even when the robot is enabled. The 2CAN just sits there with a flashing orange light (the boot loader). It's probably some setup issue because the 2CAN seems to be a quality product. Work continues but so far it's been pretty frustrating. We've tried various RJ11 cables.
A slow orange light means that the 2CAN does not have communication or it is disabled. If you are able to view the 2CAN dashboard then the 2CAN is not in bootloader. We are currently working on updating the 2CAN plugin to be compatible with some changes made to the CANjaguar class. The update will be available soon. Thank you for your patience.
__________________
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
  #29   Spotlight this post!  
Unread 26-01-2010, 19:15
ellisk ellisk is offline
Registered User
FRC #1540
 
Join Date: Dec 2008
Location: Vancouver, WA
Posts: 41
ellisk is on a distinguished road
Re: Black jaguars: not working

I tried it with the 2CAN bus. Now, instead of giving me error messages, it just silently fails. I've updated the firmware on the 2CAN, but it still doesn't work. Any ideas? Here's the code I'm using:

Code:
#include "WPILib.h"
#include "2CAN.h"



class Spy : public SimpleRobot
{
	JaguarOverCAN  *mtr;

public:
	Spy(void)
	{
		GetWatchdog().SetEnabled(false);
	}

	void Autonomous(void)
	{

	}

	void OperatorControl(void)
	{
		mtr = new JaguarOverCAN (2);
		while (true) {
			mtr->Set(0.5);
			Wait(0.5);
		}
	}
};
EDIT: I tried visiting the 2CAN's web page at 10.15.40.10. I was able to see that both the 2CAN and the Jaguar are at least partially set up correctly, that the Jaguar is getting power and that it is on ID 2.

Last edited by ellisk : 26-01-2010 at 19:40.
Reply With Quote
  #30   Spotlight this post!  
Unread 27-01-2010, 00:58
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Black jaguars: not working

Quote:
Originally Posted by ellisk View Post
I tried it with the 2CAN bus. Now, instead of giving me error messages, it just silently fails. I've updated the firmware on the 2CAN, but it still doesn't work. Any ideas? Here's the code I'm using:

Code:
#include "WPILib.h"
#include "2CAN.h"



class Spy : public SimpleRobot
{
	JaguarOverCAN *mtr;

public:
	Spy(void)
	{
		GetWatchdog().SetEnabled(false);
	}

	void Autonomous(void)
	{

	}

	void OperatorControl(void)
	{
		mtr = new JaguarOverCAN (2);
		while (true) {
			mtr->Set(0.5);
			Wait(0.5);
		}
	}
};
You are using the old JaguarOverCAN class that CTRE released before the season began and before the rules were released. You need to be using the unified CANJaguar class for it to work with the FRC 2010 control system.

-Joe
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial to CAN Gateway in new Black Jaguars? dmcguire3006 Electrical 54 26-01-2010 07:32
Jaguars arent working yoavh360 Electrical 6 19-01-2010 17:20
Victors and Jaguars not Receiving Signal? excel2474 Electrical 1 12-02-2009 16:41
jaguars suddenly not working Mr. E Technical Discussion 1 07-02-2009 21:09
Jaguars working with 2.4 Ghz R/C NOV8R Technical Discussion 0 09-01-2009 16:15


All times are GMT -5. The time now is 12:26.

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