14. Robot Welding

14.1. Set Welding Process Curve Parameters

New in version C++SDK-v2.1.5.0.

 1/**
 2 * @brief Set welding process curve parameters
 3 * @param [in] id Welding process ID (1-99)
 4 * @param [in] startCurrent Arc starting current (A)
 5 * @param [in] startVoltage Arc starting voltage (V)
 6 * @param [in] startTime Arc starting time (ms)
 7 * @param [in] weldCurrent Welding current (A)
 8 * @param [in] weldVoltage Welding voltage (V)
 9 * @param [in] endCurrent Arc ending current (A)
10 * @param [in] endVoltage Arc ending voltage (V)
11 * @param [in] endTime Arc ending time (ms)
12 * @return Error code
13 */
14errno_t WeldingSetProcessParam(int id, double startCurrent, double startVoltage, double startTime, double weldCurrent, double weldVoltage, double endCurrent, double endVoltage, double endTime);

14.2. Get Welding Process Curve Parameters

New in version C++SDK-v2.1.5.0.

 1/**
 2 * @brief Get welding process curve parameters
 3 * @param [in] id Welding process ID (1-99)
 4 * @param [out] startCurrent Arc starting current (A)
 5 * @param [out] startVoltage Arc starting voltage (V)
 6 * @param [out] startTime Arc starting time (ms)
 7 * @param [out] weldCurrent Welding current (A)
 8 * @param [out] weldVoltage Welding voltage (V)
 9 * @param [out] endCurrent Arc ending current (A)
10 * @param [out] endVoltage Arc ending voltage (V)
11 * @param [out] endTime Arc ending time (ms)
12 * @return Error code
13 */
14errno_t WeldingGetProcessParam(int id, double& startCurrent, double& startVoltage, double& startTime, double& weldCurrent, double& weldVoltage, double& endCurrent, double& endVoltage, double& endTime);

14.3. Set Welding Current to Analog Output Relationship

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Set welding current to analog output relationship
3* @param [in] currentMin Current value at left point of linear relationship (A)
4* @param [in] currentMax Current value at right point of linear relationship (A)
5* @param [in] outputVoltageMin Analog output voltage at left point (V)
6* @param [in] outputVoltageMax Analog output voltage at right point (V)
7* @return Error code
8*/
9errno_t WeldingSetCurrentRelation(double currentMin, double currentMax, double outputVoltageMin, double outputVoltageMax);

14.4. Set Welding Voltage to Analog Output Relationship

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Set welding voltage to analog output relationship
3* @param [in] weldVoltageMin Welding voltage at left point of linear relationship (A)
4* @param [in] weldVoltageMax Welding voltage at right point of linear relationship (A)
5* @param [in] outputVoltageMin Analog output voltage at left point (V)
6* @param [in] outputVoltageMax Analog output voltage at right point (V)
7* @return Error code
8*/
9errno_t WeldingSetVoltageRelation(double weldVoltageMin, double weldVoltageMax, double outputVoltageMin, double outputVoltageMax);

14.5. Get Welding Current to Analog Output Relationship

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Get welding current to analog output relationship
3* @param [out] currentMin Current value at left point of linear relationship (A)
4* @param [out] currentMax Current value at right point of linear relationship (A)
5* @param [out] outputVoltageMin Analog output voltage at left point (V)
6* @param [out] outputVoltageMax Analog output voltage at right point (V)
7* @return Error code
8*/
9errno_t WeldingGetCurrentRelation(double *currentMin, double *currentMax, double *outputVoltageMin, double *outputVoltageMax);

14.6. Get Welding Voltage to Analog Output Relationship

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Get welding voltage to analog output relationship
3* @param [out] weldVoltageMin Welding voltage at left point of linear relationship (A)
4* @param [out] weldVoltageMax Welding voltage at right point of linear relationship (A)
5* @param [out] outputVoltageMin Analog output voltage at left point (V)
6* @param [out] outputVoltageMax Analog output voltage at right point (V)
7* @return Error code
8*/
9errno_t WeldingGetVoltageRelation(double *weldVoltageMin, double *weldVoltageMax, double *outputVoltageMin, double *outputVoltageMax);

14.7. Set Welding Current

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Set welding current
3* @param [in] ioType Control IO type 0-Control box IO; 1-Extension IO
4* @param [in] current Welding current value (A)
5* @param [in] AOIndex Welding current control box analog output port (0-1)
6* @param [in] blend Whether to smooth 0-Not smooth; 1-Smooth
7* @return Error code
8*/
9errno_t WeldingSetCurrent(int ioType, double current, int AOIndex, int blend);

14.8. Set Welding Voltage

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Set welding voltage
3* @param [in] ioType Control IO type 0-Control box IO; 1-Extension IO
4* @param [in] voltage Welding voltage value (V)
5* @param [in] AOIndex Welding voltage control box analog output port (0-1)
6* @param [in] blend Whether to smooth 0-Not smooth; 1-Smooth
7* @return Error code
8*/
9errno_t WeldingSetVoltage(int ioType, double voltage, int AOIndex, int blend);

14.9. Set Weaving Parameters

 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 weaving;
 6 *        1-Vertical L-shaped triangular wave weaving;
 7 *        2-Clockwise circular weaving;
 8 *        3-Counter-clockwise circular weaving;
 9 *        4-Horizontal sine wave weaving;
10 *        5-Vertical L-shaped sine wave weaving;
11 *        6-Vertical triangular wave weaving;
12 *        7-Vertical sine wave weaving
13 * @param [in] weaveFrequency Weaving frequency (Hz)
14 * @param [in] weaveIncStayTime Wait mode:
15 *        0-Period excludes wait time;
16 *        1-Period includes wait time
17 * @param [in] weaveRange Weaving amplitude (mm)
18 * @param [in] weaveLeftRange Left chord length for vertical triangular weaving (mm)
19 * @param [in] weaveRightRange Right chord length for vertical triangular weaving (mm)
20 * @param [in] additionalStayTime Vertical triangular weaving apex dwell time (mm)
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 during weaving:
25 *        0-Position continues moving during wait time;
26 *        1-Position remains static during wait time
27 * @param [in] weaveYawAngle Weaving direction azimuth angle (rotation around Z-axis), in °
28 * @param [in] weaveRotAngle Weaving direction tilt angle (deflection around X-axis), in °
29 * @return Error code
30 */
31errno_t 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 = 0);

