Simple Servo Position Control Program - Is this right?


Results 1 to 11 of 11

Threaded View

  1. #9
    Join Date
    Oct 2010
    Location
    Northern Colorado
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Simple Servo Position Control Program - Is this right?

    Not to bring up a dead subject, and I am not sure if anybody is going to have any interest in helping out. But if I am using a code similar to Alain's that he posted above ^^^, how can I slow down the movement of the servo? Basically, the servo goes straight from one point to another. I want to add something that will make it so that rather then jumping from position one to position two and back again that it takes, say 10 seconds, to gradually move from position one to position two. I have an idea in mind to basically have it move from say position 200 to 300 by 1 every .1 seconds so that after 10 seconds it has reached the second position. I would think a counting function or something would work so that it would go
    Code:
    IF I >= 50 THEN
    position=200
    pause 100
    position=201
    pause 100
    position=202
    pause 100
    ...
     ELSE 
      POSITION = 200
     ENDIF
    And if that is what it takes that I need to type out the whole process count down then so be it. But I would think there would be an easier option..

    Application: My problem right now is that there is a 4 inch piece of copper rod on the servo with a ceramic insulator attached to the end of that copper arm. So whenever it moves from position one to position two, the momentum of the mass of the ceramic insulator is causing the servo to overshoot its programmed position. Maybe its a servo issue, but I thought I would start with this.

    Any thoughts or help?
    Last edited by marcusvm; - 28th March 2011 at 04:51.

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts