Skip to main content

PR0003 EtherCAT Communication and Control Mode Guide

ItemInformation
Document No.PR0003
RevisionRev. 1.1
Applicable ProductsJxServo EtherCAT Joint Modules (R48 / R58 / R68 and other single-axis slave series)
Applicable FirmwareEtherCAT Application Firmware V2.00.04+ (verify online via 0x100A:00 during integration)
LanguageEnglish
Last Updated2026-11-15

This guide is intended for EtherCAT master developers and system integration engineers. It covers CoE (CANopen over EtherCAT) device verification, PDO mapping layouts, CiA 402 state machine handshaking, operation mode specifications, Set Mechanical Zero, parameter management, and fault diagnostics for Juxie Intelligent Joint Modules.

  • Encoding Conventions: Object dictionary entries are denoted throughout this document as 0xIndex:SubIndex (both in hexadecimal). All multi-byte values on the EtherCAT bus are transmitted in Little-Endian byte order.
  • Force Control Companion Guide: For control loop partitioning and parameter tuning workflows in pure current control, joint Torque Sensor closed-loop control, and MIT Impedance Control, refer to TN0003 EtherCAT Force Control Principles and Integration Dictionary.
Internal Real-Time Control Architecture

The drive employs a multi-rate closed-loop control architecture internally:

  • 1 kHz Loop: CiA 402 state machine management, stop control, mode switching, and PP (Profile Position) trajectory planning;
  • 2 kHz Loop: CSP (Cyclic Synchronous Position) target sampling and position loop calculation;
  • 4 kHz Loop: Velocity loop, current loop, joint torque closed-loop, and MIT Impedance Control target updates.

Bus commands sent by the master are preprocessed through a synchronized buffer in the main loop and dispatched to the corresponding control loop rate. Feedback dictionary objects are refreshed in groups by the main loop at divided intervals (between refresh ticks, reading returns the previous complete valid frame). The frequencies above represent internal drive control loop rates—they are neither identical to the EtherCAT bus cycle nor guaranteed to represent end-to-end latency, nor is every individual bus frame guaranteed to execute separately; within the same control tick, the latest valid command received takes effect.


1. Integration Preparation & Device Identification​

1.1 Downloading the ESI Device Description File​

Before integration, download the companion EtherCAT Slave Information (ESI XML) file and import it into the device description library of your master environment (such as TwinCAT, IgH, SOEM, KPA, etc.) prior to scanning slaves and configuring PDOs.

ItemValue
File NameGDESC_CIA402_V6_JX.xml
ESI VersionV6 (and subsequent compatible versions)
Matching Device Revision0x00000010 (must match between the imported ESI and online 0x1018:03)

1.2 Identity Object 0x1018​

Standard single-axis Juxie Intelligent EtherCAT Joint Modules (such as the R48 / R58 / R68 series) use the following standard identity values:

ObjectNameStandard ValueDescription
0x1018:01Vendor ID0x00001035Juxie Intelligent vendor identifier
0x1018:02Product Code0x0000077EEtherCAT Joint Module product code
0x1018:03Revision Number0x00000010Revision number matching V6 ESI; must match the ESI file in use
0x1018:04Serial Number0x00000000Returns 0 by default; not currently used to distinguish individual units

1.3 Online Model & Firmware Version Verification​

Because multiple hardware models share the same Product Code and offline ESI string fields may be empty, the master should read the following read-only Visible String objects via CoE SDO during initialization to verify the actual model and firmware version (examples for R48 / R58 / R68 series shown below):

ObjectMeaningR48 ExampleR58 ExampleR68 Example
0x1008:00Manufacturer Device NameR48V3_ECR58V3_ECR68V3_EC
0x1009:00Manufacturer Hardware VersionAuto-detected at power-onAuto-detected at power-onAuto-detected at power-on
0x100A:00Manufacturer Software VersionV2.00.04+V2.00.04+V2.00.04+
  • Version Readback Notes: 0x100A:00 returns the active application firmware version string running on the device (e.g., V2.00.04 and subsequent compatible releases). 0x1009:00 auto-detects hardware revisions typically in the range V2.01 to V2.15 (returns V1.00 by default if hardware ID encoding is unconfigured; rely on the online return value).
  • Compatibility Verification: Application firmware version (0x100A:00) and device Revision (0x1018:03) are maintained independently. During system integration, always cross-check the online model name, application firmware version, Revision, actual PDO mapping structure, and supported drive modes bitmap 0x6502:00; available features depend on online device declarations and factory hardware configuration.

2. Standard PDO Mapping Layout​

By default, the device enables the standard control module 0x119800 (applicable to PP, PV, Homing, CSP, CSV, joint torque closed-loop, and Iq current modes), comprising RxPDO 0x1600 and TxPDO 0x1A00. Both downlink and uplink frames are 15 bytes each, tightly packed in Little-Endian order without padding bytes.

To use MIT Impedance Control mode (Mode -2), switch to the dedicated module 0x419800. For its exact layout, see Section 5: MIT Impedance Control Mode Specifications.

2.1 RxPDO 0x1600 (Master → Slave, 15 Bytes)​