14.10. Welding Parameter Setup Code Example

 1int TestSetWeldParam(void)
 2{
 3  ROBOT_STATE_PKG pkg = {};
 4  FRRobot robot;
 5  robot.LoggerInit();
 6  robot.SetLoggerLevel(1);
 7  int rtn = robot.RPC("192.168.58.2");
 8  if (rtn != 0)
 9  {
10    return -1;
11  }
12  robot.SetReConnectParam(true, 30000, 500);
13  robot.WeldingSetProcessParam(1, 177, 27, 1000, 178, 28, 176, 26, 1000);
14  robot.WeldingSetProcessParam(2, 188, 28, 555, 199, 29, 133, 23, 333);
15  double startCurrent = 0;
16  double startVoltage = 0;
17  double startTime = 0;
18  double weldCurrent = 0;
19  double weldVoltage = 0;
20  double endCurrent = 0;
21  double endVoltage = 0;
22  double endTime = 0;
23  robot.WeldingGetProcessParam(1, startCurrent, startVoltage, startTime, weldCurrent, weldVoltage, endCurrent, endVoltage, endTime);
24  cout << "the Num 1 process param is " << startCurrent << " " << startVoltage << " " << startTime << " " << weldCurrent << " " << weldVoltage << " " << endCurrent << " " << endVoltage << " " << endTime << endl;
25  robot.WeldingGetProcessParam(2, startCurrent, startVoltage, startTime, weldCurrent, weldVoltage, endCurrent, endVoltage, endTime);
26  cout << "the Num 2 process param is " << startCurrent << " " << startVoltage << " " << startTime << " " << weldCurrent << " " << weldVoltage << " " << endCurrent << " " << endVoltage << " " << endTime << endl;
27  rtn = robot.WeldingSetCurrentRelation(0, 400, 0, 10, 0);
28  cout << "WeldingSetCurrentRelation rtn is: " << rtn << endl;
29  rtn = robot.WeldingSetVoltageRelation(0, 40, 0, 10, 1);
30  cout << "WeldingSetVoltageRelation rtn is: " << rtn << endl;
31  double current_min = 0;
32  double current_max = 0;
33  double vol_min = 0;
34  double vol_max = 0;
35  double output_vmin = 0;
36  double output_vmax = 0;
37  int curIndex = 0;
38  int volIndex = 0;
39  rtn = robot.WeldingGetCurrentRelation(&current_min, &current_max, &output_vmin, &output_vmax, &curIndex);
40  cout << "WeldingGetCurrentRelation rtn is: " << rtn << endl;
41  cout << "current min " << current_min << " current max " << current_max << " output vol min " << output_vmin << " output vol max " << output_vmax << endl;
42  rtn = robot.WeldingGetVoltageRelation(&vol_min, &vol_max, &output_vmin, &output_vmax, &volIndex);
43  cout << "WeldingGetVoltageRelation rtn is: " << rtn << endl;
44  cout << "vol min " << vol_min << " vol max " << vol_max << " output vol min " << output_vmin << " output vol max " << output_vmax << endl;
45  rtn = robot.WeldingSetCurrent(1, 100, 0, 0);
46  cout << "WeldingSetCurrent rtn is: " << rtn << endl;
47  this_thread::sleep_for(chrono::seconds(3));
48  rtn = robot.WeldingSetVoltage(1, 10, 0, 0);
49  cout << "WeldingSetVoltage rtn is: " << rtn << endl;
50  rtn = robot.WeaveSetPara(0, 0, 2.000000, 0, 10.000000, 0.000000, 0.000000, 0, 0, 0, 0, 0, 60.000000);
51  cout << "rtn is: " << rtn << endl;
52  robot.WeaveOnlineSetPara(0, 0, 1, 0, 20, 0, 0, 0, 0);
53  rtn = robot.WeldingSetCheckArcInterruptionParam(1, 200);
54  printf("WeldingSetCheckArcInterruptionParam  %d\n", rtn);
55  rtn = robot.WeldingSetReWeldAfterBreakOffParam(1, 5.7, 98.2, 0);
56  printf("WeldingSetReWeldAfterBreakOffParam  %d\n", rtn);
57  int enable = 0;
58  double length = 0;
59  double velocity = 0;
60  int moveType = 0;
61  int checkEnable = 0;
62  int arcInterruptTimeLength = 0;
63  rtn = robot.WeldingGetCheckArcInterruptionParam(&checkEnable, &arcInterruptTimeLength);
64  printf("WeldingGetCheckArcInterruptionParam checkEnable %d  arcInterruptTimeLength %d\n", checkEnable, arcInterruptTimeLength);
65  rtn = robot.WeldingGetReWeldAfterBreakOffParam(&enable, &length, &velocity, &moveType);
66  printf("WeldingGetReWeldAfterBreakOffParam enable = %d, length = %lf, velocity = %lf, moveType = %d\n", enable, length, velocity, moveType);
67  robot.SetWeldMachineCtrlModeExtDoNum(17);
68  for (int i = 0; i < 5; i++)
69  {
70    robot.SetWeldMachineCtrlMode(0);
71    robot.Sleep(1000);
72    robot.SetWeldMachineCtrlMode(1);
73    robot.Sleep(1000);
74  }
75  robot.CloseRPC();
76  return 0;
77}

14.11. Instantaneously Set Weaving Parameters

New in version C++SDK-v2.1.1.0.

 1/**
 2* @brief Instantly set weaving parameters
 3* @param [in] weaveNum Weaving parameter configuration number
 4* @param [in] weaveType Weaving type 0-Flat triangular wave; 1-Vertical L-shaped triangular wave; 2-Clockwise circular; 3-Counter-clockwise circular; 4-Flat sine wave; 5-Vertical L-shaped sine wave; 6-Vertical triangular wave; 7-Vertical sine wave
 5* @param [in] weaveFrequency Weaving frequency (Hz)
 6* @param [in] weaveIncStayTime Wait mode 0-Cycle excludes wait time; 1-Cycle includes wait time
 7* @param [in] weaveRange Weaving amplitude (mm)
 8* @param [in] weaveLeftStayTime Left dwell time (ms)
 9* @param [in] weaveRightStayTime Right dwell time (ms)
10* @param [in] weaveCircleRadio Circular weaving - callback ratio (0-100%)
11* @param [in] weaveStationary Weaving position wait, 0-Position continues moving during wait; 1-Position remains stationary during wait
12* @return Error code
13*/
14errno_t WeaveOnlineSetPara(int weaveNum, int weaveType, double weaveFrequency, int weaveIncStayTime, double weaveRange, int weaveLeftStayTime, int weaveRightStayTime, int weaveCircleRadio, int weaveStationary);

14.12. Set Robot Welding Arc Unexpected Interruption Detection Parameters

New in version C++SDK-v2.1.8-3.7.8.

1/**
2     * @brief Set robot welding arc unexpected 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*/
7    errno_t WeldingSetCheckArcInterruptionParam(int checkEnable, int arcInterruptTimeLength);

14.13. Get Robot Welding Arc Unexpected Interruption Detection Parameters

New in version C++SDK-v2.1.8-3.7.8.

1/**
2     * @brief Get robot welding arc unexpected interruption detection parameters
3     * @param [out] checkEnable Whether detection is enabled; 0-Disabled; 1-Enabled
4     * @param [out] arcInterruptTimeLength Arc interruption confirmation duration (ms)
5     * @return Error code
6*/
7    errno_t WeldingGetCheckArcInterruptionParam(int* checkEnable, int* arcInterruptTimeLength);

14.14. Set Robot Welding Interruption Recovery Parameters

New in version C++SDK-v2.1.8-3.7.8.

1/**
2     * @brief Set robot welding interruption recovery parameters
3     * @param [in] enable Whether to enable welding interruption recovery
4     * @param [in] length Weld overlap distance (mm)
5     * @param [in] velocity Robot return to re-arc point speed percentage (0-100)
6     * @param [in] moveType Robot movement to re-arc point method; 0-LIN; 1-PTP
7     * @return Error code
8*/
9    errno_t WeldingSetReWeldAfterBreakOffParam(int enable, double length, double velocity, int moveType);

14.15. Get Robot Welding Interruption Recovery Parameters

New in version C++SDK-v2.1.8-3.7.8.

1/**
2     * @brief Get robot welding interruption recovery parameters
3     * @param [out] enable Whether welding interruption recovery is enabled
4     * @param [out] length Weld overlap distance (mm)
5     * @param [out] velocity Robot return to re-arc point speed percentage (0-100)
6     * @param [out] moveType Robot movement to re-arc point method; 0-LIN; 1-PTP
7     * @return Error code
8*/
9    errno_t WeldingGetReWeldAfterBreakOffParam(int* enable, double* length, double* velocity, int* moveType);

14.16. Set Welder Control Mode Extended DO Port

New in version C++SDK-v2.1.5.0.

1/**
2* @brief Set welder control mode extended DO port
3* @param DONum Welder control mode DO port (0-127)
4* @return Error code
5*/
6errno_t SetWeldMachineCtrlModeExtDoNum(int DONum);

14.17. Set Welder Control Mode

New in version C++SDK-v2.1.5.0.

1/**
2* @brief Set welding machine control mode
3* @param [in] 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 [in] ioType Control type; 0-Control box IO; 1-Digital communication protocol (UDP); 2-Digital communication protocol (ModbusTCP)
5* @return Error code
6*/
7errno_t SetWeldMachineCtrlMode(int mode, int ioType = 1);

14.18. Welding Start

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Welding start
3* @param [in] ioType IO type 0-Controller IO; 1-Extended IO
4* @param [in] arcNum Welder configuration file number
5* @param [in] timeout Arc ignition timeout
6* @return Error code
7*/
8errno_t ARCStart(int ioType, int arcNum, int timeout);

14.19. Welding End

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Welding end
3* @param [in] ioType IO type 0-Controller IO; 1-Extended IO
4* @param [in] arcNum Welder configuration file number
5* @param [in] timeout Arc extinguishing timeout
6* @return Error code
7*/
8errno_t ARCEnd(int ioType, int arcNum, int timeout);

14.20. Weaving Start

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Weaving start
3* @param [in] weaveNum Weaving parameter configuration number
4* @return Error code
5*/
6errno_t WeaveStart(int weaveNum);

14.21. Weaving End

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Weaving end
3* @param [in] weaveNum Weaving parameter configuration number
4* @return Error code
5*/
6errno_t WeaveEnd(int weaveNum);

14.22. Forward Wire Feeding

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Forward wire feeding
3* @param [in] ioType IO type 0-Controller IO; 1-Extended IO
4* @param [in] wireFeed Wire feed control 0-Stop feeding; 1-Feed wire
5* @return Error code
6*/
7errno_t SetForwardWireFeed(int ioType, int wireFeed);

