Skip to main content

TN0003 EtherCAT Force Control Principles and Integration Dictionary

ItemInformation
Document No.TN0003
RevisionRev. 1.1 · 2026-11-15
Applicable ProductsJxServo EtherCAT Joint Modules (R48 / R58 / R68 and related series; specific force-control capabilities depend on hardware sensors and factory configuration)
Applicable FirmwareEtherCAT Application Firmware V2.00.04+ (with companion ESI V6 or above)
Commissioning BaselineAlways start real-hardware tuning from verified factory parameters; numerical values in this document are examples for illustrating encoding and unit scaling

This guide is intended for robot motion-control algorithm developers and system integration engineers. It systematically explains the control-chain partitioning and parameter tuning relationships across Pure Current Mode (-1), Joint Torque Closed-Loop Mode (10), and MIT Impedance Control Mode (-2), and consolidates all EtherCAT control objects, feedback dictionary entries, and standard master state-machine workflows required for force-control integration.

For device identity verification, basic CiA 402 handshaking, and complete byte-by-byte PDO offset definitions, read this document alongside PR0003 EtherCAT Communication and Control Mode Guide. When integrating different module models or custom production batches, verify hardware capabilities against online object readbacks and product specifications.


1. Mode Selection Guide: Pure Current, Torque Closed-Loop & MIT​

1.1 Control Partitioning & Application Selection​

Application Requirement & Master Setpoint StyleRecommended Mode (0x6060)Internal Drive Responsibility
Master reads Torque Sensor feedback, computes outer-loop force control itself, and directly commands final quadrature currentPure Current Mode: -1Receives Iq commands at the 4 kHz update path and executes low-level current closed-loop control; outer torque or impedance loops reside entirely on the master
Master completes high-level dynamics calculation and directly commands desired joint output torqueJoint Torque Closed-Loop: 10Uses built-in joint Torque Sensor feedback to track desired joint output torque via an internal closed loop
Master cyclically commands joint position, velocity, Stiffness, Damping, and Feedforward TorqueMIT Impedance Control: -2Synthesizes desired joint torque in real time at 4 kHz inside the drive, then dispatches it to the configured low-level execution chain
Validate active zero-torque compliant backdriving (zero-torque teaching / following)Prefer Joint Torque Closed-Loop 10Tracks a 0 N·m joint torque target in closed loop, actively canceling part of internal transmission resistance (does not hold position)
Implement pure viscous damping, compliant posture holding, or whole-body dynamic impedance trajectoriesMIT Impedance Control: -2Defines spring-damper dynamic response to joint position and velocity errors via Kp, Kd, and Feedforward Torque

1.2 Internal Signal Chains Across the Three Force-Control Modes​

From a control-architecture standpoint, MIT mode determines how desired joint torque is synthesized, whereas Torque Sensor closed-loop control or direct current conversion determines how that desired torque is executed at the low level:

Signal chain comparison of the three force control modes: Mode -1 passes Iq directly to the current loop; Mode 10 runs sensor torque closed-loop control and friction compensation before the current loop; Mode -2 synthesizes MIT impedance torque first, then routes through either the sensor torque loop or torque-constant scaling into current synthesis and the current loop.EtherCAT MasterCoE Cyclic PDOJoint Module Drive Internals (4 kHz Command Update → Current Loop)Mode -1 · Pure CurrentMaster Outer Force LoopReads 0x6077 & compensates0x6071Final Iq (0.01 A)Direct to current loop (bypasses internal MIT, torque loop & friction comp.)Current Loop0x6072 limitMode 10 · Joint Torque LoopMaster Torque CommandDynamics ref / zero torque0x6071Torque (0.025 N·m)Direct joint torque refSensor Torque LoopTorque P / DampingIq Synthesis+ Friction / τ compCurrent Loop0x6072 limitMode -2 · MIT ImpedanceMaster 6-Term MIT Cmdq / dq / Kp / Kd / τ_ff / limit0x2100:01~0617B Cyclic RxPDOMIT Torque SumKp·Δq + Kd·Δdq + τ_ffSensor Torque LoopWith loop: P / DampingKt Torque ScalingDirect current configIq Synthesis+ Friction / τ compCurrent Loop0x6072 limit

