PR0003 EtherCAT Communication and Control Mode Guide
| Item | Information |
|---|---|
| Document No. | PR0003 |
| Revision | Rev. 1.1 |
| Applicable Products | JxServo EtherCAT Joint Modules (R48 / R58 / R68 and other single-axis slave series) |
| Applicable Firmware | EtherCAT Application Firmware V2.00.04+ (verify online via 0x100A:00 during integration) |
| Language | English |
| Last Updated | 2026-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.
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.
| Item | Value |
|---|---|
| File Name | GDESC_CIA402_V6_JX.xml |
| ESI Version | V6 (and subsequent compatible versions) |
| Matching Device Revision | 0x00000010 (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:
| Object | Name | Standard Value | Description |
|---|---|---|---|
0x1018:01 | Vendor ID | 0x00001035 | Juxie Intelligent vendor identifier |
0x1018:02 | Product Code | 0x0000077E | EtherCAT Joint Module product code |
0x1018:03 | Revision Number | 0x00000010 | Revision number matching V6 ESI; must match the ESI file in use |
0x1018:04 | Serial Number | 0x00000000 | Returns 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):
| Object | Meaning | R48 Example | R58 Example | R68 Example |
|---|---|---|---|---|
0x1008:00 | Manufacturer Device Name | R48V3_EC | R58V3_EC | R68V3_EC |
0x1009:00 | Manufacturer Hardware Version | Auto-detected at power-on | Auto-detected at power-on | Auto-detected at power-on |
0x100A:00 | Manufacturer Software Version | V2.00.04+ | V2.00.04+ | V2.00.04+ |
- Version Readback Notes:
0x100A:00returns the active application firmware version string running on the device (e.g.,V2.00.04and subsequent compatible releases).0x1009:00auto-detects hardware revisions typically in the rangeV2.01toV2.15(returnsV1.00by 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 bitmap0x6502: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 module0x419800. For its exact layout, see Section 5: MIT Impedance Control Mode Specifications.
2.1 RxPDO 0x1600 (Master → Slave, 15 Bytes)
| Byte Offset | Object | Name | Data Type | Unit & Description |
|---|---|---|---|---|
| 0 | 0x6040:00 | Controlword | UINT16 | CiA 402 state machine transition and action trigger bits |
| 2 | 0x6060:00 | Modes of operation | INT8 | Requested control mode code (see Section 4) |
| 3 | 0x607A:00 | Target position | INT32 | Joint output shaft, 65536 LSB/joint rev |
| 7 | 0x60FF:00 | Target velocity | INT32 | Motor rotor shaft, 1 rpm/LSB |
| 11 | 0x6071:00 | Target current / torque | INT16 | Mode -1: 0.01 A/LSB; Mode 10: 0.025 N·m/LSB |
| 13 | 0x6072:00 | Cyclic current limit | UINT16 | 0.01 A/LSB; write 0 to apply no additional limit |
2.2 TxPDO 0x1A00 (Slave → Master, 15 Bytes)
| Byte Offset | Object | Name | Data Type | Unit & Description |
|---|---|---|---|---|
| 0 | 0x6041:00 | Statusword | UINT16 | Current drive state machine status and action acknowledgment bits |
| 2 | 0x6061:00 | Modes of operation display | INT8 | Must be evaluated together with 0x6041 to confirm active enabled execution |
| 3 | 0x6064:00 | Position actual value | INT32 | Joint output shaft, 65536 LSB/joint rev |
| 7 | 0x606C:00 | Velocity actual value | INT32 | Motor rotor shaft, 1 rpm/LSB |
| 11 | 0x6077:00 | Torque actual value | INT16 | Joint Torque Sensor reading, 0.025 N·m/LSB (fixed unit across all modes) |
| 13 | 0x6078:00 | Current actual value (Iq) | INT16 | Actual 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, writing500imposes an additional5.00 Aceiling, while writing0removes 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
OPsession and is never saved to Flash. ExitingOPautomatically clears the session's additional limit; the master must resend it upon re-enteringOP. - Typical Combination Examples:
- After completing
OPentry and the enable handshake, setting Mode-1,0x6071 = 123,0x6072 = 500commands1.23 Atarget current while clamping total|Iq|to5.00 A. - Setting Mode
10,0x6071 = 40,0x6072 = 500commands1.00 N·mjoint target torque while clamping the torque loop's|Iq|output to5.00 A.
- After completing
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:
-
Preload Safe Initial Commands in
SAFEOPThe slave establishes its cyclic output session upon receiving the first valid RxPDO frame inSAFEOP(no motion is executed duringSAFEOP). Before requesting transition toOP, 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
0x6064first and assign it to target position0x607A(in PP mode, keep0x6040.bit4 = 0) to prevent a sudden position step upon enabling; - Velocity / Current / Torque modes: Explicitly send
0even 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, preload0x2100:01 = 0x6064and set velocity, Stiffness, Damping, and Feedforward Torque to0).
- Position modes (CSP / PP): Read the current actual joint position
-
Acquire EtherCAT Control Authority in
OPEnsure no other control interface (such as JxServo Studio over USB) is actively holding servo enable authority. After enteringOPwhile disabled, the slave automatically acquires EtherCAT control authority:- Until EtherCAT control authority is acquired, mode display
0x6061remains0; - Prior to active running,
0x6061may echo the currently requested valid mode early, which does not mean the power stage is enabled or mode execution is active. Always verify both statusword0x6041and mode display0x6061together.
- Until EtherCAT control authority is acquired, mode display
-
Execute the CiA 402 Enable Handshake Step-by-Step The drive does not support jumping states by writing
0x000Fdirectly. Write to controlword0x6040:00sequentially, waiting at every step until statusword0x6041:00satisfies the bitmask criterion before sending the next command:
| Step | Master Writes 0x6040:00 | Wait Criterion (0x6041 & 0x006F) | CiA 402 State Reached |
|---|---|---|---|
| 1 | 0x0006 | == 0x0021 | Ready to switch on |
| 2 | 0x0007 | == 0x0023 | Switched on |
| 3 | 0x000F | == 0x0027 | Operation 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
0x6060mode and its corresponding safe target value together within the same RxPDO frame. - Precaution for Standalone SDO Mode Writes: Writing
0x6060via 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 abit4trigger). 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.
- Recommended Practice (Synchronous PDO Update): Update the new
- Halt (
0x6040.bit8):- Setting
0x6040.bit8 = 1decelerates the motor at the configured deceleration rate and maintains closed-loop position holding; in Halt state,0x6041.bit10 = 1indicates 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.
- Setting
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 & Command | Behavior & Master Handling Requirements |
|---|---|
Quick Stop0x6040 = 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 Reset0x6040.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 Value | Mode Name | Core Control Objects | Physical Units & Control Characteristics |
|---|---|---|---|
1 | PP (Profile Position) | 0x607A, 0x6081, 0x6083, 0x6084 | Joint-side absolute position (65536 LSB/joint rev); 0x6040.bit4 triggers internal point-to-point trajectory planning |
3 | PV (Profile Velocity) | 0x60FF, 0x6083 | Motor-shaft velocity (1 rpm/LSB); smooth acceleration/deceleration using velocity ramp settings |
6 | Homing (Current Position Zero) | 0x6040.bit4 | Rising edge on bit4 sets current position directly as mechanical zero and queues background Flash save (no homing search motion) |
8 | CSP (Cyclic Synchronous Position) | 0x607A | Joint-side absolute position (65536 LSB/joint rev); direct pass-through by default, sampled at the 2 kHz position tick |
9 | CSV (Cyclic Synchronous Velocity) | 0x60FF, 0x6083 | Motor-shaft velocity (1 rpm/LSB); velocity ramp enable follows device configuration |
10 | Joint Torque Closed-Loop Mode | 0x6071 | Joint-side target torque (0.025 N·m/LSB); requires hardware Torque Sensor and closed-loop firmware support |
-1 (0xFF) | Iq Current Mode | 0x6071 | Motor quadrature current Iq (0.01 A/LSB, i.e., 10 mA/LSB) |
-2 (0xFE) | MIT Impedance Control Mode | 0x2100:01 to :06 | Joint-side position, velocity, Stiffness Kp, Damping Kd, Feedforward Torque, and total target torque limit (see Section 5) |
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 velocity0x6081(joint-side1 rpm/LSB), PP profile acceleration/deceleration0x6083/0x6084(joint-side1 rpm/s/LSB), joint torque0x6071(Mode10) /0x6077(0.025 N·m/LSB), and all target and feedback objects in MIT mode (including0x2101joint angular velocity). - Motor Rotor Shaft Units: Target velocity
0x60FFin PV (Mode3) and CSV (Mode9) (1 rpm/LSBat motor shaft), velocity ramp acceleration0x6083in velocity modes (1 rpm/s/LSBat motor shaft), and standard TxPDO velocity feedback0x606C(1 rpm/LSBat 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
0x60C2does not alter EtherCAT interpolation behavior.
- Start sending continuous, smooth cyclic position trajectories from near the current actual joint position
- PV / CSV Velocity Modes (Mode
3/9):- Acceleration object
0x6083in velocity modes uses motor-shaftrpm/s; raw values above20000are clamped to20000, and writing0applies the firmware runtime default.
- Acceleration object
IqCurrent & Joint Torque Closed-Loop (Mode-1/10):- Both modes share the
INT16object0x6071; the master must switch scaling factors synchronously when changing modes. Protocol encoding spans-327.68 Ato+327.67 Ain Current mode and-819.2 N·mto+819.175 N·min Torque Closed-Loop mode, while actual physical output remains bounded by hardware ratings and internal controller limits.
- Both modes share the
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 Bit | Drive Behavior & Master Criterion |
|---|---|
0x6040.bit4 = 0 | Preloads 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 1 | Supports 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.bit12asserts1only after truly enteringOperation enabled. Never block the enable handshake waiting forbit12. Furthermore, sending a single legacy0x004Fcommand will not start PP motion as described here.
PP Mode Edge-Trigger & Continuous-Update Example
| Step | Controlword 0x6040 | Target Position 0x607A | Master Action & Wait Condition |
|---|---|---|---|
| 1. Enable & preload | 0x0006 → 0x0007 → 0x000F | 16384 | Complete Section 3.1 handshake, confirm 0x6061 = 1, preload 1/4-turn target (90°) |
| 2. First trigger | 0x001F | 16384 | Raise bit4 to generate a rising edge; wait for 0x6041.bit12 == 1 to confirm latch |
| 3. Clear ack | 0x000F | 16384 | Clear bit4 and wait for 0x6041.bit12 == 0; trajectory continues until bit10 == 1 (reached) |
| 4. Re-trigger | 0x001F | 32768 | Write half-turn target (180°) and raise bit4 again to submit via a new rising edge |
| 5. Continuous update | Hold 0x001F | 49152 | Keep 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
| Object | Name | Type | Physical Value per LSB | Description |
|---|---|---|---|---|
0x2100:01 | Desired joint position q_des | INT32 | 1/65536 joint rev | Same position unit as 0x607A / 0x6064 |
0x2100:02 | Desired joint velocity dq_des | INT16 | 0.001 rad/s | Joint output shaft angular velocity target |
0x2100:03 | Position Stiffness Kp | UINT16 | 0.1 N·m/rad | Encoding range 0 to 6553.5 N·m/rad |
0x2100:04 | Velocity Damping Kd | UINT16 | 0.01 N·m·s/rad | Encoding range 0 to 655.35 N·m·s/rad |
0x2100:05 | Feedforward Torque τ_ff | INT16 | 0.025 N·m | Gravity or inverse-dynamics compensation feedforward |
0x2100:06 | Total target torque magnitude limit | UINT16 | 0.025 N·m | Clamps synthesized ` |
0x2101:00 | Actual joint velocity dq | INT32 | 0.001 rad/s | Read-only feedback, joint output shaft angular velocity |
- Torque Limit Boundary: During normal running,
0x2100:06clamps 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 Offset | Object | Name | Type | Unit & Description |
|---|---|---|---|---|
| 0 | 0x6040:00 | Controlword | UINT16 | CiA 402 state machine enable and control bits |
| 2 | 0x6060:00 | Modes of operation | INT8 | Fixed at -2 (wire byte 0xFE) |
| 3 | 0x2100:01 | Desired joint position | INT32 | 1/65536 joint rev |
| 7 | 0x2100:02 | Desired joint velocity | INT16 | 0.001 rad/s |
| 9 | 0x2100:03 | Position Stiffness Kp | UINT16 | 0.1 N·m/rad |
| 11 | 0x2100:04 | Velocity Damping Kd | UINT16 | 0.01 N·m·s/rad |
| 13 | 0x2100:05 | Feedforward Torque τ_ff | INT16 | 0.025 N·m |
| 15 | 0x2100:06 | Total target torque limit | UINT16 | 0.025 N·m (0 = no additional limit) |
TxPDO 0x1A03 (Slave → Master, 15 Bytes)
| Byte Offset | Object | Name | Type | Unit & Description |
|---|---|---|---|---|
| 0 | 0x6041:00 | Statusword | UINT16 | Actual drive operating status |
| 2 | 0x6061:00 | Modes of operation display | INT8 | Evaluate with statusword; returns -2 (0xFE) in normal MIT operation |
| 3 | 0x6064:00 | Actual joint position | INT32 | 1/65536 joint rev |
| 7 | 0x2101:00 | Actual joint velocity | INT32 | 0.001 rad/s (distinguish from motor-shaft rpm in standard PDO 0x606C) |
| 11 | 0x6077:00 | Joint sensor torque | INT16 | 0.025 N·m/LSB |
| 13 | 0x6078:00 | Actual Iq current | INT16 | 0.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_desto the current actual joint position and clearsdq_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
-2and confirm mode and enable readiness first before writing MIT parameters. To submit all 6 parameters atomically via SDO, use0x2100Complete Access: 16 bytes starting from sub-index:00(06 00header plus 14 parameter bytes), or 14 bytes of pure parameters starting from sub-index:01. - Session Cleanup & Dual Limiting: Exiting
OPautomatically clears MIT session commands and additional limits, requiring re-transmission upon reconnection. Although the default MIT PDO omits0x6072, any non-zero0x6072current limit set via SDO or custom mapping in the active session still applies during normal running independently alongside0x2100: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):
| Field | Physical Setpoint | Raw Integer Value | Hex Bytes (Little-Endian) |
|---|---|---|---|
0x6040:00 Controlword | Operation enabled | 0x000F | 0F 00 |
0x6060:00 Mode | MIT Mode | -2 | FE |
0x2100:01 Desired position | 0.25 joint rev | 16384 (0x00004000) | 00 40 00 00 |
0x2100:02 Desired velocity | 1.0 rad/s | 1000 (0x03E8) | E8 03 |
0x2100:03 Stiffness Kp | 300 N·m/rad | 3000 (0x0BB8) | B8 0B |
0x2100:04 Damping Kd | 0.5 N·m·s/rad | 50 (0x0032) | 32 00 |
0x2100:05 Feedforward τ_ff | 1.0 N·m | 40 (0x0028) | 28 00 |
0x2100:06 Torque limit | 50.0 N·m | 2000 (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) | Function | Preconditions & Execution Behavior |
|---|---|---|
0x00000001 | Set Mechanical Zero at current position | Accepted 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. |
0x00000002 | Zero-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. |
0x00271002 | Theoretical +10 N·m Torque Calibration | Opcode 0x02, upper 24-bit signed value +10000 mN·m (0x002710). |
0xFFD8F002 | Theoretical -10 N·m Torque Calibration | Opcode 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 inmN·mwithin±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 object0x607E. - Readback Semantics: Reading
0x2531:00returns 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:
- Confirm the slave is in
OP, holds EtherCAT control authority, has valid position feedback, and is fault-free (enteringOperation enabledis not mandatory). - Write
0x6060 = 6and wait for0x6061 == 6; keep low controlword bits at0x0006/0x0007/0x000Fwithbit4 = 0. - Transition
0x6040.bit4from0to1(rising edge) to trigger Set Mechanical Zero (do not assert Halt or Fault Reset simultaneously; holdingbit4high will not re-trigger). - Inspect
bit13,bit12, andbit10of statusword0x6041to verify the outcome; clearbit4to0first if another trigger is needed.
| Homing Execution Stage | bit13 (Error) | bit12 (Attained) | bit10 (Target Reached) |
|---|---|---|---|
| Idle before trigger | 0 | 0 | 1 |
| Processing or awaiting updated post-zero feedback | 0 | 0 | 0 |
| Zero offset applied & background save queued | 0 | 1 | 1 |
| Homing operation failed | 1 | 0 | 1 |
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.
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:
| Object | Parameter Name | Type | Scaling & Value Constraints | Online Write When Enabled |
|---|---|---|---|---|
0x2532:00 | Current loop bandwidth | UINT32 | 1 Hz/LSB, must be > 0 | No |
0x2534:00 | Velocity loop proportional gain Kp | UINT32 | Actual = raw ÷ 100000, must be > 0 | No |
0x2535:00 | Velocity loop integral gain Ki | UINT32 | Actual = raw ÷ 10000000, 0 allowed | No |
0x2536:00 | Position loop proportional gain Kp | UINT32 | Actual = raw ÷ 100, raw range 0 to 100000 | No |
0x2537:00 | Position loop integral gain Ki | UINT32 | Actual = raw ÷ 10000000, 0 allowed | No |
0x2538:00 | Peak phase current limit | INT32 | 0.01 A/LSB (e.g., 500 = 5.00 A), must be > 0 | No |
0x2548:01 | Torque loop P | UINT16 | 0.001/LSB (dimensionless), raw 1000 to 20000 (1 to 20) | Yes |
0x2548:06 | Torque damping | UINT32 | 0.001 N·m·s/rad/LSB, raw 0 to 10000000 | Yes |
0x2549:00 | Global Friction Compensation ratio | INT32 | 1%/LSB, raw 0 to 100 (0 disables output, 50 = 0.5 ratio) | Yes |
0x607D:01 | Min position limit (software) | INT32 | 65536 LSB/joint rev; save validation requires Min < Max | No |
0x607D:02 | Max position limit (software) | INT32 | 65536 LSB/joint rev (soft-limit enable follows device config) | No |
- Compatibility & Reserved Entries: Writing to
0x2548requires firmware with Torque Sensor and torque loop support. Sub-indices0x2548:02through:05are read-only reserved items (reads return0, writes return a read-only SDO abort, unused in control). Torque Sensor Notch Filter switch and parameters use0x2547:01through: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
- 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/OPstate, 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. - Online Tunable Objects (Immediate Runtime Effect)
Firmware
V2.00.04+supports writing0x2548:01(Torque loop P),0x2548:06(Torque damping), and0x2549: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:00updates both common friction and torque compensation ratios simultaneously (the master torque-compensation switch remains independent; on firmware earlier thanV2.00.04,0x2548:01and0x2549:00support 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
| Operation | Target SDO Object | Write Value (UINT32) | Little-Endian Bytes | Execution Behavior |
|---|---|---|---|---|
| Save Current Parameters | 0x1010:01 or 0x1010:03 | 0x65766173 | 73 61 76 65 ("save") | Validates staged parameters, applies & rebuilds runtime modules, and queues background Flash write |
| Restore Default Parameters | 0x1011:03 | 0x64616F6C | 6C 6F 61 64 ("load") | Restores factory default parameter group, updates boot group, and loads into active runtime |
Recommended Save Procedure & Precautions
- Confirm Actual Power-Stage Disable: Ensure the motor power stage has completely ceased current output (see Section 7.4).
- Edit & Verify Staged Values: Write target parameters via SDO (e.g.,
0x2538:00 = 500for5.00 Apeak phase current) and read back to confirm. - Submit Save & Wait: Write
0x65766173to0x1010:03. Keep in mind:- A successful SDO response indicates only that the background save job was accepted (reading
0x1010/0x1011returns1as 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.
- A successful SDO response indicates only that the background save job was accepted (reading
- Verify Persistence: No dedicated EtherCAT object currently polls background Flash completion, so fixed delays or repeated reads of
0x1010cannot 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 Code | Meaning & Troubleshooting |
|---|---|
0x08000021 | Background storage or calibration job is busy; wait for the previous operation to finish before retrying |
0x08000022 | Current device or runtime module state prohibits the operation (e.g., motor is still enabled/outputting current, or torque loop is not ready) |
0x06090030 | Parameter value out of range, or cross-parameter validation failed during save (e.g., software min limit >= max limit) |
7.4 Save Preconditions
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:
- During controlled holding (
ACT_DHOLD) or protective deceleration stops, the power stage may continue closed-loop current output even if Statusword reportsFaultor no longer showsOperation enabled. Never rely solely on surface statusword bits to judge safe disablement. - 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:
| Object | Monitored Quantity | Resolution | Scaling Example |
|---|---|---|---|
0x2661:00 | Filtered DC bus current | 1 mA/LSB | 1250 = 1.25 A |
0x2662:00 | MOSFET / drive temperature | 0.1 °C/LSB | 425 = 42.5 °C |
0x2663:00 | Motor winding temperature | 0.1 °C/LSB | -125 = -12.5 °C |
0x2664:00 | MCU internal temperature | 0.1 °C/LSB | 350 = 35.0 °C |
Tip: DC bus current (
0x2661:00) and motor quadrature currentIq(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-onlyUINT32, 4-byte single SDO read only; PDO mapping and Complete Access unsupported). The lower 16 bits return the V2.0 diagnostic code (0xDDSSformat), while the upper 16 bits are fixed at0x0000.
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 Opcode | Function | flags & code Requirements |
|---|---|---|
0x01 | Mask (disable) specified fault in RAM | code = 16-bit diagnostic code; setting flags bit0 = 1 simultaneously clears its active latch |
0x02 | Re-enable specified fault in RAM | code = 16-bit diagnostic code; set flags = 0x00 |
0x03 | Restore default diagnostic configuration | Set flags and code to 0; deletes saved Flash overrides and reinitializes history and active states |
0x04 | Save current diagnostic configuration to Flash | Set flags and code to 0; persists current RAM fault mask settings to Flash |
- Write Examples:
- Write
0x0101050B: Masks diagnostic code0x050Band 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.
- Write
- 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.