14.23. Reverse Wire Feeding

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Reverse wire feeding
3* @param [in] ioType IO type 0-Controller IO; 1-Extended IO
4* @param [in] wireFeed Wire feed control 0-Stop feeding; 1-Feed wire
5* @return Error code
6*/
7errno_t SetReverseWireFeed(int ioType, int wireFeed);

14.24. Gas Feeding

New in version C++SDK-v2.1.1.0.

1/**
2* @brief Gas feeding
3* @param [in] ioType IO type 0-Controller IO; 1-Extended IO
4* @param [in] airControl Gas feed control 0-Stop feeding; 1-Feed gas
5* @return Error code
6*/
7errno_t SetAspirated(int ioType, int airControl);

14.25. Set Robot to Resume Welding After Interruption

New in version C++SDK-v2.1.8-3.7.8.

1/**
2     * @brief Set robot to resume welding after interruption
3     * @return Error code
4*/
5    errno_t WeldingStartReWeldAfterBreakOff();

14.26. Set Robot to Abort Welding After Interruption

New in version C++SDK-v2.1.8-3.7.8.

1/**
2     * @brief Set robot to abort welding after interruption
3     * @return Error code
4     */
5    errno_t WeldingAbortWeldAfterBreakOff();

14.27. Robot Welding Control Code Example

 1int TestWelding(void)
 2{
 3  ROBOT_STATE_PKG pkg = {};
 4  FRRobot robot;
 5  robot.LoggerInit();
 6  robot.SetLoggerLevel(1);
 7  int rtn = robot.RPC("192.168.58.2");
 8  if (rtn != 0)
 9  {
10    return -1;
11  }
12  robot.SetReConnectParam(true, 30000, 500);
13  robot.SetForwardWireFeed(0, 1);
14  robot.Sleep(1000);
15  robot.SetForwardWireFeed(0, 0);
16  robot.SetReverseWireFeed(0, 1);
17  robot.Sleep(1000);
18  robot.SetReverseWireFeed(0, 0);
19  robot.SetAspirated(0, 1);
20  robot.Sleep(1000);
21  robot.SetAspirated(0, 0);
22  robot.WeldingSetCurrent(1, 230, 0, 0);
23  robot.WeldingSetVoltage(1, 24, 0, 1);
24  DescPose p1Desc(228.879, -503.594, 453.984, -175.580, 8.293, 171.267);
25  JointPos p1Joint(102.700, -85.333, 90.518, -102.365, -83.932, 22.134);
26  DescPose p2Desc(-333.302, -435.580, 449.866, -174.997, 2.017, 109.815);
27  JointPos p2Joint(41.862, -85.333, 90.526, -100.587, -90.014, 22.135);
28  ExaxisPos exaxisPos(0, 0, 0, 0);
29  DescPose offdese(0, 0, 0, 0, 0, 0);
30  robot.MoveJ(&p1Joint, &p1Desc, 13, 0, 20, 100, 100, &exaxisPos, -1, 0, &offdese);
31  robot.ARCStart(1, 0, 10000);
32  robot.WeaveStart(0);
33  robot.MoveL(&p2Joint, &p2Desc, 13, 0, 20, 100, 100, -1, 0, &exaxisPos, 0, 0, &offdese);
34  robot.ARCEnd(1, 0, 10000);
35  robot.WeaveEnd(0);
36  robot.WeldingStartReWeldAfterBreakOff();
37  robot.WeldingAbortWeldAfterBreakOff();
38  robot.CloseRPC();
39  return 0;
40}

14.28. Segment Welding Start

New in version C++SDK-v2.1.1.0.

 1/**
 2* @brief Segment welding start
 3* @param [in] startDesePos Starting point Cartesian position
 4* @param [in] endDesePos Ending point Cartesian pose
 5* @param [in] startJPos Starting point joint pose
 6* @param [in] endJPos Ending point joint pose
 7* @param [in] weldLength Welding segment length (mm)
 8* @param [in] noWeldLength Non-welding segment length (mm)
 9* @param [in] weldIOType Welding IO type (0-Control box IO; 1-Extended IO)
10* @param [in] arcNum Welder configuration file number
11* @param [in] weldTimeout Arc ignition/extinguishing timeout
12* @param [in] isWeave Whether to weave
13* @param [in] weaveNum Weaving parameter configuration number
14* @param [in] tool Tool coordinate number, range [0~14]
15* @param [in] user Workpiece coordinate number, range [0~14]
16* @param [in] vel Speed percentage, range [0~100]
17* @param [in] acc Acceleration percentage, range [0~100], not currently open
18* @param [in] ovl Speed scaling factor, range [0~100]
19* @param [in] blendR [-1.0]-Move to position (blocking), [0~1000.0]-Smoothing radius (non-blocking), unit mm
20* @param [in] epos Extended axis position, unit 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 coordinate system, 2-Offset in tool coordinate system
23* @param [in] offset_pos Pose offset
24* @return Error code
25*/
26errno_t SegmentWeldStart(DescPose *startDesePos, DescPose *endDesePos, JointPos *startJPos, JointPos *endJPos, double weldLength, double noWeldLength, int weldIOType, int arcNum, int weldTimeout, bool isWeave, int weaveNum, int tool, int user, float vel, float acc, float ovl, float blendR, ExaxisPos *epos, uint8_t search, uint8_t offset_flag, DescPose *offset_pos);

14.29. Robot Segment Welding Code Example

Changed in version C++SDK-v2.1.2.0.

 1int TestSegWeld(void)
 2{
 3  ROBOT_STATE_PKG pkg = {};
 4  FRRobot robot;
 5  robot.LoggerInit();
 6  robot.SetLoggerLevel(1);
 7  int rtn = robot.RPC("192.168.58.2");
 8  if (rtn != 0)
 9  {
10    return -1;
11  }
12  robot.SetReConnectParam(true, 30000, 500);
13  robot.WeldingSetCurrent(1, 230, 0, 0);
14  robot.WeldingSetVoltage(1, 24, 0, 1);
15  DescPose p1Desc(228.879, -503.594, 453.984, -175.580, 8.293, 171.267);
16  JointPos p1Joint(102.700, -85.333, 90.518, -102.365, -83.932, 22.134);
17  DescPose p2Desc(-333.302, -435.580, 449.866, -174.997, 2.017, 109.815);
18  JointPos p2Joint(41.862, -85.333, 90.526, -100.587, -90.014, 22.135);
19  ExaxisPos exaxisPos(0, 0, 0, 0);
20  DescPose offdese(0, 0, 0, 0, 0, 0);
21  rtn = robot.SegmentWeldStart(&p1Desc, &p2Desc, &p1Joint, &p2Joint, 20, 20, 0, 0, 5000, 0, 0, 0, 0, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese);
22  printf("SegmentWeldStart rtn is %d\n", rtn);
23  robot.CloseRPC();
24  return 0;
25}

14.30. Simulation Weaving Start

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief Simulation weaving start
3 * @param [in] weaveNum Weaving parameter number
4 * @return Error code
5 */
6errno_t WeaveStartSim(int weaveNum);

14.31. Simulation Weaving End

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief Simulation weaving end
3 * @param [in] weaveNum Weaving parameter number
4 * @return Error code
5 */
6errno_t WeaveEndSim(int weaveNum);

14.32. Start Trajectory Detection Warning (No Movement)

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief Start trajectory detection warning (no movement)
3 * @param [in] weaveNum  Weaving parameter number
4 * @return Error code
5 */
6errno_t WeaveInspectStart(int weaveNum);

14.33. End Trajectory Detection Warning (No Movement)

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief End trajectory detection warning (no movement)
3 * @param [in] weaveNum  Weaving parameter number
4 * @return Error code
5 */
6errno_t WeaveInspectEnd(int weaveNum);

14.34. Weaving Gradual Change Start

1/**
2 * @brief Weaving gradual change start
3 * @param [in] weaveChangeFlag 1-Change weaving parameters; 2-Change weaving parameters + welding speed
4 * @param [in] weaveNum Weaving number
5 * @param [in] velStart Welding start speed (cm/min)
6 * @param [in] velEnd Welding end speed (cm/min)
7 * @return Error code
8 */
9 errno_t WeaveChangeStart(int weaveChangeFlag, int weaveNum, double velStart, double velEnd);