Pay close attention to the following architectural boundaries during engineering integration:

  1. Execution Boundaries of Pure Current Mode (-1):
    • The master reads joint torque feedback 0x6077, computes its own control law, torque-to-current conversion, and any desired compensation, and sends the final Iq target via 0x6071 (0.01 A/LSB, e.g., 100 = 1.00 A; read actual Iq from 0x6078).
    • This path bypasses the drive's internal MIT synthesizer, Torque Sensor closed-loop controller, and built-in compensators (Torque loop P, Torque damping, and 0x2549 Friction Compensation do not participate in this path), while low-level current limits and hardware protections remain active. Master outer-loop bandwidth is bounded by divided feedback refresh intervals, bus cycle time, and round-trip communication delay.
    • Conceptual Distinction — Zero Current Target ≠ Zero Joint Torque Target: Commanding Iq = 0 requests zero electromagnetic torque only; manually backdriving the joint must still overcome the reducer's inherent backdriving friction. By contrast, commanding 0 N·m in Mode 10 actively drives motor current based on sensor feedback to track zero net joint output torque.
  2. Verifying the Underlying MIT Execution Path:
    • Mode display 0x6061 = -2 or supported-modes bitmap 0x6502 confirms only protocol-level MIT mode entry. Whether the drive internally routes MIT output through "MIT → Torque Sensor Closed-Loop → Current Loop" or "MIT → Direct Torque-Constant Current Conversion → Current Loop" depends on the specific hardware model and factory configuration—it cannot be inferred solely from 0x6061 or 0x6502.

1.3 Interactive Torque Synthesis Explorer​

Control Partitioning & Joint Response

Interactive Demo
τ = Kp × (q_des − q) + Kd × (dq_des − dq) + τ_ff

Drag the joint arm and release to observe restoring torque and springback.

Joint Position · CCW Positiveq = 0.35 raddq = 0.00 rad/s
Actual PosDashed: Target PosArrow: Total Torque
Spring−3.500 N·m
Damping+0.000 N·m
Feedfwd+0.000 N·m
Total−3.500 N·m
Target Torque−3.500 N·m

Paused; drag and release the joint arm to resume response.

Spring return requires Kp > 0; pure damping does not hold position. Increasing Kd reduces overshoot; when Kp > 0, τ_ff shifts equilibrium.

Simulation Model & Boundaries

Models a single ideal rotational inertia J = 0.25 kg·m² driven by J × α = total target torque, without gravity or friction, bounded to ±3 rad. Internal drive bandwidth, filtering, compensation, and safety limits are omitted; not intended to predict hardware dynamic performance.

Interactive Guide: Use the top dropdown (执行路径示意 / Execution Path) to compare the four signal chains. Click 示例:弹簧回弹 (Preset: Spring Return), then drag the joint arm on the right or the 实际位置 q (Actual Position q) slider away from the target and release to observe spring return behavior (increasing Kp strengthens restoring torque, while adjusting Kd tunes oscillation decay). Switch to 示例:MIT 纯阻尼 (Preset: MIT Pure Damping) (Kp = 0) to observe pure velocity-opposing damping where releasing the arm leaves it stationary without springing back.


2. MIT Impedance Control Law & Parameter Tuning​

In MIT mode, the drive synthesizes desired joint torque in real time according to the joint-side control law:

τ = Kp × (q_des − q) + Kd × (dq_des − dq) + τ_ff

Position error uses rad, velocity error uses rad/s, and output torque uses N·m. Here, Kp and Kd belong exclusively to the MIT impedance law and are completely independent of the drive's standard cascaded position and velocity loop gains (0x2534 to 0x2537).

MIT ParameterControl Role & Tuning StrategyKey Signals to MonitorAbnormal Symptoms & Rollback Criteria
Stiffness Kp
(N·m/rad)
Restoring torque per unit position error. Always verify pure damping at Kp = 0 first, then increment Kp in small stepsPosition tracking error, target vs. actual torque, Iq currentVibration, harsh impact feel, or sustained current saturation → roll back to the previous verified value
Damping Kd
(N·m·s/rad)
Damping torque per unit velocity error. Set dq_des = 0 when validating pure dampingManual backdriving resistance, joint velocity smoothness, Iq ripple, temperature riseExcessive drag resistance, high-frequency jitter from velocity noise, or oscillation → reduce Kd
Feedforward Torque τ_ff
(N·m)
Added directly to synthesized target torque for gravity or known payload dynamics compensation. Verify sign polarity first before ramping upActual joint torque, static position drift, Iq currentJoint accelerates continuously or drift worsens due to inverted polarity → withdraw immediately and re-verify dynamics sign
Total Target Torque Limit
(N·m)
Clamps the magnitude `τof the three-term sum; write0` to disable this additional limit
  • Recommended Setpoint Practices:
    • Compliant Position Holding: Typically configure Kp > 0, Kd > 0, and dq_des = 0.
    • Dynamic Trajectory Tracking: Set dq_des equal to the time derivative of desired position trajectory q_des(t), paired as needed with polarity-verified Feedforward Torque τ_ff; avoid leaving dq_des = 0 and drastically inflating Kp alone to compensate for dynamic tracking lag.

