Go to Post "Its never too late to be inspired" - Alex Golec [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-14-2012, 09:08 PM
Nymph808's Avatar
Nymph808 Nymph808 is offline
Registered User
FRC #2443
 
Join Date: Jan 2011
Location: Maui
Posts: 11
Nymph808 is an unknown quantity at this point
Programming the 393 VEX Motor in Java

So we're adding a VEX 393 motor to run a camera mount, and I was wondering how to program the actual motor. We've connected the motor to the speed controller it came with and from there, it connects to a PWM slot on the side car. I've been looking at the Java documentations under the SpeedController interface, but the only classes it implements are the Jaguar and Victor classes. I don't know if the VEX motor uses one of those classes, or if it uses it's own separate class. Any ideas?
Reply With Quote
  #2   Spotlight this post!  
Unread 04-11-2012, 03:01 PM
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Re: Programming the 393 VEX Motor in Java

I am pretty sure that almost any time you hook up any motor to a vex or jag you will use the victor class in java because when you use the victor class it wont differentiate what is wired to it. all it will do is send an output of whatever you set it to in the code.
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #3   Spotlight this post!  
Unread 04-12-2012, 01:17 PM
sand500 sand500 is offline
Registered User
FRC #3540 (Wildcat Robotics)
 
Join Date: Jan 2011
Rookie Year: 2011
Location: United States
Posts: 81
sand500 is an unknown quantity at this point
Re: Programming the 393 VEX Motor in Java

You might want to try the servo class. I believe we got the motor to turn with the servo class. But we were also using the vex speed controller.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-12-2012, 03:27 PM
nyaculak nyaculak is offline
Registered User
FRC #0053 (Area 53)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Maryland
Posts: 28
nyaculak will become famous soon enough
Re: Programming the 393 VEX Motor in Java

I believe you can either control it with the Victor or Jaguar class. I believe it is also possible to control it by creating an instance of the PWM class.
__________________
2013 MUC DC 3rd Place, FRC DC Regional, FRC Chesapeake Regional
2012 FRC DC Regional, FRC Chesapeake Regional
ERHS Robotics Club
- FRC Team 53 "Area 53"
www.erhsroboticsclub.org
Reply With Quote
  #5   Spotlight this post!  
Unread 04-12-2012, 03:38 PM
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 678
RufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud of
Re: Programming the 393 VEX Motor in Java

Quote:
Originally Posted by nyaculak View Post
I believe you can either control it with the Victor or Jaguar class. I believe it is also possible to control it by creating an instance of the PWM class.
The Victor class would be correct as the VEX controller PWM timings match those of the Victor. The Jaguar uses different timings. You could certainly use the PWM class and specify the timings yourself but it would be extra work to do so.
Reply With Quote
  #6   Spotlight this post!  
Unread 04-12-2012, 04:45 PM
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 7,823
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Quote:
Originally Posted by RufflesRidge View Post
The Victor class would be correct as the VEX controller PWM timings match those of the Victor. The Jaguar uses different timings. You could certainly use the PWM class and specify the timings yourself but it would be extra work to do so.

The update rate for the victor in the control system is 100hz, which is beyond spec but works. However, I'd be hesitant to recommend it for the 393 without testing it. The servo class uses the more conservative 50hz.

Have you tried it?
Reply With Quote
  #7   Spotlight this post!  
Unread 04-12-2012, 04:56 PM
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 678
RufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud ofRufflesRidge has much to be proud of
Re: Programming the 393 VEX Motor in Java

Quote:
Originally Posted by Joe Ross View Post
Have you tried it?
I have, however I didn't do extensive testing to verify that I was actually seeing the free speed at max signal in either direction. The Servo class would certainly seem to be the safer choice.
Reply With Quote
Reply


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 01:41 AM.

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


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