Go to Post Looks like I'm late, but in the grand tradition of Chief Delphi, I'll butt in and beat the dead horse anyway! - PayneTrain [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2014, 19:34
LFRobotics's Avatar
LFRobotics LFRobotics is offline
Registered User
FRC #4623
 
Join Date: Jan 2014
Location: Little Falls, MN
Posts: 95
LFRobotics is on a distinguished road
Motor Speed Values

What is the max speed value I can give a motor?

Like is

Code:
motor.set(10);
any faster than

Code:
motor.set(1);
THANKS!
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2014, 19:41
matthewdenny's Avatar
matthewdenny matthewdenny is offline
Registered User
FRC #6054 (Dukes)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: United States
Posts: 311
matthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant futurematthewdenny has a brilliant future
No. The motor values go from -1 to 1. Giving it a value of 10 is either going I cause an error or be the same as 1.
Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2014, 19:57
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 434
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Motor Speed Values

Quote:
Originally Posted by LFRobotics View Post
What is the max speed value I can give a motor?
The set method calls the setSpeed method of the PWM class.

If you look at the source code of this class, you can see that any input is constrained to be between 1.0 to -1.0.

Code:
final void setSpeed(double speed) {
            // clamp speed to be in the range 1.0 >= speed >= -1.0
            if (speed < -1.0) {
                speed = -1.0;
            } else if (speed > 1.0) {
                speed = 1.0;
            }
...
1.0 and -1.0 don't directly correlate to an actual motor speed. They will just dump 100% battery voltage to the motor in the specified direction. The speed the motor will travel at under this condition is dependent on a number of factors like gearing, load, battery voltage, etc.
__________________
http://team2168.org

Last edited by otherguy : 15-02-2014 at 19:59. Reason: clarification
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2014, 22:56
LFRobotics's Avatar
LFRobotics LFRobotics is offline
Registered User
FRC #4623
 
Join Date: Jan 2014
Location: Little Falls, MN
Posts: 95
LFRobotics is on a distinguished road
Re: Motor Speed Values

Okay - THANKS!
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 12:42.

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