3. Inner vs. Outer Loop Parameters: Torque Loop P, Torque Damping & MIT Kd​

On modules equipped with closed-loop Torque Sensor control, clearly distinguish inner sensor torque-loop parameters from outer MIT impedance parameters:

ParameterWhat It Acts OnRecommended Tuning MethodSymptoms Requiring Rollback
Torque Loop P (0x2548:01)
Dimensionless
Regulates inner Torque Sensor closed-loop responsiveness and how tightly actual joint torque tracks desired torqueFine-tune in small steps from verified factory settings while evaluating manual backdrive feel and torque step tracking; re-check Torque Damping after every changeVibration, amplified sensor noise, increased Iq ripple, or sustained current limiting (larger values are not inherently better)
Torque Damping (0x2548:06)
(N·m·s/rad)
Inner-loop damping term used to suppress mechanical resonance and flexspline oscillation within the torque loopKeep Torque Loop P fixed, adjust Torque Damping in small increments, and compare oscillation decay and current ripple under identical external perturbationsUnimproved vibration accompanied by rising current, high-frequency noise, or sluggish response
MIT Kd (0x2100:04)
(N·m·s/rad)
Acts on the error between actual and desired joint velocity, shaping macroscopic motion damping presented to the taskSet Kp = 0, τ_ff = 0, dq_des = 0, then ramp Kd up from zero while observing manual push resistanceExcessive drag resistance, velocity-noise-induced buzz, or oscillation
Coupling Boundaries Between Torque Loop Parameters and MIT Parameters
  1. Separate Control Layers — Never Interchange: Torque Loop P governs the inner sensor torque loop, whereas MIT Kp converts outer position error into desired torque. Likewise, Torque Damping and MIT Kd must be tuned at their respective layers—their numerical values are not interchangeable.
  2. Zero-Output Condition for Torque Damping: Effective inner-loop torque damping depends on Torque Loop P—when Torque Loop P = 1 (0x2548:01 = 1000) or Torque Damping = 0, inner torque damping output becomes zero. Always re-verify Torque Damping whenever Torque Loop P is modified; actual damping output is also bounded by available current headroom and output limits.

4. EtherCAT Force-Control Integration Object Dictionary​

The objects below apply to application firmware V2.00.04+ and companion ESI (V6 and above). RxPDO denotes cyclic master-to-slave commands, and TxPDO denotes cyclic slave-to-master feedback. PDO field ordering and byte lengths follow the selected ESI module definition, with all multi-byte values transmitted in Little-Endian order.

4.1 Mode Selection & State Machine Control Objects​

ObjectTypeCore Master PurposeChannel & Value Notes
0x6040:00UINT16Enable, stop, fault resetRxPDO / SDO; standard enable must step through 0x0006 → 0x0007 → 0x000F
0x6041:00UINT16Evaluate actual drive operating stateTxPDO; evaluate bitmask (0x6041 & 0x006F) during enable handshaking
0x6060:00INT8Request operation modeRxPDO / SDO; -1 (0xFF) Pure Current, 10 (0x0A) Joint Torque Closed-Loop, -2 (0xFE) MIT
0x6061:00INT8Verify active mode displayTxPDO; must be checked alongside 0x6041—never rely on 0x6061 alone to confirm power-stage enablement
0x6502:00UINT32Query supported drive modes bitmapRead-only SDO; declares protocol-supported modes, not whether MIT uses a Torque Sensor closed loop
0x603F:00UINT16Read active fault codeSDO / optional TxPDO; see FC0002 Joint Module Fault Alarm & Protection Logic Guide

Signed Integer Parsing: Wire byte 0xFF represents -1 and 0xFE represents -2. Always parse 0x6060 and 0x6061 as signed 8-bit integers (int8_t) on the master.

4.2 Current, Torque Targets & Motion Feedback Objects​

