Go to Post Thank you NASA (except for Dave, his tormenting hints make us even) - Mike Schroeder [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-02-2014, 04:00
cobble123 cobble123 is offline
Registered User
FRC #3466
 
Join Date: Feb 2014
Location: Massachusetts
Posts: 7
cobble123 is an unknown quantity at this point
How do you make a trim control?

Hi my team uses labview for programming and I'd like to know how to make a trimming control with the z axis of a joystick(which is the slider that has + and - on it). I'm wondering if there's a way to be able to either change the motor values with that or the joystick values. Please and thank you.
  #2   Spotlight this post!  
Unread 05-02-2014, 06:05
sasha831 sasha831 is offline
Sasha
FRC #4529 (AI Robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Australia
Posts: 35
sasha831 is an unknown quantity at this point
Re: How do you make a trim control?

Hello,

Are you attempting to limit the motor power through the throttle, or control the motor power entirely?

For the first one, since we get a value from -1 to 1, we need to scale it, by adding 1 and dividing by 2. Then Just multiply this value by the value you were sending into the motor controller.

For Controlling the motor entirely off the throttle, just feed in the value for 2-way control, or scale it as specified above for more precise 1-way control.

Hoped That Helped

Sasha
__________________
Theory is when you know everything but nothing works. Practice is everything works but no one knows why. On our Team, theory and practice are combined: nothing works and no one knows why!
  #3   Spotlight this post!  
Unread 05-02-2014, 06:15
cobble123 cobble123 is offline
Registered User
FRC #3466
 
Join Date: Feb 2014
Location: Massachusetts
Posts: 7
cobble123 is an unknown quantity at this point
Re: How do you make a trim control?

I'm trying to limit the motors power with the throttle.
  #4   Spotlight this post!  
Unread 05-02-2014, 09:09
Chadfrom308's Avatar
Chadfrom308 Chadfrom308 is offline
Slave to the bot
AKA: Chad Krause
FRC #0308 (The Monsters)
Team Role: Driver
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Novi
Posts: 272
Chadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to behold
Re: How do you make a trim control?

You would have to take the drive stick value and either scale it to the Z slider value from the joystick, or limit it at the joystick.

If you want to scale it (like if the Z slider was at 70% and the joystick was at 90%, the output would be 63%), take the joystick input and multiply it by the Z input.

If you want to limit it (like if the Z slider was at 70% and the joystick was at 90%, the output would be 70%), take the joystick input and do a greater than block and wire the boolean output to the boolean input on a select function block. After that, route the Z axis into the true input and the joystick axis to the false input

After you have either of those, you have to add a couple of logic statements for going in reverse (Because -z axis * - joystick axis = positive number, driving the robot in the opposite direction)
  #5   Spotlight this post!  
Unread 05-02-2014, 09:48
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: How do you make a trim control?

Quote:
Originally Posted by cobble123 View Post
I'm trying to limit the motors power with the throttle.
Is this for your drivetrain motors?


  #6   Spotlight this post!  
Unread 05-02-2014, 09:55
cobble123 cobble123 is offline
Registered User
FRC #3466
 
Join Date: Feb 2014
Location: Massachusetts
Posts: 7
cobble123 is an unknown quantity at this point
Re: How do you make a trim control?

Quote:
Originally Posted by Ether View Post
Is this for your drivetrain motors?


Yes this is for my drive chain motors
  #7   Spotlight this post!  
Unread 05-02-2014, 10:04
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: How do you make a trim control?

Quote:
Originally Posted by cobble123 View Post
Yes this is for my drive chain motors
Why do you want to limit the throttle? (I ask because there may be better ways to accomplish what you want).


  #8   Spotlight this post!  
Unread 05-02-2014, 10:08
cobble123 cobble123 is offline
Registered User
FRC #3466
 
Join Date: Feb 2014
Location: Massachusetts
Posts: 7
cobble123 is an unknown quantity at this point
Re: How do you make a trim control?

Quote:
Originally Posted by Ether View Post
Why do you want to limit the throttle? (I ask because there may be better ways to accomplish what you want).


I just want to limit the power each motor gives out without changing the code each time one motor is more powerful than the other. So if I add in a control to the power of the motor we can fine tune it during competition more easily.
  #9   Spotlight this post!  
Unread 05-02-2014, 10:21
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: How do you make a trim control?

Quote:
Originally Posted by cobble123 View Post
I just want to limit the power each motor gives out without changing the code each time one motor is more powerful than the other. So if I add in a control to the power of the motor we can fine tune it during competition more easily.
What kind of drivetrain do you have?


  #10   Spotlight this post!  
Unread 05-02-2014, 10:26
cobble123 cobble123 is offline
Registered User
FRC #3466
 
Join Date: Feb 2014
Location: Massachusetts
Posts: 7
cobble123 is an unknown quantity at this point
Re: How do you make a trim control?

Quote:
Originally Posted by Ether View Post
What kind of drivetrain do you have?


We have 2 motors and belts
  #11   Spotlight this post!  
Unread 05-02-2014, 11:01
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: How do you make a trim control?

Quote:
Originally Posted by cobble123 View Post
We have 2 motors and belts
One motor on each side?

Or 2 motors per gearbox, with 1 gearbox on each side?

How many wheels? What kind of wheels? What is the wheel diameter? What is the gearbox ratio?

What diameter is the driving pulley and the driven pulley?



Last edited by Ether : 05-02-2014 at 11:03.
  #12   Spotlight this post!  
Unread 05-02-2014, 11:11
cobble123 cobble123 is offline
Registered User
FRC #3466
 
Join Date: Feb 2014
Location: Massachusetts
Posts: 7
cobble123 is an unknown quantity at this point
Re: How do you make a trim control?

Quote:
Originally Posted by Ether View Post
One motor on each side?

Or 2 motors per gearbox, with 1 gearbox on each side?

How many wheels? What kind of wheels? What is the wheel diameter? What is the gearbox ratio?

What diameter is the driving pulley and the driven pulley?


1 motor per gearbox and 6 wheels, and we're using the wheels that came in the kit of parts. Everything else I don't know off the top of my head.
  #13   Spotlight this post!  
Unread 05-02-2014, 12:18
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: How do you make a trim control?

Quote:
Originally Posted by cobble123 View Post
1 motor per gearbox and 6 wheels, and we're using the wheels that came in the kit of parts. Everything else I don't know off the top of my head.
If you're using only 2 motors to power your drivetrain, you might want to find the answers to the other questions and post them here.


  #14   Spotlight this post!  
Unread 05-02-2014, 12:31
feverittm's Avatar
feverittm feverittm is offline
Registered User
FRC #0997 (Spartans)
Team Role: Mentor
 
Join Date: Apr 2010
Rookie Year: 2010
Location: Corvallis, OR
Posts: 124
feverittm will become famous soon enoughfeverittm will become famous soon enough
Re: How do you make a trim control?

I guess the quick way to answer these questions would be to ask: "Are you using a standard 2014 Kit-of-Parts Drivetrain?"
__________________
Floyd Moore
Mentor Electrical and Pneumatics
Team 997 - Spartan Robotics
Corvallis High School, Corvallis Oregon
  #15   Spotlight this post!  
Unread 05-02-2014, 14:27
cobble123 cobble123 is offline
Registered User
FRC #3466
 
Join Date: Feb 2014
Location: Massachusetts
Posts: 7
cobble123 is an unknown quantity at this point
Re: How do you make a trim control?

Quote:
Originally Posted by feverittm View Post
I guess the quick way to answer these questions would be to ask: "Are you using a standard 2014 Kit-of-Parts Drivetrain?"
Yes my team is using the standard 2014 drivetrain
Closed Thread


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 02:47.

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