AXIS_REF_SM3 Error Codes?

SLUCodesys
2025-09-22
2025-09-24
  • SLUCodesys - 2025-09-22

    I'm trying to firm up alarming of axis faults. Declutter the code and figure out what's what.

    Diving into it, I see the AXIS_REF_SM3 function block provides uiDriveInterfaceError and dwErrorId, but I can't find any significance of these further than
    Drive interface error number Parameter number: 1014 and
    Drive specific error identifier, parameter number: 1031, respectively.
    Is there some corresponding appendix I could use to decode these?

    Also, is there any relation to the Error ID (of type SMC_Error) of the MC POUs? MC_Jog, MC_Reset, MC_MoveRelative, etc? If so, are the above errors redundant?

    Thanks in advance.

     

    Last edit: SLUCodesys 2025-09-22
  • gseidel - 2025-09-24

    Hi SLUCodesys,

    dwErrorId is a drive specific error number. The drive documentation should be consulted to interpret it. (Note that you should use MC_ReadAxisError to read this error, see https://content.helpme-codesys.com/en/libs/SM3_Basic/Current/SM3_Basic/POUs/Diagnostics/MC_ReadAxisError.html. Accessing the internal variable will result in outdated values if the acis error is not mapped by PDO and is not recommended in general.)

    uiDriveInterfaceError holds errors of the SoftMotion driver for the drive. It is also an internal variable, not intended for direct access. It is intended for logging, the PLC log will contain the drive interface error, consisting of this number and an error text.

    My recommendation for handling axis errors in the CODESYS application:
    1) Use MC_ReadStatus on the axis to find out whether it is in state Errorstop
    2) If in Errorstop, there are two possibilities: an error reported by the drive (MC_ReadAxisError) or an error of the SoftMotion function blocks (output MC_ReadStatus.FBErrorOccured).
    3) If there is no drive error, you can use SMC_ReadFBError https://content.helpme-codesys.com/en/libs/SM3_Basic/Current/SM3_Basic/POUs/Diagnostics/FBError/SMC_ReadFBError.html

    Best regards,

    Georg

     

Log in to post a comment.