Object (Applicable Mode)TypePhysical Meaning, Unit & ChannelEncoding Examples
0x6071:00 (Mode -1)INT16Final Iq current target, 0.01 A/LSB (RxPDO)100 = 1.00 A, -100 = -1.00 A
0x6071:00 (Mode 10)INT16Joint output target torque, 0.025 N·m/LSB (RxPDO)40 = 1.00 N·m, -40 = -1.00 N·m
0x6077:00INT16Joint Torque Sensor feedback, 0.025 N·m/LSB (TxPDO)40 = 1.00 N·m (constant unit across all modes)
0x6078:00INT16Actual Iq current feedback, 0.01 A/LSB (TxPDO)100 = 1.00 A (constant unit across all modes)
0x6064:00INT32Joint output position feedback, 65536 LSB/joint rev (TxPDO)16384 = 90° = π/2 rad
0x606C:00INT32Motor rotor shaft velocity feedback, 1 rpm/LSB (Standard TxPDO)60 = motor shaft 60 rpm
0x2101:00INT32Joint output shaft velocity feedback, 0.001 rad/s/LSB (MIT TxPDO)1000 = joint output 1.000 rad/s
0x6072:00UINT16Additional magnitude ceiling on final Iq command, 0.01 A/LSB (RxPDO / SDO)500 = 5.00 A; 0 = remove additional limit
  • Dual Physical Units on 0x6071: Neither current nor joint torque uses per-thousand rated scaling. When switching between Mode -1 and Mode 10, the master must switch its 0x6071 conversion factor synchronously; by contrast, feedback objects 0x6077 and 0x6078 maintain fixed physical units at all times.
  • Position & Velocity Conversions: Convert joint position to radians via q = raw × 2π / 65536. Standard TxPDO 0x606C reports motor-shaft rpm and must never be plugged directly into MIT joint velocity error calculations; divide by the gear ratio or use 0x2101:00 mapped in the MIT module.
  • Scope of Additional Current Limit 0x6072: Active only during normal closed-loop operation (RUNNING), taking the minimum with internal drive limits; cleared automatically on OP exit and never saved to Flash. Deceleration stops, position holding (HOLD), and fault reactions (including ACT_DHOLD) apply internal safety protection limits.

4.3 MIT Cyclic Command Group 0x2100​

When selecting Mode -2, enable module 0x419800 so all 6 items below are transmitted together with Controlword and Mode of Operation in a single 17-byte RxPDO, ensuring intra-cycle parameter consistency:

ObjectTypePhysical Meaning & UnitRaw Conversion Examples
0x2100:01INT32Desired joint position q_des, 65536 LSB/joint rev16384 = π/2 rad (90°)
0x2100:02INT16Desired joint velocity dq_des, 0.001 rad/s/LSB1000 = 1.000 rad/s
0x2100:03UINT16Stiffness Kp, 0.1 N·m/rad/LSB100 = 10.0 N·m/rad
0x2100:04UINT16Damping Kd, 0.01 N·m·s/rad/LSB50 = 0.50 N·m·s/rad
0x2100:05INT16Feedforward Torque τ_ff, 0.025 N·m/LSB40 = 1.00 N·m
0x2100:06UINT16Additional limit on total synthesized torque, 0.025 N·m/LSB80 = 2.00 N·m; 0 = remove additional limit
  • Session Lifecycle & Atomic Submission: All 6 sub-indices are session-scoped commands cleared upon exiting OP and must be resent upon reconnection. Partial mappings or single-item SDO writes take effect individually; for atomic SDO submission, use 0x2100 Complete Access as shown in PR0003 MIT Initialization & Packing Example.
  • Independent Dual Limiting: Default MIT PDO omits 0x6072. If set via SDO or custom mapping in the active session, 0x6072 limits the current command stage while 0x2100:06 limits the synthesized torque stage independently. Target clamping cannot prevent physical sensor torque spikes under external mechanical impact.

4.4 Torque Loop & Friction Compensation Configuration Objects (V2.00.04+)​

These objects are accessed via single-sub-index SDO only (no PDO mapping or Complete Access). In firmware V2.00.04+, Torque Loop P, Torque Damping, and Global Friction Compensation Ratio support online SDO writes while the servo is enabled, immediately updating both active runtime values and RAM staged values without stopping or saving; execute a Save command after stopping and disabling if power-off retention is desired:

