View Full Version : CANJaguar position problems
03-02-2012, 04:16 PM
we are trying to use the position setting for out CAN jaguars, but whenever we run it, it is either unresponsive, or does not stop.
As it runs and is not moving, the jaguar flashes red.
We use the setX() function to move the motor to certain positions, but it does not seem to do what we want it to do.
if anyone can clarify what exactly position control setX() does, and how to properly use position control for a CAN jaguar that would be great
03-02-2012, 09:51 PM
We use speed mode for our canbus but it should be similar. First, make sure you change to position mode and also set position reference. Then enable control and to set them use the Set() function. I do not know what the SetX() does.
03-17-2012, 07:36 PM
I'd be happy to try to help. I do have a question though: What is your position reference? You need to have an encoder or a potentiometer on it otherwise the position control would do nothing.
The SetX() method on the CAN Jaguar sets the position in terms of rotations of the motor, from where you started.
A few things to note to get it to work:
- In order for the Position mode to work on your Jaguar, you need to set the jaguar to say how many lines the encoder has (assuming it's an encoder).
- You need to set up a PID loop on the jaguar in order for it to do anything.
As an example, here's our turret setup (using position mode). It's in C++, and from your use of SetX() I assume you're in Java. But you'll see still what it's doing.
Hopefully this was sorta helpful. I'd be happy to help further. We just fought for a week on our position controlled turret, so I know how to make it work.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.