top of page

Java 4. Robot movement

4.1. Jog movement

/**
* @brief Jog movement
* @param [in] refType 0-joint jog, 2-base coordinate jog, 4-tool coordinate jog, 8-workpiece coordinate jog
* @param [in] nb 1-joint 1 (or x-axis), 2-joint 2 (or y-axis), 3-joint 3 (or z-axis), 4-joint 4 (or rotation about x-axis), 5-joint 5 (or rotation about y-axis), 6-joint 6 (or rotation about z-axis)
* @param [in] dir 0-negative direction, 1-positive direction
* @param [in] vel Speed percentage, [0~100]
* @param [in] acc Acceleration percentage, [0~100]
* @param [in] max_dis Maximum angle per jog movement in [°] or distance in [mm]
* @return Error code
*/
int StartJOG(int refType, int nb, int dir, double vel, double acc, double max_dis);

4.2. Jog deceleration stop

/**
* @brief Jog deceleration stop
* @param  [in]  stopType  1-joint jog stop, 3-base coordinate jog stop, 5-tool coordinate jog stop, 9-workpiece coordinate jog stop
* @return  Error code
*/
int StopJOG(int stopType);

4.3. Jog immediate stop

/**
* @brief Jog immediate stop
* @return  Error code
*/
int ImmStopJOG();

4.4. Robot jog control code example

public static  int TestJOG(Robot robot)
{
    for (int i = 0; i < 6; i++)
    {
        robot.StartJOG(0, i + 1, 0, 20.0, 20.0, 30.0);
        robot.Sleep(1000);
        robot.ImmStopJOG();
        robot.Sleep(1000);
    }

    for (int i = 0; i < 6; i++)
    {
        robot.StartJOG(2, i + 1, 0, 20.0, 20.0, 30.0);
        robot.Sleep(1000);
        robot.ImmStopJOG();
        robot.Sleep(1000);
    }

    for (int i = 0; i < 6; i++)
    {
        robot.StartJOG(4, i + 1, 0, 20.0, 20.0, 30.0);
        robot.Sleep(1000);
        robot.StopJOG(5);
        robot.Sleep(1000);
    }

    for (int i = 0; i < 6; i++)
    {
        robot.StartJOG(8, i + 1, 0, 20.0, 20.0, 30.0);
        robot.Sleep(1000);
        robot.StopJOG(9);
        robot.Sleep(1000);
    }
    return 0;
}

4.5. Joint space movement

/**
* @brief  Joint space 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] ovl  Speed scaling factor, range [0~100]
* @param  [in] epos  Extended axis position in mm
* @param  [in] blendT [-1.0]-move to position (blocking), [0~500.0]-smoothing time (non-blocking) in ms
* @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 MoveJ(JointPos joint_pos, DescPose desc_pos, int tool, int user, double vel, double acc, double ovl, ExaxisPos epos, double blendT, int offset_flag, DescPose offset_pos);

4.6. Joint space motion (automatic forward kinematics calculation)

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

/**
* @brief Joint space motion (automatic forward kinematics calculation)
* @param [in] joint_pos  Target joint position, unit deg
* @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] ovl  Velocity scaling factor, range [0~100]
* @param [in] epos  Extended axis position, unit mm
* @param [in] blendT [-1.0]-move to position (blocking), [0~500.0]-smoothing time (non-blocking), unit ms
* @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
* @return Error code
*/
int MoveJ(JointPos joint_pos, int tool, int user, double vel, double acc, double ovl, ExaxisPos epos, double blendT, int offset_flag, DescPose offset_pos)

4.7. Cartesian space linear movement

Changed in version Java: SDK-v1.0.5-3.8.2

/**
* @brief  Cartesian Space Linear Motion (Overloaded Function 1 with blendMode)
* @param  joint_pos  Target joint positions, unit: deg
* @param  desc_pos   Target Cartesian pose
* @param  tool  Tool coordinate system index, range [1~15]
* @param  user  Workpiece/User coordinate system index, range [1~15]
* @param  vel  Velocity percentage, range [0~100]
* @param  acc  Acceleration percentage, range [0~100], currently unavailable
* @param  ovl  Velocity scaling factor [0~100] / Physical velocity (mm/s)
* @param  blendR  [-1.0]-Block until motion completes (blocking), [0~1000.0]-Blend radius (non-blocking), unit: mm
* @param  blendMode  Transition method; 0-Tangent blend; 1-Corner blend
* @param  epos  Extended axis position, unit: mm
* @param  search  0-No wire search, 1-Wire search
* @param  offset_flag  0-No offset, 1-Offset in base/workpiece coordinate system, 2-Offset in tool coordinate system
* @param  offset_pos  Pose offset value
* @param  oacc  Acceleration scaling factor [0-100] / Physical acceleration (mm/s²)
* @param  velAccParamMode  Velocity/acceleration parameter mode; 0-Percentage; 1-Physical velocity (mm/s) and acceleration (mm/s²)
* @param  overSpeedStrategy  Overspeed handling strategy; 1-Standard; 2-Stop with error on overspeed; 3-Adaptive speed reduction, default 0
* @param  speedPercent  Allowable speed reduction threshold percentage [0-100], default 10%
* @return  Error code
*/
public int MoveL(JointPos joint_pos, DescPose desc_pos, int tool, int user, double vel, double acc, double ovl, double blendR, int blendMode, ExaxisPos epos, int search, int offset_flag, DescPose offset_pos, double oacc,int velAccParamMode, int overSpeedStrategy, int speedPercent)

