|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Labview velocity PID
thanks for the replies. the problem is that we dont want it just hold a position we want to be able to have control with a joystick thats why i thought it be based on power output versus encoder count. i know that for holding a position i can just use the output degree of the encoder as the setpoint.
i like the surgical tubing idea is a good idea it would slow down the force of the gravity on it it would just create the opposite problem coming back up but i think that it would be better having that continuous gradual force rather than the instantaneous force of the shift of gravity..... i actually really like that idea what do you guys think? i could use it for our first segment of the arm... we have 3 segments the first one stays down till we have a crate pickup with the 2nd segment then the 1st goes 90 degrees up and just stops and it would have an easier time going up with an upward force to help it out |
|
#2
|
||||
|
||||
|
Re: Labview velocity PID
Quote:
setpoint and processVariable are inputs to a PID, and the PID takes care of adjusting motor voltage to go to and hold the commanded setpoint. |
|
#3
|
|||
|
|||
|
Re: Labview velocity PID
that's what confuses me. because joystick output would give me a setpoint between +- 100, how does the encoder correspond to that. because if i gave it encoder value as the feedback wouldn't that make it think that the motors power was what ever the encoder value was which could be 0-infinity.
|
|
#4
|
|||||
|
|||||
|
Re: Labview velocity PID
You would just need to scale the joystick and the encoder so that they both map to the same range, and would have the same value when the arm was at the commanded position. If it's an arm with a limited range of motion, you might want to use something that provides an absolute measure of the arm angle such as a potentiometer or magnetic sensor, instead of a relative-position measurement such as a quadrature encoder.
|
|
#5
|
|||||
|
|||||
|
Re: Labview velocity PID
Here's an example of mapping a joystick to the range of a potentiometer.
This would force an arm to a particular setting of the potentiometer. In this case we have a pot with a minimum value of 1.17v when the arm joint is in the lowest position. The pot has a maximum value of 3.9v when the arm is in the highest position. (You never want to run your pot right up to it's physical limits, otherwise it can get broken very easily) The joystick full range gets mapped to the pot's full range in the left box. In other words the joystick value gets converted into pot terms. The right box applies the PID based on the joystick position (now in desired pot terms), and compares it to the current actual pot value, to produce a motor output that will force the arm in the direction it must go in order to make the actual pot value line up with the desired pot value. ![]() Last edited by Mark McLeod : 05-02-2012 at 19:29. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|