Go to Post Less playing to the camera, more talking about cool FIRST stuff please. - Cuog [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: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 11-01-2011, 20:26
Alexander Meyer Alexander Meyer is offline
Registered User
FRC #2358 (Bearbotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Lake Zurich, Illinois
Posts: 36
Alexander Meyer is on a distinguished road
Updated CAN Jaguar Issue

Hey y'all! Question.. (correct me if this should go in the Java section)

During the offseason, our team got an old swerve chassis up and running with five black jags hooked up to the cRio via the serial interface. We programmed the whole setup using Java. After kickoff, we moved the controller board to a new prototype chassis--all CAN and encoder wiring stayed exactly the same. We then updated:

1) cRio -> image v25, with black jag serial plugin selected
2) Driver station
3) Black jags -> firmware version 92
4) Netbeans plugins

Now, all our code (which is also exactly the same) fails at jag initialization with an UncleanStatusException. In the past, this problem had to do with a low battery, but we hooked up a fully charged one and the problem still persists. We also tested the jags with BDC-COMM v92, and they work perfectly. Is there anything else that needs to be updated/changed to get these working?
Reply With Quote
  #2   Spotlight this post!  
Unread 11-01-2011, 21:36
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Updated CAN Jaguar Issue

Please excuse my unhelpful and indeed useless post in advance, and PLEASE do not follow this advice. Thank you.

Quote:
Originally Posted by Alexander Meyer View Post
UncleanStatusException
Wash the jaguars so they are clean again.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #3   Spotlight this post!  
Unread 11-01-2011, 21:44
Alexander Meyer Alexander Meyer is offline
Registered User
FRC #2358 (Bearbotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Lake Zurich, Illinois
Posts: 36
Alexander Meyer is on a distinguished road
Re: Updated CAN Jaguar Issue

Quote:
Originally Posted by DonRotolo View Post
Wash the jaguars so they are clean again.
We tried that, but it resulted in a WetStatusException; we let them dry, but apparently they got dirty again..
Reply With Quote
  #4   Spotlight this post!  
Unread 11-01-2011, 21:48
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,795
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Updated CAN Jaguar Issue

Quote:
Originally Posted by DonRotolo View Post
Wash the jaguars so they are clean again.
Time to go home, Don.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
  #5   Spotlight this post!  
Unread 12-01-2011, 12:06
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: Updated CAN Jaguar Issue

Unclean can be caused by multiple issues. When we first dabbled in it we cam across three. Cant recall the numbers but one was that the jag plugin wasn't loaded. One was because one of the students loaded the serial plugin and the 2can plugin. The last error was because there was a short on the can bus (particularly the serial plug terminating resistor)

So to summerize ...

Check your can network
Check to make sure you have added the plugin to the cRio
Check that it is loading
Make sure you don't have both plugins loaded
Reply With Quote
  #6   Spotlight this post!  
Unread 12-01-2011, 14:01
rrossbach rrossbach is offline
Registered User
AKA: Ron R
FRC #2607 (RoboVikings)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Warrington PA
Posts: 90
rrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to behold
Re: Updated CAN Jaguar Issue

Quote:
Originally Posted by Alexander Meyer View Post
Now, all our code (which is also exactly the same) fails at jag initialization with an UncleanStatusException. In the past, this problem had to do with a low battery, but we hooked up a fully charged one and the problem still persists. We also tested the jags with BDC-COMM v92, and they work perfectly. Is there anything else that needs to be updated/changed to get these working?
Does your code retry when getting the exception, or just give up without retrying? Last year we noticed that we'd occasionally get the UncleanStatusException at initialization of the first Jag, and as best we could tell seemed to do with sensitivities with all the inter-task communications - i.e. the WPI library calls FRC_NetworkCommunication, which in turn calls the plugin main task, which calls send/receive tasks.... - I'd have to check with the team to see exactly where the diagnosis led.

In any case, we solved it by wrapping the constructors in a try block, and putting that in a loop so that we kept retrying the initialization until successful. The first Jag would occasionally have to be tried a couple of times before success.

- Ron
Team #2607 controls mentor
__________________

FIRST Mid-Atlantic Volunteer
FRC Team #2607 Mentor
Reply With Quote
  #7   Spotlight this post!  
Unread 12-01-2011, 14:29
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: Updated CAN Jaguar Issue

Quote:
Originally Posted by Alexander Meyer View Post
Hey y'all! Question.. (correct me if this should go in the Java section)

During the offseason, our team got an old swerve chassis up and running with five black jags hooked up to the cRio via the serial interface. We programmed the whole setup using Java. After kickoff, we moved the controller board to a new prototype chassis--all CAN and encoder wiring stayed exactly the same. We then updated:

1) cRio -> image v25, with black jag serial plugin selected
2) Driver station
3) Black jags -> firmware version 92
4) Netbeans plugins

Now, all our code (which is also exactly the same) fails at jag initialization with an UncleanStatusException. In the past, this problem had to do with a low battery, but we hooked up a fully charged one and the problem still persists. We also tested the jags with BDC-COMM v92, and they work perfectly. Is there anything else that needs to be updated/changed to get these working?
Please let me know what the actual status code is. I'm also in the process of cleaning up the exception handling in the Java implementation. I know it is not good at the moment.

-Joe
Reply With Quote
  #8   Spotlight this post!  
Unread 12-01-2011, 14:32
Alexander Meyer Alexander Meyer is offline
Registered User
FRC #2358 (Bearbotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Lake Zurich, Illinois
Posts: 36
Alexander Meyer is on a distinguished road
Re: Updated CAN Jaguar Issue

