OCCRA
Go to Post Attitudes in one part of life tend to carry over to others. - Wetzel [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media  
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-20-2018, 12:25 PM
WiseOwl WiseOwl is offline
Registered User
FRC #3586 (Caveman Robotics)
Team Role: Coach
 
Join Date: Feb 2018
Rookie Year: 2012
Location: Reardan, WA
Posts: 7
WiseOwl is an unknown quantity at this point
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-20-2018, 12:37 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 9,126
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Limiting output speed

Quote:
Originally Posted by WiseOwl View Post
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 03-20-2018, 12:39 PM
Landonh12's Avatar
Landonh12 Landonh12 is offline
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
Landonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud of
Re: Limiting output speed

Quote:
Originally Posted by WiseOwl View Post
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
Reply With Quote
  #4   Spotlight this post!  
Unread 03-20-2018, 12:39 PM
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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
Reply With Quote
  #5   Spotlight this post!  
Unread 03-20-2018, 12:57 PM
WiseOwl WiseOwl is offline
Registered User
FRC #3586 (Caveman Robotics)
Team Role: Coach
 
Join Date: Feb 2018
Rookie Year: 2012
Location: Reardan, WA
Posts: 7
WiseOwl is an unknown quantity at this point
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?
Reply With Quote
  #6   Spotlight this post!  
Unread 03-20-2018, 12:59 PM
Landonh12's Avatar
Landonh12 Landonh12 is offline
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
Landonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud of
Re: Limiting output speed

Quote:
Originally Posted by WiseOwl View Post
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
Reply With Quote
  #7   Spotlight this post!  
Unread 03-20-2018, 01:54 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 9,126
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Limiting output speed


Quote:
Originally Posted by WiseOwl View Post
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 View Post
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 03-20-2018, 05:16 PM
JeffB JeffB is offline
Registered User
FRC #5052 (RoboLobos)
Team Role: Mentor
 
Join Date: Apr 2015
Rookie Year: 2014
Location: Austin
Posts: 318
JeffB has a reputation beyond reputeJeffB has a reputation beyond reputeJeffB has a reputation beyond reputeJeffB has a reputation beyond reputeJeffB has a reputation beyond reputeJeffB has a reputation beyond reputeJeffB has a reputation beyond reputeJeffB has a reputation beyond reputeJeffB has a reputation beyond reputeJeffB has a reputation beyond reputeJeffB has a reputation beyond repute
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.
Reply With Quote
  #9   Spotlight this post!  
Unread 03-20-2018, 05:34 PM
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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
Reply With Quote
  #10   Spotlight this post!  
Unread 03-20-2018, 05:39 PM
WiseOwl WiseOwl is offline
Registered User
FRC #3586 (Caveman Robotics)
Team Role: Coach
 
Join Date: Feb 2018
Rookie Year: 2012
Location: Reardan, WA
Posts: 7
WiseOwl is an unknown quantity at this point
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.
Reply With Quote
  #11   Spotlight this post!  
Unread 03-20-2018, 05:44 PM
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
Reply With Quote
  #12   Spotlight this post!  
Unread 03-20-2018, 05:48 PM
cpapplefamily's Avatar
cpapplefamily cpapplefamily is offline
Registered User
FRC #3244 (Granite City Gearheads)
Team Role: Mentor
 
Join Date: May 2015
Rookie Year: 2015
Location: Minnesota
Posts: 755
cpapplefamily is a splendid one to beholdcpapplefamily is a splendid one to beholdcpapplefamily is a splendid one to beholdcpapplefamily is a splendid one to beholdcpapplefamily is a splendid one to beholdcpapplefamily is a splendid one to beholdcpapplefamily is a splendid one to behold
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.



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 09:19 PM.

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


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi