top of page

Java 4.17. Cartesian Space Full Circle Motion (Added velAccParamMode parameter for velocity and acceleration modes)

New in version Java: SDK-v1.0.8-3.8.5

/**
*@brief  Cartesian Space Full Circle Motion (Added velAccParamMode parameter for velocity and acceleration modes)
*@param  [in] joint_pos_p  Path point 1 joint position, unit deg
*@param  [in] desc_pos_p   Path point 1 Cartesian pose
*@param  [in] ptool  Tool coordinate number, range [1~15]
*@param  [in] puser  Workpiece coordinate number, range [1~15]
*@param  [in] pvel  Velocity percentage, range [0~100]
*@param  [in] pacc  Acceleration percentage, range [0~100], not yet open
*@param  [in] epos_p  Extended axis position, unit mm
*@param  [in] joint_pos_t  Path point 2 joint position, unit deg
*@param  [in] desc_pos_t   Path point 2 Cartesian pose
*@param  [in] ttool  Tool coordinate number, range [1~15]
*@param  [in] tuser  Workpiece coordinate number, range [1~15]
*@param  [in] tvel  Velocity percentage, range [0~100]
*@param  [in] tacc  Acceleration percentage, range [0~100], not yet open
*@param  [in] epos_t  Extended axis position, unit mm
*@param  [in] ovl  Velocity scaling factor, range [0~100]
*@param  [in] offset_flag  0-No offset, 1-Offset in base/workpiece coordinate system, 2-Offset in tool coordinate system
*@param  [in] offset_pos  Pose offset
*@param  [in] oacc Acceleration percentage
*@param  [in] blendR -1: Blocking; 0~1000: Blending radius
*@param  [in] velAccParamMode Velocity and acceleration parameter mode; 0-Percentage; 1-Physical velocity (mm/s) and acceleration (mm/s^2)
*@return  Error code
*/
public int Circle(JointPos joint_pos_p, DescPose desc_pos_p, int ptool, int puser, double pvel, double pacc, ExaxisPos epos_p, JointPos joint_pos_t, DescPose desc_pos_t, int ttool, int tuser, double tvel, double tacc, ExaxisPos epos_t, double ovl, int offset_flag, DescPose offset_pos, double oacc, double blendR, int velAccParamMode)

4.18. Cartesian Space Full Circle Motion (Overload Function 1, No Joint Position Input Required)

New in version Java: SDK-v1.0.8-3.8.5

/**
* @brief  Cartesian Space Full Circle Motion (Overload Function 1, No Joint Position Input Required)
* @param  [in] desc_pos_p   Path point 1 Cartesian pose
* @param  [in] ptool  Tool coordinate number, range [0~14]
* @param  [in] puser  Workpiece coordinate number, range [0~14]
* @param  [in] pvel  Velocity percentage, range [0~100]
* @param  [in] pacc  Acceleration percentage, range [0~100], not yet open
* @param  [in] epos_p  Extended axis position, unit mm
* @param  [in] desc_pos_t   Path point 2 Cartesian pose
* @param  [in] ttool  Tool coordinate number, range [0~14]
* @param  [in] tuser  Workpiece coordinate number, range [0~14]
* @param  [in] tvel  Velocity percentage, range [0~100]
* @param  [in] tacc  Acceleration percentage, range [0~100], not yet open
* @param  [in] epos_t  Extended axis position, unit mm
* @param  [in] ovl  Velocity scaling factor, range [0~100]
* @param  [in] offset_flag  0-No offset, 1-Offset in base/workpiece coordinate system, 2-Offset in tool coordinate system
* @param  [in] offset_pos  Pose offset
* @param  [in] oacc Acceleration percentage
* @param  [in] blendR -1: Blocking; 0~1000: Blending radius
* @param  [in] config Inverse kinematic joint space configuration, [-1]-Reference current joint position for calculation, [0~7]-Solve based on specific joint space configuration
* @param  [in] velAccParamMode Velocity and acceleration parameter mode; 0-Percentage; 1-Physical velocity (mm/s) and acceleration (mm/s^2)
* @return  Error code
*/
public int Circle(DescPose desc_pos_p, int ptool, int puser, double pvel, double pacc, ExaxisPos epos_p, DescPose desc_pos_t, int ttool, int tuser, double tvel, double tacc, ExaxisPos epos_t, double ovl, int offset_flag, DescPose offset_pos, double oacc, double blendR, int config, int velAccParamMode)

4.19. Cartesian space point-to-point movement

