TN0003 EtherCAT Force Control Principles and Integration Dictionary
| Item | Information |
|---|---|
| Document No. | TN0003 |
| Revision | Rev. 1.1 · 2026-11-15 |
| Applicable Products | JxServo EtherCAT Joint Modules (R48 / R58 / R68 and related series; specific force-control capabilities depend on hardware sensors and factory configuration) |
| Applicable Firmware | EtherCAT Application Firmware V2.00.04+ (with companion ESI V6 or above) |
| Commissioning Baseline | Always 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 Style | Recommended Mode (0x6060) | Internal Drive Responsibility |
|---|---|---|
| Master reads Torque Sensor feedback, computes outer-loop force control itself, and directly commands final quadrature current | Pure Current Mode: -1 | Receives 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 torque | Joint Torque Closed-Loop: 10 | Uses 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 Torque | MIT Impedance Control: -2 | Synthesizes 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 10 | Tracks 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 trajectories | MIT Impedance Control: -2 | Defines 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:
Pay close attention to the following architectural boundaries during engineering integration:
- 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 finalIqtarget via0x6071(0.01 A/LSB, e.g.,100=1.00 A; read actualIqfrom0x6078). - This path bypasses the drive's internal MIT synthesizer, Torque Sensor closed-loop controller, and built-in compensators (
Torque loop P,Torque damping, and0x2549Friction 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 = 0requests zero electromagnetic torque only; manually backdriving the joint must still overcome the reducer's inherent backdriving friction. By contrast, commanding0 N·min Mode10actively drives motor current based on sensor feedback to track zero net joint output torque.
- The master reads joint torque feedback
- Verifying the Underlying MIT Execution Path:
- Mode display
0x6061 = -2or supported-modes bitmap0x6502confirms 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 from0x6061or0x6502.
- Mode display
1.3 Interactive Torque Synthesis Explorer
Control Partitioning & Joint Response
Interactive DemoDrag the joint arm and release to observe restoring torque and springback.
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. 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.Simulation Model & Boundaries
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 Positionq) slider away from the target and release to observe spring return behavior (increasingKpstrengthens restoring torque, while adjustingKdtunes 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 Parameter | Control Role & Tuning Strategy | Key Signals to Monitor | Abnormal 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 steps | Position tracking error, target vs. actual torque, Iq current | Vibration, 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 damping | Manual backdriving resistance, joint velocity smoothness, Iq ripple, temperature rise | Excessive 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 up | Actual joint torque, static position drift, Iq current | Joint 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, anddq_des = 0. - Dynamic Trajectory Tracking: Set
dq_desequal to the time derivative of desired position trajectoryq_des(t), paired as needed with polarity-verified Feedforward Torqueτ_ff; avoid leavingdq_des = 0and drastically inflatingKpalone to compensate for dynamic tracking lag.
- Compliant Position Holding: Typically configure
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:
| Parameter | What It Acts On | Recommended Tuning Method | Symptoms Requiring Rollback |
|---|---|---|---|
Torque Loop P (0x2548:01)Dimensionless | Regulates inner Torque Sensor closed-loop responsiveness and how tightly actual joint torque tracks desired torque | Fine-tune in small steps from verified factory settings while evaluating manual backdrive feel and torque step tracking; re-check Torque Damping after every change | Vibration, 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 loop | Keep Torque Loop P fixed, adjust Torque Damping in small increments, and compare oscillation decay and current ripple under identical external perturbations | Unimproved 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 task | Set Kp = 0, τ_ff = 0, dq_des = 0, then ramp Kd up from zero while observing manual push resistance | Excessive drag resistance, velocity-noise-induced buzz, or oscillation |
- Separate Control Layers — Never Interchange:
Torque Loop Pgoverns the inner sensor torque loop, whereasMIT Kpconverts outer position error into desired torque. Likewise,Torque DampingandMIT Kdmust be tuned at their respective layers—their numerical values are not interchangeable. - Zero-Output Condition for Torque Damping: Effective inner-loop torque damping depends on
Torque Loop P—whenTorque Loop P = 1(0x2548:01 = 1000) orTorque Damping = 0, inner torque damping output becomes zero. Always re-verify Torque Damping wheneverTorque Loop Pis 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
| Object | Type | Core Master Purpose | Channel & Value Notes |
|---|---|---|---|
0x6040:00 | UINT16 | Enable, stop, fault reset | RxPDO / SDO; standard enable must step through 0x0006 → 0x0007 → 0x000F |
0x6041:00 | UINT16 | Evaluate actual drive operating state | TxPDO; evaluate bitmask (0x6041 & 0x006F) during enable handshaking |
0x6060:00 | INT8 | Request operation mode | RxPDO / SDO; -1 (0xFF) Pure Current, 10 (0x0A) Joint Torque Closed-Loop, -2 (0xFE) MIT |
0x6061:00 | INT8 | Verify active mode display | TxPDO; must be checked alongside 0x6041—never rely on 0x6061 alone to confirm power-stage enablement |
0x6502:00 | UINT32 | Query supported drive modes bitmap | Read-only SDO; declares protocol-supported modes, not whether MIT uses a Torque Sensor closed loop |
0x603F:00 | UINT16 | Read active fault code | SDO / optional TxPDO; see FC0002 Joint Module Fault Alarm & Protection Logic Guide |
Signed Integer Parsing: Wire byte
0xFFrepresents-1and0xFErepresents-2. Always parse0x6060and0x6061as signed 8-bit integers (int8_t) on the master.
4.2 Current, Torque Targets & Motion Feedback Objects
| Object (Applicable Mode) | Type | Physical Meaning, Unit & Channel | Encoding Examples |
|---|---|---|---|
0x6071:00 (Mode -1) | INT16 | Final Iq current target, 0.01 A/LSB (RxPDO) | 100 = 1.00 A, -100 = -1.00 A |
0x6071:00 (Mode 10) | INT16 | Joint output target torque, 0.025 N·m/LSB (RxPDO) | 40 = 1.00 N·m, -40 = -1.00 N·m |
0x6077:00 | INT16 | Joint Torque Sensor feedback, 0.025 N·m/LSB (TxPDO) | 40 = 1.00 N·m (constant unit across all modes) |
0x6078:00 | INT16 | Actual Iq current feedback, 0.01 A/LSB (TxPDO) | 100 = 1.00 A (constant unit across all modes) |
0x6064:00 | INT32 | Joint output position feedback, 65536 LSB/joint rev (TxPDO) | 16384 = 90° = π/2 rad |
0x606C:00 | INT32 | Motor rotor shaft velocity feedback, 1 rpm/LSB (Standard TxPDO) | 60 = motor shaft 60 rpm |
0x2101:00 | INT32 | Joint output shaft velocity feedback, 0.001 rad/s/LSB (MIT TxPDO) | 1000 = joint output 1.000 rad/s |
0x6072:00 | UINT16 | Additional 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-1and Mode10, the master must switch its0x6071conversion factor synchronously; by contrast, feedback objects0x6077and0x6078maintain fixed physical units at all times. - Position & Velocity Conversions: Convert joint position to radians via
q = raw × 2π / 65536. Standard TxPDO0x606Creports motor-shaftrpmand must never be plugged directly into MIT joint velocity error calculations; divide by the gear ratio or use0x2101:00mapped 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 onOPexit and never saved to Flash. Deceleration stops, position holding (HOLD), and fault reactions (includingACT_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:
| Object | Type | Physical Meaning & Unit | Raw Conversion Examples |
|---|---|---|---|
0x2100:01 | INT32 | Desired joint position q_des, 65536 LSB/joint rev | 16384 = π/2 rad (90°) |
0x2100:02 | INT16 | Desired joint velocity dq_des, 0.001 rad/s/LSB | 1000 = 1.000 rad/s |
0x2100:03 | UINT16 | Stiffness Kp, 0.1 N·m/rad/LSB | 100 = 10.0 N·m/rad |
0x2100:04 | UINT16 | Damping Kd, 0.01 N·m·s/rad/LSB | 50 = 0.50 N·m·s/rad |
0x2100:05 | INT16 | Feedforward Torque τ_ff, 0.025 N·m/LSB | 40 = 1.00 N·m |
0x2100:06 | UINT16 | Additional limit on total synthesized torque, 0.025 N·m/LSB | 80 = 2.00 N·m; 0 = remove additional limit |
- Session Lifecycle & Atomic Submission: All 6 sub-indices are session-scoped commands cleared upon exiting
OPand must be resent upon reconnection. Partial mappings or single-item SDO writes take effect individually; for atomic SDO submission, use0x2100Complete 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,0x6072limits the current command stage while0x2100:06limits 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:
| Object | Type | Quantity, Resolution & Raw Range | Online Effect & Persistence |
|---|---|---|---|
0x2548:01 | UINT16 | Torque 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:06 | UINT32 | Torque 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:00 | INT32 | Global 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+): Writing0x2549:00over 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., writing50sets both ratios to0.5starting 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 = 0sets 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. Mode10and sensor-closed-loop MIT paths utilize torque compensation, while other non-current paths follow their respective configurations (on firmware earlier thanV2.00.04,0x2549:00edits only the staged common friction parameter—verify firmware version via0x100A:00).
Reserved Compatibility Sub-Indices & Torque Sensor Notch Filter Configuration
0x2548:02through:05are read-only reserved entries (reading returns0, writing returns a read-only SDO abort, unused in active control).- Torque Sensor Notch Filter enable switch uses
0x2547:01; Global Friction Compensation Ratio uses0x2549:00. - Torque Sensor Notch Filter parameters reside at
0x2547:01through: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
| Object | Type | Master Write Value (UINT32) | Preconditions & Completion Verification |
|---|---|---|---|
0x2531:00 | UINT32 | 0x00000002: Zero-Torque Calibration | Requires servo disabled, valid sensor, and idle calibration state; remove external torque loads before submitting; automatically samples and saves upon acceptance |
0x2531:00 | UINT32 | 0x00000001: Set Mechanical Zero at Current Point | Shifts 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:01 | UINT32 | 0x65766173 (Little-Endian ASCII save) | Submit only after confirming zero motor current output; validates staged parameters, rebuilds runtime modules, and saves asynchronously to Flash |
0x1011:03 | UINT32 | 0x64616F6C (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:
- An SDO write confirmation indicates command acceptance only—not completion of background sampling or Flash programming. Reading
0x1010/0x1011returns capability flag1, not save completion status. Because no dedicated background-job polling object exists, never rely on fixed delays or repeated reads of0x1010as proof of completion (verify via diagnostic logs during commissioning). - 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.
- An SDO write confirmation indicates command acceptance only—not completion of background sampling or Flash programming. Reading
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 Mode10first; switch into Mode10separately only when specifically evaluating standalone Torque Sensor zero-torque backdriving.
5.1 Selecting the PDO Module & Pre-Enable Checklist
| Target Control Method | Selected Module | RxPDO / TxPDO Spec | Master Integration Focus |
|---|---|---|---|
Pure Current (-1)Joint Torque Closed-Loop ( 10) | 0x119800 | 0x1600 / 0x1A00, 15 bytes each | Scale 0x6071 according to 0x6060; read statusword, position, motor-shaft speed 0x606C, sensor torque, and Iq |
MIT Impedance Control (-2) | 0x419800 | 0x1603 (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
0x6502match 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
0x6064position, velocity,0x6077torque, and0x6078current refresh continuously with consistent polarity and units, and confirm0x603Fshows no active fault. - Coordinate & Zero-Offset Check: Inspect current joint position
0x6064and unloaded torque zero0x6077. 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.
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.
| Step | Master Command Action | Transition Criterion to Next Step |
|---|---|---|
| 1. Preload Outputs | Keep 0x6040 = 0x0000, load target 0x6060 mode and safe initial commands from the table below; prepare target torque limit and optional 0x6072 current limit | PDO layout, unit conversions, and initial setpoints pass self-check; no enable requested yet |
| 2. Establish Session | Transmit valid RxPDO frames continuously in SAFEOP, then request OP while maintaining safe initial commands | Master confirms OP state with valid process-data WKC; slave acquires EtherCAT authority and 0x6061 matches requested mode |
| 3. Ready to Switch On | Write 0x6040 = 0x0006 | (0x6041 & 0x006F) == 0x0021 (Ready to switch on) |
| 4. Switched On | Write 0x6040 = 0x0007 | (0x6041 & 0x006F) == 0x0023 (Switched on) |
| 5. Enable Operation | Write 0x6040 = 0x000F while maintaining safe initial commands | (0x6041 & 0x006F) == 0x0027 (Operation enabled) and 0x6061 equals requested mode |
| 6. Static Verification | Hold safe initial commands steady for several cycles while monitoring position, velocity, torque, and Iq | No abnormal jumps, oscillation, or sustained current saturation; feedback matches expected path behavior |
State Evaluation Note:
OPis a bus communication state and0x6061is mode feedback—neither alone proves the power stage is closed-loop enabled. Always mask Statusword with& 0x006F(e.g., full statusword0x0227masked with& 0x006Fyields0x0027).
| Startup Mode | Safe Initial Commands Preloaded Before Enable | Post-Enable Static Verification Focus |
|---|---|---|
Pure Current -1 | 0x6071 = 0 | Iq target is zero; under external load or gravity, sensor torque 0x6077 is not necessarily zero |
Joint Torque Closed-Loop 10 | 0x6071 = 0 | Requests zero joint torque; joint does not hold position, and manual drag feel depends on internal Friction Compensation and sensor zero offset |
MIT -2 | Copy latest raw 0x6064 integer directly into 0x2100:01; set :02 to :05 = 0; write chosen torque limit to :06 | Synthesized 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 Scenario | Mandatory Synchronous Master Actions |
|---|---|
Pure Current -1 ↔ Torque Closed-Loop 10 | Set 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 -2 | Align 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 Modes | Initialize 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 PDO | Confirm 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
0x6060never alters the active PDO layout automatically. Standard module PDO lacks the 6 MIT objects, and MIT module PDO lacks0x6071—never assume writing0x6060alone 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
0x6060value and safe initial targets synchronously in the same RxPDO frame while monitoring0x6061and0x6041(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 Stage | Master Command Strategy | Field Observation & Pass Criteria |
|---|---|---|
| 1. Zero-Gain Check | Align q_des to current feedback; set dq_des = 0, Kp = 0, Kd = 0, τ_ff = 0 | Zero torque synthesized by MIT terms; position, joint velocity, sensor torque, and Iq refresh cleanly |
| 2. Pure Damping Validation | Keep Kp = 0, dq_des = 0, τ_ff = 0; increment Kd in small steps from zero | Pushing 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 Hold | Latch 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 steps | Displacing 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 Feedforward | Generate 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 needed | Dynamic 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 log0x603F:00(and0x4500:00fault history), eliminate the root physical cause, issue a0x6040.bit7rising edge, and verify actual fault-bit clearance. - Safe Recovery After Reconnection or Reset: After any
OPexit/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 from0x6064, resend all 6 MIT parameters, and reapply any0x6072current limit (exitingOPwipes 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), orFaulttransitions, the power stage may still carry closed-loop current even whenOperation enabledis cleared; review PR0003 Save Preconditions before initiating any Flash operation.