Skip to main content

UM0002 JxServo Studio Control Commands Guide

ItemInformation
Document No.UM0002
RevisionRev. 1.0
Applicable ProductJxServo Studio
LanguageEnglish
Last Updated2026-06-05

Scope​

This document describes the basic control commands and extended debugging commands available in the "命令列表" (Command List) panel of JxServo Studio. It applies to field commissioning, factory inspection, after-sales fault diagnosis, and R&D integration testing.

Before executing any command in this document, complete device connection, command list retrieval, and necessary data waveform setup first. For connection and waveform setup instructions, please refer to UM0001 JxServo Studio Connection and Waveform Viewing Guide.

Available commands may vary across product models and firmware versions; always refer to the command list actually returned by the connected device during operation.

1. Basic Control Commands​

This section covers the basic commands in the default TEST group of "命令列表" (Command List), including oscilloscope telemetry capture, Enable / Disable (Servo ON / OFF), basic closed-loop current and velocity control, S-curve positioning, MIT damping/compliant hold, and mechanical zero setting.

Before executing any control command, confirm that the device is connected and the command list has finished loading. Commands involving current, velocity, position, or MIT control actively drive motor motion—confirm that the device is securely mounted, the motion workspace is clear, and emergency-stop or power-off measures are ready before execution.

The examples below illustrate how to fill in command parameters in JxServo Studio. During actual commissioning, adjust values according to your product specifications, load conditions, and on-site safety requirements.

1.1 启动示波采集 (Start Oscilloscope Capture)​

"启动示波采集" (Start Oscilloscope Capture) enables telemetry frame streaming from the device. Once executed, JxServo Studio continuously receives the selected frames and plots real-time waveform data.

▸ Parameters

  • P0, P1, P2: Frame indices to enable, ranging from 0 to 8; values 1 through 8 correspond to frames F1 through F8, while 0 leaves that slot unused.
  • P3: Unified decimation (prescaler) factor, integer; 0 means no decimation (full rate), while a non-zero value transmits frames divided by that factor.

▸ Description

Once executed successfully, the device transmits only the frames selected in P0 through P2 using the shared decimation value P3, and the log indicates that waveform control has been updated. This command only affects telemetry frame streaming and does not alter the motor control state.

▸ Tip

By default, JxServo Studio automatically enables frame F2 upon connecting so basic device information and common status items can be displayed. You only need to execute this command manually when you want to observe additional telemetry frames or adjust the decimation factor.

▸ Example

Start Oscilloscope Capture Example

  • P0=1, P1=2, P2=0, P3=0: Enables waveform frames F1 and F2, leaves the third frame slot empty, and streams without decimation.

1.2 停止示波采集 (Stop Oscilloscope Capture)​

"停止示波采集" (Stop Oscilloscope Capture) disables transmission of all telemetry waveform frames. Once executed, JxServo Studio stops receiving new F1 through F8 waveform data.

▸ Parameters

No parameters are required for this command.

▸ Description

Executing this command stops waveform data streaming only—it does not stop motor motion or delete variables already added to the waveform list in JxServo Studio. To stop the motor, use "伺服失能" (Servo Disable / Servo OFF) or the appropriate stop command.

▸ Example

Stop Oscilloscope Capture Example

  • Leave all parameter fields blank and click the "触发" (Trigger) button for this command to stop streaming all F1 through F8 waveform frames.

1.3 电流闭环控制 (Closed-Loop Current Control)​

"电流闭环控制" (Closed-Loop Current Control) issues a target quadrature current (Iq). Once executed, the device enters closed-loop current control mode and regulates output according to the target current.

▸ Parameters

  • P0: Iq target current, type float, unit A.

▸ Description

Upon execution, the device checks its servo state and fault status. If the servo is currently disabled (Servo OFF), the device attempts to enable itself automatically; if the device is in a fault state, the command is rejected—clear the fault or reset the device first. Once active, both target current and actual current can be observed in the waveform view.

▸ Tip

Start with a small current during initial commissioning and verify motor rotation direction and load conditions. If static friction in the module or attached mechanism is relatively high, a very small current may not overcome stiction; increase P0 gradually after confirming safety.

▸ Example

