Go to Post When you get a vanity license plate with you team or robot name on it or some other FIRST reference. - Raul [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
  #31   Spotlight this post!  
Unread 27-01-2010, 18:18
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 switching to CANJaguar as well, and I still get the errors I had before (status == -57002). This was using the CANJaguar class using the 2CAN attachment.
Reply With Quote
  #32   Spotlight this post!  
Unread 27-01-2010, 18:37
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 switching to CANJaguar as well, and I still get the errors I had before (status == -57002). This was using the CANJaguar class using the 2CAN attachment.
There was an update to the 2CAN plugin released just a day or two ago. Try updating that.
Reply With Quote
  #33   Spotlight this post!  
Unread 27-01-2010, 23:18
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 the update (http://crosstheroadelectronics.com/2...2CANPlugIn.out) and it still doesn't work. This is very odd...
Reply With Quote
  #34   Spotlight this post!  
Unread 28-01-2010, 09:38
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 537
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Black jaguars: not working

ellisk,

I just to confirm where you are...

You are using wind river c++ with "latest" checked out code from firstforge, or the last file release (zip under the file release link)?

You have latest FRC_2CANPlugin.out file from ctr website.

FRC_2CANPlugin.out is in the "ni-rt/system" directory on the ftp server in the cRIO.

ni-rt.ini is modified so that ";FRC_2CANPlugIn.out" is IMMEDIETELY after FRC_NetworkCommunication.out.
Note that FRC_2CANPlugIn.out now should be before FRC_UserProgram (in the past releases it would have been after but that was incorrect, causing all sorts of problems).

And also have you successfully viewed the web dashboard in the 2CAN and have confirmed that the Jaguar ID for your jag is the same one used in the constructor of CANJaguar?
Reply With Quote
  #35   Spotlight this post!  
Unread 28-01-2010, 10:56
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 ozrien View Post
ellisk,

I just to confirm where you are...

You are using wind river c++ with "latest" checked out code from firstforge, or the last file release (zip under the file release link)?

You have latest FRC_2CANPlugin.out file from ctr website.

FRC_2CANPlugin.out is in the "ni-rt/system" directory on the ftp server in the cRIO.

ni-rt.ini is modified so that ";FRC_2CANPlugIn.out" is IMMEDIETELY after FRC_NetworkCommunication.out.
Note that FRC_2CANPlugIn.out now should be before FRC_UserProgram (in the past releases it would have been after but that was incorrect, causing all sorts of problems).

And also have you successfully viewed the web dashboard in the 2CAN and have confirmed that the Jaguar ID for your jag is the same one used in the constructor of CANJaguar?
ozrien,

I've been using CAN control for over a couple weeks now, but I'm using the serial port. CANJaguar.h is necessary for the project to build. ellisk only shows 2CAN.h included. Could this be his/her problem?

- Bryce

P.S. ellisk, I would verify yourself that your Jaguars are set with the correct ID. Also, that they have the correct firmware. There are two firmware files, one for the black Jags and one for the gray Jags. TI just released a new version of the firmware, so you can take this time to reflash with the newest: http://www.luminarymicro.com/index.p...d&Itemid=59 1

P.S.S. Unless you just didn't show it, you're also missing START_ROBOT_CLASS(Spy); that comes after your class. If this line is not there, the cRio won't deploy your code. This line creates a new task with your program...

P.S.S.S. Here's an example of what my code would be using CAN over the serial port.

Code:
#include "WPILib.h"
#include "CANJaguar.h"



class Spy : public SimpleRobot
{
	CANJaguar *mtr;

public:
	Spy(void)
	{	
                mtr = new CANJaguar (5);  //or whatever ID you have set
		GetWatchdog().SetEnabled(false);
	}

	void Autonomous(void)
	{

	}

	void OperatorControl(void)
	{

		while (true) {
			mtr->Set(0.5);
			Wait(0.5);
		}
	}
};

START_ROBOT_CLASS(Spy);
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #36   Spotlight this post!  
Unread 28-01-2010, 13:14
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Black jaguars: not working

Make SURE you have toggled the Console Out DIP switch on the cRio. My team was having the exact same problem and it worked after toggling Console Out and a good ol' hard reboot.
Reply With Quote
  #37   Spotlight this post!  
Unread 28-01-2010, 15:40
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 basicxman View Post
Make SURE you have toggled the Console Out DIP switch on the cRio. My team was having the exact same problem and it worked after toggling Console Out and a good ol' hard reboot.
That's a good point for everyone trying to use the serial port, but it shouldn't matter for the 2CAN interface.

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #38   Spotlight this post!  
Unread 28-01-2010, 16:39
hm29168's Avatar
hm29168 hm29168 is offline
*poke poke*
FRC #2415 (WiredCats)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2010
Location: Georgia
Posts: 9
hm29168 is an unknown quantity at this point
Re: Black jaguars: not working

We have been having a similar problem as ellisk. We have updated our Jaguars to the most current firmware (87) as well as our 2CAN (v.1.5) and have gotten the sample code to work. However, we can only move sporadically with error -52007 showing up on the target console. Likewise, the watchdog is flipping on and off sporadically. We are using 2CAN with gray Jaguars.
Reply With Quote
  #39   Spotlight this post!  
Unread 28-01-2010, 18:14
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 Bryscus View Post
P.S.S.S. Here's an example of what my code would be using CAN over the serial port.

Code:
#include "WPILib.h"
#include "CANJaguar.h"



class Spy : public SimpleRobot
{
	CANJaguar *mtr;

public:
	Spy(void)
	{	
                mtr = new CANJaguar (5);  //or whatever ID you have set
		GetWatchdog().SetEnabled(false);
	}

	void Autonomous(void)
	{

	}

	void OperatorControl(void)
	{

		while (true) {
			mtr->Set(0.5);
			Wait(0.5);
		}
	}
};

START_ROBOT_CLASS(Spy);
And because of the unified architecture, the exact same code will work with the 2CAN with no modifications (or even rebuilding) by simply changing which driver plugin is configured to load on startup. It may be good to get a baseline with serial so you know the robot code is OK, then switch to the 2CAN plugin and see if there might be a problem with it.

-Joe
Reply With Quote
  #40   Spotlight this post!  
Unread 28-01-2010, 18:17
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 hm29168 View Post
Likewise, the watchdog is flipping on and off sporadically.
Which watchdog?
Reply With Quote
  #41   Spotlight this post!  
Unread 28-01-2010, 18:49
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: 454
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 hm29168 View Post
We have been having a similar problem as ellisk. We have updated our Jaguars to the most current firmware (87) as well as our 2CAN (v.1.5) and have gotten the sample code to work. However, we can only move sporadically with error -52007 showing up on the target console. Likewise, the watchdog is flipping on and off sporadically. We are using 2CAN with gray Jaguars.
Are you able to view the dashboard? If the answer is yes, are your Jaguars showing up in the dashboard view? If they are, and there are no faults displayed, it is possible the issue is somewhere in the code. One thing that you could do is leverage the dashboard feature of the 2CAN. When you are in the dashboard view, verify the throttle values that your code is requesting. For example if you are requesting a throttle value of 1, the throttle value in the dashboard view for that Jaguar should be 100%. Try this and post your results. The next release of the firmware will contain more diagnostic features that will help users to pinpoint problems.
__________________
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
  #42   Spotlight this post!  
Unread 28-01-2010, 19:33
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

Update:

ozrien: Yes to everything.

I'm not sure what on the dashboard would appear for the Jaguar. However, everything looks dead (not seeing any relays, etc).

I also get error -63194 at the start when I run over the RS232 port, that is:
Code:
>>>ERROR: status == -63194 (0xFFFF0926) in InitJaguar() in C:/windriver/workspace/Spy/CANJaguar.cpp at line 32
Reply With Quote
  #43   Spotlight this post!  
Unread 28-01-2010, 23:18
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: 504
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

One other thing to add to ellisk's report. When using the BDC-COMM application over RS-232 via a PC we are able to control the Jaguar and it's attached motor. It was thrilling to see a motor actually move! That seems to indicate the problem is not a physical one, at least using RS-232.

I'm about ready to pull the plug, so to speak, on CAN. We'd really like to use the advanced features of Jaguars, and love the way it cleans up the board, but we also need to get on with things. Ellisk is one of the most talented programmers our team has ever had -- four years on the team, four years of CS classes, Intel Science Talent Search finalist, etc.

Do you folks have any final ideas???
__________________
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
  #44   Spotlight this post!  
Unread 29-01-2010, 01:00
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 also get error -63194 at the start when I run over the RS232 port, that is:
Code:
>>>ERROR: status == -63194 (0xFFFF0926) in InitJaguar() in C:/windriver/workspace/Spy/CANJaguar.cpp at line 32
-63194 is kRIOStatusVersionMismatch. Update the Jaguar firmware.

-Joe
Reply With Quote
  #45   Spotlight this post!  
Unread 29-01-2010, 08:21
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: 454
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 jhersh View Post
-63194 is kRIOStatusVersionMismatch. Update the Jaguar firmware.

-Joe
This makes sense. That explains the jittery behavior. Ellis I would not give up on CAN just yet. Try to verify the JAG firmware version number as 87 using either the 2CAN web dash or the BDC-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
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 13:41.

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