Skip to content

Appendix: API2 Error Codes

API2 Return Value Definition

  • C/C++: The interface returns an error code. A return value of 0 indicates success. Other return values can be looked up in the table below.
  • Python: The interface returns a tuple in the form of (RetVal, data). RetVal is the error code. A return value of 0 indicates success. Other return values can be looked up in the table below. Data represents the retrieved information.

API2 Error Codes

ParameterTypeDescriptionHandling Suggestions
0intSuccess.-
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.- Validate JSON Command:
① Enable DEBUG logs for the API to capture the raw JSON data.
② Check JSON syntax: Ensure correct formatting of parentheses, quotes, commas, etc. (You can use a JSON validation tool).
③ Verify against the API documentation that parameter names, data types, and value ranges comply with the specifications.
④ After fixing the issues, resend the command and check if the controller returns a normal status code and business data.
- Check Robot Arm Status:
① Check for real-time error messages in the robot arm controller or logs (such as hardware failures, over-limit conditions), and reset, calibrate, or troubleshoot hardware issues according to the prompts.
② After fixing the issues, resend the command and check if the controller returns a normal status code and business data.
-1intThe data transmission fails, indicating that a problem occurs during the communication.Check Network Connectivity:
Use tools like ping/telnet to check if the communication link with the controller is normal.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.- Check Network Connectivity:
Use tools like ping/telnet to check if the communication link with the controller is normal.
- Verify Version Compatibility:
① Check if the controller firmware version supports the current API functions. For specific version compatibility, refer to the Version Description.
② If the version is too low, upgrade the controller or use an API version that is compatible.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.Verify Version Compatibility:
① Check if the controller firmware version supports the current API functions. For specific version compatibility, refer to the Version Description.
② If the version is too low, upgrade the controller or use an API version that is compatible.
-4intThe current in-position equipment verification fails, indicating the current in-position equipment is not the joints/elevators/grippers/dexterous hands.- Detect Concurrent Control by Multiple Devices: Check if other devices are sending motion commands to the robot arm, including the motion of the robot arm, gripper, dexterous hand, and elevator.
- Monitor Command Events in Real-Time: Register the callback function rm_get_arm_event_call_back:
① Capture device arrival events (such as motion completion, timeout, etc.).
② Determine the specific device type that triggered the event through the device parameter in the callback.
-5intThe single-thread mode does not receive a return value after the timeout, indicating that the timeout period may be improper.- Check Timeout Setting: In single-thread blocking mode, it supports configuring the timeout for waiting for the device to complete its motion. Ensure that the timeout is set longer than the device's motion time.
- Check Network Connectivity:
Use tools like ping/telnet to check if the communication link with the controller is normal.

WARNING

  • The error code -4 in the Modbus Configuration and Trajectory File interfaces is different from the above error codes. It is defined as -4: This interface is not supported by the Gen 3 Controller..

  • The following interfaces do not use the above error codes. Please refer to the error code list in the corresponding interface documentation.

    • Inverse kinematics function rm_algo_inverse_kinematics(): C/C++, Python;
    • Select the Optimal Solution from Multiple Solutions (Currently supports only six degrees of freedom robots) rm_algo_ikine_select_ik_solve(): C/C++, Python;
    • Check if the Inverse Kinematics Solution Exceeds Joint Position Limits (Currently supports only six degrees of freedom robots) rm_algo_ikine_check_joint_position_limit()C/C++Python
    • Check if the Inverse Kinematics Solution Exceeds Joint Velocity Limits (Currently supports only six degrees of freedom robots) rm_algo_ikine_check_joint_velocity_limit()C/C++Python
    • Calculate Arm Angle from Reference Configuration (Only supports RM75) rm_algo_calculate_arm_angle_from_config_rm75()C/C++Python
    • Solve Inverse Kinematics for RM75 Using Arm Angle Method rm_algo_inverse_kinematics_rm75_for_arm_angle()C/C++Python
    • Numerical Method to Determine if the Robot is in a Singular Configuration rm_algo_universal_singularity_analyse()C/C++Python
    • Analytical Method to Determine if the Robot is in a Singular Configuration (Only supports six degrees of freedom) rm_algo_kin_robot_singularity_analyse()C/C++Python
    • Save the drag teaching trajectory rm_save_trajectory(): C/C++, Python;
    • Set the 6-DoF Drag Mode rm_set_force_drag_mode(): C/C++, Python;
    • Get the 6-DoF Drag Mode rm_get_drag_teach_sensitivity(): C/C++, Python;
    • Release gripperrm_set_gripper_release(): C/C++, Python;
    • Gripper force-controlled graspingrm_set_gripper_pick(): C/C++, Python;
    • Gripper continuous force-controlled graspingrm_set_gripper_pick_on(): C/C++, Python;
    • Set gripper to a specified positionrm_set_gripper_position(): C/C++, Python;
    • Run dexterous hand target gesture sequence number rm_set_hand_posture(): C/C++, Python;
    • Run dexterous hand action sequence number rm_set_hand_seq(): C/C++, Python;
    • Run Specified Program File rm_set_program_id_run(): C/C++, Python;
    • Initialize thread mode rm_init(): C/C++, Python;
    • Delete the specified robotic arm instance rm_delete_robot_arm(): C/C++, Python;
    • Get basic information of robotic arm rm_get_robot_info(): C/C++, Python;
    • Query Flowchart Program Run State rm_get_flowchart_program_run_state(); C/C++, Python;
    • Set Robotic Arm Emergency Stop State rm_set_arm_emergency_stop(); C/C++, Python;