Quote:
Originally Posted by Ether
"m" and "b" are constants which you need to calculate and set so that the operating range of the process variable corresponds to the desired operating range of the joystick, be it -1 to +1 or 0 to +1 or whatever.
Read this post, then ask if it's not clear.
|
Am I correct about this:
JoyStickYaxis is +1 (operator input)
currentPotValue is 550 (min is 300 and max is 600)
(m*(currentPotValue+b)) = ( (1/150)*(550-450) )
m is 1/150 and b is -450 so that the number is always between -1 and 1
error = 1 - 0.6666;
MotorOutput = k * 0.3333 and say k is 0.75 then the output becomes 0.25
of course, k needs to be adjusted so the error is as close to 0 as possible and/or the arm doesn't oscillate
Good so far? Or did I make a mistake somewhere?
EDIT: I have a feeling I did something wrong