View Single Post
  #3   Spotlight this post!  
Unread 10-02-2013, 16:20
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Positional Motor Control using CANJaguar

Quote:
Originally Posted by John_1102 View Post
*Bump*
Sorry John, usually I stay out of conversations that I don't have a reasonable answer to, and this is one of them.

The code looks good other than this typo[?] near the bottom:
TEST_Tistance = PIDTEST.getPosition();

But that should be caught at compile time.

The only suggestion I have is to print the exception in your catch blocks. You could be getting a CANTimeoutException when you start your move. Sometimes this resets the Jag, and would result in an incomplete move, and the inability to go back to position 0, since you would by default the Jag would reset into VBus mode.

The most common cause of a timeout when you start a big position move on the Jags is overdrawing current. I'd find that hard to believe with a cam setup though. Flipping the limit switch jumpers sideways to enable the ramping feature on the Jags is a quick and easy way to avoid over-drawing current in these kinds of applications.
__________________
In life, what you give, you keep. What you fail to give, you lose forever...

Last edited by Mr. Lim : 10-02-2013 at 16:25.
Reply With Quote