Closed-Loop Current Control Example

  • After confirming the servo is enabled and current waveforms are active, enter P0=0.8 and click "触发" (Trigger) to send a closed-loop current target of Iq=0.8 A.

1.4 伺服使能 (Servo Enable / Servo ON)​

"伺服使能" (Servo Enable / Servo ON) switches the device into an active closed-loop holding state ready to accept motion commands. Once enabled, the device locks onto its current joint position as the holding target.

▸ Parameters

No parameters are required for this command.

▸ Description

Upon execution, the device checks its initialization state, encoder status, and active fault/protection flags. If the device has an active fault, protection condition, encoder error, or incomplete initialization, the Enable (Servo ON) request is rejected—troubleshoot and clear the abnormal state first. When successful, non-brake modules enter closed-loop holding directly, whereas brake-equipped modules complete brake release and power-stage preparation before entering closed-loop holding.

▸ Tip

After Enable (Servo ON) succeeds, the device does not move to a new position; instead, it holds near its present position. You can verify execution via log messages such as [SERVO] enable or "伺服系统已使能" (Servo system enabled).

▸ Example

Servo Enable Example

  • Leave all parameter fields blank, confirm the device is in a safe posture, and click "触发" (Trigger) to enable the servo system (Servo ON).

1.5 伺服失能 (Servo Disable / Servo OFF)​

"伺服失能" (Servo Disable / Servo OFF) turns off servo power output and exits the active control state.

▸ Parameters

No parameters are required for this command.

▸ Description

Once executed, the device terminates active servo control. Always execute "伺服失能" (Servo Disable / Servo OFF) before ending a test session or disconnecting the device.

▸ Example

  • Leave all parameter fields blank and click "触发" (Trigger) to disable servo output (Servo OFF) and exit the active control mode.

1.6 速度目标设定 (Velocity Target Setting)​

"速度目标设定" (Velocity Target Setting) sends a velocity-loop setpoint. Once executed, the device enters closed-loop velocity control at the specified target speed.

▸ Parameters

  • P0: Target velocity, type float, unit rpm (motor-side speed).

▸ Description

Enter this parameter in motor-side rpm. If the servo is disabled (Servo OFF), the device attempts to enable itself automatically; if a fault is active, the command is rejected. If the entered speed is smaller than the active velocity deadband, the log will note that the command may be treated as 0.

▸ Example

  • P0=10.0: Sends a motor-side velocity target of 10 rpm.

1.7 S曲线定位 (S-Curve Positioning)​

"S曲线定位" (S-Curve Positioning) initiates a smooth point-to-point positioning move defined by target position, maximum velocity, and acceleration. Once executed, the device plans and executes an S-curve trajectory.

▸ Parameters

  • P0: Target angle, type float, unit deg.
  • P1: Maximum velocity, type float, unit rad/s.
  • P2: Acceleration, type float, unit rad/s^2.

▸ Description

The device validates that both P1 and P2 are strictly positive numbers. If velocity or acceleration is less than or equal to 0, the command is rejected due to invalid parameters. Before executing, verify that the target angle, velocity, and acceleration are within the mechanical limits of your assembly.

▸ Tip

The default TEST group intentionally omits a direct "位置设定(CSP)" (Position Setting (CSP)) pass-through command. Because JxServo Studio sends a single one-shot setpoint when triggered, a direct CSP command would create an abrupt step input; always prefer "S曲线定位" (S-Curve Positioning) for position moves in the Studio UI.

▸ Example

  • P0=5.0, P1=0.5, P2=1.0: Smoothly moves to the 5 deg target position with a maximum velocity of 0.5 rad/s and an acceleration of 1.0 rad/s^2.

1.8 MIT阻尼保持 (MIT Damping / Compliant Hold)​

"MIT阻尼保持" (MIT Damping / Compliant Hold) places the module into pure damping or compliant position-holding control under MIT impedance mode. Once executed, the device updates its MIT control targets according to the selected sub-mode.

▸ Parameters

  • P0: Mode selection; 0 for pure damping, 1 for compliant hold.
  • P1: Position stiffness kp, type float, unit Nm/rad.
  • P2: Velocity damping kd, type float, unit Nm*s/rad.
  • P3: Feedforward torque tau_ff, type float, unit Nm.

▸ Description

Upon execution, the device checks fault status and attempts to enable itself automatically if currently disabled. Both kp and kd must be greater than or equal to 0. When P0=0, the device enters pure damping mode; when P0=1, the device captures its current angle as the reference position and enters compliant hold mode.

▸ Example

  • Pure damping: P0=0, P1=0, P2=0.2, P3=0 — enters MIT pure damping mode.
  • Compliant hold: P0=1, P1=2.0, P2=0.2, P3=0 — holds the current position with compliant impedance.

1.9 设置机械零位 (Set Mechanical Zero)​

"设置机械零位" (Set Mechanical Zero) sets or saves the mechanical zero position of the joint. Once executed, the device immediately updates the active zero offset in RAM or submits a non-volatile Flash save request.

▸ Parameters

  • P0=0: Sets the current joint position as mechanical zero. Takes effect immediately in RAM without writing to Flash.
  • P0=1: Submits a request to save the currently active mechanical zero into Flash. The actual Flash write is completed asynchronously by the background parameter task in a safe state.

▸ Description

P0=0 shifts the active position coordinate system—confirm that the joint is physically aligned at the intended mechanical zero posture before executing. P0=1 submits a save job; if the servo is still enabled (Servo ON), Flash writing may wait until the drive enters a safe disabled state.

▸ Tip

Execute P0=0 first and verify that the reported joint position reads zero as expected, then execute P0=1 to persist it to Flash. Do not cut power while saving is in progress.

▸ Example

  • P0=0: Immediately sets the current joint position as mechanical zero in RAM only.
  • P0=1: Submits the active mechanical zero to be saved into Flash via background safe write.

2. Extended Debugging Commands​

This section describes additional control and diagnostic commands exposed in the DEBUG command group. Because DEBUG is a superset of TEST, commands already covered in Section 1—oscilloscope start/stop, Enable / Disable (Servo ON / OFF), velocity target, S-curve positioning, MIT damping/compliant hold, and mechanical zero setting—are not repeated here.

When you first connect to a device and retrieve its command list, JxServo Studio displays the TEST group by default. After switching to debug access, click "获取命令列表" (Get Command List) at the bottom again so the device returns the newly visible command group.

2.1 直接电流控制 (Direct Current Control)​

"直接电流控制" (Direct Current Control) directly injects Id / Iq current references into the low-level FOC current loop using live encoder electrical angle feedback.

▸ Parameters

  • P0: Id target current, type float, unit A.
  • P1: Iq target current, type float, unit A.

▸ Description

This command is a low-level current-loop debug entry that bypasses the high-level servo state machine current mode described in Section 1. Current references act directly on the FOC current loop, making it suitable for R&D, production testing, and low-level diagnosis.

▸ Tip

Keep current values small on initial use, and verify motor rotation direction, load conditions, and thermal dissipation.

▸ Example

  • P0=0.0, P1=0.1: Holds Id=0 A and applies a direct quadrature current target of Iq=0.1 A.

2.2 电机正常停止 (Normal Motor Stop)​

"电机正常停止" (Normal Motor Stop) requests the low-level current loop to transition into a safe stop / idle state, terminating active current-loop output.

▸ Parameters

No parameters are required for this command.

▸ Description

Once executed, the device requests the current loop to stop running and logs a motor-stopped confirmation. Primarily used for normal stopping during low-level extended debugging.

▸ Example

  • Leave all parameter fields blank and click "触发" (Trigger) to request a normal motor stop.

2.3 电机紧急制动 (Emergency Motor Brake)​

"电机紧急制动" (Emergency Motor Brake) forces the current loop into a fault state to immediately terminate current-loop output under emergency conditions.

▸ Parameters

No parameters are required for this command.

▸ Description

More aggressive than a normal stop, this command is intended for rapidly terminating current-loop output during abnormal debug conditions. After execution, you will typically need to clear the resulting fault state before re-enabling the servo or issuing further control commands.

▸ Tip

Do not use emergency braking as a routine stop method; during normal testing, prefer "电机正常停止" (Normal Motor Stop) or "伺服失能" (Servo Disable / Servo OFF).

▸ Example

  • Leave all parameter fields blank and click "触发" (Trigger) to trigger emergency motor braking.

2.4 开环电流控制 (Open-Loop Current Control)​

"开环电流控制" (Open-Loop Current Control) starts open-loop current debugging at a specified Id / Iq current, mechanical speed, and initial electrical angle without relying on real-time encoder angle feedback.

▸ Parameters

  • P0: Id target current, type float, unit A.
  • P1: Iq target current, type float, unit A.
  • P2: Mechanical speed, type float, unit rpm.
  • P3: Initial electrical angle, type float, unit deg.

▸ Description

Used for open-loop motor debugging independent of closed-loop encoder angle feedback. Confirm secure mounting, safe motion clearance, and current/speed values within product ratings before execution.

▸ Tip

Use small current and speed values on first use to prevent unexpected rotor movement.

▸ Example

  • P0=0.0, P1=0.1, P2=0.0, P3=0.0: Starts open-loop current debugging with a small Iq current, zero mechanical speed, and 0 deg initial electrical angle.

2.5 开环电压控制 (Open-Loop Voltage Control)​

"开环电压控制" (Open-Loop Voltage Control) starts open-loop voltage debugging at a specified Vd / Vq voltage, mechanical speed, and initial electrical angle.

▸ Parameters

  • P0: Vd target voltage, type float, unit V.
  • P1: Vq target voltage, type float, unit V.
  • P2: Mechanical speed, type float, unit rpm.
  • P3: Initial electrical angle, type float, unit deg.

▸ Description

If the device is already running in open-loop voltage debug mode, re-triggering this command updates the open-loop voltage parameters on the fly. Confirm secure mounting, safe motion clearance, and voltage/speed values within product ratings before execution.

▸ Tip

Begin with a small voltage on initial use and observe rotation direction, temperature rise, and current waveforms before making incremental adjustments.

▸ Example

  • P0=0.0, P1=1.0, P2=0.0, P3=0.0: Starts open-loop voltage debugging with Vq=1.0 V, zero mechanical speed, and 0 deg initial electrical angle.

2.6 启动磁极校准 (Start Pole Calibration)​

"启动磁极校准" (Start Pole Calibration) initiates the magnetic pole / electrical offset calibration routine for the absolute encoder, driving the motor through the selected calibration sequence.

▸ Parameters

  • P0: Calibration mode; 0 for direct detection, 1 for bidirectional fitting.
  • P1: Alignment current, type float, unit A.
  • P2: Scanning current, type float, unit A.

▸ Description

This command actively drives rotor motion through the calibration routine. Before execution, confirm that the module is mounted on an appropriate calibration fixture or uncoupled safe state, and verify that calibration currents match product specifications.

▸ Example

  • P0=0, P1=1.0, P2=1.0: Starts pole calibration in direct detection mode with both alignment current and scanning current set to 1.0 A.

2.7 信号发生控制 (Signal Generator Control)​

"信号发生控制" (Signal Generator Control) injects sinusoidal or frequency-sweep excitation signals into a selected control loop target.

▸ Parameters

  • P0: Target selection; 0 = stop generator, 1 = position target, 2 = velocity target, 3 = reserved for current target (currently unconnected), 4 = MIT position target, 5 = MIT feedforward torque.
  • P1: Waveform mode; 0 = sine wave, 1 = logarithmic chirp/sweep, 2 = linear chirp/sweep, 3 = reserved for tracking test (currently unimplemented).
  • P2: Frequency, type float, unit Hz.
  • P3: Amplitude, type float, unit depends on the selected target type.

▸ Description

Setting P0=0 stops the active signal generator. When selecting position, velocity, or MIT targets, ensure the drive is already in the corresponding controllable state; specifically, when P0=4 or P0=5, the device must enter MIT mode first, otherwise the MIT signal injection request is rejected.

▸ Tip

Signal injection continuously modulates the target reference—always start with a small amplitude and confirm sufficient mechanical travel clearance.

▸ Example

  • P0=0: Stops the active signal generator.
  • P0=1, P1=0, P2=0.5, P3=0.02: Injects a 0.5 Hz small-amplitude sine wave into the position target.

2.8 ARF Removed​

"ARF Removed" is a retained placeholder for a deprecated debug entry. When triggered, the device simply logs a notice stating that this command has been removed.

▸ Parameters

No parameters are required for this command.

▸ Description

