C

This document will introduce the data types and APIs defined in the JAKA SDK (C), mainly intended for software developers creating robot applications in C/C++ that communicate with virtual or real controllers. It will also be helpful for users who need to understand JAKA robot controller applications.

Calling Conventions

  • robot_id and robot_index select the target robot. Use 0 for a single arm; for V3 dual-arm systems, use 0 or 1 according to controller configuration.

  • C interfaces have no default arguments: explicitly pass every declared parameter. Interfaces without a robot selector use the default robot; supply the target robot_id/robot_index to extended entry points.

  • These interfaces follow inc/jakaAPI.h in the SDK client source.

  • handle is the robot handle, returned at login and supplied to subsequent interfaces. The caller allocates output buffers.

  • A return value of 0 indicates success; other values are error codes. Success from a non-blocking motion call does not mean the target has been reached.

Interface List

Basic Robot Operations

Robot Arm Login

errno_t create_handler(const char *ip, JKHD *handle)

errno_t create_handler_with_auth(const char *ip, JKHD *handle, BOOL use_grpc, const char *username, const char *password);
  • Parameters

    • ip Controller IP address

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • use_grpc 1/true for gRPC, 0/false for TCP. gRPC is recommended for V3.

    • username SDK login username; use jaka_sdk with V3.

    • password SDK account password configured in JAKA App.

Robot Arm Logout

