Go to Post Everyone together now, say 'thank you'. - ebarker [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 12-02-2009, 09:32
seanl's Avatar
seanl seanl is offline
"The Everything person"
FRC #0867 (Absolute Value)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Arcadia, CA
Posts: 267
seanl will become famous soon enoughseanl will become famous soon enough
how do I ramp up the wheels slowly

I am trying to create some code in Labview so i can ramp up and ramp down the speed of the wheels but i don't know where to start. like to slowly go from the value of 0 to the max speed of -1. i tried to do this with a while loop but failed because i could not find a variable such as x. any suggestions?
__________________
, Sean

TEAM 867
-electrical
-pneumatics
-programming



2008 Autodesk Visualization Grand Prize Winner
  #2   Spotlight this post!  
Unread 12-02-2009, 09:34
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: how do I ramp up the wheels slowly

http://thinktank.wpi.edu/article/140

Hopefully this document will help.
  #3   Spotlight this post!  
Unread 12-02-2009, 10:02
seanl's Avatar
seanl seanl is offline
"The Everything person"
FRC #0867 (Absolute Value)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Arcadia, CA
Posts: 267
seanl will become famous soon enoughseanl will become famous soon enough
Re: how do I ramp up the wheels slowly

this is for the drive of a motor without the use of a joystick, i am using a button to drive the whole robot forward but i need it to ramp up. but thanks for the information on making the joysticks smoother.
__________________
, Sean

TEAM 867
-electrical
-pneumatics
-programming



2008 Autodesk Visualization Grand Prize Winner
  #4   Spotlight this post!  
Unread 12-02-2009, 10:22
Russ Beavis Russ Beavis is offline
Registered User
no team
 
Join Date: Nov 2005
Location: Manchester, NH - DEKA R&D Corp.
Posts: 341
Russ Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond repute
Re: how do I ramp up the wheels slowly

I haven't read Eric's article but the use of filters isn't limited to floating point joystick position readings. You can also take a boolean value, convert it to a floating point 1 or 0 ("boolean to 1:0") and then pass the value through a point-by-point or similar lowpass filter (this is probably one of Eric's suggestions). The filter cut-off frequency would dictate the response time.

You could also pass the 1:0 value through a leaky integrator (if 1 then add a little bit (clamp to max value), else decrement a little bit (clamp to a min value)).

Russ
  #5   Spotlight this post!  
Unread 12-02-2009, 10:40
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: how do I ramp up the wheels slowly

I've attached a picture of a leaky integrator.

I used the boolean select to convert a boolean to one of two floating point values - in this case, how much to add or subtract each time the code is executed.

I used a feedback node (the arrow) to remember the last value.

I used the coerce and in range to limit the max forward or reverse speed.
Attached Thumbnails
Click image for larger version

Name:	button-ramp.JPG
Views:	159
Size:	13.3 KB
ID:	7411  
  #6   Spotlight this post!  
Unread 12-02-2009, 17:00
seanl's Avatar
seanl seanl is offline
"The Everything person"
FRC #0867 (Absolute Value)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Arcadia, CA
Posts: 267
seanl will become famous soon enoughseanl will become famous soon enough
Re: how do I ramp up the wheels slowly

Eric, i tried what you stated in your paper and it looks like it could work, can you or someone else check and see if it is right. i put a constant of 1 instead of the "input from joystick". theoretically this should allow the robot to slowly back up.

P.S. the code is attached to this post.
Attached Files
File Type: vi Basic Robot Main(ramping).vi (83.7 KB, 46 views)
__________________
, Sean

TEAM 867
-electrical
-pneumatics
-programming



2008 Autodesk Visualization Grand Prize Winner
  #7   Spotlight this post!  
Unread 12-02-2009, 18:57
dmcguire3006 dmcguire3006 is offline
Registered User
FRC #3006 (West High FIRST Robotics)
Team Role: Teacher
 
Join Date: Dec 2008
Rookie Year: 2009
Location: Salt Lake City, UT
Posts: 21
dmcguire3006 is on a distinguished road
Re: how do I ramp up the wheels slowly

Use a PID Controller:
http://en.wikipedia.org/wiki/PID_controller

There provided as a VI in Labview.
  #8   Spotlight this post!  
Unread 12-02-2009, 19:11
seanl's Avatar
seanl seanl is offline
"The Everything person"
FRC #0867 (Absolute Value)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Arcadia, CA
Posts: 267
seanl will become famous soon enoughseanl will become famous soon enough
Re: how do I ramp up the wheels slowly

Quote:
Originally Posted by dmcguire3006 View Post
Use a PID Controller:
http://en.wikipedia.org/wiki/PID_controller

There provided as a VI in Labview.
are there any documentation on using a PID controller being that i am a novice at labview programming. And is there an advantage to using a PID controller over the method stated above?
__________________
, Sean

TEAM 867
-electrical
-pneumatics
-programming



2008 Autodesk Visualization Grand Prize Winner
  #9   Spotlight this post!  
Unread 12-02-2009, 19:26
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: how do I ramp up the wheels slowly

Quote:
Originally Posted by seanl View Post
are there any documentation on using a PID controller being that i am a novice at labview programming. And is there an advantage to using a PID controller over the method stated above?
PID controllers are very powerful, but in this case they are probably over-kill.

I would recommend using one here in place of a leaky integrator only for the learning experience - you will find it very helpful in the future. That being said, leaky integrator is probably the way to go here if you are aiming for simple.
  #10   Spotlight this post!  
Unread 13-02-2009, 00:13
chmp09 chmp09 is offline
Registered User
AKA: Marc Pulte
FRC #1702 (Robocubs)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Troy, Michigan
Posts: 25
chmp09 is a jewel in the roughchmp09 is a jewel in the roughchmp09 is a jewel in the rough
Re: how do I ramp up the wheels slowly

Quote:
Originally Posted by seanl View Post
are there any documentation on using a PID controller being that i am a novice at labview programming. And is there an advantage to using a PID controller over the method stated above?
I use a lead-lag PID controller to control our ramping, and it works really well. It will take some tweaking, but it is not that difficult.

For basics, just set you [EDIT] output range to -1 and 1. Set you gain to 1. Set your lag time to whatever you find is best (ours is .2); this changes how fast it ramps. Set lead time to zero. Set dt to -1(sets it to milliseconds). [/EDIT] You may want to tell it to reinitialize at values of zero because it will also ramp down.

The code attached was made for ramp code on a tank drive robot.
Attached Files
File Type: vi Ramp Motors.vi (27.2 KB, 44 views)

Last edited by chmp09 : 13-02-2009 at 08:19.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you make your compressorless system work, when all valves "bleed" air slowly? kmcclary Pneumatics 9 17-02-2007 21:01
Q&A Discuss: How long is the bump from the ramp to the top? CD47-Bot Extra Discussion 1 11-01-2003 09:48
How long is the bump from the ramp to the top? Tton Rules/Strategy 1 09-01-2003 18:26
How will the bins face on the ramp? Jacqui Sutton Rules/Strategy 1 07-01-2003 08:48
How much force to push the ramp? archiver 2001 1 23-06-2002 22:44


All times are GMT -5. The time now is 21:49.

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