Byte OffsetObjectNameData TypeUnit & Description
00x6040:00ControlwordUINT16CiA 402 state machine transition and action trigger bits
20x6060:00Modes of operationINT8Requested control mode code (see Section 4)
30x607A:00Target positionINT32Joint output shaft, 65536 LSB/joint rev
70x60FF:00Target velocityINT32Motor rotor shaft, 1 rpm/LSB
110x6071:00Target current / torqueINT16Mode -1: 0.01 A/LSB; Mode 10: 0.025 N·m/LSB
130x6072:00Cyclic current limitUINT160.01 A/LSB; write 0 to apply no additional limit

2.2 TxPDO 0x1A00 (Slave → Master, 15 Bytes)​

Byte OffsetObjectNameData TypeUnit & Description
00x6041:00StatuswordUINT16Current drive state machine status and action acknowledgment bits
20x6061:00Modes of operation displayINT8Must be evaluated together with 0x6041 to confirm active enabled execution
30x6064:00Position actual valueINT32Joint output shaft, 65536 LSB/joint rev
70x606C:00Velocity actual valueINT32Motor rotor shaft, 1 rpm/LSB
110x6077:00Torque actual valueINT16Joint Torque Sensor reading, 0.025 N·m/LSB (fixed unit across all modes)
130x6078:00Current actual value (Iq)INT16Actual Iq current, 0.01 A/LSB (fixed unit across all modes)

2.3 C Struct Reference​

Master developers can map process data directly using the following 1-byte-packed C structures:

#include <stdint.h>

#pragma pack(push, 1)

/* Standard Module 0x119800 - RxPDO (0x1600, 15 bytes) */
typedef struct {
uint16_t controlword; /* 0x6040:00 Controlword */
int8_t mode_of_operation; /* 0x6060:00 Modes of operation request */
int32_t target_position; /* 0x607A:00 Target joint position, 65536 LSB/joint rev */
int32_t target_velocity; /* 0x60FF:00 Target motor shaft velocity, 1 rpm/LSB */
int16_t target_torque_iq; /* 0x6071:00 Target current (0.01 A) or joint torque (0.025 N·m) */
uint16_t max_current_limit; /* 0x6072:00 Cyclic additional current limit, 0.01 A/LSB (0 = no extra limit) */
} jx_ecat_std_rxpdo_t;

/* Standard Module 0x119800 - TxPDO (0x1A00, 15 bytes) */
typedef struct {
uint16_t statusword; /* 0x6041:00 Statusword */
int8_t mode_display; /* 0x6061:00 Modes of operation display */
int32_t actual_position; /* 0x6064:00 Actual joint position, 65536 LSB/joint rev */
int32_t actual_velocity; /* 0x606C:00 Actual motor shaft velocity, 1 rpm/LSB */
int16_t actual_torque; /* 0x6077:00 Joint sensor torque, 0.025 N·m/LSB */
int16_t actual_iq; /* 0x6078:00 Actual Iq current, 0.01 A/LSB */
} jx_ecat_std_txpdo_t;

#pragma pack(pop)

2.4 Using Cyclic Current Limit 0x6072​

Across all EtherCAT operation modes, 0x6072:00 is uniformly interpreted as an additional dynamic upper limit on the magnitude of the final quadrature current command |Iq|:

  • Scaling & Meaning: Resolution is 0.01 A/LSB. For example, writing 500 imposes an additional 5.00 A ceiling, while writing 0 removes any master-imposed additional limit. A non-zero value takes the minimum alongside hardware ratings, mode limits, and existing internal controller limits.
  • Session Lifecycle: This limit is valid only within the current OP session and is never saved to Flash. Exiting OP automatically clears the session's additional limit; the master must resend it upon re-entering OP.
  • Typical Combination Examples:
    • After completing OP entry and the enable handshake, setting Mode -1, 0x6071 = 123, 0x6072 = 500 commands 1.23 A target current while clamping total |Iq| to 5.00 A.
    • Setting Mode 10, 0x6071 = 40, 0x6072 = 500 commands 1.00 N·m joint target torque while clamping the torque loop's |Iq| output to 5.00 A.
Scope Boundary of Cyclic Current Limit

0x6072 constrains the Iq control command only during normal closed-loop operation (RUNNING) and is not an independent overcurrent fault protection threshold. During deceleration stop, position holding (HOLD), fault protection responses, or controlled fault holding (ACT_DHOLD), the drive applies internal protection limits, so actual braking or holding current may exceed the additional limit set by the master in 0x6072.


3. Controlword & State Machine Handshake​

3.1 Prerequisites & Standard Enable Sequence​

