View Single Post
  #13   Spotlight this post!  
Unread 12-02-2010, 12:34
darrellt darrellt is offline
Registered User
FRC #2635
 
Join Date: Oct 2009
Location: Lake Oswego, Oregon
Posts: 9
darrellt is an unknown quantity at this point
Re: Problem using encoders on Jaguar

Have you made any progress on this?

We succeeded last night in getting something sort-of working with a slightly modified version of the C++ CANJaguarPositionControlExample from FirstForge (you have to sign in and download from the FirstForge SVN server to get it).

We modified the code to select the encoder, instead of the potentiometer, as the position sensor. We also changed the CAN channel to match one of the Jaguars on our robot. We were able to make the motor move, but we have not successfully adjusted the PID constants to stabilize the position control.

We are using a Black Jaguar with the serial port from the cRIO. We are using standard CIM motors and the AndyMark gearbox with the standard encoders installed (we had to modify/shave the standard mounting plastic hardware to fit around the motor -- if you force it, the encoder will bind and you won't get any signals from the encoder).

A few things that we learned:
+ it is essential to update the Jaguars to the latest version of the firmware (we are using version 87) from the www.Luminarymicro.com/jaguar site. This allowed us to use the BDC-COMM application to control the CAN network of Jaguars directly (we are using a http://www.iogear.com/product/GUC232A/ USB --> Serial port device to bridge between our laptop USB port and the serial port into the Black Jaguar).
+ The 3 PID constants all default to 0.0 -- nothing will happen with these at 0.0.
+ The cRIO has to have it's firmware updated and configured to include the black Jaguar code. Get the code here: (http://firstforge.wpi.edu/sf/frs/do/...gbridgeplugin).
The update/config instructions are here: http://firstforge.wpi.edu/sf/projects/canjaguar
+ To effectively run this example, also run the "Position Control Tuning Dashboard" project from the "CANJaguar Dashboards" folder from the FirstForge SVN server. This allows you to modify the PID contstants & visualize the results. You have to configure this dashboard as your robot control station dashboard, either by installing it on the drive station or setting it up as a "Remote Dashboard" from the Driver Station Setup tab.

We would very much like to get this working with LabVIEW, but as yet we keep getting -52007 errors when we try to use the equivalent LabVIEW version of the position control example (again from FirstForge).

Anyone succeeding with LabVIEW?
Reply With Quote