How to get the motor scaling value from code

viksym
2025-06-12
2025-06-13
  • viksym - 2025-06-12

    Is there a way to see what value is set as the "Work travel distance per motor rotation" that is set in the Scaling menu of the axis ? I am working on my own homing function block for sensorless (hardstop) homing and I want to make it be universal between different axes with different motor's scaling for distance per rev so I need to know this value from the axis itself. I know I could do it by just creating an input variable for the function block but I'm leaving that option as a last resort.

     
  • tk096 - 2025-06-13

    Hi, unfortunately, in Softmotion you have only access to the combined fraction - the scaling factor from user units to motor increments. It can be accessed using MC_ReadParameter with parameter number 1054.

    increments = user_unit_position * fScaleFactor

     
    πŸ‘
    1

Log in to post a comment.