Log in

View Full Version : [FTC]: Use Tetrix Encoders to Hold Positions?


Just_In_Time
26-02-2014, 17:16
Hello. I recently installed some encoders on our robot's arm in the hopes that I could press a button to allow the arm to go to a certain position regardless of the previous position the arm was at, essentially the same thing one would do with a servo. However, when I tried using Encoder Target Distances, it simply went in one direction for however many rotations instead of rotating back to the same position. Does anyone know of a way that I could accomplish this so the Tetrix motor acts like a servo and returns to a previously set position? Any help is greatly appreciated. Thanks.

JIT

MattRain
26-02-2014, 18:25
RobotC, or Labview??

Just_In_Time
26-02-2014, 18:27
RobotC

MattRain
27-02-2014, 10:47
If you post your problem/idea here, alot more people can help out with your programming.

http://www.robotc.net/forums/viewforum.php?f=52&sid=0d107de33c3e99ad8844d016402c758b

Wingus&Dingus
06-03-2014, 12:39
Hello. I recently installed some encoders on our robot's arm in the hopes that I could press a button to allow the arm to go to a certain position regardless of the previous position the arm was at, essentially the same thing one would do with a servo. However, when I tried using Encoder Target Distances, it simply went in one direction for however many rotations instead of rotating back to the same position. Does anyone know of a way that I could accomplish this so the Tetrix motor acts like a servo and returns to a previously set position? Any help is greatly appreciated. Thanks.

JIT

From memory the Encoder Target Distance function only works with the LEGO motors. You'll need to implement (at least) a Proportional controller which measures the arm position and adjusts motor power according to the error between your Set Point and the Current Position. Also the PID controller built into HiTechnic DC Motor controllers didn't work out for us in a past season so we ended up writing our own. It all seems like partial implementations in these motor controllers which is frustrating.