Skip to main content

Motor control FAQ

A troubleshooting guide for when a servo or stepper motor enables successfully but does not move, or moves abnormally.

Core principle

The CiA 402 standard defines a common interface, but proprietary objects and default values differ enormously between vendors. The same operating mode that works on brand A may fail completely on brand B. When a problem occurs, always consult the manual of the specific device.

General troubleshooting method​

When a motor control problem occurs, work through the following layers. Confirm that each layer passes before moving to the next, so that you do not waste time at the wrong level.

First layer: is communication working?​

Motor control presupposes a working EtherCAT communication link.

CheckMethodExpected result
Is the master in OPmaster.StateEcState.OP
Is the slave in OPRead 0x6041 or slave.StateNot 0x0000
Is the PDO validslave.Ibytes > 0Input byte count > 0
Is the PDO data refreshingRead the StatusWord repeatedly and watch for changesNot all zero, and changing

If this layer does not pass, the problem is in the network or the configuration, not in motor control.

Second layer: does the CiA 402 state machine advance correctly?​

The motor must reach the Operation Enabled state before it can move.

Checks:

  1. Read the StatusWord (0x6041) and decode the current state with the masks:

    (sw & 0x4F) == 0x40  → Switch on disabled (send 0x06)
    (sw & 0x6F) == 0x21 → Ready to switch on (send 0x07)
    (sw & 0x6F) == 0x23 → Switched on (send 0x0F)
    (sw & 0x6F) == 0x27 → Operation enabled ✅
    (sw & 0x4F) == 0x08 → Fault (send 0x80 to reset)
  2. If it is stuck in one state and does not advance:

    • Check whether the Controlword is written in every PDO cycle (not just once)
    • Some drives require a delay between states; wait for the StatusWord to acknowledge each step before advancing
    • Check whether a Fault is present (bit3=1); reset it before enabling again
  3. If Fault recurs:

    • Read 0x603F (Error Code) to obtain the specific error code. A failed read returns the sentinel 0xFFFF (not a real error code; only 0x0000 means no error), so detect it with the check method below and treat it as a failure rather than a real value
    • Read 0x1003 (Pre-defined Error Field) to obtain the error history. A failed read returns -1 as a whole and the SDK maps it to an empty collection; an empty result must be treated as a failure
    • Look up the meaning of the error code in the device manual
    • Read-failure detection has three tiers, and no tier may be treated as a valid reading; detect them with the check methods below and treat them as failures:
      • Option code (0x605A-0x605E) read failure = -32768
      • Error code (0x603F) read failure = 0xFFFF
      • Array-style read interfaces return an empty array on failure, not -1: GetErrorHistory(int maxCount = 32) returns uint[] and GetSupportedHomingMethodsDll(int maxCount = 64) returns sbyte[]; treat an empty result as a failure
    • The check method depends on the language: C DARRA_IS_READ_FAIL_I16 / DARRA_IS_READ_FAIL_U16 / DARRA_IS_READ_FAIL_INT, C++ is_read_fail_sentinel(v) (int16_t / uint16_t / int overloads), C# CiA402Instance.IsReadFailSentinel(v) (short / ushort / int overloads), Java isReadFailSentinelI16 / isReadFailSentinelU16 / isReadFailSentinelInt, Python is_read_fail_sentinel_i16 / _u16 / _int, Rust is_read_fail_sentinel_i16 / _u16 / _int. Java's isReadFailSentinel(short|int) and Python's is_read_fail_sentinel are legacy cross-domain merged entry points with documented false positives; use the domain-specific check above according to the shape of the value under test
    • Method numbers (0x60E3 list entries; -128..-1 are vendor-defined methods) are real values and are not sentinels; do not apply the check methods to them

Third layer: is the operating mode in effect?​

After writing the mode you must verify that the drive accepted it.

  1. Write 0x6060 (Modes of Operation) = the target mode value
  2. Read 0x6061 (Modes of Operation Display) and confirm that the returned value matches
  3. If they do not match:
    • The drive may not support that mode (check Supported Modes in the ESI or the manual)
    • Some drives only allow the mode to be switched in a particular state (for example only in the Switched On state)

Fourth layer: is a protection mechanism inside the drive preventing motion?​

This is the layer that is most easily overlooked. When the drive has reached Operation Enabled but still does not move, some protection mechanism is usually active.

4a. Hardware limit protection​