ObjectTypeQuantity, Resolution & Raw RangeOnline Effect & Persistence
0x2548:01UINT16Torque Loop P, 0.001/LSB (dimensionless); 1000 to 20000 (1 to 20)Tunable online when torque loop is ready, refreshing dependent torque damping synchronously; requires Save to persist
0x2548:06UINT32Torque Damping, 0.001 N·m·s/rad/LSB; 0 to 10000000 (0 to 10000 N·m·s/rad)Tunable online when torque loop is ready and updates staged value; requires Save to persist
0x2549:00INT32Global Friction Compensation Ratio, 1%/LSB; 0 to 100 (0% to 100%)Tunable online; 0 disables compensation output, 100 applies 100% ratio; requires Save to persist

Runtime Rules for 0x2549:00 Friction & Torque Compensation​

  • Path Applicability: Torque Loop P and Torque Damping act on the internal Torque Sensor closed loop. Pure Current Mode (-1) closes its outer loop on the master, so internal Torque Loop P, Torque Damping, and Friction Compensation are all inactive in Mode -1. Note: Friction Compensation cannot substitute for external gravity compensation or Torque Sensor zero calibration.
  • Synchronized Dual-Ratio Update (V2.00.04+): Writing 0x2549:00 over EtherCAT sets both the common friction ratio and the torque-loop compensation ratio to the same percentage and updates active runtime coefficients immediately (e.g., writing 50 sets both ratios to 0.5 starting on the next control cycle). Internally they remain separate parameters without multiplicative compounding when tuned via other tools.
  • Smooth Ramp-to-Zero & Firmware Compatibility: Writing 0x2549:00 = 0 sets both ratios to zero and ramps torque compensation output smoothly to zero at its configured slew rate without altering the master torque-compensation enable switch; actual compensation is bounded by velocity, current headroom, and current limits. Mode 10 and sensor-closed-loop MIT paths utilize torque compensation, while other non-current paths follow their respective configurations (on firmware earlier than V2.00.04, 0x2549:00 edits only the staged common friction parameter—verify firmware version via 0x100A:00).
Reserved Compatibility Sub-Indices & Torque Sensor Notch Filter Configuration
  • 0x2548:02 through :05 are read-only reserved entries (reading returns 0, writing returns a read-only SDO abort, unused in active control).
  • Torque Sensor Notch Filter enable switch uses 0x2547:01; Global Friction Compensation Ratio uses 0x2549:00.
  • Torque Sensor Notch Filter parameters reside at 0x2547:01 through :04 (enable switch, center frequency, quality factor Q, and notch depth, respectively). Refer to the online EtherCAT Object Dictionary for exact data types and ranges.

4.5 Calibration & Parameter Save Commands​

ObjectTypeMaster Write Value (UINT32)Preconditions & Completion Verification
0x2531:00UINT320x00000002: Zero-Torque CalibrationRequires servo disabled, valid sensor, and idle calibration state; remove external torque loads before submitting; automatically samples and saves upon acceptance
0x2531:00UINT320x00000001: Set Mechanical Zero at Current PointShifts joint position coordinate reference only—does not zero Torque Sensor offset; if accepted while enabled, Flash write waits until motor disable conditions are met
0x1010:03 or 0x1010:01UINT320x65766173 (Little-Endian ASCII save)Submit only after confirming zero motor current output; validates staged parameters, rebuilds runtime modules, and saves asynchronously to Flash
0x1011:03UINT320x64616F6C (Little-Endian ASCII load)Submit only after confirming zero motor current output; restores factory default parameter group into runtime (not used for normal parameter saving)
  • Asynchronous Execution & Save Sequence Rules:
    1. An SDO write confirmation indicates command acceptance only—not completion of background sampling or Flash programming. Reading 0x1010 / 0x1011 returns capability flag 1, not save completion status. Because no dedicated background-job polling object exists, never rely on fixed delays or repeated reads of 0x1010 as proof of completion (verify via diagnostic logs during commissioning).
    2. Recommended save sequence: Confirm motor current output has completely stopped → Write parameters & read back staged values to verify → Submit Save command → Wait for background Flash completion (do not edit parameters or re-enable during waiting) → Power-cycle & read back via SDO to confirm persistence, or re-enable for testing.

5. Master Integration Workflow: From Power-On Self-Check to MIT Closed-Loop​

The standard integration pipeline is: Verify Device & PDO Module → Check Feedback & Zero Offsets → Preload Safe Initial Commands → Establish OP & Enable Handshake → Verify Active Mode → Validate MIT Pure Damping → Engage Compliant Holding or Trajectory Tracking.

The master can start up and complete the CiA 402 enable handshake directly in MIT mode (-2) without entering Mode 10 first; switch into Mode 10 separately only when specifically evaluating standalone Torque Sensor zero-torque backdriving.

