Skip to main content

Common Errors

This page describes common errors when using CODESYS Softmotion Basic, their causes, and possible actions to take to correct the error. For a list of all possible errors with a brief description, see the library documentation: SMC_ERROR

Table 40.

Error Code

Description and Causes

Actions

SMC_DI_AXIS_ERROR

The drive has reported an error.

Possible causes:

  • Position lag

  • Limit switch

  • Overload (I²t error)

Check which error the drive is reporting. The error can be read from the display of the drive (if available) or by fetching with the MC_ReadAxisError function block.

SMC_AXIS_ERROR_DURING_MOTION

The drive has reported an error. During a movement, the active motion block returns this error.

See the actions for the error SMC_DI_AXIS_ERROR.

SMC_FB_WASNT_CALLED_DURING_MOTION

The function block which controls the active movement has not been called in the current cycle.

Possible causes:

  • The call order for buffered movements or blending movements is incorrect. The function block instance of the subsequent movement must not be called earlier than the function block instance which commanded the previous movement.

  • In SoftMotion version 4.15.0.0 and higher, the log message for this error contains the instance path to the affected function block.

  • In the application, check for the reason why the function block was not called cyclically.

  • Fix the call so that it is done cyclically (at least as long as the block is in use).

SMC_BLOCKING_MC_STOP_WASNT_CALLED

During an active stop, the associated function block MC_Stop was not called in the current cycle.

See the actions for the error SMC_FB_WASNT_CALLED_DURING_MOTION.

SMC_AXIS_NOT_READY_FOR_MOTION

The axis is not ready for use and cannot execute the desired movement.

Possible causes:

  • The axis is not in an operational state for the respective movement (for example, power_off or errorstop).

  • The axis is in an error state and all buffered movements return this error.

  • The axis is in the stopping state (during an active MC_Stop) and a new aborting movement is commanded.

Check the state of the axis:

  • Is the axis in an operational state by MC_Power?

  • Is the axis in the errorstop state? If so, then identify the axis error and correct it.

  • Does the axis state match the commanded movement? For example, MC_CamOut can be commanded only when the axis is in the state of the synchronized movement.

SMC_FB_CALLED_FROM_WRONG_TASK

The SoftMotion block was called from a task which does not correspond to the bus task of the axis.

Because the SoftMotion blocks change values in the axis, inconsistent states can occur if calls are made from tasks other than the bus task. This can lead to undefined errors, which is prevented by this error.

  • Check the log: The affected axis and block instance are logged.

  • Remove the call from the incorrect task.

SMC_DI_FIELDBUS_LOST_SYNCRONICITY

Occurs when using EtherCAT with distributed clocks if the frame from the controller to the drive has not been received on time (within the defined time window ("SyncWindow") or has not been received at all.

Possible causes:

  • Real-time problems:

    • The task jitter is too high.

    • The task priority of the EtherCAT task is too low.

    • Other fieldbuses (for example, Modbus) or lengthy operations in addition to the control tasks (for example, file access) in the EtherCAT task

    • Modbus is executed in another task, but the I/O channels it uses are also referenced in the EtherCAT task.

    • Especially with Linux operating systems, the configuration of the system (for example, IRQ priorities)

  • Communication problem with the EtherCAT slave: Connection interrupted, problems with electromagnetic compatibility (EMC), etc.

Check for the cause of the behavior. The following functions can help you with this:

Possible actions for real-time problems:

SMC_DI_SWLIMITS_EXCEEDED

The axis moves in the direction of the positive or negative software limit switch and will exceed it with the current dynamics. The error also triggers before the actual limit switch position because the required deceleration distance is also included in the calculation.

  • Check whether or not the movement is desired in this position range.

  • If necessary, adjust the negative and/or positive software limit switch position. See Tab: General

SMC_DI_HWLIMITS_EXCEEDED

The positive or negative hardware limit switch has triggered and the axis moves in the direction of this limit switch.

  • Check the commanded position of the movement. This should not exceed the positions of the hardware limit switches.

  • If the movement is OK, then check the signals of the hardware limit switches.

SMC_MOVING_WITHOUT_ACTIVE_MOVEMENT

There is no active movement, but the set velocity is not equal to zero and the axis is in an operating state in which the set values are followed.

Possible causes:

  • When using MC_PositionProfile, MC_VelocityProfile, or MC_AccelerationProfile, the axis must come to a standstill at the end of this movement or a subsequent movement must be commanded in the same cycle. Otherwise this error is returned.

Check the cause of the problem:

  • Incorrect call order for buffered and blending movements: Adjust the call order. For more information, see the section Execution Order of Movement Function Blocks.

  • MC_PositionProfile, MC_VelocityProfile, or MC_AccelerationProfile is used and no standstill is reached at the end: Adjust the profile accordingly so that standstill is reached at the end. Or instead use Cams, which cover a similar use case to these function blocks, but are more flexible and easier to use.