FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN Error -44087 JaguarCANDriver timed out

Folks,

I am trying to use CAN with the 2CAN interface and Labview.  My objective is to use the quad encoder on a CIM motor to control the speed of my shooter.  I am having real problems getting the CAN to work reliably.  I can recreate my problem with the basic FRC framework with the code from the CAN Speed Control Encoder split between Begin and Teleop

I can configure and test the simple motor controls without error.  As soon as I add a “sophisticated” control, either the CAN PID using a quad encoder or even the 4 motor drive, I start to get -44087 errors. 

ERROR <Code>-44087  occurred at NetComm_CAN_Receive.vi:47
FRC: JaguarCANDriver timed out waiting to receive a response from a Jaguar

I have tried to isolate the offending code and it is elusive.  I have replaced the following:
All new Black Jags
Updated firmware
Swapped out the CAN cables and terminating resistor
Tried both RS232 and 2CAN with same results
I have re-imaged the cRIO with the correct CAN Driver Plugin
Swapped out quad encoders
If I run deployed compiled code it runs more cleanly than interactive code

When I run the sample CAN Speed Control Encoder and put a wave chart on the Get Status Speed after the Set Output, I get intermittent breaks in the RPM curve that correspond to a physical stuttering of the motor. They also seem to be tied to the Time Out error on the driver station

If I whip saw the desired speed (something I would generally avoid), I hear a click and then the Jag refuses to respond. It is not the fuse, but appears to be in the Jag.  If I reboot, it comes back on line, but there is no other way to restart the Jag. 

Any thoughts or suggestions would be appreciated?

Thanks

__________________
Peter Randall
Chairman, Department of Engineering & Robotics
Springside Chestnut Hill Academy
TEAM 1218

0 Kudos
Message 1 of 6
(6,103 Views)

Check your RJ jacks on the Jaguars for unsprung contacts.

Is your code doing anything else at the time?  You sait you tried the example and still had issues?

-Joe

0 Kudos
Message 2 of 6
(3,670 Views)

We have triple checked the cabling and configs.  When we run BDC COMM we get some spurious action as well so we are going back to the drawing board with the encoders.   Still even with out the encoder code in place, we are getting 44087 as well Slow Loop on the dirve commands.  So clearly something is slowing everything down.  We have turned off video processing so that shouldn't be the problem.  The kids are very frustrated as we have spent 3 days trying to get this one thing to work.  We are about to go back to PWM control and bag the CAN.  It shouldn't be this hard.

PGR

0 Kudos
Message 3 of 6
(3,670 Views)

What else is your code doing?  Any chance you can upload a ZIP of the entire project?  Have you tried creating a basic robot project that doesn't do anything other than talk to the motors over CAN?  I think there's a template for it, or if not, check out the examples.  You don't need any of the game code, the vision, autonomous/teleop, etc.  You can get it to a single loop plus the driver station communication VI.  If it works there, then start looking for reasons why it doesn't work in your real robot code.

Many teams seem convinced that every loop in their code needs to run as fast as possible, and put a very small wait, or no wait at all (this is particularly bad) in their loops.  If you have a loop with no wait, it's spinning as fast as it can, taking up all the processor time and preventing other loops from running.

0 Kudos
Message 4 of 6
(3,670 Views)

Folks,

Here is the offending code.  I am running the encoder on the Shooter motor.

Thanks

PGR

0 Kudos
Message 5 of 6
(3,670 Views)

Any luck with this issue?  I'm having the same thing happen to me intermittently. When I run code to set up CAN communication with a 2CAN and a single Jaguar, it works fine a couple of times, and then on the third run, I get this error after setting the position reference.

0 Kudos
Message 6 of 6
(3,670 Views)