Potential Issue with the C++ CANJaguar Implementation

I have our Jaguars all running in CAN communication mode and the ones that are being controlled in voltage control are working great.

However, when I try to control a Jaguar in position control, I am getting garbage back from the encoder. I verified that everything was setup correctly by testing it with the BDC-COM utility. I can see the encoder perfectly there, and I can tune the controller and it works great.

We have a display for the encoder position on the driver station, and if I watch the value here it jumps around erratically (3 -> 8 -> 11 -> 65535 etc.). This makes me think it has something to do with the way the code is unpacking the data from the CAN messages, but I am not familiar enough with the messages to know that this is the case.

I guess my real question is: Has anyone else been able to get meaningful data back from a CANJaguar, and if so, did you have to do anything special? I really need to be able to get the position reliably.

Thanks,
Matt

We were able to get it working. We believe that somehow the Jaguar was getting set to expect a potentiometer rather than an encoder. Not sure how though as we only had code in there for the encoder configuration.

Anyway, it works great now.

Would it be expecting an Absolute Encoder that outputs a 0-5 V signal based on shaft position? If you are working with a position control mode, that is what I would expect Vs using a relative quadrature encoder.

Mike R.