View Single Post
  #101   Spotlight this post!  
Unread 10-08-2013, 13: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: NI Week Athena Announcement and Q&A Panel

Quote:
Originally Posted by RufflesRidge View Post
It's an issue with how WPILib deals, or doesn't deal rather, with a jag erroring out. If you keep trying to talk to the jag with messages that require an ACK you will have to keep waiting for the full timeout to not get one. Which will cause your code to slow down and throw motor safety errors which slow the code down further and...well you can see where this is going.

You can use the No-Ack versions of messages to help and/or add some intelligence in a class that wraps CAN Jag to prevent spamming messages to a jag that's not responding and to detect and re-initialize a jag that browns out if you are using anything other than the default mode.
The delays and motor safety you see could be one of 2 things...

1) The errors causing slowdown in LabVIEW WPILib due to the Auto-error handler feature which has to synchronize with the main thread. This is instigated when the errors from a Jaguar access call has its error wire coming out of the VI not connected. Just wire it up to the side of a structure like a loop, case structure, or sequence structure, and the auto error handler will not get invoked.

2) You have no threading in your robot program that allows other motors to be accessed while the one controller fails to respond. This of course causes the rest of them to not get the control update in time either. You will then see the motor safety messages. This applies to any language.
Reply With Quote