/**
* @brief Cartesian space point-to-point movement
* @param [in] desc_pos  Target cartesian pose or pose increment
* @param [in] tool  Tool coordinate number, range [0~14]
* @param [in] user  Workpiece coordinate number, range [0~14]
* @param [in] vel  Speed percentage, range [0~100]
* @param [in] acc  Acceleration percentage, range [0~100], not currently available
* @param [in] ovl  Speed scaling factor, range [0~100]
* @param [in] blendT [-1.0]-move to position (blocking), [0~500.0]-smoothing time (non-blocking) in ms
* @param [in] config  Joint space configuration, [-1]-calculate with reference to current joint position, [0~7]-calculate with reference to specific joint space configuration, default -1
* @return Error code
*/
int MoveCart(DescPose desc_pos, int tool, int user, double vel, double acc, double ovl, double blendT, int config);

4.20. Basic robot movement command code example

public static int TestMove(Robot robot)
{
    int rtn=-1;
    JointPos j1=new JointPos(-11.904, -99.669, 117.473, -108.616, -91.726, 74.256);
    JointPos j2=new JointPos(-45.615, -106.172, 124.296, -107.151, -91.282, 74.255);
    JointPos j3=new JointPos(-29.777, -84.536, 109.275, -114.075, -86.655, 74.257);
    JointPos j4=new JointPos(-31.154, -95.317, 94.276, -88.079, -89.740, 74.256);
    DescPose desc_pos1=new DescPose(-419.524, -13.000, 351.569, -178.118, 0.314, 3.833);
    DescPose desc_pos2=new DescPose(-321.222, 185.189, 335.520, -179.030, -1.284, -29.869);
    DescPose desc_pos3=new DescPose(-487.434, 154.362, 308.576, 176.600, 0.268, -14.061);
    DescPose desc_pos4=new DescPose(-443.165, 147.881, 480.951, 179.511, -0.775, -15.409);
    DescPose offset_pos=new DescPose(0, 0, 0, 0, 0, 0);
    ExaxisPos epos=new ExaxisPos(0, 0, 0, 0);
    int tool = 0;
    int user = 0;
    double vel = 100.0;
    double acc = 100.0;
    double ovl = 100.0;
    double oacc = 100.0;
    double blendT = 0.0;
    double blendR = 0.0;
    int flag = 0;
    int search = 0;
    int blendMode = 0;
    int velAccMode = 0;
    robot.SetSpeed(20);
    rtn = robot.MoveJ(j1, desc_pos1, tool, user, vel, acc, ovl, epos, blendT, flag, offset_pos);
    System.out.printf("movej errcode:%d\n", rtn);
    rtn = robot.MoveL(j2, desc_pos2, tool, user, vel, acc, ovl, blendR, blendMode, epos, search, flag, offset_pos, oacc, velAccMode,0,10);
    System.out.printf("movel errcode:%d\n", rtn);
    rtn = robot.MoveC(j3, desc_pos3, tool, user, vel, acc, epos, flag, offset_pos, j4, desc_pos4, tool, user, vel, acc, epos, flag, offset_pos, ovl, blendR, oacc, velAccMode);
    System.out.printf("movec errcode:%d\n", rtn);
    rtn = robot.MoveJ(j2, desc_pos2, tool, user, vel, acc, ovl, epos, blendT, flag, offset_pos);
    System.out.printf("movej errcode:%d\n", rtn);
    rtn = robot.Circle(j3, desc_pos3, tool, user, vel, acc, epos, j1, desc_pos1, tool, user, vel, acc, epos, ovl, flag, offset_pos, oacc, -1, velAccMode);
    System.out.printf("circle errcode:%d\n", rtn);
    rtn = robot.MoveCart(desc_pos4, tool, user, vel, acc, ovl, blendT, -1);
    System.out.printf("MoveCart errcode:%d\n", rtn);
    rtn = robot.MoveJ(j1, tool, user, vel, acc, ovl, epos, blendT, flag, offset_pos);
    System.out.printf("movej errcode:%d\n", rtn);
    rtn = robot.MoveL(desc_pos2, tool, user, vel, acc, ovl, blendR, blendMode, epos, search, flag, offset_pos, -1, velAccMode,0,10);
    System.out.printf("movel errcode:%d\n", rtn);
    rtn = robot.MoveC(desc_pos3, tool, user, vel, acc, epos, flag, offset_pos, desc_pos4, tool, user, vel, acc, epos, flag, offset_pos, ovl, blendR, -1, velAccMode);
    System.out.printf("movec errcode:%d\n", rtn);
    rtn = robot.MoveJ(j2, tool, user, vel, acc, ovl, epos, blendT, flag, offset_pos);
    System.out.printf("movej errcode:%d\n", rtn);
    rtn = robot.Circle(desc_pos3, tool, user, vel, acc, epos, desc_pos1, tool, user, vel, acc, epos, ovl, flag, offset_pos, oacc, blendR, -1, velAccMode);
    System.out.printf("circle errcode:%d\n", rtn);
    return 0;
}

4.21. Cartesian space spiral movement

