Go to Post ...can I play a computer game during a competition, while i'm suppposed to operate the robot? - Gal Longin [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 29-01-2011, 12:52
computerish computerish is offline
Registered User
FRC #0619
 
Join Date: Nov 2008
Location: va
Posts: 45
computerish is an unknown quantity at this point
Jaguars do not work except in percent vbus mode

We are attempting to use closed-loop encoder control with our Jaguars this year. When we hook our CAN network up to a computer, we can use BDC-COMM to set output values in RPM and the motors run correctly.

When we try to control the Jaguars from Java, we can't get it to work. We can control the Jaguars in the percent voltage mode just fine (that's the -1 to 1 output mode). When we switch to voltage, speed, or current mode, they don't work. The motors don't move, the light on the Jaguar stays solid yellow, and the voltage output according to the code is 0.

Our code is in teleopPeriodic() and looks like this:

Code:
try{
  leftMotor.changeControlMode(CANJaguar.ControlMode.kVoltage);
  leftMotor.setX(6);
  // a bunch of printlns for debugging
}catch(CANTimeoutException ex){
  ex.printStackTrace();
}
No exceptions, nothing but yellow lights on the Jaguar. Nothing.

Any ideas?
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:30.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi