Go to Post Don't waste the opportunity because you were too focused on "winning" the championship. - Don Wright [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

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 20-06-2011, 21:24
Yppiz's Avatar
Yppiz Yppiz is offline
Registered User
FRC #1014 (Bad Robots)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 1776
Location: Dublin,OH
Posts: 33
Yppiz is an unknown quantity at this point
Exclamation VEX motors on a FRC robot

We are using a VEX motor module on our FRC robot for an off season competition. We are using Java and are unsure how to control the motor in our code.
A fast answer is greatly needed and appreciated!
__________________
My friend VICTOR has a JAGUAR and a 2CAN, and from his Lab'sVIEW he can CRIO grande. Do the puns have you VEXed? You're not the FIRST.
Reply With Quote
  #2   Spotlight this post!  
Unread 21-06-2011, 02:32
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,518
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Re: VEX motors on a FRC robot

I'm no expert, but to me it seems you would plug it in a PWM port on the Digital Sidecar and control it the same way you would a Victor.

This is assuming it is a 3-wire Vex motor.

One thing to note though is how much current can the digital sidecar source on the PWM power pins? The Vex motor is capable of pulling probably a couple Amps. You might want to do a little wiring and give it power directly from the fuse panel, and only take its signal line to the sidecar.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
Reply With Quote
  #3   Spotlight this post!  
Unread 21-06-2011, 08:10
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,080
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: VEX motors on a FRC robot

I assume you will be using either a 3-wire VEX motor or a 3-to-2 wire motor controller so that you can use the cRIO PWM outputs? If so, your code can simply call it a Victor and should work without issues (the PWM timing of 1ms reverse, 1.5ms neutral, and 2ms forward is exactly the same between Victors and 3-wire VEX motors/controllers). You would also want to make sure the 6V servo jumper is installed on the motors' PWM pin so that you can source enough current to your motor (up to ~3A is available - total - to PWM outputs connected to the 6V line, so multiple VEX motors at stall run the risk of blowing a fuse).

You can also get a 2-wire motor working, but would have to write custom code to control it from the solenoid breakout or 5V digital IO pin.

Keep in mind that VEX motors are spec'd at 7.2V nominally, but the cRIO can only provide 6V via PWM. If you use a 3-wire motor/controller, expect to see a slightly slower and less powerful motion as a result.

(Here is the digital sidecar document for reference).

Last edited by Jared Russell : 21-06-2011 at 08:13.
Reply With Quote
  #4   Spotlight this post!  
Unread 30-06-2011, 12:58
Egg 3141592654's Avatar
Egg 3141592654 Egg 3141592654 is offline
Now a mentor, always a student
FRC #0810 (Mechanical Bulls)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Long Island
Posts: 53
Egg 3141592654 is on a distinguished road
Re: VEX motors on a FRC robot

If you are using a speed controller on the motor, it isn't different than coding a regular FIRST motor. Firstly, you need to determine what speed controller it is (Victor or jag). Depending on which it is, the constructor will be something like
Code:
 /*speed controller type*/ motor = new /*speed controller type */(4,/*pwm number on sidecar*/);
/*during teleport period...*/
motor.setSpeed(*/a double less than 1*/);
Hope this helps a tad, ill try to respond, budpt im in germany right now and wifi is sketchy here...
__________________
"The answers to the book of life are not found in the back." Charlie Brown

Software Mentor - Team Apex Robotics 5803

Lead Programmer - Team 810 Mechanical Bulls '09-'11

Last edited by Egg 3141592654 : 30-06-2011 at 13:04. Reason: speed control name replaced with speed control type for clarity
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 13:04.

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