/**
* @brief Cartesian space spiral movement
* @param [in] joint_pos  Target joint position in deg
* @param [in] desc_pos   Target cartesian pose
* @param [in] tool  Tool coordinate number, range [0~14]
* @param [in] user  Workpiece coordinate number, range [0~14]
* @param [in] vel  Speed percentage, range [0~100]
* @param [in] acc  Acceleration percentage, range [0~100], not currently available
* @param [in] epos  Extended axis position in mm
* @param [in] ovl  Speed scaling factor, range [0~100]
* @param [in] offset_flag  0-no offset, 1-offset in base/workpiece coordinate, 2-offset in tool coordinate
* @param [in] offset_pos  Pose offset
* @return Error code
*/
int NewSpiral(JointPos joint_pos, DescPose desc_pos, int tool, int user, double vel, double acc, ExaxisPos epos, double ovl, int offset_flag, DescPose offset_pos, SpiralParam spiral_param);

4.22. Cartesian space spiral motion (automatic inverse kinematics calculation)

New in version Java: SDK-v1.0.8-3.8.5

/**
* @brief Cartesian space spiral motion (automatic inverse kinematics calculation)
* @param [in] desc_pos  Target cartesian pose
* @param [in] tool  Tool coordinate number, range [0~14]
* @param [in] user  Workpiece coordinate number, range [0~14]
* @param [in] vel  Velocity percentage, range [0~100]
* @param [in] acc  Acceleration percentage, range [0~100], not open yet
* @param [in] epos  Extended axis position, unit mm
* @param [in] ovl  Velocity scaling factor, range [0~100]
* @param [in] offset_flag  0-no offset, 1-offset in base/workpiece coordinate system, 2-offset in tool coordinate system
* @param [in] offset_pos  Pose offset
* @param [in] spiral_param  Spiral parameters
* @param [in] config Inverse kinematics joint space configuration, [-1]-calculate based on current joint position, [0~7]-solve according to specific joint space configuration
* @return Error code
*/
int NewSpiral(DescPose desc_pos, int tool, int user, double vel, double acc, ExaxisPos epos, double ovl, int offset_flag, DescPose offset_pos, SpiralParam spiral_param,int config)

4.23. Spiral movement code example

public static int TestSpiral(Robot robot)
{
    int rtn=-1;
    JointPos j=new JointPos(-11.904, -99.669, 117.473, -108.616, -91.726, 74.256);
    DescPose desc_pos=new DescPose(-419.524, -13.000, 351.569, -178.118, 0.314, 3.833);
    DescPose offset_pos1=new DescPose(50, 0, 0, -30, 0, 0);
    DescPose offset_pos2=new DescPose(50, 0, 0, -5, 0, 0);
    ExaxisPos epos=new ExaxisPos(0, 0, 0, 0);
    SpiralParam sp=new SpiralParam(1,5.0,50.0,10.0,10.0,0);

    int tool = 0;
    int user = 0;
    double vel = 100.0;
    double acc = 100.0;
    double ovl = 100.0;
    double blendT = 0.0;
    int flag = 2;

    rtn = robot.MoveJ(j, tool, user, vel, acc, ovl, epos, blendT, flag, offset_pos1);
    System.out.println("movej errcode:"+ rtn);

    rtn = robot.NewSpiral(desc_pos, tool, user, vel, acc, epos, ovl, flag, offset_pos2, sp,-1);
    System.out.println("newspiral errcode:"+ rtn);

    return 0;
}

4.24. Servo movement start

/**
* @brief Servo movement start, used with ServoJ, ServoCart commands
* @return Error code
*/
int ServoMoveStart();

4.25. Servo movement end

/**
* @brief Servo movement end, used with ServoJ, ServoCart commands
* @return Error code
*/
int ServoMoveEnd();

4.26. Joint space servo mode movement

Changed in version Java: SDK-v1.0.6-3.8.3

/**
* @brief  Joint space servo mode movement
* @param  [in] joint_pos  Target joint position in deg
* @param  [in] axisPos  External axis position in mm
* @param  [in] acc  Acceleration percentage, range [0~100], not currently available, default 0
* @param  [in] vel  Speed percentage, range [0~100], not currently available, default 0
* @param  [in] cmdT  Command cycle in s, recommended range [0.001~0.0016]
* @param  [in] filterT Filter time in s, not currently available, default 0
* @param  [in] gain  Target position proportional amplifier, not currently available, default 0
* @param  [in] id  servoJ command ID, default 0
* @return  Error code
*/
int ServoJ(JointPos joint_pos, ExaxisPos axisPos, double acc, double vel, double cmdT, double filterT, double gain, int id);

robotic arm
FAIRINO ROBOTIC ARMS

Contact

Location: 10637 Scripps Summit Court,

San Diego, CA. 92131
Phone: (619) 333-FAIR
Email: hello@fairino.us

© 2023 Fairino US official site Proudly created By G2T

bottom of page