14.35. Robot Weaving Gradual Change Welding Code Example

 1int TestWeave(void)
 2{
 3  ROBOT_STATE_PKG pkg = {};
 4  FRRobot robot;
 5  robot.LoggerInit();
 6  robot.SetLoggerLevel(1);
 7  int rtn = robot.RPC("192.168.58.2");
 8  if (rtn != 0)
 9  {
10    return -1;
11  }
12  robot.SetReConnectParam(true, 30000, 500);
13  DescPose p1Desc(228.879, -503.594, 453.984, -175.580, 8.293, 171.267);
14  JointPos p1Joint(102.700, -85.333, 90.518, -102.365, -83.932, 22.134);
15  DescPose p2Desc(-333.302, -435.580, 449.866, -174.997, 2.017, 109.815);
16  JointPos p2Joint(41.862, -85.333, 90.526, -100.587, -90.014, 22.135);
17  ExaxisPos exaxisPos(0, 0, 0, 0);
18  DescPose offdese(0, 0, 0, 0, 0, 0);
19  robot.MoveJ(&p1Joint, &p1Desc, 13, 0, 20, 100, 100, &exaxisPos, -1, 0, &offdese);
20  robot.WeaveStartSim(0);
21  robot.MoveL(&p2Joint, &p2Desc, 13, 0, 20, 100, 100, -1, 0, &exaxisPos, 0, 0, &offdese);
22  robot.WeaveEndSim(0);
23  robot.MoveJ(&p1Joint, &p1Desc, 13, 0, 20, 100, 100, &exaxisPos, -1, 0, &offdese);
24  robot.WeaveInspectStart(0);
25  robot.MoveL(&p2Joint, &p2Desc, 13, 0, 20, 100, 100, -1, 0, &exaxisPos, 0, 0, &offdese);
26  robot.WeaveInspectEnd(0);
27  robot.WeldingSetVoltage(1, 19, 0, 0);
28  robot.WeldingSetCurrent(1, 190, 0, 0);
29  robot.MoveL(&p1Joint, &p1Desc, 1, 1, 100, 100, 50, -1, &exaxisPos, 0, 0, &offdese);
30  robot.ARCStart(1, 0, 10000);
31  robot.ArcWeldTraceControl(1, 0, 1, 0.06, 5, 5, 60, 1, 0.06, 5, 5, 80, 0, 0, 4, 1, 10, 0, 0);
32  robot.WeaveStart(0);
33  robot.WeaveChangeStart(1, 0, 50, 30);
34  robot.MoveL(&p2Joint, &p2Desc, 1, 1, 100, 100, 1, -1, &exaxisPos, 0, 0, &offdese);
35  robot.WeaveChangeEnd();
36  robot.WeaveEnd(0);
37  robot.ArcWeldTraceControl(0, 0, 1, 0.06, 5, 5, 60, 1, 0.06, 5, 5, 80, 0, 0, 4, 1, 10, 0, 0);
38  robot.ARCEnd(1, 0, 10000);
39  robot.CloseRPC();
40  return 0;
41}

14.36. Weaving Gradual Change End

New in version C++SDK-v2.2.0-3.8.0.

1    /**
2     * @brief  Weaving gradual change end
3     * @return  Error code
4     */
5errno_t WeaveChangeEnd();

14.37. Extended IO-Configure Welder Gas Detection Signal

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief Extended IO-Configure welder gas detection signal
3 * @param [in] DONum Gas detection signal extended DO number
4 * @return Error code
5 */
6errno_t SetAirControlExtDoNum(int DONum);

14.38. Extended IO-Configure Welder Arc Start Signal

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief Extended IO-Configure welder arc start signal
3 * @param [in] DONum Welder arc start signal extended DO number
4 * @return Error code
5 */
6errno_t SetArcStartExtDoNum(int DONum);

14.39. Extended IO-Configure Welder Reverse Wire Feed Signal

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief Extended IO-Configure welder reverse wire feed signal
3 * @param [in] DONum Reverse wire feed signal extended DO number
4 * @return Error code
5 */
6errno_t SetWireReverseFeedExtDoNum(int DONum);

14.40. Extended IO-Configure Welder Forward Wire Feed Signal

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief Extended IO-Configure welder forward wire feed signal
3 * @param [in] DONum Forward wire feed signal extended DO number
4 * @return Error code
5 */
6errno_t SetWireForwardFeedExtDoNum(int DONum);

14.41. Extended IO-Configure Welder Arc Success Signal

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief Extended IO-Configure welder arc success signal
3 * @param [in] DINum Arc success signal extended DI number
4 * @return Error code
5 */
6errno_t SetArcDoneExtDiNum(int DINum);

14.42. Extended IO-Configure Welder Ready Signal

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief Extended IO-Configure welder ready signal
3 * @param [in] DINum Welder ready signal extended DI number
4 * @return Error code
5 */
6errno_t SetWeldReadyExtDiNum(int DINum);

14.43. Extended IO-Configure Welding Interruption Recovery Signal

New in version C++SDK-v2.1.5.0.

1/**
2 * @brief Extended IO-Configure welding interruption recovery signal
3 * @param [in] reWeldDINum Resume welding after interruption signal extended DI number
4 * @param [in] abortWeldDINum Abort welding after interruption signal extended DI number
5 * @return Error code
6 */
7errno_t SetExtDIWeldBreakOffRecover(int reWeldDINum, int abortWeldDINum);

14.44. Set Extended IO Welding Signal Code Example

 1int TestExtDIConfig(void)
 2{
 3  ROBOT_STATE_PKG pkg = {};
 4  FRRobot robot;
 5  robot.LoggerInit();
 6  robot.SetLoggerLevel(1);
 7  int rtn = robot.RPC("192.168.58.2");
 8  if (rtn != 0)
 9  {
10    return -1;
11  }
12  robot.SetReConnectParam(true, 30000, 500);
13  robot.SetArcStartExtDoNum(10);
14  robot.SetAirControlExtDoNum(20);
15  robot.SetWireForwardFeedExtDoNum(30);
16  robot.SetWireReverseFeedExtDoNum(40);
17  robot.SetWeldReadyExtDiNum(50);
18  robot.SetArcDoneExtDiNum(60);
19  robot.SetExtDIWeldBreakOffRecover(70, 80);
20  robot.SetWireSearchExtDIONum(0, 1);
21  robot.CloseRPC();
22  return 0;
23}

14.45. Arc Tracking Control

New in version C++SDK-v2.1.5.0.

 1  /**
 2  * @brief  Arc tracking control
 3      * @param  [in] flag Switch, 0-Off; 1-On
 4      * @param  [in] dalayTime Lag time, unit 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 cyc
 8      * @param  [in] stepMaxLr Left-right maximum compensation per cycle mm
 9      * @param  [in] sumMaxLr Left-right total maximum compensation 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 cyc
13      * @param  [in] stepMaxUd Up-down maximum compensation per cycle mm
14      * @param  [in] sumMaxUd Up-down total maximum compensation
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);, cyc
18      * @param  [in] referSampleCountUd Up-down reference current sampling cycle count (feedback);, cyc
19      * @param  [in] referenceCurrent Up-down reference current mA
20      * @param  [in] offsetType Offset tracking type, 0-No offset; 1-Sampling; 2-Percentage
21      * @param  [in] offsetParameter Offset parameter; Sampling (offset sampling start time, default one cycle); Percentage (offset percentage (-100 ~ 100))
22      * @return  Error code
23      */
24     errno_t 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 = 0, int offsetParameter = 0);

14.46. Set Arc Tracking Input Signal Port

New in version C++SDK-v2.1.5.0.

1 /**
2  * @brief  Set arc tracking input signal port
3  * @param  [in] channel Arc tracking AI channel selection,[0-3]
4  * @return  Error code
5  */
6 errno_t ArcWeldTraceExtAIChannelConfig(int channel);

14.47. Arc Tracking + Multi-layer Multi-pass Compensation Start

New in version C++SDK-v2.1.5.0.

1/**
2* @brief Arc tracking + multi-layer multi-pass compensation start
3* @return Error code
4*/
5errno_t ArcWeldTraceReplayStart();

14.48. Arc Tracking + Multi-layer Multi-pass Compensation End

New in version C++SDK-v2.1.5.0.

1/**
2* @brief Arc tracking + multi-layer multi-pass compensation end
3* @return Error code
4*/
5errno_t ArcWeldTraceReplayEnd();

14.49. Offset Coordinate Transformation - Multi-layer Multi-pass Welding

New in version C++SDK-v2.1.5.0.

1/**
2* @brief Offset coordinate transformation - multi-layer multi-pass welding
3* @return Error code
4*/
5errno_t MultilayerOffsetTrsfToBase(DescTran pointO, DescTran pointX, DescTran pointZ, double dx, double dy, double db, DescPose& offset);

