top of page

Java 14.59. Calculate wire search offset

/**
* @brief Calculate wire search offset
* @param [in] seamType Weld seam type
* @param [in] method Calculation method
* @param [in] varNameRef Reference points 1-6, "#" indicates no point variable
* @param [in] varNameRes Contact points 1-6, "#" indicates no point variable
* @param [out] offset Offset pose [x, y, z, a, b, c] and offset method
* @return Error code
*/
int GetWireSearchOffset(int seamType, int method, String[] varNameRef, String[] varNameRes, DescOffset offset);

14.60. Wait for wire search completion

/**
* @brief Wait for wire search completion
* @return Error code
*/
int WireSearchWait(String name);

14.61. Write wire search contact point to database

/**
* @brief Write wire search contact point to database
* @param [in] varName Contact point name "RES0" ~ "RES99"
* @param [in] pos Contact point data [x, y, z, a, b, c]
* @return Error code
*/
int SetPointToDatabase(String varName, DescPose pos);

14.62. Robot wire search code example

public static int TestWireSearch(Robot robot)
{
    DescPose toolCoord = new DescPose(0, 0, 200, 0, 0, 0);
    robot.SetToolCoord(1, toolCoord, 0, 0, 1, 0);
    DescPose wobjCoord = new DescPose(0, 0, 0, 0, 0, 0);
    robot.SetWObjCoord(1, wobjCoord, 0);

    int rtn0, rtn1, rtn2 = 0;
    ExaxisPos exaxisPos = new ExaxisPos(0, 0, 0, 0);
    DescPose offdese = new DescPose(0, 0, 0, 0, 0, 0);

    DescPose descStart = new DescPose(216.543, 445.175, 93.465, 179.683, 1.757, -112.641);
    JointPos jointStart = new JointPos(-128.345, -86.660, 114.679, -119.625, -89.219, 74.303);

    DescPose descEnd = new DescPose(111.143, 523.384, 87.659, 179.703, 1.835, -97.750);
    JointPos jointEnd = new JointPos(-113.454, -81.060, 109.328, -119.954, -89.218, 74.302);

    robot.MoveL(jointStart, descStart, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 100);
    robot.MoveL(jointEnd, descEnd, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 100);

    DescPose descREF0A = new DescPose(142.135, 367.604, 86.523, 179.728, 1.922, -111.089);
    JointPos jointREF0A = new JointPos(-126.794, -100.834, 128.922, -119.864, -89.218, 74.302);

    DescPose descREF0B = new DescPose(254.633, 463.125, 72.604, 179.845, 2.341, -114.704);
    JointPos jointREF0B = new JointPos(-130.413, -81.093, 112.044, -123.163, -89.217, 74.303);

    DescPose descREF1A = new DescPose(92.556, 485.259, 47.476, -179.932, 3.130, -97.512);
    JointPos jointREF1A = new JointPos(-113.231, -83.815, 119.877, -129.092, -89.217, 74.303);

    DescPose descREF1B = new DescPose(203.103, 583.836, 63.909, 179.991, 2.854, -103.372);
    JointPos jointREF1B = new JointPos(-119.088, -69.676, 98.692, -121.761, -89.219, 74.303);

    rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
    robot.MoveL(jointREF0A, descREF0A, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);  // Start point
    robot.MoveL(jointREF0B, descREF0B, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 1, 0, offdese, 0, 10);  // Direction point
    rtn1 = robot.WireSearchWait("REF0");
    rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);

    rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
    robot.MoveL(jointREF1A, descREF1A, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);  // Start point
    robot.MoveL(jointREF1B, descREF1B, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 1, 0, offdese, 0, 10);  // Direction point
    rtn1 = robot.WireSearchWait("REF1");
    rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);

    rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
    robot.MoveL(jointREF0A, descREF0A, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);  // Start point
    robot.MoveL(jointREF0B, descREF0B, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 1, 0, offdese, 0, 10);  // Direction point
    rtn1 = robot.WireSearchWait("RES0");
    rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);

    rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
    robot.MoveL(jointREF1A, descREF1A, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);  // Start point
    robot.MoveL(jointREF1B, descREF1B, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 1, 0, offdese, 0, 10);  // Direction point
    rtn1 = robot.WireSearchWait("RES1");
    rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);

    String[] varNameRef = new String[]{"REF0", "REF1", "#", "#", "#", "#"};
    String[] varNameRes = new String[]{"RES0", "RES1", "#", "#", "#", "#"};
    int offectFlag = 0;

    DescPose pos = new DescPose(0, 0, 0, 0, 0, 0);
    DescOffset offectPos = new DescOffset();
    offectPos.offset = pos;
    offectPos.offsetFlag = 0;

    rtn0 = robot.GetWireSearchOffset(0, 0, varNameRef, varNameRes, offectPos);
    robot.PointsOffsetEnable(0, pos);
    robot.MoveL(jointStart, descStart, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);
    robot.MoveL(jointEnd, descEnd, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 1, 0, offdese, 0, 10);
    robot.PointsOffsetDisable();

    robot.CloseRPC();
    return 0;
}

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