Attitudes in one part of life tend to carry over to others. - Wetzel [more]
 Chief Delphi Limiting output speed
 portal register members calendar search Today's Posts Mark Forums Read FAQ rules

#1
03-20-2018, 12:25 PM
 WiseOwl Registered User FRC #3586 (Caveman Robotics) Team Role: Coach Join Date: Feb 2018 Rookie Year: 2012 Location: Reardan, WA Posts: 7
Limiting output speed

How do you limit the output speed on a motor via programming in LabVIEW. I understand how to do it in autonomous but not during teleop.
#2
03-20-2018, 12:37 PM
 Ether systems engineer (retired) no team Join Date: Nov 2009 Rookie Year: 1969 Location: US Posts: 9,126
Re: Limiting output speed

Quote:
 Originally Posted by WiseOwl How do you limit the output speed on a motor via programming in LabVIEW. I understand how to do it in autonomous but not during teleop.
I will assume what you actually want to limit is not necessarily the speed of the motor, but rather the speed of whatever the motor is powering.

If you want to limit the speed under all circumstances, then the best way is to change the gearing.

This will not only limit the speed, it will also give you better control of small movements.

It would help if you would provide answers to some key questions:

- why do you want to limit speed? i.e. what is the problem you are trying to solve?

- what motor controller are you using?

- is there an encoder or other speed sensing device?

Last edited by Ether : 03-20-2018 at 12:42 PM.
#3
03-20-2018, 12:39 PM
 Landonh12 Hail State AKA: Landon Haugh FRC #0364 (Team Fusion) Team Role: College Student Join Date: Jan 2012 Rookie Year: 2012 Location: Gulfport, MS Posts: 325
Re: Limiting output speed

Quote:
 Originally Posted by WiseOwl How do you limit the output speed on a motor via programming in LabVIEW. I understand how to do it in autonomous but not during teleop.
In teleop, if you are controlling a motor with a joystick, you can multiply the output of the joystick by a decimal number (i.e. 0.8 if you want 80% power), then wire the output of the multiplication to the motor.
__________________
Team Fusion 364 - Driver/Programmer 2012-2015; Controls Mentor 2016-Present
#4
03-20-2018, 12:39 PM
 Mark McLeod Just Itinerant AKA: Hey dad...Father...MARK FRC #0358 (Robotic Eagles) Team Role: Engineer Join Date: Mar 2003 Rookie Year: 2001 Location: Hauppauge, Long Island, NY Posts: 9,702
Re: Limiting output speed

It depends on how you want the system to respond, but a couple of simple ways are:
• Multiply the controlling joystick axis by some percentage of max speed, e.g., joystick * .8 would give you a max of 80% of full speed.
• If you just want a cutoff instead you can use "In Range and Coerce" to cap the max/min values.
__________________
We are what we repeatedly do. Excellence, then, is not an act, but a habit. -Aristotle
#5
03-20-2018, 12:57 PM
 WiseOwl Registered User FRC #3586 (Caveman Robotics) Team Role: Coach Join Date: Feb 2018 Rookie Year: 2012 Location: Reardan, WA Posts: 7
Re: Limiting output speed

We want to essentially make our drive motors only at about 80% power instead of 100%. Where in the code do I input the decimals?
#6
03-20-2018, 12:59 PM
 Landonh12 Hail State AKA: Landon Haugh FRC #0364 (Team Fusion) Team Role: College Student Join Date: Jan 2012 Rookie Year: 2012 Location: Gulfport, MS Posts: 325
Re: Limiting output speed

Quote:
 Originally Posted by WiseOwl We want to essentially make our drive motors only at about 80% power instead of 100%. Where in the code do I input the decimals?
Right click and open the math (numeric, i think) palette. Pull in a multiplication block into your code. Wire your joystick output into one of the inputs and wire a 0.8 constant into the other input. Wire the output to your Motor Set vi.
__________________
Team Fusion 364 - Driver/Programmer 2012-2015; Controls Mentor 2016-Present
#7
03-20-2018, 01:54 PM
 Ether systems engineer (retired) no team Join Date: Nov 2009 Rookie Year: 1969 Location: US Posts: 9,126
Re: Limiting output speed

Quote:
 Originally Posted by WiseOwl We want to essentially make our drive motors only at about 80% power instead of 100%.
Why do you want to do that ? What problem are you trying to solve ?

Quote:
 Originally Posted by WiseOwl Where in the code do I input the decimals?
