Go to Post Why does kick off take so long to get here but ship date comes toooooooooo fast? - Steve W [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
  #46   Spotlight this post!  
Unread 29-01-2010, 11:13
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 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.
hm29168,

I think I was getting the same error. I believe the error had to do with saturating the serial port (or maybe the 2CAN in your case?). Put a wait statement in your main loop. Use the code Wait(x); where x is the number of seconds and is a float. If you try to send commands too quickly, you will end up with jittery motors and a lot of those errors because the serial port can't send the data out as fast as you can write to the serial port itself.

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #47   Spotlight this post!  
Unread 29-01-2010, 15:20
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

@jhersh - The watchdog is the main watchdog in the FIRST code; it appears on the Driver Station PC as "Watchdog not Fed".

@Mike Copoli - We are able to access the web dashboard and the throttle values do what we set them to.

@Bryscus - We did have a Wait function in our code set at 0.005. After playing with different Wait Value functions (0.02, 0.5, 0.08), we noted that the error dissapeared for higher values, but the Driver Station PC complained of the Watchdog not being fed. We do think it's a problem with the 2CAN being overloaded as the lower values (0.02) are the only ones that complains about the error. We could keep playing around with values until we find the magic number that makes it work. However, we are afraid of being disqualified during competition / losing command of our robot due to the Watchdog waiting too long. What was your Wait value and do you have any recommendations?
Reply With Quote
  #48   Spotlight this post!  
Unread 29-01-2010, 19:20
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

Quote:
Originally Posted by Mike Copioli View Post
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.
Thank you so much! It works now over 2CAN!
Reply With Quote
  #49   Spotlight this post!  
Unread 29-01-2010, 22: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

Just to close the loop in case everyone is wondering. After all the messing around with Jaguars, loading firmware, etc. somehow we didn't have the latest firmware on the Jaguar!!! Of all the mistakes.

We're still working on getting things working with RS-232 so we can make an informed choice vs the 2CAN but at least one of the two is working now. Thanks so much to everyone who helped us get this together!
__________________
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
  #50   Spotlight this post!  
Unread 30-01-2010, 07:48
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=hm29168;909397]@ We do think it's a problem with the 2CAN being overloaded as the lower values (0.02) are the only ones that complains about the error. ?[/quote]


This is not likely. The response time between commands sent and and aked over CAN using the 2CAN is sub mS and CAN is the bottleneck not Ethernet.

Are you using Java, c++ or Labview?

How many Jags are you using?

Is the webhost running when you observe these issues? This should not cause a problem but it is good to rule it out.

Any issues that are caused by "to much data" over Ethernet will only be worse over serial.
__________________
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
  #51   Spotlight this post!  
Unread 30-01-2010, 10:29
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 are using C++ with 4 Grey Jags and 2CAN. We are not running the web interface when the robot exhibits these problems and we are using Ethernet, not serial. The cRIO, Jag's, and 2CAN firmware are updated to version 19, 87, and 1.5, respecitvely.

Last edited by hm29168 : 30-01-2010 at 10:35. Reason: Fix version number.
Reply With Quote
  #52   Spotlight this post!  
Unread 30-01-2010, 12:06
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 hm29168 View Post
We are using C++ with 4 Grey Jags and 2CAN. We are not running the web interface when the robot exhibits these problems and we are using Ethernet, not serial. The cRIO, Jag's, and 2CAN firmware are updated to version 19, 87, and 1.5, respecitvely.
I know some of this may seem redundant but I am going to ask anyway.

- Have you used the web dash to verify version number of the Jaguars and the 2CAN firmware?

- Do you have a 120 ohm termination resistor on the CAN BUS?

- Have you confirmed the ARB(Jag) IDs are set correctly and not conflicting?

- Is the latest plugin being loaded? The latest can be found at www.crosstheroadelectronics.com/2CAN.htm

- When your code is running and you are not changing throttle values, what state is the LED on the 2CAN and the Jaguars in. (color and solid/blink)

The 007 ERROR is indicating that the 2CAN is awaiting a response from the Jaguar over CAN. This can happen for several reasons. It is usually due to the wrong firmware being loaded onto the Jag but can be caused by any of the afore mentioned 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

Last edited by Mike Copioli : 30-01-2010 at 12:09.
Reply With Quote
  #53   Spotlight this post!  
Unread 30-01-2010, 17:09
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
Talking Re: Black jaguars: not working

After doing all of your suggestions, we realized that the problem was that in the code, we were not asking anything of the Jaguars in the code. So, the 2CAN was waiting for a response from the Jaguars, but the Jaguars weren't sending anything back. Thanks for all of your help! Can't wait to start playing with the CAN features.
Reply With Quote
  #54   Spotlight this post!  
Unread 01-02-2010, 09:36
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 hm29168 View Post
After doing all of your suggestions, we realized that the problem was that in the code, we were not asking anything of the Jaguars in the code. So, the 2CAN was waiting for a response from the Jaguars, but the Jaguars weren't sending anything back. Thanks for all of your help! Can't wait to start playing with the CAN features.
So just to satisfy my morbid curiosity, to which code are you referring and what was the fix? Thanks.

- Bryce

P.S. Also, just in case you didn't know, you can set the expiration time for the Watchdog. If for some reason your cannot feed the watchdog in time, make sure the current expiration time is not set too short. It should be initialized in your main robot code and should then be fed every iteration of the main loop.
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.

Last edited by Bryscus : 01-02-2010 at 09:40.
Reply With Quote
  #55   Spotlight this post!  
Unread 01-02-2010, 17:53
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 were coding in C++ and did play with the GetWatchdog.SetExpiration() as well as the Wait command. The fix (at least for us temporarily) was to get the Jaguars to do something every now and then, say GetOutputVoltage from the Jaguar. So glad to finally get this resolved and can finally work on more complex features of CAN.
Reply With Quote
  #56   Spotlight this post!  
Unread 02-02-2010, 11:14
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 hm29168 View Post
We were coding in C++ and did play with the GetWatchdog.SetExpiration() as well as the Wait command. The fix (at least for us temporarily) was to get the Jaguars to do something every now and then, say GetOutputVoltage from the Jaguar. So glad to finally get this resolved and can finally work on more complex features of CAN.
I'm glad you have it working, but you shouldn't have to request any information from the Jags to get them to work.

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
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:45.

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