5.1 Selecting the PDO Module & Pre-Enable Checklist​

Target Control MethodSelected ModuleRxPDO / TxPDO SpecMaster Integration Focus
Pure Current (-1)
Joint Torque Closed-Loop (10)
0x1198000x1600 / 0x1A00, 15 bytes eachScale 0x6071 according to 0x6060; read statusword, position, motor-shaft speed 0x606C, sensor torque, and Iq
MIT Impedance Control (-2)0x4198000x1603 (17 bytes), 0x1A03 (15 bytes)Transmit all 6 MIT parameters in a single frame; velocity feedback is 0x2101 joint-output rad/s

For complete byte offsets and C structs, see PR0003 Standard PDO Layout and MIT PDO Layout. Complete the following three checks before allowing motor enablement:

  • Device & Execution Path Verification: Confirm online model string, firmware version, ESI Revision, and 0x6502 match expectations; identify whether MIT routes through the Torque Sensor closed loop or direct current conversion on your hardware.
  • Communication & Feedback Health Check: Confirm valid process data and expected Working Counter (WKC); verify 0x6064 position, velocity, 0x6077 torque, and 0x6078 current refresh continuously with consistent polarity and units, and confirm 0x603F shows no active fault.
  • Coordinate & Zero-Offset Check: Inspect current joint position 0x6064 and unloaded torque zero 0x6077. Perform calibration independently per Section 4.5 only when needed—never hardcode automatic Set Mechanical Zero or automatic zero-torque calibration into every power-on startup routine.
Safety Precaution for Initial Zero-Target Testing on Gravity-Loaded Joints

Zero torque target (τ = 0), zero current target (Iq = 0), and zero-gain MIT (Kp = 0, Kd = 0, τ_ff = 0) do not hold position and do not counteract gravity. Before enabling a gravity-loaded joint with zero targets for the first time, ensure the mechanical link is safely supported or protected by physical stops.

5.2 Startup & CiA 402 Enable Handshake Sequence​

The sequence below assumes complete RxPDO frames are transmitted continuously at a fixed bus cycle. Hold each command until feedback satisfies the transition condition before advancing; if any step times out or faults, abort immediately and log 0x6041, 0x6061, and 0x603F—never blast controlwords blindly using fixed timers.

StepMaster Command ActionTransition Criterion to Next Step
1. Preload OutputsKeep 0x6040 = 0x0000, load target 0x6060 mode and safe initial commands from the table below; prepare target torque limit and optional 0x6072 current limitPDO layout, unit conversions, and initial setpoints pass self-check; no enable requested yet
2. Establish SessionTransmit valid RxPDO frames continuously in SAFEOP, then request OP while maintaining safe initial commandsMaster confirms OP state with valid process-data WKC; slave acquires EtherCAT authority and 0x6061 matches requested mode
3. Ready to Switch OnWrite 0x6040 = 0x0006(0x6041 & 0x006F) == 0x0021 (Ready to switch on)
4. Switched OnWrite 0x6040 = 0x0007(0x6041 & 0x006F) == 0x0023 (Switched on)
5. Enable OperationWrite 0x6040 = 0x000F while maintaining safe initial commands(0x6041 & 0x006F) == 0x0027 (Operation enabled) and 0x6061 equals requested mode
6. Static VerificationHold safe initial commands steady for several cycles while monitoring position, velocity, torque, and IqNo abnormal jumps, oscillation, or sustained current saturation; feedback matches expected path behavior

State Evaluation Note: OP is a bus communication state and 0x6061 is mode feedback—neither alone proves the power stage is closed-loop enabled. Always mask Statusword with & 0x006F (e.g., full statusword 0x0227 masked with & 0x006F yields 0x0027).

Startup ModeSafe Initial Commands Preloaded Before EnablePost-Enable Static Verification Focus
Pure Current -10x6071 = 0Iq target is zero; under external load or gravity, sensor torque 0x6077 is not necessarily zero
Joint Torque Closed-Loop 100x6071 = 0Requests zero joint torque; joint does not hold position, and manual drag feel depends on internal Friction Compensation and sensor zero offset
MIT -2Copy latest raw 0x6064 integer directly into 0x2100:01; set :02 to :05 = 0; write chosen torque limit to :06Synthesized three-term MIT target is zero; whether sensor torque reads near zero depends on underlying execution path and external load

