Absolute movement controlled by an external encoder.

21 hours ago
17 hours ago
  • poliautomacao - 21 hours ago

    Hello, is it possible to perform an MC_MoveAbsolute movement, and have the servo move using an external encoder (freeEncoder)? In my application, I have slippage on the main shaft of the servo motor, and I would like to add an encoder to measure the actual position of the material.

     
  • gseidel - 17 hours ago

    Hi polyautomacao,

    basically, there are two ways to approach this.

    1. My first choice would be to check whether your servo drives supports an external encoder, connect the encoder to the servo and configure the servo accordingly. In this case, you would not need to change anything in the CODESYS application.
    2. If that is not an option, you could use SM_DrivePosControl, a drive that closes the position loop in the PLC, and feed it with the external encoder positions. See (0). You can switch your servo drive to velocity control mode (SMC_SetControllerMode) and use SMC_FollowVelocity to apply the fSetVelocity of the SM_DrivePosControl to your servo. The MC_MoveAbsolute can then be performed on the SC_DrivePosControl

    Hope that helps.

    (0) https://content.helpme-codesys.com/en/CODESYS%20SoftMotion/_sm_example_poscontrol.html

    Best regards,

    Georg

     

Log in to post a comment.