errno_t destory_handler(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Power On Robot Arm

errno_t power_on(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Power Off Robot Arm

errno_t power_off(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Shut Down Robot Arm

errno_t shut_down(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Enable Robot Arm

errno_t enable_robot(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Disable Robot Arm

errno_t disable_robot(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Get the DH parameters of the currently connected robot arm

errno_t get_dh_param(const JKHD *handle, DHParam *dhParam)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • dhParam DH parameters: alpha, a, d, theta

Set Robot Arm Installation Angle

errno_t set_installation_angle(const JKHD* handle, double angleX, double angleZ)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • angleX Rotation angle around X-axis

    • angleZ Rotation angle around Z-axis

Get Robot Arm Installation Angle

errno_t get_installation_angle(const JKHD* handle, Quaternion* quat, Rpy* appang)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • quat Installation angle quaternion

    • appang Installation angle RPY (Roll-Pitch-Yaw) angles

Get Robot Arm Status

errno_t get_robot_state(const JKHD *handle, RobotState *state)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • state Robot arm status query result

Retrieve robot arm status monitoring data (only thread-safe interface)

errno_t get_robot_status(const JKHD *handle, RobotStatus *status)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • status  Robot arm status

Get Robot Arm Status Monitoring Data

errno_t get_robot_status_simple(const JKHD *handle, RobotStatus_simple *status)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • status  Robot arm status

Set Simulation Mode

errno_t set_sim_enable(const JKHD *handle, int enable, int robot_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • enable Simulation mode: 1 for simulation, 0 for a physical robot.

    • robot_id Compatibility parameter; this interface currently does not distinguish robots. Use 0. C interfaces exposing this parameter require an explicit argument.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Get Simulation Mode

errno_t get_sim_enable(const JKHD *handle, int *enable, int robot_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • enable Outputs the simulation mode: 1 for simulation, 0 for a physical robot.

    • robot_id Compatibility parameter; this interface currently does not distinguish robots. Use 0. C interfaces exposing this parameter require an explicit argument.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Set Simulated Robot Model

errno_t set_sim_robot(const JKHD *handle, int model, int robot_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • model Simulated model index; select from the model list supplied by the controller.

    • robot_id Compatibility parameter; this interface currently does not distinguish robots. Use 0. C interfaces exposing this parameter require an explicit argument.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Get Simulated Robot Model

errno_t get_sim_robot(const JKHD *handle, int *model, int robot_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • model Simulated model index; select from the model list supplied by the controller.

    • robot_id Compatibility parameter; this interface currently does not distinguish robots. Use 0. C interfaces exposing this parameter require an explicit argument.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Get Simulated Robot Model List

errno_t get_sim_robot_list(const JKHD *handle, SimRobotInfoList *robot_list, int robot_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • robot_list Outputs the simulated robot model list; count is the valid entry count. Entries contain model indices and names.

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. The current gRPC query does not distinguish robots using this parameter. C interfaces exposing it require an explicit argument.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Get Robot Control Source

errno_t get_control_source(const JKHD *handle, int *source, int robot_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • source Outputs the current control-source code; interpret it according to the controller’s control-source configuration. This interface queries the source; it does not switch it.

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. The current gRPC query does not distinguish robots using this parameter. C interfaces exposing it require an explicit argument.

  • Return value: ERR_SUCC on success; any other value indicates failure.

SDK

Register a callback function for robot arm errors

errno_t set_error_handler(const JKHD *handle, CallBackFuncType func)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • func is a function pointer pointing to a user-defined function

Get SDK Version Number

errno_t get_sdk_version(const JKHD *handle, char *version)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • version SDK version number

Set robot arm motion type to automatically stop during network exceptions

errno_t set_network_exception_handle(const JKHD *handle, float millisecond, ProcessType mnt)

errno_t set_network_exception_handle_extend(const JKHD *handle, float millisecond, ProcessType mnt, DOInfo *do_info, int do_count);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • millisecond Time parameter, unit: ms, range 500-30000 ms, if set outside this range, the actual effective time will be 2 seconds

    • mnt Type of action the robot arm should take when a network exception occurs, optional types: MOT_KEEP (default), MOT_PAUSE, MOT_ABORT

    • do_info DO configuration array. Servo interfaces apply it with servo commands; the network-disconnection interface applies it after disconnection. A null value means no DO settings.

    • do_count Number of valid DO configurations in do_info.

Get Controller IP

errno_t get_controller_ip(char *controller_name, char *ip_list)
  • Parameters

    • controller_name Controller name

    • ip_list Controller IP list. When the controller name is a specific value, return the IP address corresponding to that name. When the controller name is empty, return all controller IP addresses within the subnet class.

Set the storage path for the robot arm error code file

errno_t set_errorcode_file_path(const JKHD *handle, char *path)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • path Output buffer or input path, as indicated by the get/set interface name.

Set file storage path for robot arm error codes and get the most recent robot arm error code

errno_t get_last_error(const JKHD *handle, ErrorCode *code)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • code Outputs the most recent controller error code and message.

Error status clear

errno_t clear_error(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Set whether the SDK enables debug mode

errno_t set_debug_mode(const JKHD *handle, BOOL mode)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • mode Legacy debug switch; this interface is obsolete and the parameter has no effect.

Set SDK log path

errno_t set_SDK_filepath(const char *filepath)
  • Parameters

    • filepath SDK log path

Obtain SDK log path

errno_t get_SDK_filepath(char *filepath, int size)
  • Parameters

    • filepath SDK log path: input for setters, output buffer for getters.

    • size Output buffer capacity in bytes, including the terminating null character for strings.

Set Blocking Motion Timeout

Warning: Deprecated interface

errno_t set_block_wait_timeout(const JKHD* handle, float seconds);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • seconds Legacy timeout parameter; this interface always returns ERR_OBSOLETE and the parameter has no effect.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Set the automatic update interval for robot arm status data

Warning: Deprecated interface

errno_t set_status_data_update_time_interval(const JKHD *handle, float millisecond);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • millisecond time parameter,unit:ms

  • Return value: ERR_SUCC on success; any other value indicates failure.

Enable SDK Logging

errno_t enable_SDK_log(BOOL enable);
  • Parameters

    • enable Enable log writing with 1/true; disable it with 0/false. Login is not required.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Set SDK Log Level and Capacity

errno_t set_SDK_log_config(LogLevel level, int total_capacity_mb);
  • Parameters

    • level Log level: SDK_LOG_ERROR, SDK_LOG_WARN, SDK_LOG_INFO, or SDK_LOG_TRACE; default: SDK_LOG_INFO. The getter outputs the current level.

    • total_capacity_mb Total log capacity, 128–256 MiB, rounded down to a multiple of 16 MiB. The getter outputs the effective capacity.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Get SDK Log Level and Capacity

errno_t get_SDK_log_config(LogLevel *level, int *total_capacity_mb);
  • Parameters

    • level Log level: SDK_LOG_ERROR, SDK_LOG_WARN, SDK_LOG_INFO, or SDK_LOG_TRACE; default: SDK_LOG_INFO. The getter outputs the current level.

    • total_capacity_mb Total log capacity, 128–256 MiB, rounded down to a multiple of 16 MiB. The getter outputs the effective capacity.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Robot Moving Output

Robot arm movement in manual mode

errno_t jog(const JKHD *handle, int aj_num, MoveMode move_mode, CoordType coord_type, double vel_cmd, double pos_cmd)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • aj_num Represents joint numbers [0-5 ]in joint space; in Cartesian space it corresponds to axes x, y, z, rx, ry, rz

    • move_mode Robot arm motion mode. Available types: Absolute motion (ABS), incremental motion (INCR), continuous motion (CONTINUE), and stop (STOP)

    • coord_type Robot arm motion coordinate system. Available systems: Tool coordinate system (COORD_TOOL), base coordinate system (COORD_BASE), or joint space (COORD_JOINT)

    • vel_cmd Command speed. Unit for rotational axes or joint motion is rad/s; unit for linear axes is mm/s

    • pos_cmd Command position, rotation axis or joint movement unit is rad, linear axis unit is mm. When move_mode is continuous, the parameter can be ignored

Robot arm stop movement in manual mode

errno_t jog_stop(const JKHD *handle, int num)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • num Legacy axis identifier; ignored by the current implementation, which calls stop_jog.

Robot arm joint movement

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t joint_move(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode, BOOL is_block, double speed)
errno_t joint_move_extend(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode, BOOL is_block, double speed, double acc, double tol, const OptionalCond *option_cond)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • joint_pos Target position for robot arm joint movement, a double type 6-dimensional array

    • move_mode Robot arm motion mode. Available types: Absolute motion (ABS), incremental motion (INCR), continuous motion (CONTINUE), and stop (STOP)

    • is_block Wait for motion completion: 1/true for blocking, 0/false for non-blocking. Waiting uses an empty queue and the in-position flag, not a fixed 30-second timeout.

    • speed robot arm joint movement speed, unit: rad/s

    • acc robot arm joint movement angular acceleration, default value is 3.5rad/s^2^

    • tol robot arm joint movement endpoint error, this parameter makes transitions between two movements smoother. When using this parameter, multiple consecutive movements are required, and it must be in non-blocking mode. Default value is 0mm

    • option_cond Optional motion condition pointer. The current joint_move, linear_move, and circular_move implementations do not serialize it into motion requests; it cannot implement termination conditions.

Robot arm linear movement at end effector

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t linear_move(const JKHD *handle, const CartesianPose *end_pos, MoveMode move_mode, BOOL is_block, double speed)
errno_t linear_move_extend(const JKHD *handle, const CartesianPose *end_pos, MoveMode move_mode, BOOL is_block, double speed, double accel, double tol, const OptionalCond *option_cond)
errno_t linear_move_extend_ori(const JKHD *handle, const CartesianPose *end_pos, MoveMode move_mode, BOOL is_block, double speed, double accel, double tol, const OptionalCond *option_cond, double ori_vel, double ori_acc)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • end_pos Target position for robot arm end movement

    • move_mode Robot arm motion mode. Available types: Absolute motion (ABS), incremental motion (INCR), continuous motion (CONTINUE), and stop (STOP)

    • is_block Wait for motion completion: 1/true for blocking, 0/false for non-blocking. Waiting uses an empty queue and the in-position flag, not a fixed 30-second timeout.

    • speed robot arm linear movement speed, unit: mm/s

    • accel Acceleration: rad/s² for joint motion; mm/s² for linear and circular motion.

    • tol robot arm linear movement endpoint error. This parameter makes transitions between two movements smoother. When using this parameter, multiple consecutive movements are required, and it must be in non-blocking mode. Default value is 0mm

    • option_cond Optional motion condition pointer. The current joint_move, linear_move, and circular_move implementations do not serialize it into motion requests; it cannot implement termination conditions.

    • ori_vel Orientation velocity, default value is 3.14rad/s

    • ori_acc Orientation acceleration, default value is 12.56rad/s^2^

Robot arm arc movement

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t circular_move(const JKHD *handle, const CartesianPose *end_pos, const CartesianPose *mid_pos, MoveMode move_mode, BOOL is_block, double speed, double accel, double tol, const OptionalCond *option_cond)
errno_t circular_move_extend(const JKHD *handle, const CartesianPose *end_pos, const CartesianPose *mid_pos, MoveMode move_mode, BOOL is_block, double speed, double accel, double tol, const OptionalCond *option_cond, double circle_cnt)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • end_pos Target position for robot arm end movement

    • mid_pos Intermediate point of the robot arm end movement

    • move_mode Robot arm motion mode. Available types: Absolute motion (ABS), incremental motion (INCR), continuous motion (CONTINUE), and stop (STOP)

    • is_block Wait for motion completion: 1/true for blocking, 0/false for non-blocking. Waiting uses an empty queue and the in-position flag, not a fixed 30-second timeout.

    • speed robot arm linear movement speed, unit: mm/s

    • accel Acceleration: rad/s² for joint motion; mm/s² for linear and circular motion.

    • tol Endpoint error of the robot arm movement in Cartesian space

    • option_cond Optional motion condition pointer. The current joint_move, linear_move, and circular_move implementations do not serialize it into motion requests; it cannot implement termination conditions.

    • circle_cnt Specifies the number of circular motion loops for the robot arm. The default value is 0; when it is 0, it is equivalent to circular_move

Robot arm arc movement

errno_t circular_move_extend_mode(const JKHD *handle, const CartesianPose *end_pos, const CartesianPose *mid_pos, MoveMode move_mode, BOOL is_block, double speed, double accel, double tol, const OptionalCond *option_cond, double circle_cnt, int circle_mode)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • end_pos Target position for robot arm end movement

    • mid_pos Intermediate point of the robot arm end movement

    • move_mode Robot arm motion mode. Available types: Absolute motion (ABS), incremental motion (INCR), continuous motion (CONTINUE), and stop (STOP)

    • is_block Wait for motion completion: 1/true for blocking, 0/false for non-blocking. Waiting uses an empty queue and the in-position flag, not a fixed 30-second timeout.

    • speed robot arm linear movement speed, unit: mm/s

    • accel Acceleration: rad/s² for joint motion; mm/s² for linear and circular motion.

    • tol Endpoint error of the robot arm movement in Cartesian space

    • option_cond Optional motion condition pointer. The current joint_move, linear_move, and circular_move implementations do not serialize it into motion requests; it cannot implement termination conditions.

    • circle_cnt Specifies the number of circular motion loops for the robot arm. The default value is 0; when it is 0, it is equivalent to circular_move

    • circle_mode Specifies the circular motion mode of the robot arm, default value is 0, parameter description as follows:

Set robot arm speed multiplier

errno_t set_rapidrate(const JKHD *handle, double rapid_rate)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • rapid_rate is the program running rate, setting range is [0 to 1]

Get robot arm speed multiplier

errno_t get_rapidrate(const JKHD *handle, double *rapid_rate)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • rapid_rate Outputs the robot motion speed ratio, ranging from 0 to 1.

Set tool information

errno_t set_tool_data(const JKHD *handle, int id, const CartesianPose *tcp, const char *name)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • id Tool ID, value range [1 to 15]

    • tcp Tool coordinate system offset relative to the flange coordinate system

    • name Alias for the specified tool

Get tool information

errno_t get_tool_data(const JKHD *handle, int id, CartesianPose *tcp)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • id Tool ID query result

    • tcp Tool coordinate system offset relative to the flange coordinate system

Set the currently used tool ID

errno_t set_tool_id(const JKHD *handle, const int id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • id Tool coordinate system ID, value range is [0–15], where 0 means using the default end flange center coordinate system

Query the currently used tool ID

errno_t get_tool_id(const JKHD *handle, int *id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • id Tool ID query result

Set user coordinate system information

errno_t set_user_frame_data(const JKHD *handle, int id, const CartesianPose *user_frame, const char *name)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • id User coordinate system ID, value range [1–15], 0 is the default world coordinate system and cannot be changed.

    • user_frame User coordinate system offset value

    • name User coordinate system alias

Get user coordinate system information

errno_t get_user_frame_data(const JKHD *handle, int id, CartesianPose *user_frame)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • id User coordinate system ID

    • user_frame User coordinate system offset value

Set the user coordinate system ID currently in use

errno_t set_user_frame_id(const JKHD *handle, const int id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • id User coordinate system ID, value range is [0 to 15], where 0 is the world coordinate system

Query the user coordinate system ID currently in use

errno_t get_user_frame_id(const JKHD *handle, int *id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • id Result obtained

Control robot arm to enter or exit drag mode

errno_t drag_mode_enable(const JKHD *handle, BOOL enable)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • enable TRUE to enter drag mode, FALSE to exit drag mode

Query whether the robot arm is in drag mode

errno_t is_in_drag_mode(const JKHD *handle, BOOL *in_drag)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • in_drag Query result

Get joint friction compensation coefficient

errno_t get_drag_friction_compensation_gain(const JKHD* handle, DragFrictionCompensationGainList* list)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • list is a 6-dimensional integer array, corresponding to the friction compensation coefficients of 6 joints respectively

Get current robot arm joint angles — servo feedback

errno_t get_actual_joint_position(const JKHD *handle, JointValue *joint_position)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • joint_position Joint angle query result

Get the current robot arm joint angles

errno_t get_joint_position(const JKHD *handle, JointValue *joint_position)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • joint_position Joint angle query result

Set manual or automatic mode

errno_t set_auto_manual_mode(const JKHD *handle, int mode, int robot_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • mode mode parameter, 0: manual mode, 1: automatic mode

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. C interfaces exposing this parameter require an explicit argument.

Get the current robot arm operation mode

errno_t get_auto_manual_mode(const JKHD *handle, int *mode, int robot_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • mode mode parameter, 0: manual mode, 1: automatic mode

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. C interfaces exposing this parameter require an explicit argument.

Get the pose of the tool endpoint under the current settings — servo feedback

errno_t get_actual_tcp_position(const JKHD *handle, CartesianPose *tcp_position)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • tcp_position Tool end pose query result

Get the pose of the tool endpoint under the current settings

errno_t get_tcp_position(const JKHD *handle, CartesianPose *tcp_position)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • tcp_position Tool end pose query result

Check if the robot arm exceeds the limit

errno_t is_on_limit(const JKHD *handle, BOOL *on_limit)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • on_limit Interrogate results

Check if the robot arm movement has stopped

errno_t is_in_pos(const JKHD *handle, BOOL *in_pos)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • in_pos Query result

Check if the robot arm is in an emergency stop state

errno_t is_in_estop(const JKHD *handle, BOOL *in_estop)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • in_estop Outputs emergency-stop status: 1/true if active, 0/false otherwise.

Set the robot arm motion planner type

errno_t set_motion_planner(const JKHD* handle, MotionPlannerType type)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • type Motion planner type

Terminate robot arm movement

errno_t motion_abort(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Check the robot arm motion status

errno_t get_motion_status(const JKHD* handle, MotionStatus *status)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • status robot arm movement status

Set the robot arm load

errno_t set_payload(const JKHD *handle, const PayLoad *payload)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • payload Centroid and mass data of payload

Get robot arm load data

errno_t get_payload(const JKHD *handle, PayLoad *payload)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • payload Load Interrogate results

Set joint friction compensation coefficient (drag feel parameter)

errno_t set_drag_friction_compensation_gain(const JKHD* handle, int joint, int gain);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • joint Joint number 0~5

    • gain Friction compensation coefficient, value range 0-200, 200 compensates 200% of the friction

  • Return value: ERR_SUCC on success; any other value indicates failure.

External axis combined motion

Warning: Interface Notes

The corresponding TCP client implementation is empty and sends no request. A return value of 0 does not confirm execution of the original operation.

errno_t multi_mov_with_ext(const JKHD *handle, MultiMovInfoList *info_list, BOOL is_block, DI_Info *di_info, int planner_type);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • info_list Combined motion list: count specifies the number of valid units; info holds robot/external-axis targets, speeds, accelerations, and motion types.

    • is_block Wait for motion completion: 1/true for blocking, 0/false for non-blocking. Waiting uses an empty queue and the in-position flag, not a fixed 30-second timeout.

    • di_info DI motion-termination condition; use a permitted null pointer or invalid I/O configuration when no condition is required.

    • planner_type Motion planner type; default: 0.

  • Return value: ERR_SUCC on success; any other value indicates failure.

External axis jog motion

Warning: Interface Notes

The corresponding TCP client implementation is empty and sends no request. A return value of 0 does not confirm execution of the original operation.

errno_t jog_ext(const JKHD *handle, int ext_id, int is_abs, double vel, double step);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ext_id Target external axis ID.

    • is_abs 0 means absolute motion ABS, 1 means incremental motion INCR, 2 means continuous motion CONTINUE

    • vel Speed, incremental and continuous motion direction is controlled by speed

    • step ABS: step is target position; INCR: step is target increment; CONTINUE: step has no meaning

  • Return value: ERR_SUCC on success; any other value indicates failure.

Enable on external axis

Warning: Interface Notes

The corresponding TCP client implementation is empty and sends no request. A return value of 0 does not confirm execution of the original operation.

errno_t enable_ext(const JKHD *handle, int ext_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ext_id External axis ID

  • Return value: ERR_SUCC on success; any other value indicates failure.

Disable on external axis

Warning: Interface Notes

The corresponding TCP client implementation is empty and sends no request. A return value of 0 does not confirm execution of the original operation.

errno_t disable_ext(const JKHD *handle, int ext_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ext_id External axis ID

  • Return value: ERR_SUCC on success; any other value indicates failure.

Get external axis status

Warning: Interface Notes

The corresponding TCP client implementation is empty and sends no request. A return value of 0 does not confirm execution of the original operation.

errno_t get_ext_status(const JKHD *handle, ExtAxisStatusList *status_list, int ext_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • status_list External axis status list

    • ext_id External axis ID, -1 means get all external axis statuses

  • Return value: ERR_SUCC on success; any other value indicates failure.

Home External Servo Axis

errno_t ext_servo_home(const JKHD *handle, int ext_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ext_id ID of the external axis to home.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Set Dragging Parameters

Warning: Interface Notes

The corresponding TCP client implementation is empty and sends no request. A return value of 0 does not confirm execution of the original operation.

errno_t set_drag_parameters(const JKHD *handle, double ratio[MAX_AXIS], int mode, int robot_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ratio Joint friction compensation coefficient array of length MAX_AXIS; populate it for the robot’s actual axis count.

    • mode Dragging mode: 0 for classic, 1 for advanced.

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. C interfaces exposing this parameter require an explicit argument.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Get Dragging Parameters

Warning: Interface Notes

The corresponding TCP client implementation is empty and sends no request. A return value of 0 does not confirm execution of the original operation.

errno_t get_drag_parameters(const JKHD *handle, double ratio_servo[MAX_AXIS], double ratio_controller[MAX_AXIS], int *mode, BOOL *advanced, int robot_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ratio_servo Outputs joint friction compensation coefficients for classic dragging, as an array of length MAX_AXIS.

    • ratio_controller Outputs joint friction compensation coefficients for advanced dragging, as an array of length MAX_AXIS.

    • mode Outputs dragging mode: 0 for classic, 1 for advanced.

    • advanced Outputs whether advanced dragging is supported.

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. C interfaces exposing this parameter require an explicit argument.

  • Return value: ERR_SUCC on success; any other value indicates failure.

IO

Set digital output variable

Warning: Interface Notes

set_digital_output_multi is declared in the C header, but the current SDK source provides no corresponding exported definition; it is not an implemented interface.

errno_t set_digital_output(const JKHD *handle, IOType type, int index, BOOL value)

errno_t set_digital_output_multi(const JKHD *handle, IOType type, int index, BOOL* value, int len);
errno_t set_digital_output_extend(const JKHD *handle, IOType type, int index, BOOL value, int submodule_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • type DO type

    • index DO index (starting from 0)

    • value DO value to set

    • len Number of consecutive I/O channels and valid elements in the value/result array.

    • submodule_id I/O submodule ID; the default module is 0. Match the module configured in the controller.

Set analog output variable

Warning: Interface Notes

set_analog_output_multi is declared in the C header, but the current SDK source provides no corresponding exported definition; it is not an implemented interface.

errno_t set_analog_output(const JKHD *handle, IOType type, int index, float value)

errno_t set_analog_output_multi(const JKHD *handle, IOType type, int index, float* value, int len);
errno_t set_analog_output_extend(const JKHD *handle, IOType type, int index, float value, int submodule_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • type AO type, optional types refer to setting digital output variables; when acting as a Modbus slave IO, the index is 4

    • index AO index (starting from 0)

    • value AO set value

    • len Number of consecutive I/O channels and valid elements in the value/result array.

    • submodule_id I/O submodule ID; the default module is 0. Match the module configured in the controller.

Set digital output variable during movement

errno_t set_motion_digital_output(const JKHD *handle, IOType type, int index, BOOL value, BOOL rel, double distance)

errno_t set_motion_digital_output_extend(const JKHD *handle, IOType type, int index, BOOL value, BOOL rel, double distance, int submodule_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • type DO type, optional types refer to setting digital output variables

    • index DO index (starting from 0)

    • value DO value to set

    • rel 0: relative to the motion start point, 1: relative to the motion end point

    • distance Distance, refers to how far from the start or end point (based on the rel parameter) to trigger DO

    • submodule_id I/O submodule ID; the default module is 0. Match the module configured in the controller.

Set analog output variable during movement

errno_t set_motion_analog_output(const JKHD *handle, IOType type, int index, float value, BOOL rel, double distance)

errno_t set_motion_analog_output_extend(const JKHD *handle, IOType type, int index, float value, BOOL rel, double distance, int submodule_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • type AO type, optional types refer to setting digital output variables

    • index AO index (starting from 0)

    • value AO set value

    • rel 0: relative to the motion start point, 1: relative to the motion end point

    • distance Distance, refers to how far from the start or end point (based on the rel parameter) to trigger AO

    • submodule_id I/O submodule ID; the default module is 0. Match the module configured in the controller.

Check digital input status

Warning: Interface Notes

get_digital_input_multi is declared in the C header, but the current SDK source provides no corresponding exported definition; it is not an implemented interface.

errno_t get_digital_input(const JKHD *handle, IOType type, int index, BOOL *result)

errno_t get_digital_input_multi(const JKHD *handle, IOType type, int index, BOOL *result, int len);
errno_t get_digital_input_extend(const JKHD *handle, IOType type, int index, BOOL *result, int submodule_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • type DI type, optional types refer to setting digital output variables

    • index DI index (starting from 0)

    • result DI status query result

    • len Number of consecutive I/O channels and valid elements in the value/result array.

    • submodule_id I/O submodule ID; the default module is 0. Match the module configured in the controller.

Check digital output status

Warning: Interface Notes

get_digital_output_multi is declared in the C header, but the current SDK source provides no corresponding exported definition; it is not an implemented interface.

errno_t get_digital_output(const JKHD *handle, IOType type, int index, BOOL *result)

errno_t get_digital_output_multi(const JKHD *handle, IOType type, int index, BOOL *result, int len);
errno_t get_digital_output_extend(const JKHD *handle, IOType type, int index, BOOL *result, int submodule_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • type DO type, optional types refer to setting digital output variables

    • index DO index (starting from 0)

    • result DO status query result

    • len Number of consecutive I/O channels and valid elements in the value/result array.

    • submodule_id I/O submodule ID; the default module is 0. Match the module configured in the controller.

Get the value of the analog input variable

Warning: Interface Notes

get_analog_input_multi is declared in the C header, but the current SDK source provides no corresponding exported definition; it is not an implemented interface.

errno_t get_analog_input(const JKHD *handle, IOType type, int index, float *result)

errno_t get_analog_input_multi(const JKHD *handle, IOType type, int index, float *result, int len);
errno_t get_analog_input_extend(const JKHD *handle, IOType type, int index, float *result, int submodule_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • type AI type, optional types refer to setting digital output variables

    • index AI index (starting from 0)

    • result specified AI status query result

    • len Number of consecutive I/O channels and valid elements in the value/result array.

    • submodule_id I/O submodule ID; the default module is 0. Match the module configured in the controller.

Get the value of the analog output variable

Warning: Interface Notes

get_analog_output_multi is declared in the C header, but the current SDK source provides no corresponding exported definition; it is not an implemented interface.

errno_t get_analog_output(const JKHD *handle, IOType type, int index, float *result)

errno_t get_analog_output_multi(const JKHD *handle, IOType type, int index, float *result, int len);
errno_t get_analog_output_extend(const JKHD *handle, IOType type, int index, float *result, int submodule_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • type AO type, optional types refer to setting digital output variables

    • index AO index (starting from 0)

    • result specified AO status query result

    • len Number of consecutive I/O channels and valid elements in the value/result array.

    • submodule_id I/O submodule ID; the default module is 0. Match the module configured in the controller.

Query whether extended IO is running

errno_t is_extio_running(const JKHD *handle, BOOL *is_running)

errno_t is_extio_running_extend(const JKHD *handle, BOOL *is_running, int submodule_id);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • is_running extended IO module running status query result

    • submodule_id I/O submodule ID; the default module is 0. Match the module configured in the controller.

TIO

Set TIOV3 voltage parameters

errno_t set_tio_vout_param(const JKHD* handle, int vout_enable, int vout_vol)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • vout_enable Voltage enable, 0: Off, 1: On

    • vout_vol Voltage level 0: 24v 1: 12v

Get TIOV3 voltage parameters

errno_t get_tio_vout_param(const JKHD* handle, int* vout_enable, int* vout_vol)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • vout_enable Voltage enable, 0: Off, 1: On

    • vout_vol Voltage level 0: 24v 1: 12v

Add or modify TIO semaphore

errno_t add_tio_rs_signal(const JKHD* handle, SignInfo sign_info)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • sign_info semaphore parameters

TIO delete semaphore

errno_t del_tio_rs_signal(const JKHD* handle, const char* sig_name)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • sig_name semaphore name

TIO RS485 send command

errno_t send_tio_rs_command(const JKHD* handle, int chn_id, uint8_t* cmdbuf, int bufsize)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • chn_id Channel number

    • cmdbuf RS485 send buffer; bufsize specifies its length.

    • bufsize RS485 send buffer size in bytes.

TIO refresh signal information

errno_t update_tio_rs_signal(const JKHD* handle, SignInfo_simple sign_info);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • sign_info Signal information array

TIO get semaphore information

errno_t get_rs485_signal_info(const JKHD* handle, SignInfo* sign_info_array, int *array_len)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • sign_info_array Signal information array

    • array_len Signal information array length

Set TIO mode

errno_t set_tio_pin_mode(const JKHD* handle, int pin_type, int pin_mode)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • pin_type tio type 0 for DI Pins, 1 for DO Pins, 2 for AI Pins

    • pin_mode TIO pin mode; use a value compatible with pin_type and the tool hardware.

Get TIO mode

errno_t get_tio_pin_mode(const JKHD* handle, int pin_type, int* pin_mode)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • pin_type tio type 0 for DI Pins, 1 for DO Pins, 2 for AI Pins

    • pin_mode TIO pin mode; use a value compatible with pin_type and the tool hardware.

TIO RS485 communication parameter configuration

errno_t set_rs485_chn_comm(const JKHD* handle, ModRtuComm mod_rtu_com)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • mod_rtu_com When channel mode is set to Modbus RTU, an additional Modbus slave node ID must be specified

TIO RS485 communication parameter query

errno_t get_rs485_chn_comm(const JKHD* handle, ModRtuComm* mod_rtu_com)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • mod_rtu_com is used to receive the obtained channel mode parameters; when querying, chn_id is used as the input parameter

TIO RS485 communication mode configuration

errno_t set_rs485_chn_mode(const JKHD* handle, int chn_id, int chn_mode)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • chn_id 0: RS485H, channel 1; 1: RS485L, channel 2

    • chn_mode 0: Modbus RTU, 1: Raw RS485, 2: torque sensor

TIO RS485 communication mode query

errno_t get_rs485_chn_mode(const JKHD* handle, int chn_id, int* chn_mode)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • chn_id input parameter 0: RS485H, channel 1. 1: RS485L, channel 2

    • chn_mode output parameter 0: Modbus RTU. 1: Raw RS485. 2: torque sensor

Servo

Query whether the robot arm is in servo motion state

errno_t is_in_servomove(const JKHD *handle, BOOL *in_servo)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • in_servo TRUE means in servo motion state, FALSE means not in servo motion state

Enable robot arm servo position control mode

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t servo_move_enable(const JKHD *handle, BOOL enable)
errno_t servo_move_enable_extend(const JKHD *handle, BOOL enable, BOOL is_block, int robot_id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • enable TRUE means enter servo position control mode, FALSE means exit the mode

    • is_block Wait for motion completion: 1/true for blocking, 0/false for non-blocking. Waiting uses an empty queue and the in-position flag, not a fixed 30-second timeout.

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. V3 gRPC selects the robot using this identifier. C interfaces exposing it require an explicit argument.

Robot arm joint space servo mode motion

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t servo_j(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode)
errno_t servo_j_extend(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode, unsigned int step_num)
errno_t servo_j_extend_queue(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode, unsigned int step_num, int *queue_num, DOInfo *do_info, int robot_id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • joint_pos Target joint position for robot arm joint motion

    • move_mode Robot arm motion mode. Available types: Absolute motion (ABS), incremental motion (INCR), continuous motion (CONTINUE), and stop (STOP)

    • step_num divides the period, servo_j motion period is step_num*8ms, where step_num >= 1

    • queue_num output pointer, returns the current instruction queue length, default is nullptr

    • do_info specifies DO information, default is nullptr

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. V3 gRPC selects the robot using this identifier. C interfaces exposing it require an explicit argument.

robot arm Cartesian space servo mode motion

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t servo_p(const JKHD *handle, const CartesianPose *cartesian_pose, MoveMode move_mode)
errno_t servo_p_extend(const JKHD *handle, const CartesianPose *cartesian_pose, MoveMode move_mode, unsigned int step_num)
errno_t servo_p_extend_queue(const JKHD *handle, const CartesianPose *cartesian_pose, MoveMode move_mode, unsigned int step_num, int *queue_num, DOInfo *do_info, int robot_id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • cartesian_pose target position for robot arm Cartesian space motion

    • move_mode Robot arm motion mode. Available types: Absolute motion (ABS), incremental motion (INCR), continuous motion (CONTINUE), and stop (STOP)

    • step_num subdivides the cycle, servo_p motion cycle is step_num*8ms, where step_num>=1

    • queue_num output pointer, returns the current instruction queue length, default is nullptr

    • do_info specifies DO information, default is nullptr

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. V3 gRPC selects the robot using this identifier. C interfaces exposing it require an explicit argument.

Disable filter in robot arm servo mode

errno_t servo_move_use_none_filter(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

First-order low-pass filter in joint space under robot arm SERVO mode

errno_t servo_move_use_joint_LPF(const JKHD *handle, double cutoffFreq)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • cutoffFreq first-order low-pass filter cutoff frequency

Nonlinear filter in joint space under robot arm SERVO mode

errno_t servo_move_use_joint_NLF(const JKHD *handle, double max_vr, double max_ar, double max_jr)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • max_vr Maximum limit value (absolute value) of Cartesian space orientation change rate °/s

    • max_ar Maximum limit value (absolute value) of acceleration of Cartesian space orientation change rate °/s^2^

    • max_jr Maximum limit value (absolute value) of jerk of Cartesian space orientation change rate °/s^3^

Nonlinear filtering of Cartesian space in robot arm SERVO mode

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t servo_move_use_carte_NLF(const JKHD *handle, double max_vp, double max_ap, double max_jp, double max_vr, double max_ar, double max_jr)
errno_t servo_move_use_carte_NLF_extend(const JKHD *handle, double max_vp, double max_ap, double max_jp, double max_vr, double max_ar, double max_jr, int ori_quat,  int robot_id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • max_vp Maximum limit value (absolute value) of movement command speed in Cartesian space. Unit: mm/s

    • max_ap Maximum limit value (absolute value) of movement command acceleration in Cartesian space. Unit: mm/s^2^

    • max_jp Maximum limit value (absolute value) of movement command jerk in Cartesian space Unit: mm/s^3^

    • max_vr Maximum limit value (absolute value) of Cartesian space orientation change rate °/s

    • max_ar Maximum limit value (absolute value) of acceleration of Cartesian space orientation change rate °/s^2^

    • max_jr Maximum limit value (absolute value) of jerk of Cartesian space orientation change rate °/s^3^

    • ori_quat Optional parameter that specifies the representation used to describe Cartesian space orientation. 0 means using Euler angles, 1 means using quaternion representation

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. V3 gRPC selects the robot using this identifier. C interfaces exposing it require an explicit argument.

Multi-order mean filtering of joint space in robot arm SERVO mode

errno_t servo_move_use_joint_MMF(const JKHD *handle, int max_buf, double kp, double kv, double ka)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • max_buf size of the mean filter buffer

    • kp Acceleration filter coefficient

    • kv Velocity filter coefficient

    • ka position filtering coefficient

Speed foresight parameter setting in SERVO mode for robot arm

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t servo_speed_foresight(const JKHD *handle, int max_buf, double kp)
errno_t servo_speed_foresight_extend(const JKHD *handle, int max_buf, double kp, int ori_quat, int robot_id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • max_buf size of the mean filter buffer

    • kp proportional gain; the larger the value, the faster and more precise the response, but prone to jitter; the smaller the value, the smoother and more stable, but with response delay and reduced accuracy.

    • ori_quat Optional parameter that specifies the representation used to describe Cartesian space orientation. 0 means using Euler angles, 1 means using quaternion representation

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. V3 gRPC selects the robot using this identifier. C interfaces exposing it require an explicit argument.

Filter joint space in robot arm SERVO mode

errno_t servo_move_use_joint_PCM(const JKHD *handle, int max_buf, double kp, int robot_id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • max_buf filter buffer size, recommended range [1 to 50]

    • kp proportional gain, range from [0.05 to 0.4]; the larger the value, the faster and more precise the response, but prone to jitter; the smaller the value, the smoother and more stable, but with response delay and reduced accuracy

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. V3 gRPC selects the robot using this identifier. C interfaces exposing it require an explicit argument.

Filter Cartesian space in robot arm SERVO mode

errno_t servo_move_use_carte_PCM(const JKHD *handle, int max_buf, double kp, int robot_id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • max_buf filter buffer size, recommended range [1 to 50]

    • kp proportional gain, range from [0.05 to 0.4]; the larger the value, the faster and more precise the response, but prone to jitter; the smaller the value, the smoother and more stable, but with response delay and reduced accuracy

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. V3 gRPC selects the robot using this identifier. C interfaces exposing it require an explicit argument.

Execute Servo Trajectory File

Warning: Interface Notes

The corresponding gRPC client implementation is empty and sends no request. A return value of 0 does not confirm execution of the original operation.

errno_t start_servo_traj(const JKHD *handle, const char* filename)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • filename Trajectory filename.

Get servo trajectory execution status

Warning: Interface Notes

The corresponding gRPC client implementation is empty and sends no request. A return value of 0 does not confirm execution of the original operation.

errno_t get_traj_status(const JKHD *handle, int* is_running, int* whole_points, int* progress)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • is_running Whether a trajectory is executing.

    • whole_points Total number of trajectory points.

    • progress Current execution progress.

Stop Servo Trajectory Execution

Warning: Interface Notes

The corresponding gRPC client implementation is empty and sends no request. A return value of 0 does not confirm execution of the original operation.

errno_t stop_servo_traj(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

EDG

Robot arm EDG enable

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t edg_init(const JKHD *handle, BOOL en, const char* edg_stat_ip)
errno_t edg_init_extend(const JKHD *handle, BOOL en, const char* edg_stat_ip, int edg_port, int edg_mode)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • en  Enable switch, true to activate the EDG function, false to disable this function

    • edg_stat_ip  SDK client IP address

    • edg_port  SDK client port number

    • edg_mode  EDG mode, default value is 0; 0 means all EDG-related interfaces can be called; 1 means all interfaces except edg_servo_j and edg_servo_p can be called

Robot arm high-speed acquisition of EDG feedback data

errno_t edg_get_stat(const JKHD *handle, EDGState *edg_state, unsigned char robot_index)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • edg_state EDG feedback data (including joint position, velocity, torque, Cartesian position, and sensor data)

    • robot_index Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. C interfaces exposing this parameter require an explicit argument.

Robot arm acquisition of EDG feedback data issuance timestamp

errno_t edg_stat_details(const JKHD *handle, unsigned long int details[3]);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • details Timestamp

Robot arm EDG joint space servo mode motion

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t edg_servo_j(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode)
errno_t edg_servo_j_extend(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode, unsigned int step_num, unsigned char robot_index)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • joint_pos Target joint position for robot arm joint motion

    • move_mode Robot arm motion mode. Available types: Absolute motion (ABS), incremental motion (INCR), continuous motion (CONTINUE), and stop (STOP)

    • step_num Cycle subdivision; edg_servo_j motion cycle = step_num*8ms, where step_num>=1, default value is 1

    • robot_index Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. C interfaces exposing this parameter require an explicit argument.

Robot arm EDG Cartesian space servo mode motion

// These interfaces perform the same operation with different optional parameters; select the required variant.
errno_t edg_servo_p(const JKHD *handle, const CartesianPose *cartesian_pose, MoveMode move_mode)
errno_t edg_servo_p_extend(const JKHD *handle, const CartesianPose *cartesian_pose, MoveMode move_mode, unsigned int step_num, unsigned char robot_index)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • cartesian_pose target position for robot arm Cartesian space motion

    • move_mode Robot arm motion mode. Available types: Absolute motion (ABS), incremental motion (INCR), continuous motion (CONTINUE), and stop (STOP)

    • step_num multiplied subdivision cycle, edg_servo_p motion cycle is step_num*8ms, where step_num>=1

    • robot_index Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. C interfaces exposing this parameter require an explicit argument.

Trajectory

Set trajectory reproduction configuration parameters

errno_t set_traj_config(const JKHD *handle, const TrajTrackPara *para)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • para trajectory reproduction configuration parameters

Collect trajectory reproduction data control switch

errno_t set_traj_sample_mode(const JKHD *handle, const BOOL mode, char *filename)

errno_t set_traj_sample_mode_extend(const JKHD *handle, const BOOL mode, char *filename, BOOL reset);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • mode Select TRUE to start data collection, when selecting FALSE, data collection is closed

    • filename Storage file name for collected data. When filename is a null pointer, the storage file is named with the current date

    • reset Clear previously sampled trajectory data with 1/true; retain it with 0/false.

Get trajectory reproduction configuration parameters

errno_t get_traj_config(const JKHD *handle, TrajTrackPara *para)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • para trajectory reproduction configuration parameters

Query status of collected trajectory reproduction data

errno_t get_traj_sample_status(const JKHD *handle, BOOL *sample_status)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • sample_status Outputs whether trajectory sampling is in progress.

Query the file name of trajectory reproduction data already existing in the controller

errno_t get_exist_traj_file_name(const JKHD *handle, MultStrStorType *filename)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • filename File name of trajectory reproduction data already existing in the controller

Rename the file name of trajectory reproduction data

errno_t rename_traj_file_name(const JKHD *handle, const char *src, const char *dest)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • src Original file name

    • dest Target file name. File name length cannot exceed 100 characters. File name cannot be empty. Target file name does not support Chinese.

Delete trajectory reproduction data file from the controller

errno_t remove_traj_file(const JKHD *handle, const char *filename)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • filename File name of the file to delete; file name is the name of the data file

Generate controller execution script from trajectory reproduction data files in the controller

errno_t generate_traj_exe_file(const JKHD *handle, const char *filename)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • filename The name of the data file; the filename is the name of the data file without a suffix

Program

Run the currently loaded job program

errno_t program_run(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Pause the currently running job program

errno_t program_pause(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Continue running the currently paused job program

errno_t program_resume(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Terminate the currently executing job program

errno_t program_abort(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Load the specified job program

errno_t program_load(const JKHD *handle, const char *file)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • file Path to the program file

Get execution status of robot arm job program

errno_t get_program_state(const JKHD *handle, ProgramState *status)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • status Program execution status query result, PROGRAM_IDLE: stopped status, PROGRAM_RUNNING: running status, PROGRAM_PAUSED: paused status

Get information of robot arm job program

errno_t get_program_info(const JKHD *handle, ProgramInfo* info)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • info Program information query result

Get the name of the loaded job program

errno_t get_loaded_program(const JKHD *handle, char *file)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • file Path to the program file

Get the execution line number of the current robot arm operation program

errno_t get_current_line(const JKHD *handle, int *curr_line)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • curr_line Query result of the current line number

Get system variable (Deprecated)

errno_t get_user_var(const JKHD *handle, UserVariableList* vlist)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • vlist System variable query result list

Warning: Deprecated Interface

Use get_all_user_defined_variables instead.

Set system variable (Deprecated)

errno_t set_user_var(const JKHD *handle, UserVariable v)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • v System variable

Warning: Deprecated Interface

Use add_user_defined_variable instead.

Add User-Defined Variable

Warning: Interface Notes

The corresponding TCP client implementation returns ERR_NO_IMPLEMENT (-9997).

errno_t add_user_defined_variable(const JKHD *handle, const UserDefinedVariable *variable)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • variable Pointer to the user-defined variable

Delete User-Defined Variable

Warning: Interface Notes

The corresponding TCP client implementation returns ERR_NO_IMPLEMENT (-9997).

errno_t delete_user_defined_variable(const JKHD *handle, const char *alias)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • alias Name of the variable to delete

Modify User-Defined Variable

Warning: Interface Notes

The corresponding TCP client implementation returns ERR_NO_IMPLEMENT (-9997).

errno_t modify_user_defined_variable(const JKHD *handle, const char *old_alias, const UserDefinedVariable *variable)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • old_alias Current variable name

    • variable New user-defined variable (variable->alias is the new name)

Get User-Defined Variable

Warning: Interface Notes

The corresponding TCP client implementation returns ERR_NO_IMPLEMENT (-9997).

errno_t get_user_defined_variable(const JKHD *handle, const char *alias, UserDefinedVariable *variable)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • alias Name of the variable to query

    • variable Output pointer for the query result

Get All User-Defined Variables

Warning: Interface Notes

The corresponding TCP client implementation returns ERR_NO_IMPLEMENT (-9997).

errno_t get_all_user_defined_variables(const JKHD *handle, UserDefinedVariable *variables, int variable_capacity, int *variable_count)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • variables Output buffer; pass nullptr when variable_capacity is 0 to query the required count

    • variable_capacity Buffer capacity (number of array elements)

    • variable_count Receives the required/returned number of variables

Add Pose Variable

Warning: Interface Notes

The corresponding TCP client implementation returns ERR_NO_IMPLEMENT (-9997).

errno_t add_pose_variable(const JKHD *handle, const PoseVariable *pose_variable);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • pose_variable Pose-variable structure: alias, pose, tool_id, frame_id, inverse_config, ext_axes, joint_pos, tool_offset, user_offset, variable. Position in mm, angles in rad.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Delete Pose Variable

Warning: Interface Notes

The corresponding TCP client implementation returns ERR_NO_IMPLEMENT (-9997).

errno_t delete_pose_variable(const JKHD *handle, const char *alias);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • alias Nonempty, null-terminated variable name; queries and deletions require an existing controller-side name.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Modify Pose Variable

Warning: Interface Notes

The corresponding TCP client implementation returns ERR_NO_IMPLEMENT (-9997).

errno_t modify_pose_variable(const JKHD *handle, const char *old_alias, const PoseVariable *pose_variable);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • old_alias Original variable name; the input structure specifies the new name and contents.

    • pose_variable Pose-variable structure: alias, pose, tool_id, frame_id, inverse_config, ext_axes, joint_pos, tool_offset, user_offset, variable. Position in mm, angles in rad.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Get Pose Variable

Warning: Interface Notes

The corresponding TCP client implementation returns ERR_NO_IMPLEMENT (-9997).

errno_t get_pose_variable(const JKHD *handle, const char *alias, PoseVariable *pose_variable);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • alias Nonempty, null-terminated variable name; queries and deletions require an existing controller-side name.

    • pose_variable Pose-variable structure: alias, pose, tool_id, frame_id, inverse_config, ext_axes, joint_pos, tool_offset, user_offset, variable. Position in mm, angles in rad.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Get All Pose Variables

Warning: Interface Notes

The corresponding TCP client implementation returns ERR_NO_IMPLEMENT (-9997).

errno_t get_all_pose_variables(const JKHD *handle, PoseVariable *pose_variables, int pose_capacity, int *pose_count);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • pose_variables Output pose-variable array. With capacity 0, a null pointer may be passed to query the required count.

    • pose_capacity Output array capacity, measured in PoseVariable elements.

    • pose_count Outputs the required/returned pose-variable count; reallocate using this value if capacity is insufficient.

  • Return value: ERR_SUCC on success; any other value indicates failure.

FTP

Initialize FTP client

Warning: Interface Notes

The current implementation retains the compatibility call and returns 0. FTP settings are initialized at login; each file transfer establishes its own connection.

errno_t init_ftp_client(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Close FTP client

Warning: Interface Notes

The current implementation retains the compatibility call and returns 0. FTP settings are initialized at login; each file transfer establishes its own connection.

errno_t close_ftp_client(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

FTP download

errno_t download_file(const JKHD *handle, char *local, char *remote, int opt)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • local: Absolute path of the local file name for download; if it is a folder, it must end with “/”

    • remote: Absolute path of the file name inside the controller; if it is a folder, it must end with “/”

    • opt: 1 single file, 2 folder

FTP upload

errno_t upload_file(const JKHD *handle, char *local, char *remote, int opt)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • local: Absolute path of the local file name; if it is a folder, it must end with “/”

    • remote: Absolute path of the file name inside the controller; if it is a folder, it must end with “/”

    • opt: 1 single file, 2 folder

FTP delete

errno_t del_ftp_file(const JKHD *handle, char *remote, int opt)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • remote Internal file name of the controller

    • opt: 1 single file, 2 folder

FTP rename

errno_t rename_ftp_file(const JKHD *handle, char *remote, char *des, int opt)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • remote Original internal file name of the controller

    • des Target name for renaming

    • opt: 1 single file, 2 folder

FTP directory query

errno_t get_ftp_dir(const JKHD *handle, const char *remotedir, int type, char *ret)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • remotedir Controller-side directory path, such as /program/ or /track/.

    • type Query type: 0 for files and subdirectories, 1 for files, 2 for subdirectories.

    • ret Returned query result

Initialize FTP Client (Compatibility Interface)

Warning: Interface Notes

The current implementation retains the compatibility call and returns 0. FTP settings are initialized at login; each file transfer establishes its own connection.

errno_t init_ftp_client_with_ssl(const JKHD* handle, char* password);
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • password Legacy password parameter; ignored by the current implementation. FTP settings are initialized during login_in.

  • Return value: ERR_SUCC on success; any other value indicates failure.

Tool Drag

Get force compliance control parameters

errno_t get_admit_ctrl_config(const JKHD *handle, RobotAdmitCtrl *admit_ctrl_cfg)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • admit_ctrl_cfg is the storage address of the robot arm’s force compliance control parameters, an array of 6 AdmitCtrlType elements corresponding to force compliance control parameters in the x, y, z, rx, ry, rz directions

Enable or disable tool drag

errno_t enable_admittance_ctrl(const JKHD *handle, const int enable_flag)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • enable_flag 0 disables tool dragging, 1 enables it

Enable tool dragging

errno_t enable_tool_drive(const JKHD *handle, const int enable_flag)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • enable_flag 0 disables tool drag, 1 enables it.

Get tool dragging enable status

errno_t get_tool_drive_state(const JKHD *handle, int* enable, int *state)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • enable 0: off; 1: on.

    • state Dragging motion-limit warning status: 0 means no warning. The low 16 bits represent singularities 1–6, joint soft limits 1–9, and the speed limit, respectively.

Get tool dragging parameters

errno_t get_tool_drive_config(const JKHD *handle, RobotToolDriveCtrl* cfg)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • cfg Storage address for the robot arm force control compliance parameters, an array of 6 AdmitCtrlType, corresponding to the force compliance control parameters for the x, y, z, rx, ry, and rz directions.

Set force control drag feel parameters

errno_t set_tool_drive_config(const JKHD *handle, ToolDriveConfig cfg)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • cfg Configuration for the tool drag.

Get tool drag coordinate system

errno_t get_tool_drive_frame(const JKHD *handle, FTFrameType *ftFrame)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ftFrame Force-control or dragging reference frame; use FTFrameType values.

Set tool drag coordinate system

errno_t set_tool_drive_frame(const JKHD *handle, FTFrameType ftFrame)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ftFrame Force-control or dragging reference frame; use FTFrameType values.

Get fusion drag sensitivity

errno_t get_fusion_drive_sensitivity_level(const JKHD *handle, int *level)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • level Sensitivity level, 0-5, 0 means off, the smaller the value, the less sensitive

Set fusion drag sensitivity

errno_t set_fusion_drive_sensitivity_level(const JKHD *handle, int level)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • level Sensitivity level, 0-5, 0 means off, the smaller the value, the less sensitive

Get motion restriction (singularity and joint limit) warning range

errno_t get_motion_limit_warning_range(const JKHD *handle, int *warning_range)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • warning_range Range level, 1-5, the smaller the value, the larger the warning range

Set motion restriction (singularity and joint limit) warning range

errno_t set_motion_limit_warning_range(const JKHD *handle, int warning_range)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • warning_range Range level, 1-5, the smaller the value, the larger the warning range

Force control

Set constant-force compliance control coordinate system

errno_t set_ft_ctrl_frame(const JKHD *handle, FTFrameType ftFrame)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ftFrame 0: The directional axis of the force control coordinate system will remain parallel to the currently active tool coordinate system in real time; 1: The directional axis of the force control coordinate system will remain parallel to the currently active user coordinate system in real time.

Get constant-force compliance control coordinate system

errno_t get_ft_ctrl_frame(const JKHD *handle, FTFrameType *ftFrame)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ftFrame 0: The directional axis of the force control coordinate system will remain parallel to the currently active tool coordinate system in real time; 1: The directional axis of the force control coordinate system will remain parallel to the currently active user coordinate system in real time.

Set constant-force control tolerance

errno_t set_ft_tolerance(const JKHD *handle, double force, double torque)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • force force tolerance, N

    • torque torque tolerance, Nm

Get constant-force control tolerance

errno_t get_ft_tolerance(const JKHD *handle, double* force, double* torque)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • force force tolerance, N

    • torque torque tolerance, Nm

Activate/Deactivate Constant Force Compliant Control

errno_t set_ft_ctrl_mode(const JKHD *handle, BOOL mode)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • mode Enable constant-force compliance control with 1; disable it with 0.

Get constant-force compliance enable status

errno_t get_ft_ctrl_mode(const JKHD *handle, BOOL* mode)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • mode Outputs whether constant-force compliance control is enabled.

Set constant-force compliance control parameters

errno_t set_ft_ctrl_config(const JKHD *handle, AdmitCtrlType cfg)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • cfg Constant-force compliance axis configuration: axis, opt, ft_user, ft_rebound, ft_constant, ft_normal_track.

Get constant-force compliance control parameters

errno_t get_ft_ctrl_config(const JKHD *handle, RobotAdmitCtrl* cfg)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • cfg Storage address for the robot arm force control compliance parameters, an array of 6 AdmitCtrlType, corresponding to the force compliance control parameters for the x, y, z, rx, ry, and rz directions.

Set force control type and zero calibration (initialization) options

errno_t set_compliant_type(const JKHD *handle, int sensor_compensation, int compliance_type)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • sensor_compensation 1 means immediately perform a sensor zero calibration, and switch APP’s real-time force curve display and torq_sensor_monitor_data.actTorque to actual external force; 0 means no zero calibration, and when not in force control state, switch APP’s real-time force curve display and torq_sensor_monitor_data.actTorque to sensor’s raw readings (if in force control state it still displays actual external force).

    • compliance_type 0 means no compliance control method is used, 1 means constant force compliance control is enabled, 2 means speed compliance control is enabled.

Get force control type and reading display (initialization) status

errno_t get_compliant_type(const JKHD *handle, int *sensor_compensation, int *compliance_type)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • sensor_compensation indicates whether sensor compensation is enabled; 1 means APP’s real-time force curve display and torq_sensor_monitor_data.actTorque show actual external force; 0 means when not in force control state APP’s real-time force curve display and torq_sensor_monitor_data.actTorque show sensor’s raw readings (if in force control state it still shows actual external force).

    • compliance_type 0 means no compliance control method is used; 1 means constant force compliance control; 2 means speed compliance control

Set compliant control force condition

errno_t set_compliance_condition(const JKHD *handle, const FTxyz *ft)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ft is the compliant control torque limit; exceeding the limit value will slow down until stopping

Set approach speed limit

errno_t set_approach_speed_limit(const JKHD *handle, double vel, double angularVel)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • vel linear speed limit, mm/s

    • angularVel angular speed limit, rad/s

Get approach speed limit

errno_t get_approach_speed_limit(const JKHD *handle, double* vel, double* angularVel)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • vel Linear speed limit in mm/s; the getter outputs the current limit.

    • angularVel Angular speed limit in rad/s.

Collision

Query whether the robot arm is in collision protection mode

errno_t is_in_collision(const JKHD *handle, BOOL *in_collision)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • in_collision Interrogate results

Set robot arm collision level

errno_t set_collision_level(const JKHD *handle, const int level)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • level Collision level, range [0 to 5], where 0 disables collision, 1 is collision threshold 25N, 2 is collision threshold 50N, 3 is collision threshold 75N, 4 is collision threshold 100N, 5 is collision threshold 125N

Get collision level set by machine

errno_t get_collision_level(const JKHD *handle, int *level)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • level Collision level, range [0 to 5], where 0 disables collision, 1 is collision threshold 25N, 2 is collision threshold 50N, 3 is collision threshold 75N, 4 is collision threshold 100N, 5 is collision threshold 125N

Recover from collision protection mode after collision

errno_t collision_recover(const JKHD *handle)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

Kinematics

Robot arm inverse kinematics solution

errno_t kine_inverse(const JKHD *handle, const JointValue *ref_pos, const CartesianPose *cartesian_pose, JointValue *joint_pos)
// Optional extended parameters select user and tool frames for inverse kinematics.
errno_t kine_inverse_extend(const JKHD *handle, const JointValue *ref_pos, const CartesianPose *cartesian_pose, JointValue *joint_pos, const CartesianPose *tool, const CartesianPose *userFrame)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • ref_pos Reference joint space position for inverse solution calculation

    • cartesian_pose Cartesian space pose value

    • joint_pos Joint space position calculation result when calculation is successful

    • tool Specified tool coordinate system; if not specified, use the current default tool coordinate system

    • userFrame Specified user coordinate system; if not specified, use the current default user coordinate system

Robot arm forward kinematics solution

errno_t kine_forward(const JKHD *handle, const JointValue *joint_pos, CartesianPose *cartesian_pose)
// Optional extended parameters select user and tool frames for forward kinematics.
errno_t kine_forward_extend(const JKHD *handle, const JointValue *joint_pos, CartesianPose *cartesian_pose, const CartesianPose *tool, const CartesianPose *userFrame)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • joint_pos Joint space position

    • cartesian_pose Cartesian space pose calculation result

    • tool Specified tool coordinate system; if not specified, use the current default tool coordinate system

    • userFrame Specified user coordinate system; if not specified, use the current default user coordinate system

Convert Euler angles to rotation matrix

errno_t rpy_to_rot_matrix(const JKHD *handle, const Rpy *rpy, RotMatrix *rot_matrix)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • rpy Euler angle data to be converted

    • rot_matrix Converted rotation matrix

Convert rotation matrix to Euler angles

errno_t rot_matrix_to_rpy(const JKHD *handle, const RotMatrix *rot_matrix, Rpy *rpy)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • rot_matrix Rotation matrix data to be converted

    • rpy Converted RPY Euler angle result

Convert rotation matrix to quaternion

errno_t rot_matrix_to_quaternion(const JKHD *handle, const RotMatrix *rot_matrix, Quaternion *quaternion)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • rot_matrix Rotation matrix to be converted

    • quaternion Resulting converted quaternion

Convert quaternion to rotation matrix

errno_t quaternion_to_rot_matrix(const JKHD *handle, const Quaternion *quaternion, RotMatrix *rot_matrix)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • quaternion Quaternion data to be converted

    • rot_matrix Converted rotation matrix result

Set Vibration Suppression Mode

errno_t set_vibsuppress_mode(const JKHD *handle, int mode, int robot_id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • mode Vibration suppression mode, 0: Off, 1: Mode 1, 2: Mode 2

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. C interfaces exposing this parameter require an explicit argument.

  • Parameters

    • mode Vibration suppression mode, 0: Off, 1: Mode 1, 2: Mode 2

    • robot_id Reserved; always pass 0.

Enable vibration suppression settings

errno_t vibsuppress_on(const JKHD *handle, double frequency, double damping, int robot_id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • frequency Vibration frequency

    • damping Vibration damping, default value is 0.05

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. C interfaces exposing this parameter require an explicit argument.

  • Parameters

    • frequency Vibration frequency

    • damping Vibration damping, default value is 0.05

    • robot_id Reserved; always pass 0.

The initial default frequency for each model is shown in the table below:

Load/Model

Default frequency (Hz)

MiniCobot1

16

MiniCobot2

15

3kg (Zu3 and similar)

14

5kg(C5/A5)

12

7kg (Zu7 and similar)

12

12kg (Zu12 and similar)

8

16kg(Zu16)

7.5

18kg(Zu18)

7.5

20kg(Zu20)

7.5

30kg(Zu30)

7.4

Max40

5

Disable vibration suppression settings

errno_t vibsuppress_off(const JKHD *handle, int robot_id)
  • Parameters

    • handle Outputs the robot handle at login; other interfaces take the address of an authenticated handle.

    • robot_id Target robot identifier: 0 for a single arm; 0 or 1 for dual arms according to controller configuration. C interfaces exposing this parameter require an explicit argument.

  • Parameters

    • robot_id Reserved; always pass 0.

Interface call return value list and troubleshooting

Error codes

Description

Handling suggestions

0

success

null

2

interface error or controller not supported

Check the controller and SDK version information, upgrade or use another interface

-1

invalid handler

Please check whether login is done before calling the interface

-2

invalid parameter

Please check whether the parameters are correct

-3

failed to connect

Please check the network connection status, or whether the robot IP is correct

-4

inverse kinematics error

Inverse kinematics failed, please check the current coordinate system, or whether the reference joint angles are reasonable

-5

emergency stop

Emergency stop state, status retained

-6

not powered on

Not powered on

-7

not enabled

Not enabled

-8

not in servo mode

Not in servo mode. When executing servoJP, you must first enter servo mode. Please check whether the corresponding interface is called

-9

must disable enable before powering off

Must disable enable before powering off

-10

cannot operate, program is running

Cannot operate, a program is currently running. Please close the program first

-11

cannot open file, or file does not exist

Cannot open file, or file does not exist

-12

motion abnormal

Abnormal movement, possibly near a singularity point or exceeding robot movement limits

-14

ftp error

ftp abnormal

-15

socket msg or value oversize

Exceeding limit abnormal

-16

kine_forward error

Forward kinematics failed

-17

not support empty folder

Empty folders are not supported

-20

protective stop

Safeguard (Protective) Stop

-21

emergency stop

Emergency stop

-22

on soft limit

In soft limit position, manual drag of the robot is not possible; use the teaching function in the APP to approach the soft limit

-30

fail to encode cmd string

Command encoding failed, usually due to an error while parsing the message returned by the controller

-31

fail to decode cmd string

Command decoding failed, usually due to an error while parsing the message returned by the controller

-32

fail to uncompress port 10004 string

Failed to decompress data from port 10004, possibly due to network fluctuations or excessive data size

-40

move linear error

Linear movement failed, please check if there are any singular regions in the path

-41

move joint error

Joint movement failed, please check the set joint angles

-42

move circular error

Arc motion failed, please check the set parameters

-50

block_wait timeout

Blocking wait timeout

-51

power on timeout

Power-on timeout

-52

power off timeout

Power-off timeout

-53

enable timeoff

Enable timeout

-54

disable timeout

Disable timeout

-55

set userframe timeout

Setting user coordinate system timeout

-56

set tool timeout

Setting tool coordinate system timeout

-57

edg init failed

EDG function initialization failed

-58

edg is running, cannot use servo_j or servo_p

EDG function is running, cannot use servo_j or servo_p interface

-59

Current EDG mode does not support using edg_servo_j or edg_servo_p.

EDG function is running, cannot use edg_servo_j or edg_servo_p interface

-60

set io timeout

Setting IO timeout

-61

operation timeout

Interface timeout

-62

servo queue is full

Servo queue is full

-63

servo is not running

Servo mode is not started

-9997

not implement

Interface not implemented

-9998

deprecated interface

Interface will be removed in the future (function still available)

-9999

obsolete interface

Interface will be removed in the future (function unavailable)

Issue feedback

If there are any inaccurate descriptions or mistakes in the document, we kindly ask readers for their understanding and corrections. If you find any problems or wish to provide suggestions while reading, you can send an email to support@jaka.com , and we will reply to you as soon as possible.