Assigning the raw integer value of 0x6064 directly to 0x2100:01 avoids quantization error from float round-trip conversions. Configure 0x2100:06 and 0x6072 according to hardware and load requirements (0 removes the respective extra limit). Since default MIT PDO excludes 0x6072, write and verify 0x6072 via SDO (or custom PDO) within the current OP session prior to executing the enable handshake if additional Iq limiting is desired.

5.3 Mode Switching: Prepare Safe Targets Before Requesting a New Mode​

For initial integration, use the stop-and-switch safety sequence: Finish active trajectory → Write 0x6040 = 0x0006 → Wait for masked statusword 0x0021 and confirm zero current output → Load new mode and safe initial targets → Re-run 0x0007 → 0x000F handshake → Verify 0x6061 and feedback. Support external gravity loads mechanically before leaving position-holding modes—never expect zero-torque or zero-current commands to hold an unsupported load.

Mode Switch ScenarioMandatory Synchronous Master Actions
Pure Current -1 ↔ Torque Closed-Loop 10Set 0x6071 = 0 explicitly and switch master scaling factors synchronously (0.01 A/LSB vs. 0.025 N·m/LSB); never carry raw values across modes
Other Modes → MIT -2Align 0x2100:01 to latest 0x6064; zero dq_des, Kp, Kd, and τ_ff; set :06 limit explicitly; ramp Damping and Stiffness gradually only after mode switch is confirmed
MIT -2 → Other ModesInitialize target objects for the destination mode: align to 0x6064 for position modes, or set 0 for velocity/current/torque modes—never carry over stale historical targets
Destination Mode Missing from Active PDOConfirm physical stop, exit OP to swap ESI modules (0x119800 ↔ 0x419800) or remap PDOs, re-establish SAFEOP → OP, preload all targets and limits, then re-enable
  • PDO Mapping vs. Mode Decoupling: Changing 0x6060 never alters the active PDO layout automatically. Standard module PDO lacks the 6 MIT objects, and MIT module PDO lacks 0x6071—never assume writing 0x6060 alone switches process-data channels.
  • On-the-Fly Mode Switching Precautions: When active PDO mappings already cover both modes' target objects, firmware permits runtime mode switching. Submit the new 0x6060 value and safe initial targets synchronously in the same RxPDO frame while monitoring 0x6061 and 0x6041 (no bumpless transfer or automatic gain ramping is guaranteed). If switching via SDO, update the cyclic RxPDO transmit buffer simultaneously so the next cycle does not overwrite SDO-initialized targets.

5.4 MIT Hardware Commissioning: From Pure Damping to Full Closed-Loop Control​

