top of page

Java 14.10. Welding parameter setting code example

public static int TestSetWeldParam(Robot robot)
{
    WeldingProcessParam para1 = new WeldingProcessParam(177, 27, 1000, 178, 28, 176, 26, 1000);
    WeldingProcessParam para2 = new WeldingProcessParam(188, 28, 555, 199, 29, 133, 23, 333);

    robot.WeldingSetProcessParam(1, para1);
    robot.WeldingSetProcessParam(2, para2);

    double startCurrent = 0;
    double startVoltage = 0;
    int startTime = 0;
    double weldCurrent = 0;
    double weldVoltage = 0;
    double endCurrent = 0;
    double endVoltage = 0;
    int endTime = 0;

    WeldingProcessParam param = new WeldingProcessParam(startCurrent, startVoltage, startTime, weldCurrent, weldVoltage, endCurrent, endVoltage, endTime);
    robot.WeldingGetProcessParam(1, param);
    robot.WeldingGetProcessParam(2, param);

    WeldCurrentAORelation rela1 = new WeldCurrentAORelation(0, 400, 0, 10, 0);
    int rtn = robot.WeldingSetCurrentRelation(rela1);

    WeldVoltageAORelation rela2 = new WeldVoltageAORelation(0, 40, 0, 10, 1);
    rtn = robot.WeldingSetVoltageRelation(rela2);

    double current_min = 0;
    double current_max = 0;
    double vol_min = 0;
    double vol_max = 0;
    double output_vmin = 0;
    double output_vmax = 0;
    int curIndex = 0;
    int volIndex = 0;
    WeldCurrentAORelation rela3 = new WeldCurrentAORelation(current_min, current_max, output_vmin, output_vmax, curIndex);
    rtn = robot.WeldingGetCurrentRelation(rela3);

    WeldVoltageAORelation rela4 = new WeldVoltageAORelation(0, 0, 0, 0, 0);
    rtn = robot.WeldingGetVoltageRelation(rela4);

    rtn = robot.WeldingSetCurrent(0, 100, 0, 0);

    robot.Sleep(3000);

    rtn = robot.WeldingSetVoltage(0, 10, 0, 0);

    rtn = robot.WeaveSetPara(0, 0, 2.000000, 0, 10.000000, 0.000000, 0.000000, 0, 0, 0, 0, 0, 60.000000, 0);

    robot.WeaveOnlineSetPara(0, 0, 1, 0, 20, 0, 0, 0, 0);

    rtn = robot.WeldingSetCheckArcInterruptionParam(1, 200);
    rtn = robot.WeldingSetReWeldAfterBreakOffParam(1, 5.7, 98.2, 0);
    int enable = 0;
    double length = 0;
    double velocity = 0;
    int moveType = 0;
    int checkEnable = 0;
    int arcInterruptTimeLength = 0;
    List<Integer> inter = new ArrayList<>();
    List<Number> num = new ArrayList<>();

    inter = robot.WeldingGetCheckArcInterruptionParam();
    num = robot.WeldingGetReWeldAfterBreakOffParam();

    robot.SetWeldMachineCtrlModeExtDoNum(17);
    for (int i = 0; i < 5; i++) {
        robot.SetWeldMachineCtrlMode(0);
        robot.Sleep(1000);
        robot.SetWeldMachineCtrlMode(1);
        robot.Sleep(1000);
    }
    return 0;
}

14.11. Real-time weaving parameter setting

/**
* @brief Real-time weaving parameter setting
* @param [in] weaveNum Weaving parameter configuration ID
* @param [in] weaveType Weaving type:
*   0-Horizontal triangular wave
*   1-Vertical L-shaped triangular wave
*   2-Clockwise circular
*   3-Counter-clockwise circular
*   4-Horizontal sine wave
*   5-Vertical L-shaped sine wave
*   6-Vertical triangular wave
*   7-Vertical sine wave
* @param [in] weaveFrequency Weaving frequency (Hz)
* @param [in] weaveIncStayTime Wait mode:
*   0-Cycle excludes wait time
*   1-Cycle includes wait time
* @param [in] weaveRange Weaving amplitude (mm)
* @param [in] weaveLeftStayTime Left dwell time (ms)
* @param [in] weaveRightStayTime Right dwell time (ms)
* @param [in] weaveCircleRadio Circular weaving callback ratio (0-100%)
* @param [in] weaveStationary Position wait:
*   0-Continue moving during wait
*   1-Stationary during wait
* @return Error code
*/
int WeaveOnlineSetPara(int weaveNum, int weaveType, double weaveFrequency, int weaveIncStayTime, double weaveRange, int weaveLeftStayTime, int weaveRightStayTime, int weaveCircleRadio, int weaveStationary);

14.12. Set welding arc interruption detection parameters

/**
* @brief Set welding arc interruption detection parameters
* @param [in] checkEnable Enable detection: 0-Disable; 1-Enable
* @param [in] arcInterruptTimeLength Arc interruption confirmation duration (ms)
* @return Error code
*/
int WeldingSetCheckArcInterruptionParam(int checkEnable, int arcInterruptTimeLength);

14.13. Get welding arc interruption detection parameters

/**
* @brief Get welding arc interruption detection parameters
* @return List[0]: Error code; List[1]: double Detection enable (0-Disable; 1-Enable); List[2]: Arc interruption confirmation duration (ms)
*/
List<Integer> WeldingGetCheckArcInterruptionParam();

14.14. Set welding interruption recovery parameters

/**
* @brief Set welding interruption recovery parameters
* @param [in] enable Enable welding recovery
* @param [in] length Weld overlap distance (mm)
* @param [in] velocity Robot return speed percentage (0-100)
* @param [in] moveType Robot movement type to restart point: 0-LIN; 1-PTP
* @return Error code
*/
int WeldingSetReWeldAfterBreakOffParam(int enable, double length, double velocity, int moveType);

14.15. Get welding interruption recovery parameters

/**
* @brief Get welding interruption recovery parameters
* @return List[0]: Error code; List[1]: int Enable welding recovery; List[2]: double Weld overlap distance (mm);
* @return List[3]: double Robot return speed percentage (0-100); List[4]: int Robot movement type: 0-LIN; 1-PTP
*/
List<Number> WeldingGetReWeldAfterBreakOffParam();

14.16. Set welder control mode extension DO port

/**
* @brief Set welder control mode extension DO port
* @param [in] DONum Welder control mode DO port (0-127)
* @return Error code
*/
int SetWeldMachineCtrlModeExtDoNum(int DONum);

14.17. Set welder control mode

/**
* @brief Set welder control mode
* @param [in] mode Welder control mode: 0-Unified
* @return Error code
*/
int SetWeldMachineCtrlMode(int mode);

14.18. Welding start

/**
* @brief Welding start
* @param [in] ioType IO type: 0-Controller IO; 1-Extension IO
* @param [in] arcNum Welder configuration file ID
* @param [in] timeout Arc start timeout
* @return Error code
*/
int ARCStart(int ioType, int arcNum, int timeout);

14.19. Welding end

/**
* @brief Welding end
* @param [in] ioType IO type: 0-Controller IO; 1-Extension IO
* @param [in] arcNum Welder configuration file ID
* @param [in] timeout Arc end timeout
* @return Error code
*/
int ARCEnd(int ioType, int arcNum, int timeout);

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