This command starts no control action; the log merely notes that ripple compensation is now handled internally within the current loop. Retained solely for compatibility with older host layouts or legacy command lists.

▸ Tip

Do not include this command in customer commissioning workflows.

▸ Example

  • Leave all parameters blank; if triggered inadvertently, the log reports that this debug command has been removed.

2.9 故障读取清除 (Read / Clear Faults)​

"故障读取清除" (Read / Clear Faults) reads fault records or clears currently latched and cached faults according to the specified read and clear modes.

▸ Parameters

  • P0: Read mode; 0 reads the cached fault FIFO, 1 reads active runtime faults, and any other value reads active protection outputs.
  • P1: Clear mode; 0 performs no clearing, 1 clears currently latched faults only, and 2 clears both currently latched faults and cached fault history.

▸ Description

Clearing faults only resets latched flags or cached fault records—it does not mean the underlying physical cause has been resolved. If the fault retriggers immediately, inspect the logs and fault details for further root-cause troubleshooting.

▸ Tip

During field diagnosis, first read and record fault details using P1=0 before issuing a clear command.

▸ Example

  • P0=1, P1=0: Reads active runtime faults without clearing them.
  • P0=0, P1=2: Reads the cached fault FIFO and clears both active latched faults and cached fault records.

2.10 抱闸控制 (Brake Control)​

"抱闸控制" (Brake Control) manually engages or releases the mechanical holding brake.

▸ Parameters

  • P0=0: Engage (lock) the brake.
  • P0=1: Release (unlock) the brake.

▸ Description

The device checks whether manual brake override is permitted in its current state. If preconditions are not met, the command is rejected with a prompt indicating that the servo must be disabled (Servo OFF) and fault-free.

▸ Tip

Before releasing the brake (P0=1), confirm that the mechanical load or robot limb is securely supported to prevent gravity drop or unintended movement.

▸ Example

  • P0=0: Engages the holding brake.
  • P0=1: Releases the holding brake.

2.11 摆臂测试 (Swing Arm Test)​

"摆臂测试" (Swing Arm Test) starts or stops the built-in swing-arm test task on the device.

▸ Parameters

  • P0=0: Stop the swing-arm test task.
  • P0=1: Start the swing-arm test task.

▸ Description

This command has no additional permission gate and directly starts or stops the internal 10 ms swing-arm test task. Use it only when test conditions and motion clearance are explicitly verified.

▸ Tip

Before starting, confirm that the test fixture, payload, and motion workspace meet swing-arm test safety requirements.

▸ Example

  • P0=1: Starts the swing-arm test task.
  • P0=0: Stops the swing-arm test task.

2.12 KTH7112标定 (KTH7112 Calibration)​

"KTH7112标定" (KTH7112 Calibration) enters or exits the calibration mode for the KTH7112 magnetic encoder.

▸ Parameters

  • P0=0: Exit calibration mode.
  • P0=1: Enter calibration mode.

▸ Description

This command appears in the command list only on devices configured with a KTH7112 encoder. Entering calibration mode suspends normal SPI angle polling; after exiting calibration mode, a power cycle is typically required for the new calibration data to take effect.

▸ Example

  • P0=1: Enters KTH7112 calibration mode.
  • P0=0: Exits KTH7112 calibration mode (power-cycle the device afterward as required).

2.13 MIT目标设定 (MIT Target Setting)​

"MIT目标设定" (MIT Target Setting) directly sends a full 5-parameter MIT impedance control setpoint—updating target position, target velocity, stiffness, damping, and feedforward torque simultaneously.

▸ Parameters

  • P0: Target angle, type float, unit deg.
  • P1: Target velocity, type float, unit rad/s.
  • P2: Stiffness kp, type float, unit Nm/rad.
  • P3: Damping kd, type float, unit Nm*s/rad.
  • P4: Feedforward torque tau_ff, type float, unit Nm.

▸ Description

Upon execution, the device checks fault status and attempts to enable itself automatically if currently disabled (Servo OFF). Both kp and kd must be greater than or equal to 0; if the device is in a fault state, the command is rejected—clear the fault or reset the device first.

▸ Example

  • P0=0.0, P1=0.0, P2=2.0, P3=0.2, P4=0.0: Sends an MIT target with zero angle, zero velocity, low stiffness, and low damping.