Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Finding servo location? (http://www.chiefdelphi.com/forums/showthread.php?t=44671)

Eko 26-02-2006 21:59

Re: Finding servo location?
 
Other than having a rotary potentiometer or something on it...

Nope =)

Keith Watson 26-02-2006 22:20

Re: Finding servo location?
 
Quote:

Originally Posted by rodgadashruba
well i tried that in user routines, in the default code funtion. the code compiles just fine but when i add int he comman

int testTest = PAN_SERVO ;
or
static int testTest = PAN_SERVO;

i get syntax errors
is there a way to access these varible outside of tracking.c?

Yes. Since PAN_SERVO is in a #define statement in tracking.h you just need to make sure you include that .h file. Or just directly use pwm01 if that is what your #define is set to.

Keith Watson 26-02-2006 22:30

Re: Finding servo location?
 
Quote:

Originally Posted by Matt Krass
Keep in mind this tells you where the servo is being commanded to go, not where it is, in most case they're synonomous, but if you're caught on something, or doing a lot of tracking this value could introduce lag which creates oscillations, making it worse, feedback loops, a constantly increasing error, all kinds of bad stuff. Just remember thats where it's trying to be and 98% of the time it should be there.

Please note that the only thing Matt is pointing out are possible error conditions which should not be encountered in normal operation.

1) Do not command your servo to go into a position where the servo's movement is physically limited.

2) Setting the pwm value is where the servo will end up. This is pretty accurate. If you are worried about the speed in which the servo gets to the commanded position versus the speed of your processing loop then use the Hitec specification for the speed of your servo to figure out if you need a delay.


All times are GMT -5. The time now is 22:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi