Log in

View Full Version : CAN setX() not working


vinnie
20-01-2011, 19:58
Not sure if I should post this here or in the CAN section...
I was trying to use setX to set a speed of the motor. I set up the speed and position references. But the Jaguar would not do anything (RobotDrive works fine). I did not set PID and am wondering if this could be the problem. Thanks in advance for your help.

JewishDan18
25-01-2011, 00:11
yes, that would be a problem. Here's the code I used:


jag3 = new CANJaguar(3,CANJaguar.ControlMode.kSpeed);
jag3.setPID(.01, .01, 0);
jag3.setSpeedReference(CANJaguar.SpeedReference.kQ uadEncoder);
jag3.configEncoderCodesPerRev(100);
jag3.enableControl();