|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
Re: Acceleration based on position
Quote:
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? |
|
#3
|
||||
|
||||
|
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.
|
|
#4
|
|||
|
|||
|
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)? |
|
#5
|
||||
|
||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|