Before transitioning the slave to OP and enabling the motor, complete initialization and handshaking in the following three steps:

  1. Preload Safe Initial Commands in SAFEOP The slave establishes its cyclic output session upon receiving the first valid RxPDO frame in SAFEOP (no motion is executed during SAFEOP). Before requesting transition to OP, the master must preload the initial controlword, target operation mode (0x6060), and safe initial targets into cyclic RxPDO frames:

    • Position modes (CSP / PP): Read the current actual joint position 0x6064 first and assign it to target position 0x607A (in PP mode, keep 0x6040.bit4 = 0) to prevent a sudden position step upon enabling;
    • Velocity / Current / Torque modes: Explicitly send 0 even when the initial target is zero;
    • Mode 6 (Set current position as zero) & Mode -2 (MIT): Preload the controlword and mode value (for initialization rules of omitted MIT fields, see Section 5.3; with full MIT PDO, preload 0x2100:01 = 0x6064 and set velocity, Stiffness, Damping, and Feedforward Torque to 0).
  2. Acquire EtherCAT Control Authority in OP Ensure no other control interface (such as JxServo Studio over USB) is actively holding servo enable authority. After entering OP while disabled, the slave automatically acquires EtherCAT control authority:

    • Until EtherCAT control authority is acquired, mode display 0x6061 remains 0;
    • Prior to active running, 0x6061 may echo the currently requested valid mode early, which does not mean the power stage is enabled or mode execution is active. Always verify both statusword 0x6041 and mode display 0x6061 together.
  3. Execute the CiA 402 Enable Handshake Step-by-Step The drive does not support jumping states by writing 0x000F directly. Write to controlword 0x6040:00 sequentially, waiting at every step until statusword 0x6041:00 satisfies the bitmask criterion before sending the next command:

StepMaster Writes 0x6040:00Wait Criterion (0x6041 & 0x006F)CiA 402 State Reached
10x0006== 0x0021Ready to switch on
20x0007== 0x0023Switched on
30x000F== 0x0027Operation enabled

3.2 Online Mode Switching & Halt​

  • Operation Mode Switching: Supported modes can be switched by modifying 0x6060, without internal bumpless transfer or gain ramping. Perform mode switches only when the motor is stationary or under safe zero-speed, zero-torque conditions.
    • Recommended Practice (Synchronous PDO Update): Update the new 0x6060 mode and its corresponding safe target value together within the same RxPDO frame.
    • Precaution for Standalone SDO Mode Writes: Writing 0x6060 via SDO alone aligns the internal position reference to the actual position and initializes velocity, current, and torque targets to zero (PP mode retains preloaded targets awaiting a bit4 trigger). However, because target objects are typically mapped in cyclic RxPDO, subsequent bus cycles will overwrite them with RxPDO buffer values—the master must update its cyclic Tx buffer synchronously.
  • Halt (0x6040.bit8):
    • Setting 0x6040.bit8 = 1 decelerates the motor at the configured deceleration rate and maintains closed-loop position holding; in Halt state, 0x6041.bit10 = 1 indicates stable holding has been reached.
    • New targets sent during Halt are preloaded only and not executed immediately. Clearing bit8 = 0 (when fault-free) resumes the last target accepted prior to Halt; values preloaded during Halt require a new trigger edge or a post-release target change to execute.

3.3 Stopping, Fault Reset & Recovery Constraints​

Whenever fault protection, Quick Stop, servo disable, OP exit, control authority handover, or departure from PP mode occurs, the drive automatically clears pending motion requests and acknowledgment flags.

After resolving and clearing a standard power-off fault, the master must re-execute the full 0x0006 → 0x0007 → 0x000F enable handshake, align with the current position, and then issue new targets (in PP mode, a fresh bit4 rising edge is required; stale targets, repeated PDO frames, or holding bit4 high will not resume motion automatically). Special stop and recovery scenarios require the following handling:

Scenario & CommandBehavior & Master Handling Requirements
Quick Stop
0x6040 = 0x0002
Initiates fast deceleration followed by power-stage disable. However, if external commands or state conditions change during the transition, a re-enable request may still occur. Do not assume staying on 0x0002 permanently locks the drive off; follow up with a disable controlword (e.g., 0x0000 or 0x0006) and verify actual stop via 0x6041.
PP Recovery After Controlled-Hold Fault
(ACT_DHOLD Scenario)
Certain protections decelerate and maintain closed-loop position holding (ACT_DHOLD; see FC0002). After resetting such a fault, the low-level drive remains in closed-loop position hold awaiting a new motion event to return to RUNNING. If the master follows the normal shutdown recovery flow ("wait for 0x6041 to reach 0x0027 before toggling bit4"), status may remain at 0x0023 (Switched on). Validate recovery timing specifically for load-holding conditions rather than copying standard shutdown recovery verbatim.
Fault Reset
0x6040.bit7 Rising Edge
Once accepted into the background, a reset request automatically retries if the first attempt fails until reset succeeds or control authority changes. Confirm completion by verifying actual fault clearance (0x6041.bit3 == 0 and active error cleared). If a subsequent fault occurs later, pull bit7 low first before generating a new rising edge.

4. Operation Modes & Control Commands​

4.1 Overview of Supported Operation Modes​

Write the mode request to 0x6060:00 (INT8) and verify mode feedback from 0x6061:00 (INT8). Negative numbers use two's complement encoding: wire byte 0xFF represents -1, and 0xFE represents -2. Query the read-only bitmap 0x6502:00 online to inspect supported modes on the connected unit.