Before you implement that, do you understand the downside to doing it that way ?

Last edited by Ether : 03-20-2018 at 02:19 PM.
#8
03-20-2018, 05:16 PM
 JeffB Registered User FRC #5052 (RoboLobos) Team Role: Mentor Join Date: Apr 2015 Rookie Year: 2014 Location: Austin Posts: 318
Re: Limiting output speed

Ether's questions are important to answer before moving forward.

Also, if you do implement the logic, I'd suggest using Ctrl+Space to open Quick Drop and type what you want into that box rather than chasing it down in the palettes.
__________________

Any thoughts I share are meant to be my interpretation of rules/events/intents. They shouldn't be viewed as anything even approaching an official viewpoint.
#9
03-20-2018, 05:34 PM
 Mark McLeod Just Itinerant AKA: Hey dad...Father...MARK FRC #0358 (Robotic Eagles) Team Role: Engineer Join Date: Mar 2003 Rookie Year: 2001 Location: Hauppauge, Long Island, NY Posts: 9,702
Re: Limiting output speed

For a drivetrain, permanently reducing your available power can have effects you may not expect, such as making it difficult to turn.
__________________
We are what we repeatedly do. Excellence, then, is not an act, but a habit. -Aristotle
#10
03-20-2018, 05:39 PM
 WiseOwl Registered User FRC #3586 (Caveman Robotics) Team Role: Coach Join Date: Feb 2018 Rookie Year: 2012 Location: Reardan, WA Posts: 7
Re: Limiting output speed

I don't want to messing with our turning ability but our driver just thinks it's a bit to jumpy/touchy.

We are using the Logitech Gamepad controller.
#11
03-20-2018, 05:44 PM
 Mark McLeod Just Itinerant AKA: Hey dad...Father...MARK FRC #0358 (Robotic Eagles) Team Role: Engineer Join Date: Mar 2003 Rookie Year: 2001 Location: Hauppauge, Long Island, NY Posts: 9,702
Re: Limiting output speed

You might just want to play with applying a different power curve.
One that ramps up more slowly to give better control at the low end, except at the top end where it's more rapid.
A variation would be to start the power curve at a higher value (like .3) because it takes about .4 or so to just get the robot moving and that would maximize responsiveness in the joystick.

What kind of drivetrain?
- standard KOP?
- KOP gearing?
- KOP wheels?

One mechanical option is to change the gear ratio to give more torque (easier to turn) and less top speed.
If it's a KOP gearbox, AndyMark has all the gearing variations.
__________________
We are what we repeatedly do. Excellence, then, is not an act, but a habit. -Aristotle

Last edited by Mark McLeod : 03-20-2018 at 05:51 PM.
#12
03-20-2018, 05:48 PM
 cpapplefamily Registered User FRC #3244 (Granite City Gearheads) Team Role: Mentor Join Date: May 2015 Rookie Year: 2015 Location: Minnesota Posts: 755
Re: Limiting output speed

You could program some acceleration code.

If TalonSRX are used set the voltage ramp rate or what ever its called now. I don't have that in front of me right now
__________________
It makes sense in my mind.

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     User Announcements FIRST     General Forum     Rumor Mill     Career     Robot Showcase Technical     Technical Discussion     Robotics Education and Curriculum     Motors     Electrical         CAN     Programming         NI LabVIEW         C/C++         Java         Python     Sensors     Control System     Pneumatics     Kit & Additional Hardware     CAD         Inventor         SolidWorks         Creo     IT / Communications         3D Animation and Competition         Website Design/Showcase         Videography and Photography         Computer Graphics Competition     Awards         Chairman's Award     Rules/Strategy         Scouting     Team Organization         Fundraising         Starting New Teams         Finding A Team         College Teams     Championship Event     Regional Competitions     District Events     Off-Season Events     Thanks and/or Congrats     FRC Game Design     OCCRA         OCCRA Q&A Other     Chit-Chat         Games/Trivia         Fantasy FIRST     Car Nack's Corner     College & University Education     Dean Kamen's Inventions     FIRST-related Organizations         The Blue Alliance     FIRST In the News...     FIRST Lego League     FIRST Tech Challenge     VEX     Televised Robotics     Math and Science     NASA Discussion ChiefDelphi.com Website     CD Forum Support     Extra Discussion

All times are GMT -5. The time now is 09:19 PM.

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

 -- English (12 hour) -- English (24 hour) Contact Us - Chief Delphi - Rules - Archive - Top