View Single Post
  #5   Spotlight this post!  
Unread 08-11-2010, 11:52
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Joystick motion to CAN connected jaguar

Quote:
Originally Posted by sam_who View Post
I believe the joystick is okay. Full range of joystick motion results in a joystick output swing between one and minus one.

Maybe I don't understand what value Set() is expecting? I was under the impression Set() was expecting a value between one and minus one.

myJag.Set (some value between one and minus one);

I'm using a 360 count encoder mounted on a toughbox. I think the ratio for a toughbox is 12.75:1. A CIM motor is driving the toughbox. The CIM is being powered by a jag. The encoder is being fed into that jag.

How can I confirm that I am in speed mode rather than voltage mode?

I'm using

myJag ( 4, CANJaguar::kSpeed );
[EDIT]
I forgot you were using 2CAN, and so the BDC-COMM isn't as practical.
I think I also misunderstood the problem here. The issue you're having is that the Jaguar is going full speed when you're only sending it a value of 0.25? Check your encoder lines configuration to make sure you haven't said something like 10,000 counts per revolution. Also, double-check that it is RPM, not revolutions per second.
[/EDIT]

Yes, it does sound like your joystick is fine.

Have you gotten voltage mode working over CAN?
If not, let's work on that first. (It requires less configuration, and is -1 to 1 as you expected)

If you have voltage mode working:
In speed mode, the Jaguar expects an RPM value. On a toughbox with a CIM, that would be 4500 RPM / 12.75, about 350 RPM. Don't forget to set the PID and number of lines on the encoder. These settings are volatile; they disappear when the Jaguar loses power, and need to be loaded again.
Have you updated the firmware on your Jaguars?
Have you sent "speed mode enable"?

You asked about how to tell if you are in speed mode? There is a CAN "get control mode" command, but it wasn't implemented last time I checked. Maybe it will be in the next firmware update.
__________________
-- Marshal Horn

Last edited by kamocat : 08-11-2010 at 12:15.
Reply With Quote