Go to Post I don't fully buy into the 'we're all winners' concept. That is a broad statement that doesn't really say much. How did we become all winners? What did we do to become winners? Pay an expensive registration fee and participate in a robotic competition? - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 8 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 14-02-2011, 06:36
Triapod Triapod is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2005
Location: NJ
Posts: 28
Triapod is an unknown quantity at this point
Re: Acceleration based on position

If i'm following the math correctly...It's probably that +1 that makes the joystick send out a value other than 0 because in this case it will only be 0 if the joystick is all the way back.

You might want to try preset heights controlled by buttons. It seems that you'll need to hold the joystick at that position in order for the hight to remain there.

Last edited by Triapod : 14-02-2011 at 06:40.
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2011, 08:49
umangv620 umangv620 is offline
Programming Captain
AKA: Umang
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2008
Location: New Jersey
Posts: 80
umangv620 will become famous soon enoughumangv620 will become famous soon enough
Re: Acceleration based on position

Quote:
Originally Posted by Triapod View Post
If i'm following the math correctly...It's probably that +1 that makes the joystick send out a value other than 0 because in this case it will only be 0 if the joystick is all the way back.

You might want to try preset heights controlled by buttons. It seems that you'll need to hold the joystick at that position in order for the hight to remain there.
Thanks for clearing that up!

We still want joystick control of the elevator, but i wanted to use PID to slow down motor control as it hits the upper and lower limits (which I wanted to be recognized by a specific value from the encoder.

The elevator is controlled by axis 2. Lets say the upper limit is 1000 rotations, and the elevator starts at its bottom limit - 0. I want the motor to slow down as it reaches either of those two values so we don't overshoot and blow the motor. How should I go about doing that then?
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2011, 09:27
Jon236's Avatar
Jon236 Jon236 is offline
Registered User
AKA: Jon Mittelman
FRC #2648 (Infinite Loop)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Windsor, Maine
Posts: 741
Jon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond repute
Re: Acceleration based on position

You can use the joystick to select a value, only if you use a button to take a 'snapshot' of that value. That way, you will use that value as the new setpoint and the elevator will slow as it approaches it.
__________________
Jon Mittelman

Senior Judge Advisor New England & Israel 2014-2015
Infinite Loop Mentor 2011-2015
TechnoTicks Mentor 2000-2011
Championship Chairman's Award 2009 Team236 TechnoTicks
Judge 2010-2015 Championships
Senior Judge Advisor New England District Championship 2014-2015
Judge Advisor Tel Aviv Regional 2007-2015
Judge Advisor Pine Tree Regional 2013
Maine Regional Planning Committee
New England District Planning Committee
Lead Inspector Microsoft Tel Aviv Regional 2006-2008
Judge & Lead Inspector GM/Technion Tel Aviv Regional 2006
Judge UTC Hartford Regional 2006
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2011, 10:02
umangv620 umangv620 is offline
Programming Captain
AKA: Umang
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2008
Location: New Jersey
Posts: 80
umangv620 will become famous soon enoughumangv620 will become famous soon enough
Re: Acceleration based on position

While that might work, I want to be able to use the joystick to freely move the elevator for when we are hanging a tube in the middle peg or maybe for some other reason.

Could I have PID start slowing down the motor when it reaches 200 rotations close to either limit point? Or should I just use a bunch of case structures and comparisons to give the elevator different speeds based on its position? I've never used or heard of PID before, so I have no clue as to what it can or cant do.

oh, and for the second option above, is there a case structure that would let me run a set of code for a range of values (such as 0<n<200)?
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award
Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2011, 10:13
Jon236's Avatar
Jon236 Jon236 is offline
Registered User
AKA: Jon Mittelman
FRC #2648 (Infinite Loop)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Windsor, Maine
Posts: 741
Jon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond repute
Re: Acceleration based on position

PID control describes the means to control a process (elevator motion) by it's measured position (encoder) and your desired position (setpoint). You can use the PID code provided in Labview or the C++ or Java libraries, starting with only a Proportional constant.

So, you must choose a setpoint for the elevator to go to. If you are changing it with the joystick, then the elevator will simply go to that value.
__________________
Jon Mittelman

Senior Judge Advisor New England & Israel 2014-2015
Infinite Loop Mentor 2011-2015
TechnoTicks Mentor 2000-2011
Championship Chairman's Award 2009 Team236 TechnoTicks
Judge 2010-2015 Championships
Senior Judge Advisor New England District Championship 2014-2015
Judge Advisor Tel Aviv Regional 2007-2015
Judge Advisor Pine Tree Regional 2013
Maine Regional Planning Committee
New England District Planning Committee
Lead Inspector Microsoft Tel Aviv Regional 2006-2008
Judge & Lead Inspector GM/Technion Tel Aviv Regional 2006
Judge UTC Hartford Regional 2006
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:22.

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