14.50. Multi-layer Multi-pass Welding Arc Tracking Code Example

  1int TestArcWeldTrace(void)
  2{
  3  ROBOT_STATE_PKG pkg = {};
  4  FRRobot robot;
  5  robot.LoggerInit();
  6  robot.SetLoggerLevel(1);
  7  int rtn = robot.RPC("192.168.58.2");
  8  if (rtn != 0)
  9  {
 10    return -1;
 11  }
 12  robot.SetReConnectParam(true, 30000, 500);
 13  JointPos mulitilineorigin1_joint(-24.090, -63.501, 84.288, -111.940, -93.426, 57.669);
 14  DescPose mulitilineorigin1_desc(-677.559, 190.951, -1.205, 1.144, -41.482, -82.577);
 15  DescTran mulitilineX1_desc;
 16  mulitilineX1_desc.x = -677.556;
 17  mulitilineX1_desc.y = 211.949;
 18  mulitilineX1_desc.z = -1.206;
 19  DescTran mulitilineZ1_desc;
 20  mulitilineZ1_desc.x = -677.564;
 21  mulitilineZ1_desc.y = 190.956;
 22  mulitilineZ1_desc.z = 19.817;
 23  JointPos mulitilinesafe_joint(-25.734, -63.778, 81.502, -108.975, -93.392, 56.021);
 24  DescPose mulitilinesafe_desc(-677.561, 211.950, 19.812, 1.144, -41.482, -82.577);
 25  JointPos mulitilineorigin2_joint(-29.743, -75.623, 101.241, -116.354, -94.928, 55.735);
 26  DescPose mulitilineorigin2_desc(-563.961, 215.359, -0.681, 2.845, -40.476, -87.443);
 27  DescTran mulitilineX2_desc;
 28  mulitilineX2_desc.x = -563.965;
 29  mulitilineX2_desc.y = 220.355;
 30  mulitilineX2_desc.z = -0.680;
 31  DescTran mulitilineZ2_desc;
 32  mulitilineZ2_desc.x = -563.968;
 33  mulitilineZ2_desc.y = 215.362;
 34  mulitilineZ2_desc.z = 4.331;
 35  ExaxisPos epos(0, 0, 0, 0);
 36  DescPose offset(0, 0, 0, 0, 0, 0);
 37  robot.Sleep(10);
 38  int error = robot.MoveJ(&mulitilinesafe_joint, &mulitilinesafe_desc, 13, 0, 10, 100, 100, &epos, -1, 0, &offset);
 39  printf("MoveJ return: %d\n", error);
 40  error = robot.MoveL(&mulitilineorigin1_joint, &mulitilineorigin1_desc, 13, 0, 10, 100, 100, -1, &epos, 0, 0, &offset, 0, 100);
 41  printf("MoveL return: %d\n", error);
 42  error = robot.MoveJ(&mulitilinesafe_joint, &mulitilinesafe_desc, 13, 0, 10, 100, 100, &epos, -1, 0, &offset);
 43  printf("MoveJ return: %d\n", error);
 44  error = robot.MoveL(&mulitilineorigin2_joint, &mulitilineorigin2_desc, 13, 0, 10, 100, 100, -1, &epos, 0, 0, &offset, 0, 100);
 45  printf("MoveL return: %d\n", error);
 46  error = robot.MoveJ(&mulitilinesafe_joint, &mulitilinesafe_desc, 13, 0, 10, 100, 100, &epos, -1, 0, &offset);
 47  printf("MoveJ return: %d\n", error);
 48  error = robot.MoveL(&mulitilineorigin1_joint, &mulitilineorigin1_desc, 13, 0, 10, 100, 100, -1, &epos, 0, 0, &offset, 0, 100);
 49  printf("MoveL return: %d\n", error);
 50  error = robot.ARCStart(1, 0, 3000);
 51  printf("ARCStart return: %d\n", error);
 52  error = robot.WeaveStart(0);
 53  printf("WeaveStart return: %d\n", error);
 54  error = robot.ArcWeldTraceControl(1, 0, 1, 0.06, 5, 5, 50, 1, 0.06, 5, 5, 55, 0, 0, 4, 1, 10);
 55  printf("ArcWeldTraceControl return: %d\n", error);
 56  error = robot.MoveL(&mulitilineorigin2_joint, &mulitilineorigin2_desc, 13, 0, 1, 100, 100, -1, &epos, 0, 0, &offset, 0, 100);
 57  printf("MoveL return: %d\n", error);
 58  error = robot.ArcWeldTraceControl(0, 0, 1, 0.06, 5, 5, 50, 1, 0.06, 5, 5, 55, 0, 0, 4, 1, 10);
 59  printf("ArcWeldTraceControl return: %d\n", error);
 60  error = robot.WeaveEnd(0);
 61  printf("WeaveEnd return: %d\n", error);
 62  error = robot.ARCEnd(1, 0, 10000);
 63  printf("ARCEnd return: %d\n", error);
 64  error = robot.MoveJ(&mulitilinesafe_joint, &mulitilinesafe_desc, 13, 0, 10, 100, 100, &epos, -1, 0, &offset);
 65  printf("MoveJ return: %d\n", error);
 66  error = robot.MultilayerOffsetTrsfToBase(mulitilineorigin1_desc.tran, mulitilineX1_desc, mulitilineZ1_desc, 10.0, 0.0, 0.0, offset);
 67  printf("MultilayerOffsetTrsfToBase return: %d offect is %f %f %f \n", error, offset.tran.x, offset.tran.y, offset.tran.z);
 68  error = robot.MoveL(&mulitilineorigin1_joint, &mulitilineorigin1_desc, 13, 0, 10, 100, 100, -1, &epos, 0, 1, &offset, 0, 100);
 69  printf("MoveL return: %d\n", error);
 70  error = robot.ARCStart(1, 0, 3000);
 71  printf("ARCStart return: %d\n", error);
 72  error = robot.MultilayerOffsetTrsfToBase(mulitilineorigin2_desc.tran, mulitilineX2_desc, mulitilineZ2_desc, 10, 0, 0, offset);
 73  printf("MultilayerOffsetTrsfToBase return: %d offect is %f %f %f \n", error, offset.tran.x, offset.tran.y, offset.tran.z);
 74  error = robot.ArcWeldTraceReplayStart();
 75  printf("ArcWeldTraceReplayStart return: %d\n", error);
 76  error = robot.MoveL(&mulitilineorigin2_joint, &mulitilineorigin2_desc, 13, 0, 2, 100, 100, -1, &epos, 0, 1, &offset, 0, 100);
 77  printf("MoveL return: %d\n", error);
 78  error = robot.ArcWeldTraceReplayEnd();
 79  printf("ArcWeldTraceReplayEnd return: %d\n", error);
 80  error = robot.ARCEnd(1, 0, 10000);
 81  printf("ARCEnd return: %d\n", error);
 82  error = robot.MoveJ(&mulitilinesafe_joint, &mulitilinesafe_desc, 13, 0, 10, 100, 100, &epos, -1, 0, &offset);
 83  printf("MoveJ return: %d\n", error);
 84  error = robot.MultilayerOffsetTrsfToBase(mulitilineorigin1_desc.tran, mulitilineX1_desc, mulitilineZ1_desc, 0, 10, 0, offset);
 85  printf("MultilayerOffsetTrsfToBase return: %d offect is %f %f %f \n", error, offset.tran.x, offset.tran.y, offset.tran.z);
 86  error = robot.MoveL(&mulitilineorigin1_joint, &mulitilineorigin1_desc, 13, 0, 10, 100, 100, -1, &epos, 0, 1, &offset, 0, 100);
 87  printf("MoveL return: %d\n", error);
 88  error = robot.ARCStart(1, 0, 3000);
 89  printf("ARCStart return: %d\n", error);
 90  error = robot.MultilayerOffsetTrsfToBase(mulitilineorigin2_desc.tran, mulitilineX2_desc, mulitilineZ2_desc, 0, 10, 0, offset);
 91  printf("MultilayerOffsetTrsfToBase return: %d offect is %f %f %f \n", error, offset.tran.x, offset.tran.y, offset.tran.z);
 92  error = robot.ArcWeldTraceReplayStart();
 93  printf("MoveJ return: %d\n", error);
 94  error = robot.MoveL(&mulitilineorigin2_joint, &mulitilineorigin2_desc, 13, 0, 2, 100, 100, -1, &epos, 0, 1, &offset, 0, 100);
 95  printf("MoveL return: %d\n", error);
 96  error = robot.ArcWeldTraceReplayEnd();
 97  printf("ArcWeldTraceReplayEnd return: %d\n", error);
 98  error = robot.ARCEnd(1, 0, 3000);
 99  printf("ARCEnd return: %d\n", error);
100  error = robot.MoveJ(&mulitilinesafe_joint, &mulitilinesafe_desc, 13, 0, 10, 100, 100, &epos, -1, 0, &offset);
101  printf("MoveJ return: %d\n", error);
102  robot.CloseRPC();
103  return 0;
104}

