Quote:
Originally Posted by John_1102
*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.