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

MC_HOME returns error

Kim
2016-08-26
2016-10-26
  • Kim - 2016-08-26

    In a bit of a hurry since our customer is about to ship the machine to the end customer.

    Codesys Runtime v3.5.7.10, EtherCAT Master (SoftMotion) v3.5.7.30, Generic CiA driver axis v3.5.7.0

    The axis is configured as a modulo with rollover 360.0, it uses the following scaling:
    524288 increments = 1 motor turn.
    30 motor turns = 1 gear output turn.
    1 gear output turn = 90 units in application (degrees)
    Hence, 1 motor turn = 3 degrees.

    Homing seems to work well most of the times BUT I have issues when reaching higher position values from the encoder.

    We run continously in the same direction for quite a while, stop, then try to execute MC_Home with Home Position 0 (homing in the drive is set to method 35 = Sets the current position as the origin).
    Latest error occured is 'Drive doesn't accept value'.
    The MC_HOME block itself returns SMC_H_AXIS_DIDNT_START_HOMING.
    I've encountered the same error before, but those times it was due to providing MC_HOME with a too large value in the Home Position causing 0x607C Home Offset to become out of range. The value 0 should not be a problem so it must be something else.

    Some information:
    0x2067 Single turn data = 290563
    0x206A Multi turn data = 27659

    0x6064 Actual position = 1616380472
    0x607C Home Offset = 0

    I tested the same thing in Codesys runtime v3.5.3.30, it returned the same error.

    Since the code for MC_HOME is within the compiled library SM3_Basic, I can't troubleshoot it further.
    Any ideas or suggestions on how to fix/workaround this, it would be very much appreciated!

    Kim Hansen
    Beijer Electronics Automation AB

     
  • Kim - 2016-09-09

    In case anyone comes here in search for an answer, here is the excellent reply that I received from Codesys.

    Zitat:
    For modulo axes, MC_Home will not set the home offset (0x607C) to absolute zero but to the beginning of the current modulo period. This is a value close to the actual position (between actual position and actual position minus the modulo period in increments).
    So, if the drive does not accept high values in 0x607C for some reason, it can be expected that this error ('Drive doesn't accept value') may occur also when calling MC_Home with Position=0.
    One line of inquiry would be why the drive does not accept high values for 0x607C. Maybe it is possible to configure the drive in a different way? Maybe there is a firmware update to fix this limitation?
    Another possible workaround would be to not use MC_Home but MC_SetPosition. It depends on the application whether this is feasible.

    In our case it was the drive that didn't accept high values in 0x607C and we have forwarded the issue to the supplier.

     
  • hantin89 - 2016-10-13

    hi,

    how to set home method (0x6098) for CiA402 softmotion axis ?
    because MC_HOME don't have option to set homing method and pdo mapping is available.
    possible to sdo write?

     
  • Kim - 2016-10-26

    Yes, you should make use of the function block SMC3_ETC_WriteParameter_CoE if you want to write directly to 0x6098.

     

Log in to post a comment.