14.51. Arc Tracking Welder Current Feedback AI Channel Selection

1/**
2 * @brief Arc tracking welder current feedback AI channel selection
3 * @param [in]  channel Channel; 0-Extended AI0; 1-Extended AI1; 2-Extended AI2; 3-Extended AI3; 4-Control box AI0; 5-Control box AI1
4 * @return Error code
5 */
6 errno_t ArcWeldTraceAIChannelCurrent(int channel);

14.52. Arc Tracking Welder Voltage Feedback AI Channel Selection

1/**
2 * @brief Arc tracking welder voltage feedback AI channel selection
3 * @param [in]  channel Channel; 0-Extended AI0; 1-Extended AI1; 2-Extended AI2; 3-Extended AI3; 4-Control box AI0; 5-Control box AI1
4 * @return Error code
5 */
6 errno_t ArcWeldTraceAIChannelVoltage(int channel);

14.53. Arc Tracking Welder Current Feedback Conversion Parameters

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 value, default 0V, range [0-200V]
6  * @param [in] currentHigh AI channel upper limit corresponding welder current value, default 100V, range [0-200V]
7  * @return Error code
8  */
9 errno_t ArcWeldTraceCurrentPara(float AILow, float AIHigh, float currentLow, float currentHigh);

14.54. Arc Tracking Welder Voltage Feedback Conversion Parameters

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 value, default 0V, range [0-200V]
6* @param [in] voltageHigh AI channel upper limit corresponding welder voltage value, default 100V, range [0-200V]
7* @return Error code
8*/
9errno_t ArcWeldTraceVoltagePara(float AILow, float AIHigh, float voltageLow, float voltageHigh);

14.55. Arc Tracking Code Example

 1int WeldTraceControlWithCtrlBoxAI(FRRobot* robot)
 2{
 3  DescPose startdescPose = { -473.86, 257.879, -20.849, -37.317, -42.021, 2.543 };
 4  JointPos startjointPos = { -43.487, -76.526, 95.568, -104.445, -89.356, 3.72 };
 5
 6  DescPose enddescPose = { -499.844, 141.225, 7.72, -34.856, -40.17, 13.13 };
 7  JointPos endjointPos = { -31.305, -82.998, 99.401, -104.426, -89.35, 3.696 };
 8
 9  DescPose safedescPose = { -504.043, 275.181, 40.908, -28.002, -42.025, -14.044 };
10  JointPos safejointPos = { -39.078, -76.732, 87.227, -99.47, -94.301, 18.714 };
11
12  ExaxisPos exaxisPos = { 0, 0, 0, 0 };
13  DescPose offdese = { 0, 0, 0, 0, 0, 0 };
14
15  robot->WeldingSetCurrentRelation(0, 495, 1, 10, 0);
16  robot->WeldingSetVoltageRelation(10, 45, 1, 10, 1);
17
18  robot->WeldingSetVoltage(0, 25, 1, 0);// ----Set voltage
19  robot->WeldingSetCurrent(0, 260, 0, 0);// ----Set current
20
21  int rtn = robot->ArcWeldTraceAIChannelCurrent(4);
22  cout << "ArcWeldTraceAIChannelCurrent rtn is " << rtn << endl;
23  rtn = robot->ArcWeldTraceAIChannelVoltage(5);
24  cout << "ArcWeldTraceAIChannelVoltage rtn is " << rtn << endl;
25  rtn = robot->ArcWeldTraceCurrentPara(0, 5, 0, 500);
26  cout << "ArcWeldTraceCurrentPara rtn is " << rtn << endl;
27  rtn = robot->ArcWeldTraceVoltagePara(1.018, 10, 0, 50);
28  cout << "ArcWeldTraceVoltagePara rtn is " << rtn << endl;
29  robot->MoveJ(&safejointPos, &safedescPose, 1, 0, 5, 100, 100, &exaxisPos, -1, 0, &offdese);
30  robot->MoveJ(&startjointPos, &startdescPose, 1, 0, 5, 100, 100, &exaxisPos, -1, 0, &offdese);
31  rtn = robot->ArcWeldTraceControl(1, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0);
32  cout << "ArcWeldTraceControl rtn is " << rtn << endl;
33  robot->ARCStart(0, 0, 10000);
34  robot->WeaveStart(0);
35  robot->MoveL(&endjointPos, &enddescPose, 1, 0, 100, 100, 2, -1, &exaxisPos, 0, 0, &offdese);
36  robot->ARCEnd(0, 0, 10000);
37  robot->WeaveEnd(0);
38  robot->ArcWeldTraceControl(0, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0);
39  return 0;
40}

14.56. Set Wire Search Extended IO Port

New in version C++SDK-v2.1.5.0.

1/**
2* @brief Set wire search extended IO port
3* @param searchDoneDINum  Wire search success DO port (0-127)
4* @param searchStartDONum  Wire search start/stop control DO port (0-127)
5* @return Error code
6*/
7errno_t SetWireSearchExtDIONum(int searchDoneDINum, int searchStartDONum);

14.57. Example Program

New in version C++SDK-v2.1.5.0.

 1void TestUDPWireSearch(FRRobot* robot)
 2{
 3robot->ExtDevSetUDPComParam("192.168.58.88", 2021, 2, 50, 5, 50, 1, 50, 10);
 4robot->ExtDevLoadUDPDriver();
 5
 6robot->SetWireSearchExtDIONum(0, 0);
 7
 8int rtn0, rtn1, rtn2 = 0;
 9ExaxisPos exaxisPos = { 0.0, 0.0, 0.0, 0.0 };
10DescPose offdese = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
11
12DescPose descStart = { -158.767, -510.596, 271.709, -179.427, -0.745, -137.349 };
13JointPos jointStart = { 61.667, -79.848, 108.639, -119.682, -89.700, -70.985 };
14
15DescPose descEnd = { 0.332, -516.427, 270.688, 178.165, 0.017, -119.989 };
16JointPos jointEnd = { 79.021, -81.839, 110.752, -118.298, -91.729, -70.981 };
17
18robot->MoveL(&jointStart, &descStart, 1, 0, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese);
19robot->MoveL(&jointEnd, &descEnd, 1, 0, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese);
20
21DescPose descREF0A = { -66.106, -560.746, 270.381, 176.479, -0.126, -126.745 };
22JointPos jointREF0A = { 73.531, -75.588, 102.941, -116.250, -93.347, -69.689 };
23
24DescPose descREF0B = { -66.109, -528.440, 270.407, 176.479, -0.129, -126.744 };
25JointPos jointREF0B = { 72.534, -79.625, 108.046, -117.379, -93.366, -70.687 };
26
27DescPose descREF1A = { 72.975, -473.242, 270.399, 176.479, -0.129, -126.744 };
28JointPos jointREF1A = { 87.169, -86.509, 115.710, -117.341, -92.993, -56.034 };
29
30DescPose descREF1B = { 31.355, -473.238, 270.405, 176.480, -0.130, -126.745 };
31JointPos jointREF1B = { 82.117, -87.146, 116.470, -117.737, -93.145, -61.090 };
32
33rtn0 = robot->WireSearchStart(0, 10, 100, 0, 10, 100, 0);
34robot->MoveL(&jointREF0A, &descREF0A, 1, 0, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese); //Start point
35robot->MoveL(&jointREF0B, &descREF0B, 1, 0, 10, 100, 100, -1, &exaxisPos, 1, 0, &offdese); //Location point
36rtn1 = robot->WireSearchWait("REF0");
37rtn2 = robot->WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
38
39rtn0 = robot->WireSearchStart(0, 10, 100, 0, 10, 100, 0);
40robot->MoveL(&jointREF1A, &descREF1A, 1, 0, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese); //Start point
41robot->MoveL(&jointREF1B, &descREF1B, 1, 0, 10, 100, 100, -1, &exaxisPos, 1, 0, &offdese); //Location point
42rtn1 = robot->WireSearchWait("REF1");
43rtn2 = robot->WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
44
45rtn0 = robot->WireSearchStart(0, 10, 100, 0, 10, 100, 0);
46robot->MoveL(&jointREF0A, &descREF0A, 1, 0, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese); //Start point
47robot->MoveL(&jointREF0B, &descREF0B, 1, 0, 10, 100, 100, -1, &exaxisPos, 1, 0, &offdese); //Location point
48rtn1 = robot->WireSearchWait("RES0");
49rtn2 = robot->WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
50
51rtn0 = robot->WireSearchStart(0, 10, 100, 0, 10, 100, 0);
52robot->MoveL(&jointREF1A, &descREF1A, 1, 0, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese); //Start point
53robot->MoveL(&jointREF1B, &descREF1B, 1, 0, 10, 100, 100, -1, &exaxisPos, 1, 0, &offdese); //Location point
54rtn1 = robot->WireSearchWait("RES1");
55rtn2 = robot->WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
56
57vector <string> varNameRef = { "REF0", "REF1", "#", "#", "#", "#" };
58vector <string> varNameRes = { "RES0", "RES1", "#", "#", "#", "#" };
59int offectFlag = 0;
60DescPose offectPos = { 0, 0, 0, 0, 0, 0 };
61rtn0 = robot->GetWireSearchOffset(0, 0, varNameRef, varNameRes, offectFlag, offectPos);
62robot->PointsOffsetEnable(0, &offectPos);
63robot->MoveL(&jointStart, &descStart, 1, 0, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese);
64robot->MoveL(&jointEnd, &descEnd, 1, 0, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese);
65robot->PointsOffsetDisable();
66}

14.58. Wire Search Start

New in version C++SDK-v2.1.5.0.

 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; -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*/
12 errno_t WireSearchStart(int refPos, float searchVel, int searchDis, int autoBackFlag, float autoBackVel, int autoBackDis, int offectFlag);

14.59. Wire Search End

New in version C++SDK-v2.1.5.0.

 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; -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  */
12 errno_t WireSearchEnd(int refPos, float searchVel, int searchDis, int autoBackFlag, float autoBackVel, int autoBackDis, int offectFlag);

14.60. Calculate Wire Search Offset

New in version C++SDK-v2.1.5.0.

 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 point 1-6, "#" means no point variable
 6  * @param  [in] varNameRes Contact point 1-6, "#" means no point variable
 7  * @param  [out] offectFlag 0-Offset directly added to command point; 1-Offset requires coordinate transformation of command point
 8  * @param  [out] offect Offset pose [x, y, z, a, b, c]
 9  * @return  Error code
10  */
11 errno_t GetWireSearchOffset(int seamType, int method, std::vector<std::string> varNameRef, std::vector<std::string> varNameRes, int& offectFlag, DescPose& offect);

14.61. Wait for Wire Search Completion

New in version C++SDK-v2.1.5.0.

1 /**
2  * @brief  Wait for wire search completion
3  * @return  Error code
4  */
5 errno_t WireSearchWait(std::string varName);

14.62. Write Wire Search Contact Point to Database

New in version C++SDK-v2.1.5.0.

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, x, a, b, c]
5  * @return  Error code
6  */
7 errno_t SetPointToDatabase(std::string varName, DescPose pos);

14.63. Robot Wire Search Code Example

New in version C++SDK-v2.1.5.0.

 1int TestWireSearch(void)
 2{
 3  ROBOT_STATE_PKG pkg = {};
 4  FRRobot robot;
 5  robot.LoggerInit();
 6  robot.SetLoggerLevel(1);
 7  int rtn = robot.RPC("192.168.58.2");
 8  if (rtn != 0)
 9  {
10    return -1;
11  }
12  robot.SetReConnectParam(true, 30000, 500);
13  DescPose toolCoord(0, 0, 200, 0, 0, 0);
14  robot.SetToolCoord(1, &toolCoord, 0, 0, 1, 0);
15  DescPose wobjCoord(0, 0, 0, 0, 0, 0);
16  robot.SetWObjCoord(1, &wobjCoord, 0);
17  int rtn0, rtn1, rtn2 = 0;
18  ExaxisPos exaxisPos = { 0, 0, 0, 0 };
19  DescPose offdese = { 0, 0, 0, 0, 0, 0 };
20  DescPose descStart = { 216.543, 445.175, 93.465, 179.683, 1.757, -112.641 };
21  JointPos jointStart = { -128.345, -86.660, 114.679, -119.625, -89.219, 74.303 };
22  DescPose descEnd = { 111.143, 523.384, 87.659, 179.703, 1.835, -97.750 };
23  JointPos jointEnd = { -113.454, -81.060, 109.328, -119.954, -89.218, 74.302 };
24  robot.MoveL(&jointStart, &descStart, 1, 1, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese);
25  robot.MoveL(&jointEnd, &descEnd, 1, 1, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese);
26  DescPose descREF0A = { 142.135, 367.604, 86.523, 179.728, 1.922, -111.089 };
27  JointPos jointREF0A = { -126.794, -100.834, 128.922, -119.864, -89.218, 74.302 };
28  DescPose descREF0B = { 254.633, 463.125, 72.604, 179.845, 2.341, -114.704 };
29  JointPos jointREF0B = { -130.413, -81.093, 112.044, -123.163, -89.217, 74.303 };
30  DescPose descREF1A = { 92.556, 485.259, 47.476, -179.932, 3.130, -97.512 };
31  JointPos jointREF1A = { -113.231, -83.815, 119.877, -129.092, -89.217, 74.303 };
32  DescPose descREF1B = { 203.103, 583.836, 63.909, 179.991, 2.854, -103.372 };
33  JointPos jointREF1B = { -119.088, -69.676, 98.692, -121.761, -89.219, 74.303 };
34  rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
35  robot.MoveL(&jointREF0A, &descREF0A, 1, 1, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese); //Start point
36  robot.MoveL(&jointREF0B, &descREF0B, 1, 1, 100, 100, 100, -1, &exaxisPos, 1, 0, &offdese); //Direction point
37  rtn1 = robot.WireSearchWait("REF0");
38  rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
39  rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
40  robot.MoveL(&jointREF1A, &descREF1A, 1, 1, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese); //Start point
41  robot.MoveL(&jointREF1B, &descREF1B, 1, 1, 100, 100, 100, -1, &exaxisPos, 1, 0, &offdese); //Direction point
42  rtn1 = robot.WireSearchWait("REF1");
43  rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
44  rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
45  robot.MoveL(&jointREF0A, &descREF0A, 1, 1, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese); //Start point
46  robot.MoveL(&jointREF0B, &descREF0B, 1, 1, 100, 100, 100, -1, &exaxisPos, 1, 0, &offdese); //Direction point
47  rtn1 = robot.WireSearchWait("RES0");
48  rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
49  rtn0 = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0);
50  robot.MoveL(&jointREF1A, &descREF1A, 1, 1, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese); //Start point
51  robot.MoveL(&jointREF1B, &descREF1B, 1, 1, 100, 100, 100, -1, &exaxisPos, 1, 0, &offdese); //Direction point
52  rtn1 = robot.WireSearchWait("RES1");
53  rtn2 = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0);
54  vector <string> varNameRef = { "REF0", "REF1", "#", "#", "#", "#" };
55  vector <string> varNameRes = { "RES0", "RES1", "#", "#", "#", "#" };
56  int offectFlag = 0;
57  DescPose offectPos = { 0, 0, 0, 0, 0, 0 };
58  rtn0 = robot.GetWireSearchOffset(0, 0, varNameRef, varNameRes, offectFlag, offectPos);
59  robot.PointsOffsetEnable(0, &offectPos);
60  robot.MoveL(&jointStart, &descStart, 1, 1, 100, 100, 100, -1, &exaxisPos, 0, 0, &offdese);
61  robot.MoveL(&jointEnd, &descEnd, 1, 1, 100, 100, 100, -1, &exaxisPos, 1, 0, &offdese);
62  robot.PointsOffsetDisable();
63  robot.CloseRPC();
64  return 0;

14.64. Set Welding Voltage Gradual Change Start

 1 /**
 2* @brief Set welding voltage gradual change start
 3* @param [in] IOType Control type; 0-Control box IO; 1-Digital communication protocol (UDP);2-Digital communication protocol (ModbusTCP)
 4* @param [in] voltageStart Starting welding voltage (V)
 5* @param [in] voltageEnd Ending welding voltage (V)
 6* @param [in] AOIndex Control box AO port number (0-1)
 7* @param [in] blend Whether to smooth 0-No smoothing; 1-Smooth
 8* @return Error code
 9*/
10errno_t WeldingSetVoltageGradualChangeStart(int IOType, double voltageStart, double voltageEnd, int AOIndex, int blend);

14.65. Set Welding Voltage Gradual Change End

1 /**
2  * @brief Set welding voltage gradual change end
3  * @return Error code
4  */
5 errno_t WeldingSetVoltageGradualChangeEnd();

14.66. Set Welding Current Gradual Change Start

 1 /**
 2  * @brief Set welding current gradual change start
 3  * @param [in] IOType Control type; 0-Control box IO; 1-Digital communication protocol (UDP);2-Digital communication protocol (ModbusTCP)
 4  * @param [in] voltageStart Starting welding current (A)
 5  * @param [in] voltageEnd Ending welding current (A)
 6  * @param [in] AOIndex Control box AO port number (0-1)
 7  * @param [in] blend Whether to smooth 0-No smoothing; 1-Smooth
 8  * @return Error code
 9  */
10 errno_t WeldingSetCurrentGradualChangeStart(int IOType, double currentStart, double currentEnd, int AOIndex, int blend);

14.67. Set Welding Current Gradual Change End

1/**
2 * @brief Set welding current gradual change end
3 * @return Error code
4 */
5errno_t WeldingSetCurrentGradualChangeEnd();

14.68. Robot Welding Current Voltage Gradual Change Code Example

 1int WeldparamChange(FRRobot* robot)
 2{
 3  DescPose startdescPose = { -484.707, 276.996, -14.013, -37.657, -40.508, -1.548 };
 4  JointPos startjointPos = { -45.421, -75.673, 93.627, -104.302, -87.938, 6.005 };
 5
 6  DescPose enddescPose = { -508.767, 137.109, -13.966, -37.639, -40.508, -1.559 };
 7  JointPos endjointPos = { -32.768, -80.947, 100.254, -106.201, -87.201, 18.648 };
 8
 9  DescPose safedescPose = { -484.709, 294.436, 13.621, -37.660, -40.508, -1.545 };
10  JointPos safejointPos = { -46.604, -75.410, 89.109, -100.003, -88.012, 4.823 };
11  ExaxisPos exaxisPos = { 0, 0, 0, 0 };
12  DescPose offdese = { 0, 0, 0, 0, 0, 0 };
13
14  robot->WeldingSetCurrentRelation(0, 495, 1, 10, 0);
15  robot->WeldingSetVoltageRelation(10, 45, 1, 10, 1);
16  robot->MoveJ(&safejointPos, &safedescPose, 1, 0, 5, 100, 100, &exaxisPos, -1, 0, &offdese);
17  int rtn = robot->WeldingSetCurrentGradualChangeStart(0, 260, 220, 0, 0);
18  cout << "WeldingSetCurrentGradualChangeStart rtn is " << rtn << endl;
19  rtn = robot->WeldingSetVoltageGradualChangeStart(0, 25, 22, 1, 0);
20  cout << "WeldingSetVoltageGradualChangeStart rtn is " << rtn << endl;
21  rtn = robot->ArcWeldTraceControl(1, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0);
22  cout << "ArcWeldTraceControl rtn is " << rtn << endl;
23  robot->MoveJ(&startjointPos, &startdescPose, 1, 0, 5, 100, 100, &exaxisPos, -1, 0, &offdese);
24
25  robot->ARCStart(0, 0, 10000);
26  robot->WeaveStart(0);
27  robot->WeaveChangeStart(2, 1, 24, 36);
28  robot->MoveL(&endjointPos, &enddescPose, 1, 0, 100, 100, 2, -1, &exaxisPos, 0, 0, &offdese);
29  robot->ARCEnd(0, 0, 10000);
30  robot->WeaveChangeEnd();
31  robot->WeaveEnd(0);
32  robot->ArcWeldTraceControl(0, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0);
33  robot->WeldingSetCurrentGradualChangeEnd();
34  robot->WeldingSetVoltageGradualChangeEnd();
35  return 0;
36}

14.69. Set Custom Weave Parameters

New in version C++SDK-v3.8.6.

 1/**
 2* @brief Set Custom Weave Parameters
 3* @param [in] id Custom weave ID: 0-2
 4* @param [in] pointNum Number of weave points 0-10
 5* @param [in] point Movement endpoint data x,y,z
 6* @param [in] stayTime Weave dwell time (ms)
 7* @param [in] frequency Weave frequency (Hz)
 8* @param [in] incStayType Wait mode: 0- Cycle does not include wait time; 1- Cycle includes wait time
 9* @param [in] stationary Weave position wait: 0- Continue motion during wait time; 1- Position stationary during wait time
10* @return Error code
11*/
12errno_t CustomWeaveSetPara(int id, int pointNum, DescTran point[10], double stayTime[10], double frequency, int incStayType, int stationary);

14.70. Get Custom Weave Parameters

New in version C++SDK-v3.8.6.

 1/**
 2* @brief Get Custom Weave Parameters
 3* @param [in] id Custom weave ID: 0-2
 4* @param [out] pointNum Number of weave points 0-10
 5* @param [out] point Movement endpoint data x,y,z
 6* @param [out] stayTime Weave dwell time (ms)
 7* @param [out] frequency Weave frequency (Hz)
 8* @param [out] incStayType Wait mode: 0- Cycle does not include wait time; 1- Cycle includes wait time
 9* @param [out] stationary Weave position wait: 0- Continue motion during wait time; 1- Position stationary during wait time
10* @return Error code
11*/
12errno_t CustomWeaveGetPara(int id, int& pointNum, DescTran point[10], double stayTime[10], double& frequency, int& incStayType, int& stationary);

14.71. Custom Weave Parameters Code Example

New in version C++SDK-v3.8.6.

 1int TestCustomWeaveSetPara()
 2{
 3  ROBOT_STATE_PKG pkg = {};
 4  FRRobot robot;
 5  robot.LoggerInit();
 6  robot.SetLoggerLevel(1);
 7  int rtn = robot.RPC("192.168.58.2");
 8  if (rtn != 0)
 9  {
10    return 0;
11  }
12  robot.SetReConnectParam(true, 30000, 500);
13  DescTran point[10] = {};
14  point[0].x = -3;
15  point[0].y = -3;
16  point[0].z = 0;
17  point[1].x = -6;
18  point[1].y = 0;
19  point[1].z = 0;
20  point[2].x = -3;
21  point[2].y = 3;
22  point[2].z = 0;
23  point[3].x = 0;
24  point[3].y = 0;
25  point[3].z = 0;
26  double stayTime[10] = { 0,0,0,0,0,0,0,0,0,0 };
27  rtn = robot.CustomWeaveSetPara(2, 4, point, stayTime, 1.000, 0, 0);
28  printf("CustomWeaveSetPara rtn is %d\n", rtn);
29  robot.Sleep(1000);
30  int pointNum = 0;
31  double frequency;
32  int incStayType;
33  int stationary;
34  robot.CustomWeaveGetPara(2, pointNum, point, stayTime, frequency, incStayType, stationary);
35  printf("pointNum is %d\n", pointNum);
36  for (int i = 0; i < pointNum; i++)
37  {
38    printf("point %d, point x y z %f %f %f\n", i, point[i].x, point[i].y, point[i].z);
39  }
40  printf("fre is %f, stay is %d %d \n", frequency, incStayType, stationary);
41  robot.WeaveSetPara(0, 9, 1.000000, 1, 5.000000, 6.000000, 5.000000, 50, 100, 100, 0, 1, 0.000000, 0.000000);
42  DescPose desc_p1 = { -288.650, 367.807, 288.404, 0.000, -0.001, 0.001 };
43  DescPose desc_p2 = { -431.714, 367.815, 288.415, 0.001, 0.001, 0.000 };
44  DescPose desc_p3 = { -348.666, 427.798, 288.404, -0.000, -0.000, 0.001 };
45  JointPos j1 = { 140.656, -84.560, -91.707, -93.734, 90.000, 50.655 };
46  JointPos j2 = { 149.873, -98.298, -77.599, -94.103, 90.000, 59.873 };
47  JointPos j3 = { 139.773, -96.173, -80.014, -93.814, 90.000, 49.772 };
48  ExaxisPos epos = {};
49  DescPose offset_pos = {};
50  robot.MoveJ(&j1, &desc_p1, 3, 0, 100, 100, 100, &epos, -1, 0, &offset_pos);
51  robot.WeaveStart(0);
52  robot.Circle(&j3, &desc_p3, 3, 0, 100, 100, &epos, &j2, &desc_p2, 3, 0, 100, 100, &epos, 10, -1, &offset_pos);
53  robot.WeaveEnd(0);
54  robot.MoveJ(&j1, &desc_p1, 3, 0, 100, 100, 100, &epos, -1, 0, &offset_pos);
55  robot.WeaveStart(0);
56  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);
57  robot.WeaveEnd(0);
58  robot.MoveJ(&j1, &desc_p1, 3, 0, 100, 100, 100, &epos, -1, 0, &offset_pos);
59  robot.WeaveStart(0);
60  robot.MoveL(&j2, &desc_p2, 3, 0, 100, 100, 10, -1, &epos, 0, 0, &offset_pos, 0, 100);
61  robot.WeaveEnd(0);
62  robot.CloseRPC();
63}