0x6060 ValueMode NameCore Control ObjectsPhysical Units & Control Characteristics
1PP (Profile Position)0x607A, 0x6081, 0x6083, 0x6084Joint-side absolute position (65536 LSB/joint rev); 0x6040.bit4 triggers internal point-to-point trajectory planning
3PV (Profile Velocity)0x60FF, 0x6083Motor-shaft velocity (1 rpm/LSB); smooth acceleration/deceleration using velocity ramp settings
6Homing (Current Position Zero)0x6040.bit4Rising edge on bit4 sets current position directly as mechanical zero and queues background Flash save (no homing search motion)
8CSP (Cyclic Synchronous Position)0x607AJoint-side absolute position (65536 LSB/joint rev); direct pass-through by default, sampled at the 2 kHz position tick
9CSV (Cyclic Synchronous Velocity)0x60FF, 0x6083Motor-shaft velocity (1 rpm/LSB); velocity ramp enable follows device configuration
10Joint Torque Closed-Loop Mode0x6071Joint-side target torque (0.025 N·m/LSB); requires hardware Torque Sensor and closed-loop firmware support
-1 (0xFF)Iq Current Mode0x6071Motor quadrature current Iq (0.01 A/LSB, i.e., 10 mA/LSB)
-2 (0xFE)MIT Impedance Control Mode0x2100:01 to :06Joint-side position, velocity, Stiffness Kp, Damping Kd, Feedforward Torque, and total target torque limit (see Section 5)
Unit Conversion Warning: Strictly Distinguish "Joint Output Shaft" vs. "Motor Rotor Shaft"

Different objects use either reducer output shaft (joint-side) or motor rotor shaft units (differing by the gear reduction ratio). Double-check every object when implementing master scaling logic:

  • Joint Output Shaft Units: Position objects 0x607A / 0x6064 / 0x607D (65536 LSB = 1 joint rev = 360°, 16384 LSB = 1/4 rev = 90°), PP profile velocity 0x6081 (joint-side 1 rpm/LSB), PP profile acceleration/deceleration 0x6083 / 0x6084 (joint-side 1 rpm/s/LSB), joint torque 0x6071 (Mode 10) / 0x6077 (0.025 N·m/LSB), and all target and feedback objects in MIT mode (including 0x2101 joint angular velocity).
  • Motor Rotor Shaft Units: Target velocity 0x60FF in PV (Mode 3) and CSV (Mode 9) (1 rpm/LSB at motor shaft), velocity ramp acceleration 0x6083 in velocity modes (1 rpm/s/LSB at motor shaft), and standard TxPDO velocity feedback 0x606C (1 rpm/LSB at motor shaft). Divide by the model's gear ratio to obtain joint output speed.

4.2 Key Control Guidelines for CSP / Velocity / Current / Torque Modes​

  • CSP Cyclic Synchronous Position (Mode 8):
    • Start sending continuous, smooth cyclic position trajectories from near the current actual joint position 0x6064, avoiding large position steps.
    • Communication interpolation follows the firmware preset (disabled by default, directly adopting the latest target at the 2 kHz position loop); reading or writing compatibility object 0x60C2 does not alter EtherCAT interpolation behavior.
  • PV / CSV Velocity Modes (Mode 3 / 9):
    • Acceleration object 0x6083 in velocity modes uses motor-shaft rpm/s; raw values above 20000 are clamped to 20000, and writing 0 applies the firmware runtime default.
  • Iq Current & Joint Torque Closed-Loop (Mode -1 / 10):
    • Both modes share the INT16 object 0x6071; the master must switch scaling factors synchronously when changing modes. Protocol encoding spans -327.68 A to +327.67 A in Current mode and -819.2 N·m to +819.175 N·m in Torque Closed-Loop mode, while actual physical output remains bounded by hardware ratings and internal controller limits.

4.3 PP Profile Position Triggering & Continuous Update (Mode 1)​

In PP mode, 0x607A always represents an absolute joint target position. bit5 and bit6 of controlword 0x6040 are ignored (relative displacement accumulation and buffered motion queues are not supported); newly submitted targets trigger immediate internal trajectory replanning, with the latest request winning within the same control cycle. Profile parameters set to 0 use runtime defaults (0x6084 = 0 reuses active acceleration with symmetric accel/decel planning).

Status Flags & Trigger Mechanism​

Control / Status BitDrive Behavior & Master Criterion
0x6040.bit4 = 0Preloads target position and profile parameters only; previously accepted trajectory continues
0x6040.bit4 Rising Edge (0 → 1)Latches the complete current target position and profile parameters and submits them to the trajectory planner
0x6040.bit4 Held at 1Supports dynamic continuous updates: any change in target position or profile parameters triggers replanning; identical values do not restart the trajectory
0x6041.bit12 = 1 (Set-point ack)In PP mode after actually entering Operation enabled, indicates the request is latched; clears when the master clears bit4
0x6041.bit10 = 1 (Target reached)Indicates the command has been applied, trajectory planning has finished, and actual joint position is within the target window

Note: PP requests can be pre-latched during enable handshaking, whereas 0x6041.bit12 asserts 1 only after truly entering Operation enabled. Never block the enable handshake waiting for bit12. Furthermore, sending a single legacy 0x004F command will not start PP motion as described here.

PP Mode Edge-Trigger & Continuous-Update Example​

StepControlword 0x6040Target Position 0x607AMaster Action & Wait Condition
1. Enable & preload0x0006 → 0x0007 → 0x000F16384Complete Section 3.1 handshake, confirm 0x6061 = 1, preload 1/4-turn target (90°)
2. First trigger0x001F16384Raise bit4 to generate a rising edge; wait for 0x6041.bit12 == 1 to confirm latch
3. Clear ack0x000F16384Clear bit4 and wait for 0x6041.bit12 == 0; trajectory continues until bit10 == 1 (reached)
4. Re-trigger0x001F32768Write half-turn target (180°) and raise bit4 again to submit via a new rising edge
5. Continuous updateHold 0x001F49152Keep bit4 high and update target directly to 3/4-turn (270°) for online replanning

