Go to Post I don't think FIRST is the reason for following rules, being respectful, etc. We should do that anyway. - Dan Zollman [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-13-2010, 05:03 PM
duane's Avatar
duane duane is offline
Programming Mentor
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 61
duane is an unknown quantity at this point
Send a message via AIM to duane
LabView Trouble with CAN

Our CAN system (using LabView) is kind of working but there are significant errors and problems. We're hoping to get a few pointers to what the problem might be.

We are getting:

ERROR <code> -52007 occurred at CAN Receive.vi NI Platform Services: The requested operation did no complete in time.

These happen quite often. The CAN network has 10 Jaguars. We initialize them all (and expect to be able to use them all). At this point, for debugging, we have disabled the use of all but 4 of them. These 4 are our drive motors. (All of the other Jaguars are initialized but never updated.)

Along with this error we are also getting

Watchdog Expiration: System 61, User 286

The system and user number are sometimes different. It's not clear what the pattern is.

As we disabled more speed control code, the number of watchdogs has reduced. It sounds like the CAN Receive errors are related to the Watchdog. If CAN was receiving there would be no watchdog errors.

The lights on the speed controllers are solid for periods, but then flash during the Watchdog timeout. The speed controllers respond as we change the settings, but again, they flash off during the watchdog period.

I believe that if we fix the receive errors the watchdog errors will go away.

How can we address these problems? What is the cause of the receive timeout?

Thanks for the help,
...Duane
ps
I've noticed some updates to the Java and C++ code for the canjaguar project on FirstForge, but no recent changes for LabView.

Thanks again for the help!
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #2   Spotlight this post!  
Unread 02-13-2010, 08:28 PM
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: LabView Trouble with CAN

Make sure you are running the latest (v87) version of the jaguar firmware. Also make sure the IDs are unique and correct.

What interface are you using to run the CAN? 2CAN or Black Jag? Make sure you have the plugin for that one correctly installed.

Also make sure you physically wired the CAN bus properly, with the daisy chaining, terminator plug on the end, and (if using serial) on the RJ-12 to RS-232 connector the resistor was properly wired.

Try running the jags from a regular computer. All of the ones on the CAN bus should stay solid yellow all of the time. If there is intermittent blinking then there are connection problems on the CAN bus

If you are using serial, make sure the console out switch is turned off. Off is with the lower part facing away from the cRIO modules.

Also try running the CAN with only those 4 jags. Just un-wire the rest of them and remove them from code.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-14-2010, 09:34 AM
duane's Avatar
duane duane is offline
Programming Mentor
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 61
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: LabView Trouble with CAN

Thanks. We have checked out all of those items. Everything works fine from BDC-COMM. The firmware is all updated and all Jaguars have unique address and respond to BDC-COMM.

We are using LabView and the serial connection to the Jaguars.
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #4   Spotlight this post!  
Unread 02-14-2010, 03:44 PM
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: LabView Trouble with CAN

That eliminates most of the simple common errors. Looking back at your first post though, I realized it was problems with CAN Recieve.vi and not Send. What are you requesting from the Jaguar?

Also, if you disable the Watchdog does that make the problems go away? CAN requests are blocking so a loop won't repeat until the request is finished. It could be taking too long, causing the user watchdog to not be fed, disabling the inputs and outputs, causing the recieve to not complete becase it can no longer read

If it isn't the watchdog, is there anything in the code other than they joystick->CANJaguar code? If your code is just the read joystick value and output it to the Jaguar and that works, try adding more stuff in one at a time until you see the problem again. When it breaks you will know what is causing the problem.

If it still fails when it is just plain joystick read and CAN write, then I don't think I can do much more to help you. I'm a C++ programmer mainly and I only deal with LabVIEW for the dashboard.
Reply With Quote
  #5   Spotlight this post!  
Unread 02-14-2010, 05:09 PM
duane's Avatar
duane duane is offline
Programming Mentor
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 61
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: LabView Trouble with CAN

Thank you for all the help and ideas. After more debugging, it looks like an interaction between CAN and the our auto-targeting code.

If I disable auto-targeting, the watchdog errors and CAN errors go away. So, it looks like it's something that we need to work on our end.

Going back to the CAN example code helped to show that the system was working fine. Further elimination of code help to isolate the problem.

Thanks again for the help!
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #6   Spotlight this post!  
Unread 02-14-2010, 06:37 PM
aeasson aeasson is offline
Registered User
FRC #2435
 
Join Date: Jan 2008
Location: Lawton, ok
Posts: 29
aeasson is an unknown quantity at this point
Re: LabView Trouble with CAN

Duane,
Did you use th sample code from sourceforge?
I have run into the same erro codes and I was using the sample code.
Thanks
Reply With Quote
  #7   Spotlight this post!  
Unread 02-14-2010, 08:10 PM
duane's Avatar
duane duane is offline
Programming Mentor
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 61
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: LabView Trouble with CAN

We are using the code from FirstForge. Is that what you meant? :-)

We see a watchdog and receive error right at the beginning but not after that, with the sample code.

When our targeting code is off, we see similar with our code, even with 10 jaguars running. :-)
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #8   Spotlight this post!  
Unread 02-14-2010, 08:28 PM
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: LabView Trouble with CAN

Did you try disabling the User watchdog? If that fixes it then simply extend the watchdog expiration time to solve everything.

What do you mean by auto-targeting code? Is it just sending targeting information to the dashboard or is it running the Jaguars? If it is running the jags then what happens if you remove that part of the code?

@aeasson If the sample code is failing then you did something wrong setting up the CAN bus. Try the things listed in my first post in this topic. Also are you using 2CAN or Serial?
Reply With Quote
  #9   Spotlight this post!  
Unread 02-14-2010, 09:27 PM
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 7,826
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: LabView Trouble with CAN

How often are you sending CAN data? Could you be swamping the serial port?
Reply With Quote
  #10   Spotlight this post!  
Unread 02-15-2010, 11:56 AM
aeasson aeasson is offline
Registered User
FRC #2435
 
Join Date: Jan 2008
Location: Lawton, ok
Posts: 29
aeasson is an unknown quantity at this point
Re: LabView Trouble with CAN

We are using serial interface.
Some more information from a debug session.
When I probe the CANJaguarDriveReference in teleop everything shows a good status until I enable the driver station.
Then the error code appears in the probe window.
Reply With Quote
  #11   Spotlight this post!  
Unread 02-15-2010, 08:26 PM
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: LabView Trouble with CAN

Again, the problem has to be in your setup of the CAN bus. There could be any number of physical problems in the system. Run through all of my checks in my first post to make sure everything works
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
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
You can explain how robotics can help with ocean discovery and sustainability. ebarker General Forum 0 09-30-2009 06:01 PM
Trouble downloading from LabView MikePres NI LabVIEW 9 01-24-2009 07:53 AM
Trouble Downloading from LabView to cRio MikePres FRC Control System 0 01-15-2009 03:17 PM
Trouble with Autonomous popnbrown Programming 15 02-27-2007 07:48 PM
can anyone please tell mw where or with what can i lear programing in C techsage Programming 7 08-22-2005 11:25 PM


All times are GMT -5. The time now is 01:32 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi