14. Robot Welding
14.1. Set welding process curve parameters
1/**
2* @brief Set welding process curve parameters
3* @param [in] id Welding process ID (1-99)
4* @param [in] param Welding process parameters
5* @return Error code
6*/
7int WeldingSetProcessParam(int id, WeldingProcessParam param);
14.2. Get welding process curve parameters
1/**
2* @brief Get welding process curve parameters
3* @param [in] id Welding process ID (1-99)
4* @param [out] param Welding process parameters
5* @return Error code
6*/
7int WeldingGetProcessParam(int id, WeldingProcessParam param);
14.3. Set welding current to analog output relation
1/**
2* @brief Set welding current to analog output relation
3* @param [in] relation Relation value
4* @return Error code
5*/
6int WeldingSetCurrentRelation(WeldCurrentAORelation relation);
14.4. Set welding voltage to analog output relation
1/**
2* @brief Set welding voltage to analog output relation
3* @param [in] relation Welding voltage-analog output relation value
4* @return Error code
5*/
6int WeldingSetVoltageRelation(WeldVoltageAORelation relation);
14.5. Get welding current to analog output relation
1/**
2* @brief Get welding current to analog output relation
3* @param [out] relation Relation value
4* @return Error code
5*/
6int WeldingGetCurrentRelation(WeldCurrentAORelation relation);
14.6. Get welding voltage to analog output relation
1/**
2* @brief Get welding voltage to analog output relation
3* @param [out] relation Welding voltage-analog output relation value
4* @return Error code
5*/
6int WeldingGetVoltageRelation(WeldVoltageAORelation relation);
14.7. Set welding current
1/**
2* @brief Set welding current
3* @param [in] ioType Control IO type: 0-Controller IO; 1-Extension IO
4* @param [in] current Welding current value (A)
5* @param [in] AOIndex Controller analog output port (0-1)
6* @param [in] blend Smoothing: 0-No smoothing; 1-Smoothing
7* @return Error code
8*/
9int WeldingSetCurrent(int ioType, double current, int AOIndex, int blend);
14.8. Set welding voltage
1/**
2* @brief Set welding voltage
3* @param [in] ioType Control IO type: 0-Controller IO; 1-Extension IO
4* @param [in] voltage Welding voltage value (V)
5* @param [in] AOIndex Controller analog output port (0-1)
6* @param [in] blend Smoothing: 0-No smoothing; 1-Smoothing
7* @return Error code
8*/
9int WeldingSetVoltage(int ioType, double voltage, int AOIndex, int blend);
14.9. Set weaving parameters
Changed in version Java: SDK-v1.0.5-3.8.2
1/**
2* @brief Set weaving parameters
3* @param [in] weaveNum Weaving parameter configuration ID
4* @param [in] weaveType Weaving type:
5* 0-Horizontal triangular wave
6* 1-Vertical L-shaped triangular wave
7* 2-Clockwise circular
8* 3-Counter-clockwise circular
9* 4-Horizontal sine wave
10* 5-Vertical L-shaped sine wave
11* 6-Vertical triangular wave
12* 7-Vertical sine wave
13* @param [in] weaveFrequency Weaving frequency (Hz)
14* @param [in] weaveIncStayTime Wait mode:
15* 0-Cycle excludes wait time
16* 1-Cycle includes wait time
17* @param [in] weaveRange Weaving amplitude (mm)
18* @param [in] weaveLeftRange Vertical triangular wave left chord length (mm)
19* @param [in] weaveRightRange Vertical triangular wave right chord length (mm)
20* @param [in] additionalStayTime Vertical triangular wave apex dwell time (ms)
21* @param [in] weaveLeftStayTime Left dwell time (ms)
22* @param [in] weaveRightStayTime Right dwell time (ms)
23* @param [in] weaveCircleRadio Circular weaving callback ratio (0-100%)
24* @param [in] weaveStationary Position wait:
25* 0-Continue moving during wait
26* 1-Stationary during wait
27* @param [in] weaveYawAngle Weaving direction azimuth angle (around Z-axis) in °
28* @param [in] weaveRotAngle Weaving direction azimuth angle (around X-axis) in °
29* @return Error code
30*/
31int WeaveSetPara(int weaveNum, int weaveType, double weaveFrequency, int weaveIncStayTime, double weaveRange, double weaveLeftRange, double weaveRightRange, int additionalStayTime, int weaveLeftStayTime, int weaveRightStayTime, int weaveCircleRadio, int weaveStationary, double weaveYawAngle, double weaveRotAngle);
14.10. Welding parameter setting code example
1public static int TestSetWeldParam(Robot robot)
2{
3 WeldingProcessParam para1 = new WeldingProcessParam(177, 27, 1000, 178, 28, 176, 26, 1000);
4 WeldingProcessParam para2 = new WeldingProcessParam(188, 28, 555, 199, 29, 133, 23, 333);
5
6 robot.WeldingSetProcessParam(1, para1);
7 robot.WeldingSetProcessParam(2, para2);
8
9 double startCurrent = 0;
10 double startVoltage = 0;
11 int startTime = 0;
12 double weldCurrent = 0;
13 double weldVoltage = 0;
14 double endCurrent = 0;
15 double endVoltage = 0;
16 int endTime = 0;
17
18 WeldingProcessParam param = new WeldingProcessParam(startCurrent, startVoltage, startTime, weldCurrent, weldVoltage, endCurrent, endVoltage, endTime);
19 robot.WeldingGetProcessParam(1, param);
20 robot.WeldingGetProcessParam(2, param);
21
22 WeldCurrentAORelation rela1 = new WeldCurrentAORelation(0, 400, 0, 10, 0);
23 int rtn = robot.WeldingSetCurrentRelation(rela1);
24
25 WeldVoltageAORelation rela2 = new WeldVoltageAORelation(0, 40, 0, 10, 1);
26 rtn = robot.WeldingSetVoltageRelation(rela2);
27
28 double current_min = 0;
29 double current_max = 0;
30 double vol_min = 0;
31 double vol_max = 0;
32 double output_vmin = 0;
33 double output_vmax = 0;
34 int curIndex = 0;
35 int volIndex = 0;
36 WeldCurrentAORelation rela3 = new WeldCurrentAORelation(current_min, current_max, output_vmin, output_vmax, curIndex);
37 rtn = robot.WeldingGetCurrentRelation(rela3);
38
39 WeldVoltageAORelation rela4 = new WeldVoltageAORelation(0, 0, 0, 0, 0);
40 rtn = robot.WeldingGetVoltageRelation(rela4);
41
42 rtn = robot.WeldingSetCurrent(0, 100, 0, 0);
43
44 robot.Sleep(3000);
45
46 rtn = robot.WeldingSetVoltage(0, 10, 0, 0);
47
48 rtn = robot.WeaveSetPara(0, 0, 2.000000, 0, 10.000000, 0.000000, 0.000000, 0, 0, 0, 0, 0, 60.000000, 0);
49
50 robot.WeaveOnlineSetPara(0, 0, 1, 0, 20, 0, 0, 0, 0);
51
52 rtn = robot.WeldingSetCheckArcInterruptionParam(1, 200);
53 rtn = robot.WeldingSetReWeldAfterBreakOffParam(1, 5.7, 98.2, 0);
54 int enable = 0;
55 double length = 0;
56 double velocity = 0;
57 int moveType = 0;
58 int checkEnable = 0;
59 int arcInterruptTimeLength = 0;
60 List<Integer> inter = new ArrayList<>();
61 List<Number> num = new ArrayList<>();
62
63 inter = robot.WeldingGetCheckArcInterruptionParam();
64 num = robot.WeldingGetReWeldAfterBreakOffParam();
65
66 robot.SetWeldMachineCtrlModeExtDoNum(17);
67 for (int i = 0; i < 5; i++) {
68 robot.SetWeldMachineCtrlMode(0);
69 robot.Sleep(1000);
70 robot.SetWeldMachineCtrlMode(1);
71 robot.Sleep(1000);
72 }
73 return 0;
74}
14.11. Real-time weaving parameter setting
1/**
2* @brief Real-time weaving parameter setting
3* @param [in] weaveNum Weaving parameter configuration ID
4* @param [in] weaveType Weaving type:
5* 0-Horizontal triangular wave
6* 1-Vertical L-shaped triangular wave
7* 2-Clockwise circular
8* 3-Counter-clockwise circular
9* 4-Horizontal sine wave
10* 5-Vertical L-shaped sine wave
11* 6-Vertical triangular wave
12* 7-Vertical sine wave
13* @param [in] weaveFrequency Weaving frequency (Hz)
14* @param [in] weaveIncStayTime Wait mode:
15* 0-Cycle excludes wait time
16* 1-Cycle includes wait time
17* @param [in] weaveRange Weaving amplitude (mm)
18* @param [in] weaveLeftStayTime Left dwell time (ms)
19* @param [in] weaveRightStayTime Right dwell time (ms)
20* @param [in] weaveCircleRadio Circular weaving callback ratio (0-100%)
21* @param [in] weaveStationary Position wait:
22* 0-Continue moving during wait
23* 1-Stationary during wait
24* @return Error code
25*/
26int 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
1/**
2* @brief Set welding arc interruption detection parameters
3* @param [in] checkEnable Enable detection: 0-Disable; 1-Enable
4* @param [in] arcInterruptTimeLength Arc interruption confirmation duration (ms)
5* @return Error code
6*/
7int WeldingSetCheckArcInterruptionParam(int checkEnable, int arcInterruptTimeLength);
14.13. Get welding arc interruption detection parameters
1/**
2* @brief Get welding arc interruption detection parameters
3* @return List[0]: Error code; List[1]: double Detection enable (0-Disable; 1-Enable); List[2]: Arc interruption confirmation duration (ms)
4*/
5List<Integer> WeldingGetCheckArcInterruptionParam();
14.14. Set welding interruption recovery parameters
1/**
2* @brief Set welding interruption recovery parameters
3* @param [in] enable Enable welding recovery
4* @param [in] length Weld overlap distance (mm)
5* @param [in] velocity Robot return speed percentage (0-100)
6* @param [in] moveType Robot movement type to restart point: 0-LIN; 1-PTP
7* @return Error code
8*/
9int WeldingSetReWeldAfterBreakOffParam(int enable, double length, double velocity, int moveType);
14.15. Get welding interruption recovery parameters
1/**
2* @brief Get welding interruption recovery parameters
3* @return List[0]: Error code; List[1]: int Enable welding recovery; List[2]: double Weld overlap distance (mm);
4* @return List[3]: double Robot return speed percentage (0-100); List[4]: int Robot movement type: 0-LIN; 1-PTP
5*/
6List<Number> WeldingGetReWeldAfterBreakOffParam();
14.16. Set welder control mode extension DO port
1/**
2* @brief Set welder control mode extension DO port
3* @param [in] DONum Welder control mode DO port (0-127)
4* @return Error code
5*/
6int SetWeldMachineCtrlModeExtDoNum(int DONum);
14.17. Set welder control mode
1/**
2* @brief Set welding machine control mode
3* @param mode Welding machine control mode; 0-DC one-knob mode; 1-Pulse one-knob mode; 2-JOB mode; 3-Local control mode; 4-Separate mode; 5-CC/CV mode; 6-TIG; 7-CMT
4* @param ioType Control type; 0-Control box IO; 1-Digital communication protocol (UDP); 2-Digital communication protocol (ModbusTCP)
5* @return Error code
6*/
7public int SetWeldMachineCtrlMode(int mode, int ioType)
14.18. Welding start
1/**
2* @brief Welding start
3* @param [in] ioType IO type: 0-Controller IO; 1-Extension IO
4* @param [in] arcNum Welder configuration file ID
5* @param [in] timeout Arc start timeout
6* @return Error code
7*/
8int ARCStart(int ioType, int arcNum, int timeout);
14.19. Welding end
1/**
2* @brief Welding end
3* @param [in] ioType IO type: 0-Controller IO; 1-Extension IO
4* @param [in] arcNum Welder configuration file ID
5* @param [in] timeout Arc end timeout
6* @return Error code
7*/
8int ARCEnd(int ioType, int arcNum, int timeout);
14.20. Weaving start
1/**
2* @brief Weaving start
3* @param [in] weaveNum Weaving parameter configuration ID
4* @return Error code
5*/
6int WeaveStart(int weaveNum);
14.21. Weaving end
1/**
2* @brief Weaving end
3* @param [in] weaveNum Weaving parameter configuration ID
4* @return Error code
5*/
6int WeaveEnd(int weaveNum);
14.22. Forward wire feeding
1/**
2* @brief Forward wire feeding
3* @param [in] ioType IO type: 0-Controller IO; 1-Extension IO
4* @param [in] wireFeed Wire feed control: 0-Stop; 1-Feed
5* @return Error code
6*/
7int SetForwardWireFeed(int ioType, int wireFeed);
14.23. Reverse wire feeding
1/**
2* @brief Reverse wire feeding
3* @param [in] ioType IO type: 0-Controller IO; 1-Extension IO
4* @param [in] wireFeed Wire feed control: 0-Stop; 1-Feed
5* @return Error code
6*/
7int SetReverseWireFeed(int ioType, int wireFeed);
14.24. Gas feeding
1/**
2* @brief Gas feeding
3* @param [in] ioType IO type: 0-Controller IO; 1-Extension IO
4* @param [in] airControl Gas control: 0-Stop; 1-Feed
5* @return Error code
6*/
7int SetAspirated(int ioType, int airControl);
14.25. Set robot to resume welding after interruption
1/**
2* @brief Set robot to resume welding after interruption
3* @return Error code
4*/
5int WeldingStartReWeldAfterBreakOff();
14.26. Set robot to abort welding after interruption
1/**
2* @brief Set robot to abort welding after interruption
3* @return Error code
4*/
5int WeldingAbortWeldAfterBreakOff();
14.27. Robot welding control code example
1public static int TestWelding(Robot robot)
2{
3 robot.WeldingSetCurrent(0, 230, 0, 0);
4 robot.WeldingSetVoltage(0, 24, 0, 1);
5
6 DescPose p1Desc = new DescPose(228.879, -503.594, 453.984, -175.580, 8.293, 171.267);
7 JointPos p1Joint = new JointPos(102.700, -85.333, 90.518, -102.365, -83.932, 22.134);
8
9 DescPose p2Desc = new DescPose(-333.302, -435.580, 449.866, -174.997, 2.017, 109.815);
10 JointPos p2Joint = new JointPos(41.862, -85.333, 90.526, -100.587, -90.014, 22.135);
11
12 ExaxisPos exaxisPos = new ExaxisPos(0, 0, 0, 0);
13 DescPose offdese = new DescPose(0, 0, 0, 0, 0, 0);
14
15 robot.MoveJ(p1Joint, p1Desc, 13, 0, 20, 100, 100, exaxisPos, -1, 0, offdese);
16 robot.ARCStart(1, 0, 10000);
17 robot.WeaveStart(0);
18 robot.MoveL(p2Joint, p2Desc, 13, 0, 20, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);
19 robot.ARCEnd(1, 0, 10000);
20 robot.WeaveEnd(0);
21 return 0;
22}
14.28. Segment welding start
1/**
2* @brief Segment welding start
3* @param [in] startDesePos Start point Cartesian position
4* @param [in] endDesePos End point Cartesian pose
5* @param [in] startJPos Start point joint pose
6* @param [in] endJPos End point joint pose
7* @param [in] weldLength Weld segment length (mm)
8* @param [in] noWeldLength Non-weld segment length (mm)
9* @param [in] weldIOType Welding IO type (0-Controller IO; 1-Extension IO)
10* @param [in] arcNum Welder configuration file ID
11* @param [in] weldTimeout Arc start/end timeout
12* @param [in] isWeave Enable weaving
13* @param [in] weaveNum Weaving parameter configuration ID
14* @param [in] tool Tool number
15* @param [in] user Workpiece number
16* @param [in] vel Speed percentage (0~100)
17* @param [in] acc Acceleration percentage (0~100) (Not currently available)
18* @param [in] ovl Speed scaling factor (0~100)
19* @param [in] blendR [-1.0]-Move to position (blocking); [0~1000.0]-Smoothing radius (non-blocking) in mm
20* @param [in] epos External axis position in mm
21* @param [in] search 0-No wire search; 1-Wire search
22* @param [in] offset_flag 0-No offset; 1-Offset in base/workpiece frame; 2-Offset in tool frame
23* @param [in] offset_pos Pose offset
24* @return Error code
25*/
26int SegmentWeldStart(DescPose startDesePos, DescPose endDesePos, JointPos startJPos, JointPos endJPos, double weldLength, double noWeldLength, int weldIOType, int arcNum, int weldTimeout, boolean isWeave, int weaveNum, int tool, int user, double vel, double acc, double ovl, double blendR, ExaxisPos epos, int search, int offset_flag, DescPose offset_pos);
14.29. Robot segment welding code example
1public static int TestSegWeld(Robot robot)
2{
3 robot.WeldingSetCurrent(0, 230, 0, 0);
4 robot.WeldingSetVoltage(0, 24, 0, 1);
5
6 DescPose p1Desc = new DescPose(228.879, -503.594, 453.984, -175.580, 8.293, 171.267);
7 JointPos p1Joint = new JointPos(102.700, -85.333, 90.518, -102.365, -83.932, 22.134);
8
9 DescPose p2Desc = new DescPose(-333.302, -435.580, 449.866, -174.997, 2.017, 109.815);
10 JointPos p2Joint = new JointPos(41.862, -85.333, 90.526, -100.587, -90.014, 22.135);
11
12 ExaxisPos exaxisPos = new ExaxisPos(0, 0, 0, 0);
13 DescPose offdese = new DescPose(0, 0, 0, 0, 0, 0);
14
15 robot.GetForwardKin(p1Joint, p1Desc);
16 robot.GetForwardKin(p2Joint, p2Desc);
17
18 int rtn = robot.SegmentWeldStart(p1Desc, p2Desc, p1Joint, p2Joint, 20, 20, 0, 0, 5000, true, 0, 1, 0, 30, 100, 100, -1, exaxisPos, 0, 0, offdese);
19 return 0;
20}
14.30. Simulation weaving start
1/**
2* @brief Simulation weaving start
3* @param [in] weaveNum Weaving parameter ID
4* @return Error code
5*/
6int WeaveStartSim(int weaveNum);
14.31. Simulation weaving end
1/**
2* @brief Simulation weaving end
3* @param [in] weaveNum Weaving parameter ID
4* @return Error code
5*/
6int WeaveEndSim(int weaveNum);
14.32. Start trajectory inspection warning (no movement)
1/**
2* @brief Start trajectory inspection warning (no movement)
3* @param [in] weaveNum Weaving parameter ID
4* @return Error code
5*/
6int WeaveInspectStart(int weaveNum);
14.33. End trajectory inspection warning (no movement)
1/**
2* @brief End trajectory inspection warning (no movement)
3* @param [in] weaveNum Weaving parameter ID
4* @return Error code
5*/
6int WeaveInspectEnd(int weaveNum);
14.34. Weaving transition start
Changed in version Java: SDK-v1.0.5-3.8.2
1/**
2* @brief Weaving transition start
3* @param [in] weaveChangeFlag 1-Change weaving parameters; 2-Change weaving parameters + welding speed
4* @param [in] weaveNum Weaving ID
5* @param [in] velStart Welding start speed (cm/min)
6* @param [in] velEnd Welding end speed (cm/min)
7* @return Error code
8*/
9int WeaveChangeStart(int weaveChangeFlag, int weaveNum, double velStart, double velEnd);
14.35. Robot weaving transition welding code example
1public static int TestWeave(Robot robot)
2{
3 DescPose p1Desc = new DescPose(228.879, -503.594, 453.984, -175.580, 8.293, 171.267);
4 JointPos p1Joint = new JointPos(102.700, -85.333, 90.518, -102.365, -83.932, 22.134);
5
6 DescPose p2Desc = new DescPose(-333.302, -435.580, 449.866, -174.997, 2.017, 109.815);
7 JointPos p2Joint = new JointPos(41.862, -85.333, 90.526, -100.587, -90.014, 22.135);
8
9 ExaxisPos exaxisPos = new ExaxisPos(0, 0, 0, 0);
10 DescPose offdese = new DescPose(0, 0, 0, 0, 0, 0);
11
12 robot.MoveJ(p1Joint, p1Desc, 13, 0, 20, 100, 100, exaxisPos, -1, 0, offdese);
13 robot.WeaveStartSim(0);
14 robot.MoveL(p2Joint, p2Desc, 13, 0, 20, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);
15 robot.WeaveEndSim(0);
16 robot.MoveJ(p1Joint, p1Desc, 13, 0, 20, 100, 100, exaxisPos, -1, 0, offdese);
17 robot.WeaveInspectStart(0);
18 robot.MoveL(p2Joint, p2Desc, 13, 0, 20, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);
19 robot.WeaveInspectEnd(0);
20
21 robot.WeldingSetVoltage(1, 19, 0, 0);
22 robot.WeldingSetCurrent(1, 190, 0, 0);
23 robot.MoveL(p1Joint, p1Desc, 1, 1, 100, 100, 50, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);
24 robot.ARCStart(1, 0, 10000);
25 robot.ArcWeldTraceControl(1, 0, 1, 0.06, 5, 5, 60, 1, 0.06, 5, 5, 80, 0, 0, 4, 1, 10, 0, 0);
26 robot.WeaveStart(0);
27 robot.WeaveChangeStart(1, 0, 50, 30);
28 robot.MoveL(p2Joint, p2Desc, 1, 1, 100, 100, 1, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);
29 robot.WeaveChangeEnd();
30 robot.WeaveEnd(0);
31 robot.ArcWeldTraceControl(0, 0, 1, 0.06, 5, 5, 60, 1, 0.06, 5, 5, 80, 0, 0, 4, 1, 10, 0, 0);
32 robot.ARCEnd(1, 0, 10000);
33 return 0;
34}
14.36. Weaving transition end
New in version Java: SDK-v1.0.2-3.7.9
1/**
2* @brief Weaving transition end
3* @return Error code
4*/
5int WeaveChangeEnd();
14.37. Extension IO - Configure welder gas detection signal
1/**
2* @brief Extension IO - Configure welder gas detection signal
3* @param [in] DONum Gas detection signal extension DO number
4* @return Error code
5*/
6int SetAirControlExtDoNum(int DONum);
14.38. Extension IO - Configure welder arc start signal
1/**
2* @brief Extension IO - Configure welder arc start signal
3* @param [in] DONum Welder arc start signal extension DO number
4* @return Error code
5*/
6int SetArcStartExtDoNum(int DONum);
14.39. Extension IO - Configure welder reverse wire feed signal
1/**
2* @brief Extension IO - Configure welder reverse wire feed signal
3* @param [in] DONum Reverse wire feed signal extension DO number
4* @return Error code
5*/
6int SetWireReverseFeedExtDoNum(int DONum);
14.40. Extension IO - Configure welder forward wire feed signal
1/**
2* @brief Extension IO - Configure welder forward wire feed signal
3* @param [in] DONum Forward wire feed signal extension DO number
4* @return Error code
5*/
6int SetWireForwardFeedExtDoNum(int DONum);
14.41. Extension IO - Configure welder arc success signal
1/**
2* @brief Extension IO - Configure welder arc success signal
3* @param [in] DINum Arc success signal extension DI number
4* @return Error code
5*/
6int SetArcDoneExtDiNum(int DINum);
14.42. Extension IO - Configure welder ready signal
1/**
2* @brief Extension IO - Configure welder ready signal
3* @param [in] DINum Welder ready signal extension DI number
4* @return Error code
5*/
6int SetWeldReadyExtDiNum(int DINum);
14.43. Extension IO - Configure welding interruption recovery signal
1/**
2* @brief Extension IO - Configure welding interruption recovery signal
3* @param [in] reWeldDINum Resume welding after interruption signal extension DI number
4* @param [in] abortWeldDINum Abort welding after interruption signal extension DI number
5* @return Error code
6*/
7int SetExtDIWeldBreakOffRecover(int reWeldDINum, int abortWeldDINum);
14.44. Set extension IO welding signal code example
1public static int TestExtDIConfig(Robot robot)
2{
3 robot.SetArcStartExtDoNum(10);
4 robot.SetAirControlExtDoNum(20);
5 robot.SetWireForwardFeedExtDoNum(30);
6 robot.SetWireReverseFeedExtDoNum(40);
7
8 robot.SetWeldReadyExtDiNum(50);
9 robot.SetArcDoneExtDiNum(60);
10 robot.SetExtDIWeldBreakOffRecover(70, 80);
11 robot.SetWireSearchExtDIONum(0, 1);
12
13 return 0;
14}
14.45. Arc tracking control
Changed in version Java: SDK-v1.0.2-3.7.9
1/**
2* @brief Arc tracking control
3* @param [in] flag Switch: 0-Off; 1-On
4* @param [in] delaytime Lag time in ms
5* @param [in] isLeftRight Left/right deviation compensation
6* @param [in] klr Left/right adjustment coefficient (sensitivity)
7* @param [in] tStartLr Left/right start compensation time in cycles
8* @param [in] stepMaxLr Left/right maximum compensation per step in mm
9* @param [in] sumMaxLr Left/right total maximum compensation in mm
10* @param [in] isUpLow Up/down deviation compensation
11* @param [in] kud Up/down adjustment coefficient (sensitivity)
12* @param [in] tStartUd Up/down start compensation time in cycles
13* @param [in] stepMaxUd Up/down maximum compensation per step in mm
14* @param [in] sumMaxUd Up/down total maximum compensation in mm
15* @param [in] axisSelect Up/down coordinate system selection: 0-Weaving; 1-Tool; 2-Base
16* @param [in] referenceType Up/down reference current setting method: 0-Feedback; 1-Constant
17* @param [in] referSampleStartUd Up/down reference current sampling start count (feedback) in cycles
18* @param [in] referSampleCountUd Up/down reference current sampling cycle count (feedback) in cycles
19* @param [in] referenceCurrent Up/down reference current in mA
20* @param [in] offsetType Offset tracking type: 0-No offset; 1-Sampling; 2-Percentage
21* @param [in] offsetParameter Offset parameters:
22* Sampling (offset sampling start time, default one cycle)
23* Percentage (offset percentage (-100 ~ 100))
24* @return Error code
25*/
26int ArcWeldTraceControl(int flag, double delaytime, int isLeftRight, double klr, double tStartLr, double stepMaxLr, double sumMaxLr, int isUpLow, double kud, double tStartUd, double stepMaxUd, double sumMaxUd, int axisSelect, int referenceType, double referSampleStartUd, double referSampleCountUd, double referenceCurrent, int offsetType, int offsetParameter);
14.46. Arc tracking AI channel selection
1/**
2* @brief Arc tracking AI channel selection
3* @param channel Arc tracking AI channel selection [0-3]
4* @return Error code
5*/
6public int ArcWeldTraceExtAIChannelConfig(int channel);
14.47. Arc tracking + multi-layer multi-pass compensation start
1/**
2* @brief Arc tracking + multi-layer multi-pass compensation start
3* @return Error code
4*/
5public int ArcWeldTraceReplayStart();
14.48. Arc tracking + multi-layer multi-pass compensation end
1/**
2* @brief Arc tracking + multi-layer multi-pass compensation end
3* @return Error code
4*/
5public int ArcWeldTraceReplayEnd();
14.49. Offset coordinate transformation - multi-layer multi-pass welding
1/**
2* @brief Offset coordinate transformation - multi-layer multi-pass welding
3* @param pointO Reference point Cartesian pose
4* @param pointX Reference point X-direction offset point Cartesian pose
5* @param pointZ Reference point Z-direction offset point Cartesian pose
6* @param dx X-direction offset (mm)
7* @param dz Z-direction offset (mm)
8* @param dry Rotation around Y-axis offset (°)
9* @param offset Calculated offset
10* @return Error code
11*/
12public int MultilayerOffsetTrsfToBase(DescTran pointO, DescTran pointX, DescTran pointZ, double dx, double dz, double dry, DescPose offset);
14.50. Multi-layer multi-pass welding arc tracking code example
1public static int TestArcWeldTrace(Robot robot)
2{
3 JointPos mulitilineorigin1_joint = new JointPos(-24.090, -63.501, 84.288, -111.940, -93.426, 57.669);
4 DescPose mulitilineorigin1_desc = new DescPose(-677.559, 190.951, -1.205, 1.144, -41.482, -82.577);
5
6 DescTran mulitilineX1_desc = new DescTran(0, 0, 0);
7 mulitilineX1_desc.x = -677.556;
8 mulitilineX1_desc.y = 211.949;
9 mulitilineX1_desc.z = -1.206;
10
11 DescTran mulitilineZ1_desc = new DescTran(0, 0, 0);
12 mulitilineZ1_desc.x = -677.564;
13 mulitilineZ1_desc.y = 190.956;
14 mulitilineZ1_desc.z = 19.817;
15
16 JointPos mulitilinesafe_joint = new JointPos(-25.734, -63.778, 81.502, -108.975, -93.392, 56.021);
17 DescPose mulitilinesafe_desc = new DescPose(-677.561, 211.950, 19.812, 1.144, -41.482, -82.577);
18 JointPos mulitilineorigin2_joint = new JointPos(-29.743, -75.623, 101.241, -116.354, -94.928, 55.735);
19 DescPose mulitilineorigin2_desc = new DescPose(-563.961, 215.359, -0.681, 2.845, -40.476, -87.443);
20
21 DescTran mulitilineX2_desc = new DescTran(0, 0, 0);
22 mulitilineX2_desc.x = -563.965;
23 mulitilineX2_desc.y = 220.355;
24 mulitilineX2_desc.z = -0.680;
25
26 DescTran mulitilineZ2_desc = new DescTran(0, 0, 0);
27 mulitilineZ2_desc.x = -563.968;
28 mulitilineZ2_desc.y = 215.362;
29 mulitilineZ2_desc.z = 4.331;
30
31 ExaxisPos epos = new ExaxisPos(0, 0, 0, 0);
32 DescPose offset = new DescPose(0, 0, 0, 0, 0, 0);
33
34 robot.Sleep(10);
35 int error = robot.MoveJ(mulitilinesafe_joint, mulitilinesafe_desc, 13, 0, 10, 100, 100, epos, -1, 0, offset);
36
37 error = robot.MoveL(mulitilineorigin1_joint, mulitilineorigin1_desc, 13, 0, 10, 100, 100, -1, 0, epos, 0, 0, offset, 0, 100);
38
39 error = robot.MoveJ(mulitilinesafe_joint, mulitilinesafe_desc, 13, 0, 10, 100, 100, epos, -1, 0, offset);
40
41 error = robot.MoveL(mulitilineorigin2_joint, mulitilineorigin2_desc, 13, 0, 10, 100, 100, -1, 0, epos, 0, 0, offset, 0, 100);
42
43 error = robot.MoveJ(mulitilinesafe_joint, mulitilinesafe_desc, 13, 0, 10, 100, 100, epos, -1, 0, offset);
44
45 error = robot.MoveL(mulitilineorigin1_joint, mulitilineorigin1_desc, 13, 0, 10, 100, 100, -1, 0, epos, 0, 0, offset, 0, 100);
46
47 error = robot.ARCStart(1, 0, 3000);
48
49 error = robot.WeaveStart(0);
50
51 error = robot.ArcWeldTraceControl(1, 0, 1, 0.06, 5, 5, 50, 1, 0.06, 5, 5, 55, 0, 0, 4, 1, 10, 0, 0);
52
53 error = robot.MoveL(mulitilineorigin2_joint, mulitilineorigin2_desc, 13, 0, 1, 100, 100, -1, 0, epos, 0, 0, offset, 0, 100);
54
55 error = robot.ArcWeldTraceControl(0, 0, 1, 0.06, 5, 5, 50, 1, 0.06, 5, 5, 55, 0, 0, 4, 1, 10, 0, 0);
56
57 error = robot.WeaveEnd(0);
58
59 error = robot.ARCEnd(1, 0, 10000);
60
61 error = robot.MoveJ(mulitilinesafe_joint, mulitilinesafe_desc, 13, 0, 10, 100, 100, epos, -1, 0, offset);
62
63 error = robot.MultilayerOffsetTrsfToBase(mulitilineorigin1_desc.tran, mulitilineX1_desc, mulitilineZ1_desc, 10.0, 0.0, 0.0, offset);
64
65 error = robot.MoveL(mulitilineorigin1_joint, mulitilineorigin1_desc, 13, 0, 10, 100, 100, -1, 0, epos, 0, 1, offset, 0, 100);
66
67 error = robot.ARCStart(1, 0, 3000);
68
69 error = robot.MultilayerOffsetTrsfToBase(mulitilineorigin2_desc.tran, mulitilineX2_desc, mulitilineZ2_desc, 10, 0, 0, offset);
70
71 error = robot.ArcWeldTraceReplayStart();
72
73 error = robot.MoveL(mulitilineorigin2_joint, mulitilineorigin2_desc, 13, 0, 2, 100, 100, -1, 0, epos, 0, 1, offset, 0, 100);
74
75 error = robot.ArcWeldTraceReplayEnd();
76
77 error = robot.ARCEnd(1, 0, 10000);
78
79 error = robot.MoveJ(mulitilinesafe_joint, mulitilinesafe_desc, 13, 0, 10, 100, 100, epos, -1, 0, offset);
80
81 error = robot.MultilayerOffsetTrsfToBase(mulitilineorigin1_desc.tran, mulitilineX1_desc, mulitilineZ1_desc, 0, 10, 0, offset);
82
83 error = robot.MoveL(mulitilineorigin1_joint, mulitilineorigin1_desc, 13, 0, 10, 100, 100, -1, 0, epos, 0, 1, offset, 0, 100);
84
85 error = robot.ARCStart(1, 0, 3000);
86
87 error = robot.MultilayerOffsetTrsfToBase(mulitilineorigin2_desc.tran, mulitilineX2_desc, mulitilineZ2_desc, 0, 10, 0, offset);
88
89 error = robot.ArcWeldTraceReplayStart();
90
91 error = robot.MoveL(mulitilineorigin2_joint, mulitilineorigin2_desc, 13, 0, 2, 100, 100, -1, 0, epos, 0, 1, offset, 0, 100);
92
93 error = robot.ArcWeldTraceReplayEnd();
94
95 error = robot.ARCEnd(1, 0, 3000);
96
97 error = robot.MoveJ(mulitilinesafe_joint, mulitilinesafe_desc, 13, 0, 10, 100, 100, epos, -1, 0, offset);
98
99 robot.CloseRPC();
100 return 0;
101}
14.51. Arc tracking welder current feedback AI channel selection
New in version Java: SDK-v1.0.5-3.8.2
1/**
2* @brief Arc tracking welder current feedback AI channel selection
3* @param [in] channel Channel:
4* 0-Extension AI0
5* 1-Extension AI1
6* 2-Extension AI2
7* 3-Extension AI3
8* 4-Controller AI0
9* 5-Controller AI1
10* @return Error code
11*/
12int ArcWeldTraceAIChannelCurrent(int channel);
14.52. Arc tracking welder voltage feedback AI channel selection
New in version Java: SDK-v1.0.5-3.8.2
1/**
2* @brief Arc tracking welder voltage feedback AI channel selection
3* @param [in] channel Channel:
4* 0-Extension AI0
5* 1-Extension AI1
6* 2-Extension AI2
7* 3-Extension AI3
8* 4-Controller AI0
9* 5-Controller AI1
10* @return Error code
11*/
12int ArcWeldTraceAIChannelVoltage(int channel);
14.53. Arc tracking welder current feedback conversion parameters
New in version Java: SDK-v1.0.5-3.8.2
1/**
2* @brief Arc tracking welder current feedback conversion parameters
3* @param [in] AILow AI channel lower limit (default 0V, range [0-10V])
4* @param [in] AIHigh AI channel upper limit (default 10V, range [0-10V])
5* @param [in] currentLow AI channel lower limit corresponding welder current (default 0V, range [0-200V])
6* @param [in] currentHigh AI channel upper limit corresponding welder current (default 100V, range [0-200V])
7* @return Error code
8*/
9int ArcWeldTraceCurrentPara(double AILow, double AIHigh, double currentLow, double currentHigh);
14.54. Arc tracking welder voltage feedback conversion parameters
New in version Java: SDK-v1.0.5-3.8.2
1/**
2* @brief Arc tracking welder voltage feedback conversion parameters
3* @param [in] AILow AI channel lower limit (default 0V, range [0-10V])
4* @param [in] AIHigh AI channel upper limit (default 10V, range [0-10V])
5* @param [in] voltageLow AI channel lower limit corresponding welder voltage (default 0V, range [0-200V])
6* @param [in] voltageHigh AI channel upper limit corresponding welder voltage (default 100V, range [0-200V])
7* @return Error code
8*/
9int ArcWeldTraceVoltagePara(double AILow, double AIHigh, double voltageLow, double voltageHigh);
14.55. Arc tracking code example
1public static void WeldTraceControlWithCtrlBoxAI(Robot robot)
2{
3 DescPose startdescPose = new DescPose(-473.86, 257.879, -20.849, -37.317, -42.021, 2.543);
4 JointPos startjointPos = new JointPos(-43.487, -76.526, 95.568, -104.445, -89.356, 3.72);
5
6 DescPose safedescPose = new DescPose(-504.043, 275.181, 40.908, -28.002, -42.025, -14.044);
7 JointPos safejointPos = new JointPos(-39.078, -76.732, 87.227, -99.47, -94.301, 18.714);
8
9 DescPose enddescPose = new DescPose(-499.844, 141.225, 7.72, -34.856, -40.17, 13.13);
10 JointPos endjointPos = new JointPos(-31.305, -82.998, 99.401, -104.426, -89.35, 3.696);
11
12 ExaxisPos exaxisPos = new ExaxisPos(0, 0, 0, 0);
13 DescPose offdese = new DescPose(0, 0, 0, 0, 0, 0);
14 // Move to safe point
15 robot.MoveJ(safejointPos, safedescPose, 1, 0, 5, 20, 100, exaxisPos, -1, 0, offdese);
16
17 WeldCurrentAORelation current = new WeldCurrentAORelation(0, 495, 1, 10, 0);
18 WeldVoltageAORelation voltage = new WeldVoltageAORelation(10, 45, 1, 10, 1);
19 robot.WeldingSetCurrentRelation(current); // Current to analog output relation
20 robot.WeldingSetVoltageRelation(voltage); // Voltage to analog output relation
21 robot.WeldingSetVoltage(0, 25, 1, 0); // Set voltage
22 robot.WeldingSetCurrent(0, 260, 0, 0); // Set current
23
24 int rtn = robot.ArcWeldTraceAIChannelCurrent(4);
25 System.out.println("ArcWeldTraceAIChannelCurrent rtn is " + rtn);
26
27 rtn = robot.ArcWeldTraceAIChannelVoltage(5);
28 System.out.println("ArcWeldTraceAIChannelVoltage rtn is " + rtn);
29
30 rtn = robot.ArcWeldTraceCurrentPara(0.0, 5, 0, 500);
31 System.out.println("ArcWeldTraceCurrentPara rtn is " + rtn);
32
33 rtn = robot.ArcWeldTraceVoltagePara(1.018, 10, 0, 50);
34 System.out.println("ArcWeldTraceVoltagePara rtn is " + rtn);
35
36 robot.MoveJ(startjointPos, startdescPose, 1, 0, 20, 20, 100, exaxisPos, -1, 0, offdese);
37 robot.ArcWeldTraceControl(1, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0);
38 robot.ARCStart(0, 0, 10000);
39 robot.WeaveStart(0);
40 robot.MoveL(endjointPos, enddescPose, 1, 0, 100, 100, 2, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);
41 robot.ARCEnd(0, 0, 10000);
42 robot.WeaveEnd(0);
43 robot.ArcWeldTraceControl(0, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0);
44
45 robot.MoveJ(safejointPos, safedescPose, 1, 0, 20, 20, 100, exaxisPos, -1, 0, offdese);
46}
14.56. Set Wire Search Extension IO Ports
1/**
2* @brief Sets the wire search extension IO ports
3* @param [in] searchDoneDINum Wire search success DO port (0-127)
4* @param [in] searchStartDONum Wire search start/stop control DO port (0-127)
5* @return Error code
6*/
7int SetWireSearchExtDIONum(int searchDoneDINum, int searchStartDONum);
14.57. Wire search start
1/**
2* @brief Wire search start
3* @param [in] refPos 1-Reference point; 0-Contact point
4* @param [in] searchVel Search speed %
5* @param [in] searchDis Search distance mm
6* @param [in] autoBackFlag Auto return flag: 0-No auto; 1-Auto
7* @param [in] autoBackVel Auto return speed %
8* @param [in] autoBackDis Auto return distance mm
9* @param [in] offectFlag 1-Search with offset; 0-Teach point search
10* @return Error code
11*/
12int WireSearchStart(int refPos, double searchVel, int searchDis, int autoBackFlag, double autoBackVel, int autoBackDis, int offectFlag);
14.58. Wire search end
1/**
2* @brief Wire search end
3* @param [in] refPos 1-Reference point; 2-Contact point
4* @param [in] searchVel Search speed %
5* @param [in] searchDis Search distance mm
6* @param [in] autoBackFlag Auto return flag: 0-No auto; 1-Auto
7* @param [in] autoBackVel Auto return speed %
8* @param [in] autoBackDis Auto return distance mm
9* @param [in] offectFlag 1-Search with offset; 2-Teach point search
10* @return Error code
11*/
12int WireSearchEnd(int refPos, double searchVel, int searchDis, int autoBackFlag, double autoBackVel, int autoBackDis, int offectFlag);
14.59. Calculate wire search offset
1/**
2* @brief Calculate wire search offset
3* @param [in] seamType Weld seam type
4* @param [in] method Calculation method
5* @param [in] varNameRef Reference points 1-6, "#" indicates no point variable
6* @param [in] varNameRes Contact points 1-6, "#" indicates no point variable
7* @param [out] offset Offset pose [x, y, z, a, b, c] and offset method
8* @return Error code
9*/
10int GetWireSearchOffset(int seamType, int method, String[] varNameRef, String[] varNameRes, DescOffset offset);
14.60. Wait for wire search completion
1/**
2* @brief Wait for wire search completion
3* @return Error code
4*/
5int WireSearchWait(String name);
14.61. Write wire search contact point to database
1/**
2* @brief Write wire search contact point to database
3* @param [in] varName Contact point name "RES0" ~ "RES99"
4* @param [in] pos Contact point data [x, y, z, a, b, c]
5* @return Error code
6*/
7int SetPointToDatabase(String varName, DescPose pos);
14.62. Robot wire search code example
1public static int TestWireSearch(Robot robot)
2{
3 DescPose toolCoord = new DescPose(0, 0, 200, 0, 0, 0);
4 robot.SetToolCoord(1, toolCoord, 0, 0, 1, 0);
5 DescPose wobjCoord = new DescPose(0, 0, 0, 0, 0, 0);
6 robot.SetWObjCoord(1, wobjCoord, 0);
7
8 int rtn0, rtn1, rtn2 = 0;
9 ExaxisPos exaxisPos = new ExaxisPos(0, 0, 0, 0);
10 DescPose offdese = new DescPose(0, 0, 0, 0, 0, 0);
11
12 DescPose descStart = new DescPose(216.543, 445.175, 93.465, 179.683, 1.757, -112.641);
13 JointPos jointStart = new JointPos(-128.345, -86.660, 114.679, -119.625, -89.219, 74.303);
14
15 DescPose descEnd = new DescPose(111.143, 523.384, 87.659, 179.703, 1.835, -97.750);
16 JointPos jointEnd = new JointPos(-113.454, -81.060, 109.328, -119.954, -89.218, 74.302);
17
18 robot.MoveL(jointStart, descStart, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 100);
19 robot.MoveL(jointEnd, descEnd, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 100);
20
21 DescPose descREF0A = new DescPose(142.135, 367.604, 86.523, 179.728, 1.922, -111.089);
22 JointPos jointREF0A = new JointPos(-126.794, -100.834, 128.922, -119.864, -89.218, 74.302);
23
24 DescPose descREF0B = new DescPose(254.633, 463.125, 72.604, 179.845, 2.341, -114.704);
25 JointPos jointREF0B = new JointPos(-130.413, -81.093, 112.044, -123.163, -89.217, 74.303);
26
27 DescPose descREF1A = new DescPose(92.556, 485.259, 47.476, -179.932, 3.130, -97.512);
28 JointPos jointREF1A = new JointPos(-113.231, -83.815, 119.877, -129.092, -89.217, 74.303);
29
30 DescPose descREF1B = new DescPose(203.103, 583.836, 63.909, 179.991, 2.854, -103.372);
31 JointPos jointREF1B = new JointPos(-119.088, -69.676, 98.692, -121.761, -89.219, 74.303);
32
33 rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
34 robot.MoveL(jointREF0A, descREF0A, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10); // Start point
35 robot.MoveL(jointREF0B, descREF0B, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 1, 0, offdese, 0, 10); // Direction point
36 rtn1 = robot.WireSearchWait("REF0");
37 rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
38
39 rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
40 robot.MoveL(jointREF1A, descREF1A, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10); // Start point
41 robot.MoveL(jointREF1B, descREF1B, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 1, 0, offdese, 0, 10); // Direction point
42 rtn1 = robot.WireSearchWait("REF1");
43 rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
44
45 rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
46 robot.MoveL(jointREF0A, descREF0A, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10); // Start point
47 robot.MoveL(jointREF0B, descREF0B, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 1, 0, offdese, 0, 10); // Direction point
48 rtn1 = robot.WireSearchWait("RES0");
49 rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
50
51 rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
52 robot.MoveL(jointREF1A, descREF1A, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10); // Start point
53 robot.MoveL(jointREF1B, descREF1B, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 1, 0, offdese, 0, 10); // Direction point
54 rtn1 = robot.WireSearchWait("RES1");
55 rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
56
57 String[] varNameRef = new String[]{"REF0", "REF1", "#", "#", "#", "#"};
58 String[] varNameRes = new String[]{"RES0", "RES1", "#", "#", "#", "#"};
59 int offectFlag = 0;
60
61 DescPose pos = new DescPose(0, 0, 0, 0, 0, 0);
62 DescOffset offectPos = new DescOffset();
63 offectPos.offset = pos;
64 offectPos.offsetFlag = 0;
65
66 rtn0 = robot.GetWireSearchOffset(0, 0, varNameRef, varNameRes, offectPos);
67 robot.PointsOffsetEnable(0, pos);
68 robot.MoveL(jointStart, descStart, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);
69 robot.MoveL(jointEnd, descEnd, 1, 1, 100, 100, 100, -1, 0, exaxisPos, 1, 0, offdese, 0, 10);
70 robot.PointsOffsetDisable();
71
72 robot.CloseRPC();
73 return 0;
74}
14.63. Set welding voltage gradual change start
New in version Java: SDK-v1.0.5-3.8.2
1/**
2* @brief Set welding voltage gradual change start
3* @param [in] IOType Control type:
4* 0-Controller IO
5* 1-Digital communication protocol (UDP)
6* 2-Digital communication protocol (ModbusTCP)
7* @param [in] voltageStart Starting welding voltage (V)
8* @param [in] voltageEnd Ending welding voltage (V)
9* @param [in] AOIndex Controller AO port number (0-1)
10* @param [in] blend Smoothing: 0-No smoothing; 1-Smoothing
11* @return Error code
12*/
13int WeldingSetVoltageGradualChangeStart(int IOType, double voltageStart, double voltageEnd, int AOIndex, int blend);
14.64. Set welding voltage gradual change end
New in version Java: SDK-v1.0.5-3.8.2
1/**
2* @brief Set welding voltage gradual change end
3* @return Error code
4*/
5int WeldingSetVoltageGradualChangeEnd();
14.65. Set welding current gradual change start
New in version Java: SDK-v1.0.5-3.8.2
1/**
2* @brief Set welding current gradual change start
3* @param [in] IOType Control type:
4* 0-Controller IO
5* 1-Digital communication protocol (UDP)
6* 2-Digital communication protocol (ModbusTCP)
7* @param [in] currentStart Starting welding current (A)
8* @param [in] currentEnd Ending welding current (A)
9* @param [in] AOIndex Controller AO port number (0-1)
10* @param [in] blend Smoothing: 0-No smoothing; 1-Smoothing
11* @return Error code
12*/
13int WeldingSetCurrentGradualChangeStart(int IOType, double currentStart, double currentEnd, int AOIndex, int blend);
14.66. Set welding current gradual change end
New in version Java: SDK-v1.0.5-3.8.2
1/**
2* @brief Set welding current gradual change end
3* @return Error code
4*/
5int WeldingSetCurrentGradualChangeEnd();
14.67. Robot welding current/voltage gradual change code example
1public static void WeldparamChange(Robot robot)
2{
3 DescPose startdescPose = new DescPose(-484.707, 276.996, -14.013, -37.657, -40.508, -1.548);
4 JointPos startjointPos = new JointPos(-45.421, -75.673, 93.627, -104.302, -87.938, 6.005);
5
6 DescPose enddescPose = new DescPose(-508.767, 137.109, -13.966, -37.639, -40.508, -1.559);
7 JointPos endjointPos = new JointPos(-32.768, -80.947, 100.254, -106.201, -87.201, 18.648);
8
9 DescPose safedescPose = new DescPose(-484.709, 294.436, 13.621, -37.660, -40.508, -1.545);
10 JointPos safejointPos = new JointPos(-46.604, -75.410, 89.109, -100.003, -88.012, 4.823);
11
12 ExaxisPos exaxisPos = new ExaxisPos(0, 0, 0, 0);
13 DescPose offdese = new DescPose(0, 0, 0, 0, 0, 0);
14
15 WeldCurrentAORelation cur = new WeldCurrentAORelation(0, 495, 1, 10, 0);
16 WeldVoltageAORelation vol = new WeldVoltageAORelation(10, 45, 1, 10, 1);
17 robot.WeldingSetCurrentRelation(cur);
18 robot.WeldingSetVoltageRelation(vol);
19
20 robot.WeldingSetVoltage(0, 25, 1, 0);
21 robot.WeldingSetCurrent(0, 260, 0, 0);
22
23 robot.MoveJ(safejointPos, safedescPose, 1, 0, 5, 100, 100, exaxisPos, -1, 0, offdese);
24
25 robot.WeldingSetCurrentGradualChangeStart(0, 260, 220, 0, 0);
26 robot.WeldingSetVoltageGradualChangeStart(0, 25, 22, 1, 0);
27 int rtn = robot.ArcWeldTraceControl(1, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0);
28
29 robot.MoveJ(startjointPos, startdescPose, 1, 0, 5, 100, 100, exaxisPos, -1, 0, offdese);
30 System.out.println("ArcWeldTraceControl rtn is " + rtn);
31
32 robot.ARCStart(0, 0, 10000);
33 robot.WeaveStart(0);
34 robot.WeaveChangeStart(2, 1, 24, 36);
35 robot.MoveL(endjointPos, enddescPose, 1, 0, 100, 100, 2, -1, 0, exaxisPos, 0, 0, offdese, 0, 10);
36 robot.ARCEnd(0, 0, 10000);
37 robot.WeaveChangeEnd();
38 robot.WeaveEnd(0);
39 robot.ArcWeldTraceControl(0, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0);
40 robot.WeldingSetCurrentGradualChangeEnd();
41 robot.WeldingSetVoltageGradualChangeEnd();
42}
14.68. Set Custom Weaving Parameters
New in version Java: SDK-v1.0.9-3.8.6
1/**
2 * @brief Set custom weaving parameters
3 * @param [in] id Custom weaving number: 0-2
4 * @param [in] pointNum Number of weaving points: 0-10
5 * @param [in] point Moving endpoint data x,y,z
6 * @param [in] stayTime Weaving dwell time in ms
7 * @param [in] frequency Weaving frequency in Hz
8 * @param [in] incStayType Wait mode: 0-cycle does not include wait time; 1-cycle includes wait time
9 * @param [in] stationary Weaving position wait: 0-continue motion during wait time; 1-position static during wait time
10 * @return Error code
11 */
12public int CustomWeaveSetPara(int id, int pointNum, DescTran[] point, double[] stayTime, double frequency, int incStayType, int stationary)
14.69. Get Custom Weaving Parameters
New in version Java: SDK-v1.0.9-3.8.6
1/**
2 * @brief Get custom weaving parameters
3 * @param [in] id Custom weaving number: 0-2
4 * @param [out] pointNum Number of weaving points: 0-10
5 * @param [out] point Moving endpoint data x,y,z
6 * @param [out] stayTime Weaving dwell time in ms
7 * @param [out] frequency Weaving frequency in Hz
8 * @param [out] incStayType Wait mode: 0-cycle does not include wait time; 1-cycle includes wait time
9 * @param [out] stationary Weaving position wait: 0-continue motion during wait time; 1-position static during wait time
10 * @return Error code
11 */
12public int CustomWeaveGetPara(int id, int[] pointNum, DescTran[] point, double[] stayTime, double[] frequency, int[] incStayType, int[] stationary)
14.70. Custom Weaving Parameters Code Example
1public static void TestCustomWeaveSetPara(Robot robot)
2{
3 DescTran[] point = new DescTran[10];
4 point[0]=new DescTran();
5 point[0].x = -3;
6 point[0].y = -3;
7 point[0].z = 0;
8
9 point[1]=new DescTran();
10 point[1].x = -6;
11 point[1].y = 0;
12 point[1].z = 0;
13
14 point[2]=new DescTran();
15 point[2].x = -3;
16 point[2].y = 3;
17 point[2].z = 0;
18
19 point[3]=new DescTran();
20 point[3].x = 0;
21 point[3].y = 0;
22 point[3].z = 0;
23 point[4]=new DescTran(0,0,0);
24 point[5]=new DescTran(0,0,0);
25 point[6]=new DescTran(0,0,0);
26 point[7]=new DescTran(0,0,0);
27 point[8]=new DescTran(0,0,0);
28 point[9]=new DescTran(0,0,0);
29
30 double[] stayTime =new double[] { 0,0,0,0,0,0,0,0,0,0 };
31 int rtn = robot.CustomWeaveSetPara(2, 4, point, stayTime, 1.000, 0, 0);
32 System.out.println("CustomWeaveSetPara rtn is: "+ rtn);
33 robot.Sleep(1000);
34
35 int[] pointNum = new int[1];
36 double[] frequency=new double[1];
37 int[] incStayType=new int[1];
38 int[] stationary=new int[1];
39 robot.CustomWeaveGetPara(2, pointNum, point, stayTime, frequency, incStayType, stationary);
40 System.out.println("pointNum is: "+ pointNum[0]);
41 for (int i = 0; i < pointNum[0]; i++)
42 {
43 System.out.println("point: "+i+", "+ point[i].x+", "+ point[i].y+", "+ point[i].z);
44 }
45 System.out.println("frequency is: "+ frequency[0]+", incStayType is: "+ incStayType[0]+", stationary is: "+ stationary[0]);
46
47 robot.WeaveSetPara(0, 9, 1.000000, 1, 5.000000,
48 6.000000, 5.000000, 50, 100, 100,
49 0, 1, 0.000000, 0.000000);
50
51 DescPose desc_p1 =new DescPose(-288.650, 367.807, 288.404, 0.000, -0.001, 0.001 );
52 DescPose desc_p2 = new DescPose( -431.714, 367.815, 288.415, 0.001, 0.001, 0.000 );
53 DescPose desc_p3 = new DescPose( -348.666, 427.798, 288.404, -0.000, -0.000, 0.001 );
54 JointPos j1 = new JointPos( 140.656, -84.560, -91.707, -93.734, 90.000, 50.655 );
55 JointPos j2 = new JointPos( 149.873, -98.298, -77.599, -94.103, 90.000, 59.873 );
56 JointPos j3 = new JointPos( 139.773, -96.173, -80.014, -93.814, 90.000, 49.772 );
57
58 ExaxisPos epos = new ExaxisPos();
59 DescPose offset_pos = new DescPose();
60
61 robot.MoveJ(j1, desc_p1, 3, 0, 100, 100,100, epos, -1, 0, offset_pos);
62 robot.WeaveStart(0);
63 robot.Circle(j3, desc_p3, 3, 0, 100, 100, epos, j2, desc_p2, 3, 0, 100, 100, epos, 10, -1, offset_pos,0,-1,0);
64 robot.WeaveEnd(0);
65 robot.MoveJ(j1, desc_p1, 3, 0, 100, 100, 100, epos, -1, 0, offset_pos);
66 robot.WeaveStart(0);
67 robot.MoveC(j3, desc_p3, 3, 0, 100, 100, epos, 0, offset_pos, j2, desc_p2, 3, 0, 100, 100, epos, 0, offset_pos, 10, -1,0);
68 robot.WeaveEnd(0);
69 robot.MoveJ(j1, desc_p1, 3, 0, 100, 100, 100, epos, -1, 0, offset_pos);
70 robot.WeaveStart(0);
71 robot.MoveL(j2, desc_p2, 3, 0, 100, 100, 10, -1,epos, 0, 0, offset_pos, 0,0, 100);
72 robot.WeaveEnd(0);
73
74 robot.CloseRPC();
75}