Once OP state, valid WKC, (0x6041 & 0x006F) == 0x0027, and 0x6061 == -2 are confirmed, commission MIT control progressively across four stages. During normal operation, maintain 0x6040 = 0x000F and 0x6060 = -2, updating 0x2100:01 through :06 every bus cycle (MIT commands take effect continuously without PP mode's bit4 edge trigger):

Commissioning StageMaster Command StrategyField Observation & Pass Criteria
1. Zero-Gain CheckAlign q_des to current feedback; set dq_des = 0, Kp = 0, Kd = 0, τ_ff = 0Zero torque synthesized by MIT terms; position, joint velocity, sensor torque, and Iq refresh cleanly
2. Pure Damping ValidationKeep Kp = 0, dq_des = 0, τ_ff = 0; increment Kd in small steps from zeroPushing the joint in either direction produces smooth opposing viscous drag; releasing decelerates smoothly without springback, with zero damping torque at rest. Roll back Kd if high-frequency buzz or abnormal current spikes appear
3. Compliant Position HoldLatch current resting position once into constant q_hold, set q_des = q_hold and dq_des = 0, retain verified Kd, and increment Kp in small stepsDisplacing the joint from q_hold generates smooth restoring torque and returns cleanly upon release without sustained oscillation. Warning: Never overwrite q_hold with live 0x6064 every cycle, or position error will remain zero and produce zero stiffness force
4. Trajectory & Payload FeedforwardGenerate smooth continuous q_des(t) from the held posture with dq_des(t) matching dq_des = d(q_des)/dt; gradually introduce polarity-verified τ_ff as neededDynamic position and velocity tracking errors remain well-bounded without sustained torque or Iq saturation; ensure position, velocity, gains, and feedforward in each frame originate from the exact same control timestamp

Within each real-time master cycle, follow this exact execution order: Receive TxPDO feedback → Verify WKC, fault bit, masked Statusword, and Mode Display → Compute control law → Convert physical units & clamp to integer encoding bounds → Pack complete RxPDO → Transmit. Always compute and pack from a single consistent time snapshot so q_des, dq_des, gains, and τ_ff never straddle adjacent trajectory steps across frames.

Master State Machine Pseudocode Reference: Starting MIT and Ramping into Pure Damping

The pseudocode below illustrates the recommended master state machine structure (determine specific Kd setpoints, limit thresholds, and timeout counts based on your joint model and load; position, kd, and tau_limit represent scaled raw integers per Section 4.3):

Initialization:
Select dedicated MIT module 0x419800 (17B RxPDO / 15B TxPDO); verify device identity, execution path, and initial feedback
tx_cmd.mode = -2
tx_cmd.q_des = rx_fb.actual_position // Align directly with raw 0x6064 integer
tx_cmd.dq_des = 0
tx_cmd.kp = 0
tx_cmd.kd = 0
tx_cmd.tau_ff = 0
tx_cmd.tau_limit = configured_raw_torque_limit
tx_cmd.cw = 0x0000
Start cyclic transmission of full 17B RxPDO and establish SAFEOP -> OP session
If additional Iq current limit is required, write 0x6072 via SDO in this OP session and read back to verify
master_state = WAIT_OP

Every Real-Time Bus Cycle:
1. Read latest TxPDO feedback (rx_fb)
2. If WKC invalid, left OP, fault bit (rx_fb.statusword & 0x0008) != 0, or handshake step timed out:
Transition to controlled stop / fault handler (halt trajectory generation, issue disable/protective commands per stop rules)
3. Otherwise advance master_state (at most one transition per cycle):
case WAIT_OP:
if (in_OP && process_data_valid && rx_fb.mode_display == -2):
tx_cmd.q_des = rx_fb.actual_position
tx_cmd.cw = 0x0006
master_state = WAIT_0021

case WAIT_0021:
if ((rx_fb.statusword & 0x006F) == 0x0021):
tx_cmd.cw = 0x0007
master_state = WAIT_0023

case WAIT_0023:
if ((rx_fb.statusword & 0x006F) == 0x0023):
tx_cmd.q_des = rx_fb.actual_position
tx_cmd.cw = 0x000F
master_state = WAIT_0027

case WAIT_0027:
if ((rx_fb.statusword & 0x006F) == 0x0027 && rx_fb.mode_display == -2):
master_state = ZERO_GAIN_CHECK

case ZERO_GAIN_CHECK:
if (static_feedback_healthy && master_permits_damping):
master_state = PURE_DAMPING_RUN

case PURE_DAMPING_RUN:
Continuously verify OP state, (rx_fb.statusword & 0x006F) == 0x0027, and rx_fb.mode_display == -2
Ramp tx_cmd.kd smoothly up to target verification damping value
Keep tx_cmd.kp = 0, tx_cmd.dq_des = 0, tx_cmd.tau_ff = 0

4. Clamp raw integer bounds and transmit complete 17-byte RxPDO

5.5 Stopping, Fault Recovery & Session Reconnection​

  • Abnormal Stopping & Fault Reset: Upon detecting communication loss, mode mismatch, unexpected exit from Operation enabled, or a drive fault, immediately halt trajectory progression and execute controlled stopping per PR0003 Stopping, Fault Reset & Recovery Constraints—merely zeroing targets or halting PDO transmission cannot substitute for proper state-machine shutdown. When a fault occurs, read and log 0x603F:00 (and 0x4500:00 fault history), eliminate the root physical cause, issue a 0x6040.bit7 rising edge, and verify actual fault-bit clearance.
  • Safe Recovery After Reconnection or Reset: After any OP exit/re-entry, fault reset, or control-authority handover, always return to the Section 5.2 safe preload and enable handshake sequence—re-align initial position from 0x6064, resend all 6 MIT parameters, and reapply any 0x6072 current limit (exiting OP wipes prior MIT session commands and extra current limits). Never resume pre-interruption trajectories, high Stiffness, or non-zero Feedforward Torque instantaneously upon re-enabling.
  • Maintenance & Flash Save Safety Boundaries: Schedule parameter tuning saves and Flash writes during dedicated maintenance windows. During position hold (HOLD), controlled fault hold (ACT_DHOLD), or Fault transitions, the power stage may still carry closed-loop current even when Operation enabled is cleared; review PR0003 Save Preconditions before initiating any Flash operation.