Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Positioning a servo using an external encoder

ph0010421
2020-12-02
2020-12-16
  • ph0010421 - 2020-12-02

    Hi all
    This question has been asked a few times, but no answer. Is it possible to control a servo (on ethercat) but use an external encoder as the position feedback?
    thanks

     
  • Morberis

    Morberis - 2020-12-02

    I do believe so, yes. I'm basing that on this post. It is a similar but different scenario though.

    Hi sergp,
    
    of course, it would be the most beautiful solution if we had a dedicated SoftMotion axis for the devices you are using. However, as the actor device (Adafruit_DC_Motor_Hat) and the sensor device (PCF8591) are not one, this is a little tricky.
    But especially for such cases we have designed the PosControl drive, which can be added under the "SoftMotion General Axes Pool". You must link its velocity output to the Adafruit DC motor hat and copy the position input received from PCF8591 to the axis' input. Then, you can tune the position controller and make it a real servo-like axis.
    Please open the online help and find "PosControl.project" in the index, which explains in detail, how this special axis works and how it has to be configured.
    
    Good luck!
    
     

    Last edit: Morberis 2020-12-02
  • dwpessoa - 2020-12-16

    I don't know if that's what you want, but ...

    Depending on the servomotor controller (Driver), an external encoder plugged directly into the driver can be set as position feedback (sometimes they may need optional accessories), so the PLC will not have to worry about closing the control loop between the servomotor and the external encoder, the driver will take care of it.

    The implementation will depend on the manufacturer and model of the driver.

    The article below is an example of the use for Kollmorgen AKD, which has EtherCAT.
    https://www.kollmorgen.com/en-us/developer-network/setting-akd-close-position-loop-external-encoder/

    I hope it helps you.

     
    πŸ‘
    1

Log in to post a comment.