4.8. Cartesian space linear motion (automatic inverse kinematics calculation)

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

/**
* @brief Cartesian space linear motion (automatic inverse kinematics calculation)
* @param [in] desc_pos  Target cartesian pose
* @param [in] tool  Tool coordinate number, range [1~15]
* @param [in] user  Workpiece coordinate number, range [1~15]
* @param [in] vel  Velocity percentage, range [0~100]
* @param [in] acc  Acceleration percentage, range [0~100], not open yet
* @param [in] ovl  Velocity scaling factor, range [0~100]
* @param [in] blendR [-1.0]-move to position (blocking), [0~1000.0]-smoothing radius (non-blocking), unit mm
* @param [in] blendMode Transition mode; 0-tangent transition; 1-corner transition
* @param [in] epos  Extended axis position, unit mm
* @param [in] search  0-no wire search, 1-wire search
* @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] config Inverse kinematics joint space configuration, [-1]-calculate based on current joint position, [0~7]-solve according to specific joint space configuration
* @param [in] overSpeedStrategy  Overspeed handling strategy, 1-standard; 2-stop on error when overspeed; 3-adaptive speed reduction, default is 0
* @param [in] speedPercent  Allowed speed reduction threshold percentage [0-100], default 10%
* @return Error code
*/
int MoveL(DescPose desc_pos, int tool, int user, double vel, double acc, double ovl, double blendR, int blendMode, ExaxisPos epos, int search, int offset_flag, DescPose offset_pos, int config, int overSpeedStrategy, int speedPercent)

4.9. Cartesian Space Linear Motion (Added velAccParamMode parameter for velocity and acceleration modes)

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

/**
* @brief  Cartesian Space Linear Motion (Added velAccParamMode parameter for velocity and acceleration modes)
* @param  [in] joint_pos  Target joint position, unit deg
* @param  [in] desc_pos   Target Cartesian pose
* @param  [in] tool  Tool coordinate number, range [1~15]
* @param  [in] user  Workpiece coordinate number, range [1~15]
* @param  [in] vel  Velocity percentage, range [0~100]
* @param  [in] acc  Acceleration percentage, range [0~100], not yet open
* @param  [in] ovl  Velocity scaling factor, range [0~100]
* @param  [in] blendR [-1.0]-Motion complete (blocking), [0~1000.0]-Blending radius (non-blocking), unit mm
* @param  [in] epos  Extended axis position, unit mm
* @param  [in] search  0-No wire search, 1-Wire search
* @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] velAccParamMode Velocity and acceleration parameter mode; 0-Percentage; 1-Physical velocity (mm/s) and acceleration (mm/s^2)
* @param  [in] overSpeedStrategy  Overspeed handling strategy, 1-Standard; 2-Stop with error on overspeed; 3-Adaptive deceleration, default is 0
* @param  [in] speedPercent  Allowed deceleration threshold percentage [0-100], default 10%
* @return  Error code
*/
public int MoveL(JointPos joint_pos, DescPose desc_pos, int tool, int user, double vel, double acc, double ovl, double blendR, ExaxisPos epos, int search, int offset_flag, DescPose offset_pos, int velAccParamMode, int overSpeedStrategy, int speedPercent)

4.10. Cartesian Space Linear Motion (Overload Function 1, Added blendMode)

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