The status code is -52007.
Reply With Quote
  #9   Spotlight this post!  
Unread 12-01-2011, 14:39
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: Updated CAN Jaguar Issue

That's a timeout. It may be that you are trying to talk to a device number that you haven't assigned on the bus or have a problem with the bus termination or there is a bug in the CANJaguar class. Have you tried it in LabVIEW or C++?

-Joe
Reply With Quote
  #10   Spotlight this post!  
Unread 12-01-2011, 14:41
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: Updated CAN Jaguar Issue

Quote:
Originally Posted by Alexander Meyer View Post
Hey y'all! Question.. (correct me if this should go in the Java section)

During the offseason, our team got an old swerve chassis up and running with five black jags hooked up to the cRio via the serial interface. We programmed the whole setup using Java. After kickoff, we moved the controller board to a new prototype chassis--all CAN and encoder wiring stayed exactly the same. We then updated:

1) cRio -> image v25, with black jag serial plugin selected
2) Driver station
3) Black jags -> firmware version 92
4) Netbeans plugins
Alexander,

Did you try the setup after transferring the parts and before updating the firmware/software? When it comes to designing complicated systems only change one (or as few as possible) thing(s) at a time before testing again. This may seem like it takes longer, but it's worth it. It's like writing all of your code for the year without testing it at the end. Test the components along the way and you're likely to end up with a fully functioning design.

Now aside from that, I've got nothing helpful . Sorry.

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #11   Spotlight this post!  
Unread 12-01-2011, 15:21
Alexander Meyer Alexander Meyer is offline
Registered User
FRC #2358 (Bearbotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Lake Zurich, Illinois
Posts: 36
Alexander Meyer is on a distinguished road
Re: Updated CAN Jaguar Issue

Quote:
Originally Posted by jhersh View Post
That's a timeout. It may be that you are trying to talk to a device number that you haven't assigned on the bus or have a problem with the bus termination or there is a bug in the CANJaguar class. Have you tried it in LabVIEW or C++?

-Joe
I assumed that the CAN wiring (and all the IDs) were fine because a test with BDC-COMM yielded good results, i.e. everything worked. I have not tried it in any other languages, when I get over to the school I'll hack together some C++ code. As a side note, is there a list of status codes and what they mean anywhere?

To Bryscus, we performed limited testing (running one Jag in position control mode) after the move but before the firmware/software updates, and it worked fine.

Thanks for all the help so far!
Reply With Quote
  #12   Spotlight this post!  
Unread 12-01-2011, 15:26
Alexander Meyer Alexander Meyer is offline
Registered User
FRC #2358 (Bearbotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Lake Zurich, Illinois
Posts: 36
Alexander Meyer is on a distinguished road
Re: Updated CAN Jaguar Issue

Quote:
Originally Posted by rrossbach View Post
Does your code retry when getting the exception, or just give up without retrying? Last year we noticed that we'd occasionally get the UncleanStatusException at initialization of the first Jag, and as best we could tell seemed to do with sensitivities with all the inter-task communications - i.e. the WPI library calls FRC_NetworkCommunication, which in turn calls the plugin main task, which calls send/receive tasks.... - I'd have to check with the team to see exactly where the diagnosis led.

In any case, we solved it by wrapping the constructors in a try block, and putting that in a loop so that we kept retrying the initialization until successful. The first Jag would occasionally have to be tried a couple of times before success.

- Ron
Team #2607 controls mentor
Whoops, missed your post. Our code gives up without retrying--that's a good idea. I'll test that when I get there today.

Also, thanks for the hints, drakesword.
Reply With Quote
  #13   Spotlight this post!  
Unread 12-01-2011, 15:38
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: Updated CAN Jaguar Issue

Quote:
Originally Posted by Alexander Meyer View Post
As a side note, is there a list of status codes and what they mean anywhere?
Check out the \src\com\ni\rio\NiRioStatus.java in the WPILibJ source. It has most of the errors that you're likely to run across in v25.

The next version of the cRIO image will have more custom error codes so it should be more clear what they are when you see the errors in the DS errors window.

-Joe
Reply With Quote
  #14   Spotlight this post!  
Unread 12-01-2011, 15:45
rrossbach rrossbach is offline
Registered User
AKA: Ron R
FRC #2607 (RoboVikings)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Warrington PA
Posts: 90
rrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to behold
Re: Updated CAN Jaguar Issue

Quote:
Originally Posted by Alexander Meyer View Post
Quote:
Originally Posted by rrossbach View Post
In any case, we solved it by wrapping the constructors in a try block, and putting that in a loop so that we kept retrying the initialization until successful. The first Jag would occasionally have to be tried a couple of times before success.
Whoops, missed your post. Our code gives up without retrying--that's a good idea. I'll test that when I get there today.

Also, thanks for the hints, drakesword.
At the risk of stating the obvious - of course give the loop a max number of retries....that way if there is something else going on and it never succeeds, you'll be able to see that rather than just continuing to try indefinitely.....

- Ron
Team #2607 controls mentor
__________________

FIRST Mid-Atlantic Volunteer
FRC Team #2607 Mentor
Reply With Quote
  #15   Spotlight this post!  
Unread 12-01-2011, 18:33
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: Updated CAN Jaguar Issue

We would also advise that you run PWM cables to your jags so if the CANBUS goes down you can still control your motors. Just have a reduced functionality mode.
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 17:50.

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