5. MIT Impedance Control Mode Specifications​

MIT Impedance Control mode (0x6060 = -2, wire byte 0xFE) is designed for legged robots, humanoid joints, and compliant interaction. All position, velocity, Stiffness, Damping, and torque parameters use joint output shaft physical units. Use dedicated module 0x419800 for synchronous full-PDO cyclic transmission.

5.1 Control Law & Object Dictionary​

During normal operation, the drive synthesizes target joint torque according to the following joint-side impedance control law (position error in rad, velocity error in rad/s, torque in N·m):

τ = Kp × (q_des − q) + Kd × (dq_des − dq) + τ_ff
ObjectNameTypePhysical Value per LSBDescription
0x2100:01Desired joint position q_desINT321/65536 joint revSame position unit as 0x607A / 0x6064
0x2100:02Desired joint velocity dq_desINT160.001 rad/sJoint output shaft angular velocity target
0x2100:03Position Stiffness KpUINT160.1 N·m/radEncoding range 0 to 6553.5 N·m/rad
0x2100:04Velocity Damping KdUINT160.01 N·m·s/radEncoding range 0 to 655.35 N·m·s/rad
0x2100:05Feedforward Torque τ_ffINT160.025 N·mGravity or inverse-dynamics compensation feedforward
0x2100:06Total target torque magnitude limitUINT160.025 N·mClamps synthesized `
0x2101:00Actual joint velocity dqINT320.001 rad/sRead-only feedback, joint output shaft angular velocity
  • Torque Limit Boundary: During normal running, 0x2100:06 clamps the magnitude |τ| of the synthesized three-term target torque and takes the minimum with the drive's internal effective torque ceiling; stop, holding (HOLD), and fault protection states apply internal safety limits. Note that protocol encoding range does not equal physical output capability, and clamping target torque cannot prevent measured sensor torque from exceeding limits under external mechanical impact.

5.2 Dedicated MIT PDO Mapping Layout (Module 0x419800)​

Module 0x419800 maps RxPDO 0x1603 (17 bytes) and TxPDO 0x1A03 (15 bytes), both tightly packed starting at offset 0 without padding. Always configure master mappings with V6 or newer ESI files (legacy 15-byte MIT RxPDO mappings lacked the 6th item, total torque limit).

RxPDO 0x1603 (Master → Slave, 17 Bytes)​

Byte OffsetObjectNameTypeUnit & Description
00x6040:00ControlwordUINT16CiA 402 state machine enable and control bits
20x6060:00Modes of operationINT8Fixed at -2 (wire byte 0xFE)
30x2100:01Desired joint positionINT321/65536 joint rev
70x2100:02Desired joint velocityINT160.001 rad/s
90x2100:03Position Stiffness KpUINT160.1 N·m/rad
110x2100:04Velocity Damping KdUINT160.01 N·m·s/rad
130x2100:05Feedforward Torque τ_ffINT160.025 N·m
150x2100:06Total target torque limitUINT160.025 N·m (0 = no additional limit)

TxPDO 0x1A03 (Slave → Master, 15 Bytes)​

Byte OffsetObjectNameTypeUnit & Description
00x6041:00StatuswordUINT16Actual drive operating status
20x6061:00Modes of operation displayINT8Evaluate with statusword; returns -2 (0xFE) in normal MIT operation
30x6064:00Actual joint positionINT321/65536 joint rev
70x2101:00Actual joint velocityINT320.001 rad/s (distinguish from motor-shaft rpm in standard PDO 0x606C)
110x6077:00Joint sensor torqueINT160.025 N·m/LSB
130x6078:00Actual Iq currentINT160.01 A/LSB

MIT Mode C Struct Reference​

#include <stdint.h>

#pragma pack(push, 1)

/* MIT Module 0x419800 - RxPDO (0x1603, 17 bytes) */
typedef struct {
uint16_t controlword; /* 0x6040:00 Controlword */
int8_t mode_of_operation; /* 0x6060:00 Mode request, fixed at -2 (0xFE) */
int32_t q_des; /* 0x2100:01 Desired joint position, 1/65536 joint rev */
int16_t dq_des; /* 0x2100:02 Desired joint velocity, 0.001 rad/s */
uint16_t kp; /* 0x2100:03 Position Stiffness Kp, 0.1 N·m/rad */
uint16_t kd; /* 0x2100:04 Velocity Damping Kd, 0.01 N·m·s/rad */
int16_t tau_ff; /* 0x2100:05 Feedforward Torque, 0.025 N·m */
uint16_t tau_limit; /* 0x2100:06 Total target torque limit, 0.025 N·m (0 = no extra limit) */
} jx_ecat_mit_rxpdo_t;

/* MIT Module 0x419800 - TxPDO (0x1A03, 15 bytes) */
typedef struct {
uint16_t statusword; /* 0x6041:00 Statusword */
int8_t mode_display; /* 0x6061:00 Modes of operation display */
int32_t actual_position; /* 0x6064:00 Actual joint position, 1/65536 joint rev */
int32_t actual_joint_vel; /* 0x2101:00 Actual joint velocity, 0.001 rad/s (joint output side) */
int16_t actual_torque; /* 0x6077:00 Joint sensor torque, 0.025 N·m/LSB */
int16_t actual_iq; /* 0x6078:00 Actual Iq current, 0.01 A/LSB */
} jx_ecat_mit_txpdo_t;

#pragma pack(pop)

5.3 Initialization Rules & 17-Byte Frame Packing Example​

  • Mode-Entry Initialization: Upon entering MIT mode, firmware first aligns q_des to the current actual joint position and clears dq_des, Kp, Kd, τ_ff, and the additional torque limit to zero before applying fields supplied in the incoming transaction. Partial mappings or individual SDO writes take effect independently; once enabled, any non-zero gain or feedforward immediately produces torque output.
  • SDO Access & Complete Access: When writing individual SDO sub-indices, select Mode -2 and confirm mode and enable readiness first before writing MIT parameters. To submit all 6 parameters atomically via SDO, use 0x2100 Complete Access: 16 bytes starting from sub-index :00 (06 00 header plus 14 parameter bytes), or 14 bytes of pure parameters starting from sub-index :01.
  • Session Cleanup & Dual Limiting: Exiting OP automatically clears MIT session commands and additional limits, requiring re-transmission upon reconnection. Although the default MIT PDO omits 0x6072, any non-zero 0x6072 current limit set via SDO or custom mapping in the active session still applies during normal running independently alongside 0x2100:06.

Encoding Walkthrough: Assuming OP transition and enable handshaking are complete, consider encoding the following demo setpoints: joint position 1/4 rev (90°), joint velocity 1.0 rad/s, Kp = 300 N·m/rad, Kd = 0.5 N·m·s/rad, Feedforward Torque 1.0 N·m, and total target torque ceiling 50.0 N·m (values are for encoding illustration only; during real hardware commissioning, always start from zero gain and low damping):

FieldPhysical SetpointRaw Integer ValueHex Bytes (Little-Endian)
0x6040:00 ControlwordOperation enabled0x000F0F 00
0x6060:00 ModeMIT Mode-2FE
0x2100:01 Desired position0.25 joint rev16384 (0x00004000)00 40 00 00
0x2100:02 Desired velocity1.0 rad/s1000 (0x03E8)E8 03
0x2100:03 Stiffness Kp300 N·m/rad3000 (0x0BB8)B8 0B
0x2100:04 Damping Kd0.5 N·m·s/rad50 (0x0032)32 00
0x2100:05 Feedforward τ_ff1.0 N·m40 (0x0028)28 00
0x2100:06 Torque limit50.0 N·m2000 (0x07D0)D0 07

The resulting assembled 17-byte RxPDO payload is:

0F 00 FE 00 40 00 00 E8 03 B8 0B 32 00 28 00 D0 07

6. Set Mechanical Zero & Torque Sensor Calibration​

6.1 SDO Calibration Command Object 0x2531:00​

0x2531:00 is a UINT32 command object supporting 4-byte single-item SDO access only (PDO mapping and Complete Access are not supported). The lower 8 bits hold the opcode, and the upper 24 bits hold a signed parameter:

Write Value (UINT32)FunctionPreconditions & Execution Behavior
0x00000001Set Mechanical Zero at current positionAccepted whether servo is enabled or disabled (rejected if a fault is active, feedback is unready, or a background save job is busy). Immediately updates coordinates and synchronizes position references upon acceptance; background Flash persistence waits until the motor satisfies disabled conditions.
0x00000002Zero-Torque Calibration (0 N·m)Requires servo disabled, valid Torque Sensor, and idle calibration state. Submit after removing all external torque loads; automatically samples and saves to Flash upon acceptance.
0x00271002Theoretical +10 N·m Torque CalibrationOpcode 0x02, upper 24-bit signed value +10000 mN·m (0x002710).
0xFFD8F002Theoretical -10 N·m Torque CalibrationOpcode 0x02, upper 24-bit signed value -10000 mN·m (0xFFD8F0).
  • Torque Calibration Polarity & Range: For opcode 0x02, the upper 24 bits are interpreted as a signed integer in mN·m within ±100000 (±100 N·m). Polarity follows the module's internal joint reference direction; firmware automatically accounts for physical sensor mounting orientation independently of user polarity object 0x607E.
  • Readback Semantics: Reading 0x2531:00 returns only the last accepted command word and does not indicate that background sampling or Flash writing has finished.

6.2 CiA 402 Mode 6: Direct Homing at Current Position​

In addition to 0x2531:00, you can set the current position directly as mechanical zero using standard Mode 6 (Homing), which performs no home-switch search motion and ignores 0x6098 / 0x607C:

  1. Confirm the slave is in OP, holds EtherCAT control authority, has valid position feedback, and is fault-free (entering Operation enabled is not mandatory).
  2. Write 0x6060 = 6 and wait for 0x6061 == 6; keep low controlword bits at 0x0006 / 0x0007 / 0x000F with bit4 = 0.
  3. Transition 0x6040.bit4 from 0 to 1 (rising edge) to trigger Set Mechanical Zero (do not assert Halt or Fault Reset simultaneously; holding bit4 high will not re-trigger).
  4. Inspect bit13, bit12, and bit10 of statusword 0x6041 to verify the outcome; clear bit4 to 0 first if another trigger is needed.
Homing Execution Stagebit13 (Error)bit12 (Attained)bit10 (Target Reached)
Idle before trigger001
Processing or awaiting updated post-zero feedback000
Zero offset applied & background save queued011
Homing operation failed101

While Mode 6 is active, position, velocity, and torque motion targets are ignored and the new zero coordinate is held; explicitly load fresh targets before switching back to a motion mode.

Distinction Between Active Coordinate Zeroing and Non-Volatile Persistence

Both Mode 6 completion (bit12 = 1) and a successful SDO write response on 0x2531:00 indicate only that runtime coordinates are zeroed and the save job is queued—neither waits for Flash erase/write completion. If Set Mechanical Zero was performed while servo-enabled, you must disable the motor first (see Section 7.4 Save Preconditions) and allow background saving to finish before powering off, otherwise the new zero will not persist across power cycles.


7. Parameter Configuration & Non-Volatile Saving​

7.1 Common Control Parameter Dictionary​

The following parameters are accessed via single-sub-index SDO reads/writes and do not support PDO mapping or Complete Access:

ObjectParameter NameTypeScaling & Value ConstraintsOnline Write When Enabled
0x2532:00Current loop bandwidthUINT321 Hz/LSB, must be > 0No
0x2534:00Velocity loop proportional gain KpUINT32Actual = raw ÷ 100000, must be > 0No
0x2535:00Velocity loop integral gain KiUINT32Actual = raw ÷ 10000000, 0 allowedNo
0x2536:00Position loop proportional gain KpUINT32Actual = raw ÷ 100, raw range 0 to 100000No
0x2537:00Position loop integral gain KiUINT32Actual = raw ÷ 10000000, 0 allowedNo
0x2538:00Peak phase current limitINT320.01 A/LSB (e.g., 500 = 5.00 A), must be > 0No
0x2548:01Torque loop PUINT160.001/LSB (dimensionless), raw 1000 to 20000 (1 to 20)Yes
0x2548:06Torque dampingUINT320.001 N·m·s/rad/LSB, raw 0 to 10000000Yes
0x2549:00Global Friction Compensation ratioINT321%/LSB, raw 0 to 100 (0 disables output, 50 = 0.5 ratio)Yes
0x607D:01Min position limit (software)INT3265536 LSB/joint rev; save validation requires Min < MaxNo
0x607D:02Max position limit (software)INT3265536 LSB/joint rev (soft-limit enable follows device config)No
  • Compatibility & Reserved Entries: Writing to 0x2548 requires firmware with Torque Sensor and torque loop support. Sub-indices 0x2548:02 through :05 are read-only reserved items (reads return 0, writes return a read-only SDO abort, unused in control). Torque Sensor Notch Filter switch and parameters use 0x2547:01 through :04. Although legacy names and access flags remain in the ESI XML for compatibility, follow the specifications in this section during development.

7.2 Staged Editing vs. Real-Time Online Tuning​

  1. Standard Parameters (Stage in RAM → Save to Apply) Standard parameters must be written with the servo disabled. SDO writes modify only a shared RAM staging buffer (readbacks reflect staged values without altering active runtime control gains; staging is independent of motion authority or PREOP/SAFEOP/OP state, shared across communication ports where last-write-wins). Only when a Save command is issued does firmware validate cross-parameter constraints, rebuild runtime control modules, and persist to Flash.
  2. Online Tunable Objects (Immediate Runtime Effect) Firmware V2.00.04+ supports writing 0x2548:01 (Torque loop P), 0x2548:06 (Torque damping), and 0x2549:00 (Global Friction Compensation ratio) directly while the servo is enabled, updating both active runtime values and the RAM staging buffer immediately for subsequent control cycles:
    • Torque loop P and Torque damping require the torque loop to be ready; changing Torque loop P automatically refreshes effective torque damping.
    • Writing 0x2549:00 updates both common friction and torque compensation ratios simultaneously (the master torque-compensation switch remains independent; on firmware earlier than V2.00.04, 0x2548:01 and 0x2549:00 support disabled staged editing only).
    • To retain online adjustments across power cycles, execute a Save command after stopping and disabling the drive.

7.3 Non-Volatile Save & Restore Default Commands​

OperationTarget SDO ObjectWrite Value (UINT32)Little-Endian BytesExecution Behavior
Save Current Parameters0x1010:01 or 0x1010:030x6576617373 61 76 65 ("save")Validates staged parameters, applies & rebuilds runtime modules, and queues background Flash write
Restore Default Parameters0x1011:030x64616F6C6C 6F 61 64 ("load")Restores factory default parameter group, updates boot group, and loads into active runtime
  1. Confirm Actual Power-Stage Disable: Ensure the motor power stage has completely ceased current output (see Section 7.4).
  2. Edit & Verify Staged Values: Write target parameters via SDO (e.g., 0x2538:00 = 500 for 5.00 A peak phase current) and read back to confirm.
  3. Submit Save & Wait: Write 0x65766173 to 0x1010:03. Keep in mind:
    • A successful SDO response indicates only that the background save job was accepted (reading 0x1010 / 0x1011 returns 1 as a standard capability flag, not a completion status);
    • Submitting save does not freeze the staging buffer—do not modify parameters or re-enable the drive before background writing finishes, to avoid saving inconsistent data.
  4. Verify Persistence: No dedicated EtherCAT object currently polls background Flash completion, so fixed delays or repeated reads of 0x1010 cannot guarantee completion (use diagnostic logs during bench commissioning; if validation fails, fix staged values and resubmit—Flash write failures neither roll back applied runtime parameters nor auto-retry). To verify reliable persistence, power-cycle the drive after background saving completes and read back via SDO.

Common SDO Abort Codes​

SDO Abort CodeMeaning & Troubleshooting
0x08000021Background storage or calibration job is busy; wait for the previous operation to finish before retrying
0x08000022Current device or runtime module state prohibits the operation (e.g., motor is still enabled/outputting current, or torque loop is not ready)
0x06090030Parameter value out of range, or cross-parameter validation failed during save (e.g., software min limit >= max limit)

7.4 Save Preconditions​

Confirm Zero Current Output Before Any Flash Operation

Parameter saving, restoring defaults, zero-offset persistence, and diagnostic configurations involving Flash writes must be executed only after the current loop has completely stopped outputting current:

  1. During controlled holding (ACT_DHOLD) or protective deceleration stops, the power stage may continue closed-loop current output even if Statusword reports Fault or no longer shows Operation enabled. Never rely solely on surface statusword bits to judge safe disablement.
  2. Applying parameters, rebuilding runtime modules, and writing internal Flash can briefly interrupt bus communication continuity. Schedule Flash operations during dedicated maintenance windows and resume cyclic motion control only after saving completes.

8. Runtime Monitoring & Fault Diagnostics​

8.1 Basic Runtime Monitoring Objects​

The following read-only INT32 monitoring objects refresh at divided intervals alongside the feedback dictionary (retaining the previous valid reading between updates). They are excluded from default PDOs and can be polled at low frequency via SDO or mapped into custom TxPDOs as needed:

ObjectMonitored QuantityResolutionScaling Example
0x2661:00Filtered DC bus current1 mA/LSB1250 = 1.25 A
0x2662:00MOSFET / drive temperature0.1 °C/LSB425 = 42.5 °C
0x2663:00Motor winding temperature0.1 °C/LSB-125 = -12.5 °C
0x2664:00MCU internal temperature0.1 °C/LSB350 = 35.0 °C

Tip: DC bus current (0x2661:00) and motor quadrature current Iq (0x6078:00) measure physically distinct points in the power chain—distinguish between them when evaluating total system power consumption versus motor shaft torque.

8.2 Active Error & Fault History Queue​

  • Read Active Error Code: Read standard object 0x603F:00.
  • Read Historical Diagnostic Codes: Read vendor object 0x4500:00 (read-only UINT32, 4-byte single SDO read only; PDO mapping and Complete Access unsupported). The lower 16 bits return the V2.0 diagnostic code (0xDDSS format), while the upper 16 bits are fixed at 0x0000.

Reverse-Index Querying on 0x4500:00​

The drive caches up to the 64 most recent alarm/fault entries internally, returning 0 for empty slots or out-of-bounds indices. Reading is non-destructive, non-deduplicated, and unfiltered by severity (if new faults occur during querying, reverse indices shift accordingly).

Standard SDO read APIs that zero-fill the request payload return the most recent entry (k = 0). If your master stack supports custom construction of the 8-byte CoE SDO payload, set Byte4 (0-indexed, first data byte) to reverse index k (k = 0 = latest, k = 1 = second latest, k = 2 = third latest):

CoE SDO payload example (excluding EtherCAT mailbox header and CoE header):
Master request (query 3rd latest entry, k = 2): 40 00 45 00 02 00 00 00
Slave response (returns lower 16-bit code 0xHHLL): 43 00 45 00 LL HH 00 00

8.3 Fault Masking & Diagnostic Configuration Persistence 0x4500:01​

Writing a packed command to write-only object 0x4500:01 (UINT32, single SDO write) while the servo is disabled modifies fault enable states or persists diagnostic settings (operations writing Flash must obey Section 7.4 Save Preconditions).

The 32-bit command word format is [op:8][flags:8][code:16], i.e., value = (op << 24) | (flags << 16) | code:

op OpcodeFunctionflags & code Requirements
0x01Mask (disable) specified fault in RAMcode = 16-bit diagnostic code; setting flags bit0 = 1 simultaneously clears its active latch
0x02Re-enable specified fault in RAMcode = 16-bit diagnostic code; set flags = 0x00
0x03Restore default diagnostic configurationSet flags and code to 0; deletes saved Flash overrides and reinitializes history and active states
0x04Save current diagnostic configuration to FlashSet flags and code to 0; persists current RAM fault mask settings to Flash
  • Write Examples:
    • Write 0x0101050B: Masks diagnostic code 0x050B and clears its active fault latch simultaneously;
    • Write 0x04000000: Saves the current fault mask configuration to Flash.
    • Invalid opcodes, invalid diagnostic codes, disallowed device states, or save failures return an SDO Abort.
  • Troubleshooting References: For complete V2.0 diagnostic code definitions, protection levels, and field troubleshooting procedures, refer to FC0002 Joint Module Fault Alarm & Protection Logic Guide and FC0001 V2.0 Error Codes & SDO Reading.