/**
* @brief  Cartesian Space Linear Motion (Overload Function 1, Added blendMode)
* @param  [in] joint_pos  Target joint position, unit deg
* @param  [in] desc_pos   Target Cartesian pose
* @param  [in] tool  Tool coordinate number, range [1~15]
* @param  [in] user  Workpiece coordinate number, range [1~15]
* @param  [in] vel  Velocity percentage, range [0~100]
* @param  [in] acc  Acceleration percentage, range [0~100], not yet open
* @param  [in] ovl  Velocity scaling factor, range [0~100]
* @param  [in] blendR [-1.0]-Motion complete (blocking), [0~1000.0]-Blending radius (non-blocking), unit mm
* @param  [in] blendMode Transition mode; 0-Tangent transition; 1-Corner transition
* @param  [in] epos  Extended axis position, unit mm
* @param  [in] search  0-No wire search, 1-Wire search
* @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] velAccParamMode Velocity and acceleration parameter mode; 0-Percentage; 1-Physical velocity (mm/s) and acceleration (mm/s^2)
* @param  [in] overSpeedStrategy  Overspeed handling strategy, 1-Standard; 2-Stop with error on overspeed; 3-Adaptive deceleration, default is 0
* @param  [in] speedPercent  Allowed deceleration threshold percentage [0-100], default 10%
* @return  Error code
*/
public int MoveL(JointPos joint_pos, DescPose desc_pos, int tool, int user, double vel, double acc, double ovl, double blendR, int blendMode, ExaxisPos epos, int search, int offset_flag, DescPose offset_pos, int velAccParamMode, int overSpeedStrategy, int speedPercent)

4.11. Cartesian Space Linear Motion (Overload Function 2, No Joint Position Input Required)

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

/**
* @brief  Cartesian Space Linear Motion (Overload Function 2, No Joint Position Input Required)
* @param  [in] desc_pos   Target Cartesian pose
* @param  [in] tool  Tool coordinate number, range [1~15]
* @param  [in] user  Workpiece coordinate number, range [1~15]
* @param  [in] vel  Velocity percentage, range [0~100]
* @param  [in] acc  Acceleration percentage, range [0~100], not yet open
* @param  [in] ovl  Velocity scaling factor, range [0~100]
* @param  [in] blendR [-1.0]-Motion complete (blocking), [0~1000.0]-Blending radius (non-blocking), unit mm
* @param  [in] blendMode Transition mode; 0-Tangent transition; 1-Corner transition
* @param  [in] epos  Extended axis position, unit mm
* @param  [in] search  0-No wire search, 1-Wire search
* @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] 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)
* @param  [in] overSpeedStrategy  Overspeed handling strategy, 1-Standard; 2-Stop with error on overspeed; 3-Adaptive deceleration, default is 0
* @param  [in] speedPercent  Allowed deceleration threshold percentage [0-100], default 10%
* @return  Error code
*/
public int MoveL(DescPose desc_pos, int tool, int user, double vel, double acc, double ovl, double blendR, int blendMode, ExaxisPos epos, int search, int offset_flag, DescPose offset_pos, int config, int velAccParamMode, int overSpeedStrategy, int speedPercent)

4.12. Cartesian space circular movement

/**
* @brief  Cartesian Space Circular Arc Motion
* @param  joint_pos_p  Path point joint positions, unit: deg
* @param  desc_pos_p   Path point Cartesian pose
* @param  ptool  Tool coordinate system index, range [1~15]
* @param  puser  Workpiece/User coordinate system index, range [1~15]
* @param  pvel  Velocity percentage, range [0~100]
* @param  pacc  Acceleration percentage, range [0~100], currently unavailable
* @param  epos_p  Extended axis position, unit: mm
* @param  poffset_flag  0-No offset, 1-Offset in base/workpiece coordinate system, 2-Offset in tool coordinate system
* @param  offset_pos_p  Pose offset value
* @param  joint_pos_t  Target point joint positions, unit: deg
* @param  desc_pos_t   Target point Cartesian pose
* @param  ttool  Tool coordinate system index, range [1~15]
* @param  tuser  Workpiece/User coordinate system index, range [1~15]
* @param  tvel  Velocity percentage, range [0~100]
* @param  tacc  Acceleration percentage, range [0~100], currently unavailable
* @param  epos_t  Extended axis position, unit: mm
* @param  toffset_flag  0-No offset, 1-Offset in base/workpiece coordinate system, 2-Offset in tool coordinate system
* @param  offset_pos_t  Pose offset value
* @param  ovl  Velocity scaling factor [0~100] / Physical velocity (mm/s)
* @param  blendR [-1.0]-Block until motion completes (blocking), [0~1000.0]-Blend radius (non-blocking), unit: mm
* @param  oacc Acceleration scaling factor [0-100] / Physical acceleration (mm/s²)
* @param  velAccParamMode Velocity/acceleration parameter mode; 0-Percentage; 1-Physical velocity (mm/s) and acceleration (mm/s²)
* @return  Error code
*/
public int MoveC(JointPos joint_pos_p, DescPose desc_pos_p, int ptool, int puser, double pvel, double pacc, ExaxisPos epos_p, int poffset_flag, DescPose offset_pos_p, JointPos joint_pos_t, DescPose desc_pos_t, int ttool, int tuser, double tvel, double tacc, ExaxisPos epos_t, int toffset_flag, DescPose offset_pos_t, double ovl, double blendR, double oacc, int velAccParamMode)