Key insight: different operating modes respond to limits in completely different ways.

  • CSP mode: most drives ignore the hardware limits (the master is responsible for limit protection)
  • PP/PV/HM mode: the drive's internal trajectory planner checks the limits and performs a QuickStop or refuses to move when one is triggered

Checks:

  • Read 0x60FD (Digital Inputs) and check bit0 (negative limit), bit1 (positive limit) and bit2 (Home switch)
  • With no physical switch connected, a limit bit of 1 → normally-closed logic means an unconnected input counts as a triggered limit
  • Search the device manual for: limit, limit stop, sensor logic, input polarity
  • Once you find the proprietary object that controls the limit behavior, change it by SDO or by a startup parameter

4b. Software limit protection​

  • 0x607D (Software Position Limit): sub-index 1 = minimum position, sub-index 2 = maximum position
  • If the target position is outside that range, the drive refuses to move
  • Check: read 0x607D:01 and 0x607D:02 and confirm that the target position is inside the range

4c. Vendor-specific protection​

  • Each vendor has its own protection objects (safety logic, enable conditions, input configuration and so on)
  • The only reliable method is to consult the device manual
  • Search the manual for: protection, inhibit, enable condition, interlock

Fifth layer: are the motion parameters correct?​

Once Operation Enabled is reached and no protection is blocking motion, check the motion command itself.

PP mode checks​

CheckObjectRequirement
Profile velocity0x6081 ProfileVelocityMust be > 0
Profile acceleration0x6083 ProfileAccelerationShould be > 0 (some drives refuse a value of 0)
Profile deceleration0x6084 ProfileDecelerationShould be > 0
Initial target position0x607A TargetPositionShould equal ActualPosition (0x6064) on the first move
Positioning tolerance0x6067 Position WindowDefault 0 = exact arrival; set a non-zero value
bit4 rising edgeControlwordSequence: 0x0F → 0x1F → wait for bit12 → 0x0F

PP mode bit4 handshake sequence (critical):

State 0: idle → cw=0x0F, TargetPosition=ActualPosition
State 1: prepare → cw=0x0F, write TargetPosition=target value, wait several cycles to settle
State 2: trigger → cw=0x1F (bit4=1), wait for StatusWord bit12 (SetPointAck)
State 3: clear → cw=0x0F (bit4=0), wait for bit12 to clear
State 4: wait → cw=0x0F, wait for StatusWord bit10 (TargetReached)

CSP mode checks​

CheckRequirement
Target position continuitySmooth increase/decrease every cycle; no jumps
Initial target positionThe first cycle must equal ActualPosition
PDO struct field orderMust match the PDO mapping order
DC synchronizationCSP must be configured with DC Sync0
Cycle stabilityCSP should use the DarraRT real-time driver

Sixth layer: does the synchronization mode match?​

An incorrect synchronization configuration makes the drive report errors or behave abnormally.

Operating modeSynchronization requirement
CSP/CSV/CSTDC Sync0 is mandatory
PP/PV/PTFree Run is sufficient
HM (homing)Free Run is sufficient

How to configure Free Run:

// Written during PreOp (standard CiA 402 objects, not vendor specific)
slave.CoE.SDOWrite(0x1C32, 1, BitConverter.GetBytes((ushort)0x0000)); // SM2 SyncType = Free Run
slave.CoE.SDOWrite(0x1C33, 1, BitConverter.GetBytes((ushort)0x0000)); // SM3 SyncType = Free Run
Why does PP not need DC?

In PP mode the trajectory is planned inside the drive; the master only sends the target position and the trigger signal. The drive executes the trajectory with its own internal timer and does not depend on the accuracy of the master cycle. CSP is the opposite: the master sends an exact position every cycle and the drive follows it directly, so DC synchronization is mandatory.

Troubleshooting flowchart​

Motor does not move
│
├─ Master not in OP? ──────→ Check network/configuration (see device-troubleshooting)
│
├─ Slave not in Op Enabled? → Check CiA 402 state machine advance + Fault reset
│
├─ Operating mode not taking effect? ────→ Check 0x6061 readback + modes supported by the drive
│
├─ Blocked by protection? ────────→ Check hardware limits (0x60FD) + software position limits (0x607D) + vendor-specific objects
│ ⚠️ CSP works but PP does not move → most likely limit protection
│
├─ Wrong motion parameters? ──────→ PP: velocity/acceleration non-zero + bit4 rising edge timing
│ CSP: target position continuous + initial value=current position
│
└─ Sync mode mismatch? ───→ PP/PV/HM use Free Run; CSP/CSV/CST use DC Sync0