4.13. Cartesian Space Arc Motion (Added velAccParamMode parameter for velocity and acceleration modes)

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

/**
* @brief  Cartesian Space Arc Motion (Added velAccParamMode parameter for velocity and acceleration modes)
* @param  [in] joint_pos_p  Path point joint position, unit deg
* @param  [in] desc_pos_p   Path point 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] poffset_flag  0-No offset, 1-Offset in base/workpiece coordinate system, 2-Offset in tool coordinate system
* @param  [in] offset_pos_p  Pose offset
* @param  [in] joint_pos_t  Target point joint position, unit deg
* @param  [in] desc_pos_t   Target point 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] toffset_flag  0-No offset, 1-Offset in base/workpiece coordinate system, 2-Offset in tool coordinate system
* @param  [in] offset_pos_t  Pose offset
* @param  [in] ovl  Velocity scaling factor, range [0~100]
* @param  [in] blendR [-1.0]-Motion complete (blocking), [0~1000.0]-Blending radius (non-blocking), unit mm
* @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 MoveC(JointPos joint_pos_p, DescPose desc_pos_p, int ptool, int puser, double pvel, double pacc, ExaxisPos epos_p, int poffset_flag, DescPose offset_pos_p, JointPos joint_pos_t, DescPose desc_pos_t, int ttool, int tuser, double tvel, double tacc, ExaxisPos epos_t, int toffset_flag, DescPose offset_pos_t, double ovl, double blendR, int velAccParamMode)

4.14. Cartesian Space Arc Motion (Overload Function 1, No Joint Position Input Required)

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

/**
* @brief  Cartesian Space Arc Motion (Overload Function 1, No Joint Position Input Required)
* @param  [in] desc_pos_p   Path point 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] poffset_flag  0-No offset, 1-Offset in base/workpiece coordinate system, 2-Offset in tool coordinate system
* @param  [in] offset_pos_p  Pose offset
* @param  [in] desc_pos_t   Target point 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] toffset_flag  0-No offset, 1-Offset in base/workpiece coordinate system, 2-Offset in tool coordinate system
* @param  [in] offset_pos_t  Pose offset
* @param  [in] ovl  Velocity scaling factor, range [0~100]
* @param  [in] blendR [-1.0]-Motion complete (blocking), [0~1000.0]-Blending radius (non-blocking), unit mm
* @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 MoveC(DescPose desc_pos_p, int ptool, int puser, double pvel, double pacc, ExaxisPos epos_p, int poffset_flag, DescPose offset_pos_p, DescPose desc_pos_t, int ttool, int tuser, double tvel, double tacc, ExaxisPos epos_t, int toffset_flag, DescPose offset_pos_t, double ovl, double blendR, int config, int velAccParamMode)

4.15. Cartesian space full circle movement

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

/**
* @brief  Cartesian Space Full Circle Motion
* @param  joint_pos_p  Path point 1 joint positions, unit: deg
* @param  desc_pos_p   Path point 1 Cartesian pose
* @param  ptool  Tool coordinate system index, range [1~15]
* @param  puser  Workpiece/User coordinate system index, range [1~15]
* @param  pvel  Velocity percentage, range [0~100]
* @param  pacc  Acceleration percentage, range [0~100], currently unavailable
* @param  epos_p  Extended axis position, unit: mm
* @param  joint_pos_t  Path point 2 joint positions, unit: deg
* @param  desc_pos_t   Path point 2 Cartesian pose
* @param  ttool  Tool coordinate system index, range [1~15]
* @param  tuser  Workpiece/User coordinate system index, range [1~15]
* @param  tvel  Velocity percentage, range [0~100]
* @param  tacc  Acceleration percentage, range [0~100], currently unavailable
* @param  epos_t  Extended axis position, unit: mm
* @param  ovl  Velocity scaling factor [0~100] / Physical velocity (mm/s)
* @param  offset_flag  0-No offset, 1-Offset in base/workpiece coordinate system, 2-Offset in tool coordinate system
* @param  offset_pos  Pose offset value
* @param  oacc Acceleration scaling factor [0-100] / Physical acceleration (mm/s²)
* @param  blendR -1: Blocking; 0~1000: Blend radius
* @param  velAccParamMode Velocity/acceleration parameter mode; 0-Percentage; 1-Physical velocity (mm/s) and acceleration (mm/s²)
* @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.16. Cartesian space full circle motion (automatic inverse kinematics calculation)

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

/**
* @brief Cartesian space full circle motion (automatic inverse kinematics calculation)
* @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 open yet
* @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 open yet
* @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: smoothing radius
* @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 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)

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