14. Weld

14.1. Setting Welding Process Curve Parameters

New in version python: SDK-v2.0.5

Prototype

WeldingSetProcessParam(id, startCurrent, startVoltage, startTime, weldCurrent, weldVoltage, endCurrent, endVoltage, endTime)

Description

Set weld process profile parameters

Mandatory parameters

  • id: Welding process number (1-99)

  • startCurrent: Arc starting current (A)

  • startVoltage: startVoltage Arc-starting voltage (V)

  • startTime: startTime Arc start time (ms)

  • weldCurrent: weldCurrent Welding current (A)

  • weldVoltage: weldVoltage Welding voltage (V)

  • endCurrent: endCurrent Arc recovery current (A)

  • endVoltage: endVoltage Arc charging voltage (V)

  • endTime: endTime closing time (ms)

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.2. Obtaining Welding Process Curve Parameters

New in version python: SDK-v2.0.5

Prototype

WeldingGetProcessParam(id)

Description

Get welding process curve parameters

Mandatory parameters

  • id: Welding process number (1-99)

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • startCurrent: arc starting current (A)

  • startVoltage: Arc starting voltage (V)

  • startTime: start time (ms)

  • weldCurrent: welding current (A)

  • weldVoltage: welding voltage (V)

  • endCurrent: arc closing current (A)

  • endVoltage: arc closing voltage (V)

  • endTime: arc closing time (ms)

14.3. Setting of welding current and output analog correspondences

Changed in version python: SDK-v2.0.5

Prototype

WeldingSetCurrentRelation(currentMin, currentMax, outputVoltageMin, outputVoltageMax)

Description

Setting the welding current to correspond to the output analog

Mandatory parameters

  • currentMin: Welding current - analog output linear relationship left point current value (A)

  • currentMax: Welding current - analog output linear relationship right point current value (A)

  • outputVoltageMin: analog output voltage value (V) at the left point of the welding current-analog output linear relationship.

  • outputVoltageMax: analog output voltage value (V) at the point on the right side of the weld current-analog output linear relationship.

  • AOIndex: analog output port for welding current

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.4. Setting the welding voltage and output analog correspondence

Changed in version python: SDK-v2.0.5

Prototype

WeldingSetVoltageRelation(weldVoltageMin, weldVoltageMax, outputVoltageMin, outputVoltageMax)

Description

Setting the weld voltage to correspond to the output analog

Mandatory parameters

  • weldVoltageMin: Welding voltage - analog output linear relationship left point welding voltage value (A)

  • weldVoltageMax: Welding voltage - analog output linear relationship right point welding voltage value (A)

  • outputVoltageMin: analog output voltage value (V) at the left point of the welding voltage-analog output linear relationship.

  • outputVoltageMax: analog output voltage value (V) at the point on the right side of the weld voltage-analog output linear relationship.

  • AOIndex: welding voltage analog output port

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.5. Acquiring the correspondence between welding current and output analog quantity

Changed in version python: SDK-v2.0.5

Prototype

WeldingGetCurrentRelation()

Description

Get weld current to output analog correspondence

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • currentMin: welding current - analog output linear relationship left point current value (A)

  • currentMax: welding current - analog output linear relationship right point current value (A)

  • outputVoltageMin: analog output voltage value at the left point of the welding current-analog output linear relationship (V)

  • outputVoltageMax: analog output voltage value (V) at the point on the right side of the weld current-analog output linear relationship.

  • AOIndex: welding voltage analog output port

14.6. Getting welding voltage and output analog correspondence

Changed in version python: SDK-v2.0.5

Prototype

WeldingGetVoltageRelation()

Description

Get weld voltage to output analog correspondence

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • weldVoltageMin: Welding voltage - analog output linear relationship left point welding voltage value (V)

  • weldVoltageMax: Welding voltage - analog output linear relationship of the right point welding voltage value (V)

  • outputVoltageMin: Analog output voltage value at the left point of the welding voltage-analog output linear relationship (V)

  • outputVoltageMax: Analog output voltage value (V) at the right point of the weld current-analog output linear relationship

  • AOIndex: welding voltage analog output port

14.7. Setting the welding current

Changed in version python: SDK-v2.0.5

Prototype

WeldingSetCurrent(ioType, current, AOIndex, blend)

Description

Setting the welding current

Mandatory parameters

  • ioType: type 0 - controller IO; 1 - extended IO

  • current: Welding current value (A)

  • AOIndex: Analog output port (0-1) of the welding current control box

  • blend: smooth or not 0 - not smooth, 1 - smooth

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.8. Setting the welding voltage

Changed in version python: SDK-v2.0.5

Prototype

WeldingSetVoltage(ioType, voltage, AOIndex, blend)

Description

Set weld voltage

Mandatory parameters

  • ioType: type 0 - controller IO; 1 - extended IO

  • voltage: Welding voltage value (V)

  • AOIndex: Analog output port (0-1) of the welding current control box

  • blend: smooth or not 0 - not smooth, 1 - smooth

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.9. Setting Oscillation Parameters

Changed in version python: SDK-v2.0.5

Prototype

WeaveSetPara(weaveNum, weaveType, weaveFrequency, weaveIncStayTime, weaveRange, weaveLeftRange, weaveRightRange. additionalStayTime, weaveLeftStayTime, weaveRightStayTime, weaveCircleRadio, weaveStationary, weaveYawAngle=0)

Description

Setting swing parameters

Mandatory parameters

  • weaveNum: Pendulum welding parameter configuration number

  • weaveType: type of oscillation 0-planar triangular oscillation; 1-vertical L-shaped triangular oscillation; 2-clockwise circular oscillation; 3-counterclockwise circular oscillation; 4-planar sinusoidal oscillation; 5-vertical L-shaped sinusoidal oscillation; 6-vertical triangular oscillation; 7-vertical sinusoidal oscillation.

  • weaveFrequency: swing frequency (Hz)

  • weaveIncStayTime: wait mode 0-cycle without wait time; 1-cycle with wait time mandatory parameter

  • weaveRange: swing range (mm)

  • weaveLeftRange: vertical triangle swing left chord length(mm)

  • weaveRightRange: vertical triangle swing right chord length(mm)

  • additionalStayTime: vertical triangle swing vertical triangle point residence time(mm)

  • weaveLeftStayTime: wave left stay time (ms)

  • weaveRightStayTime: wave right stay time (ms)

  • weaveCircleRadio: Circle swing-back ratio (0-100%)

  • weaveStationary: swing position wait, 0 - position continues to move during wait time; 1 - position is stationary during wait time

Default parameters

  • weaveYawAngle: azimuth angle of the swing direction (rotation around the swing Z-axis) in °, default 0

  • weaveRotAngle: Swing direction azimuth (rotation around the X-axis of the swing), unit °, default 0

Return Value

Error Code Success-0 Failure- errcode

14.10. Example code for setting welding parameters

 1from fairino import Robot
 2import time
 3# Establish a connection with the robot controller and return a robot object if the connection is successful
 4robot = Robot.RPC('192.168.58.2')
 5robot.WeldingSetProcessParam(1, 177, 27, 1000, 178, 28, 176, 26, 1000)
 6robot.WeldingSetProcessParam(2, 188, 28, 555, 199, 29, 133, 23, 333)
 7start_current = 0
 8start_voltage = 0
 9start_time = 0
10weld_current = 0
11weld_voltage = 0
12end_current = 0
13end_voltage = 0
14end_time = 0
15error, start_current, start_voltage, start_time, weld_current, weld_voltage, end_current,end_voltage, end_time = robot.WeldingGetProcessParam(1)
16print(f"the Num 1 process param is {start_current} {start_voltage} {start_time} {weld_current} {weld_voltage} {end_current} {end_voltage} {end_time}")
17error, start_current, start_voltage, start_time, weld_current, weld_voltage, end_current,end_voltage, end_time = robot.WeldingGetProcessParam(2)
18print(f"the Num 2 process param is {start_current} {start_voltage} {start_time} {weld_current} {weld_voltage} {end_current} {end_voltage} {end_time}")
19rtn = robot.WeldingSetCurrentRelation(0, 400, 0, 10, 0)
20print(f"WeldingSetCurrentRelation rtn is: {rtn}")
21rtn = robot.WeldingSetVoltageRelation(0, 40, 0, 10, 1)
22print(f"WeldingSetVoltageRelation rtn is: {rtn}")
23current_min = 0
24current_max = 0
25vol_min = 0
26vol_max = 0
27output_vmin = 0
28output_vmax = 0
29cur_index = 0
30vol_index = 0
31rtn,current_min, current_max, output_vmin, output_vmax, cur_index = robot.WeldingGetCurrentRelation()
32print(f"WeldingGetCurrentRelation rtn is: {rtn}")
33print(f"current min {current_min} current max {current_max} output vol min {output_vmin} output vol max {output_vmax}")
34rtn,vol_min, vol_max, output_vmin, output_vmax, vol_index = robot.WeldingGetVoltageRelation()
35print(f"WeldingGetVoltageRelation rtn is: {rtn}")
36print(f"vol min {vol_min} vol max {vol_max} output vol min {output_vmin} output vol max {output_vmax}")
37rtn = robot.WeldingSetCurrent(1, 100, 0, 0)
38print(f"WeldingSetCurrent rtn is: {rtn}")
39time.sleep(3)
40rtn = robot.WeldingSetVoltage(1, 10, 0, 0)
41print(f"WeldingSetVoltage rtn is: {rtn}")
42rtn = robot.WeaveSetPara(0, 0, 2.000000, 0, 10.000000, 0.000000, 0.000000, 0, 0, 0, 0, 0,0.0, 60.000000)
43print(f"rtn is: {rtn}")
44robot.WeaveOnlineSetPara(0, 0, 1, 0, 20, 0, 0, 0, 0)
45rtn = robot.WeldingSetCheckArcInterruptionParam(1, 200)
46print(f"WeldingSetCheckArcInterruptionParam {rtn}")
47rtn = robot.WeldingSetReWeldAfterBreakOffParam(1, 5.7, 98.2, 0)
48print(f"WeldingSetReWeldAfterBreakOffParam {rtn}")
49enable = 0
50length = 0
51velocity = 0
52move_type = 0
53check_enable = 0
54arc_interrupt_time_length = 0
55rtn,check_enable, arc_interrupt_time_length = robot.WeldingGetCheckArcInterruptionParam()
56print(f"WeldingGetCheckArcInterruptionParam checkEnable {check_enable} arcInterruptTimeLength {arc_interrupt_time_length}")
57rtn,enable, length, velocity, move_type = robot.WeldingGetReWeldAfterBreakOffParam()
58print(f"WeldingGetReWeldAfterBreakOffParam enable = {enable}, length = {length}, velocity = {velocity}, moveType = {move_type}")
59robot.SetWeldMachineCtrlModeExtDoNum(17)
60for i in range(5):
61    robot.SetWeldMachineCtrlMode(0)
62    time.sleep(1)
63    robot.SetWeldMachineCtrlMode(1)
64    time.sleep(1)
65robot.CloseRPC()

14.11. Instant setup of swing parameters

New in version python: SDK-v2.0.1

Prototype

WeaveOnlineSetPara (weaveNum, weaveType, weaveFrequency, weaveIncStayTime, weaveRange, weaveLeftStayTime, weaveRightStayTime. weaveCircleRadio, weaveStationary)

Description

Set swing parameters on the fly

Mandatory parameters

  • weaveNum: Pendulum welding parameter configuration number

  • weaveType: type of oscillation 0-planar triangular oscillation; 1-vertical L-shaped triangular oscillation; 2-clockwise circular oscillation; 3-counterclockwise circular oscillation; 4-planar sinusoidal oscillation; 5-vertical L-shaped sinusoidal oscillation; 6-vertical triangular oscillation; 7-vertical sinusoidal oscillation.

  • weaveFrequency: swing frequency (Hz)

  • weaveIncStayTime: wait mode 0-cycle without wait time; 1-cycle with wait time mandatory parameter

  • weaveRange: swing range (mm)

  • weaveLeftStayTime: wave left stay time (ms)

  • weaveRightStayTime: wave right stay time (ms)

  • weaveCircleRadio: Circle swing-back ratio (0-100%)

  • weaveStationary: swing position wait, 0 - position continues to move during wait time; 1 - position is stationary during wait time

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.12. The detection parameters of unexpected interruption of robot welding arc were obtained

New in version python: SDK-v2.0.8

Prototype

WeldingGetCheckArcInterruptionParam()

Description

The detection parameters of unexpected interruption of robot welding arc were obtained

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • Error Code Success-0 Failure- errcode

  • checkEnable: Whether to enable detection. 0: Indicates that the function is disabled. 1- Enable

  • arcInterruptTimeLength:Arc break confirmation time (ms)

14.13. Set the detection parameters of robot welding arc unexpected interruption

New in version python: SDK-v2.0.8

Prototype

WeldingSetCheckArcInterruptionParam(checkEnable, arcInterruptTimeLength)

Description

Set the detection parameters of robot welding arc unexpected interruption

Mandatory parameters

  • checkEnable: Whether to enable detection. 0: Indicates that the function is disabled. 1- Enable

  • arcInterruptTimeLength:Arc break confirmation time (ms)

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.14. Obtain the robot welding interrupt recovery parameters

New in version python: SDK-v2.0.8

Prototype

WeldingGetReWeldAfterBreakOffParam()

Description

Obtain the robot welding interrupt recovery parameters

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • Error Code Success-0 Failure- errcode

  • enable: Whether to enable recovery from welding interruption

  • length: weld overlap distance (mm)

  • velocity: Percentage of robot return to rearcing point (0-100)

  • moveType: The way the robot moves to the rearcing point; 0-LIN; 1-PTP

14.15. Set the robot welding interrupt recovery parameters

New in version python: SDK-v2.0.8

Prototype

WeldingSetReWeldAfterBreakOffParam(enable, length, velocity, moveType)

Description

Set the robot welding interrupt recovery parameters

Mandatory parameters

  • enable:Whether to enable recovery from welding interruption

  • length: weld overlap distance (mm)

  • velocity: Percentage of robot return to rearcing point (0-100)

  • moveType: The way the robot moves to the rearcing point; 0-LIN; 1-PTP

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.16. Set welder control mode to expand DO port

New in version python: SDK-v2.0.5

Prototype

SetWeldMachineCtrlModeExtDoNum(DONum)

Description

Set welder control mode to extend DO port

Mandatory parameters

  • DONum: welder control mode DO port (0-127)

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.17. Setting the welder control mode

New in version python: SDK-v2.0.5

Prototype

SetWeldMachineCtrlMode(mode, ioType)

Description

Set welding machine control mode

Required Parameters

  • ioType: Control type; 0-Control box IO; 1-Digital communication protocol (UDP); 2-Digital communication protocol (ModbusTCP)

  • mode: Welding machine control mode; 0-One-knob mode

Default Parameters

None

Return Value

Error code Success-0 Failure-errcode

14.18. Welding Start

New in version python: SDK-v2.0.1

Prototype

ARCStart(ioType, arcNum, timeout)

Description

Welding Start

Required Parameters

  • ioType: io type 0 - controller IO; 1 - extended IO

  • arcNum: Welder profile number

  • timeout: timeout for starting an arc

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.19. End of welding

New in version python: SDK-v2.0.1

prototype

ARCEnd(ioType, arcNum, timeout)

Description

End of welding

Mandatory parameters

  • ioType: type 0 - controller IO; 1 - extended IO

  • arcNum: Welder profile number

  • timeout: timeout for starting an arc

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.20. swing start

New in version python: SDK-v2.0.1

Prototype

WeaveStart(weaveNum)

Description

Swing Start

Mandatory parameters

  • weaveNum: type 0 - controller IO; 1 - extended IO

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.21. end of swing (math.)

New in version python: SDK-v2.0.1

Prototype

WeaveEnd(weaveNum)

description

end of swing

Mandatory parameter

  • weaveNum: Pendulum welding parameter configuration number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.22. Positive wire feed

New in version python: SDK-v2.0.1

Prototype

SetForwardWireFeed(ioType, wireFeed)

Description

Positive Wire Feed

Mandatory parameters

  • ioType: 0 - controller IO; 1 - extended IO

  • wireFeed: wire feed control 0 - stop wire feed; 1 - wire feed.

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.23. Reverse wire feed

New in version python: SDK-v2.0.1

Prototype

SetReverseWireFeed(ioType, wireFeed)

Description

Reverse Wire Feed

Mandatory parameters

  • ioType: 0 - controller IO; 1 - extended IO

  • wireFeed: wire feed control 0 - stop wire feed; 1 - wire feed.

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.24. aspiration

New in version python: SDK-v2.0.1

Prototype

SetAspirated(ioType, airControl)

Description

Air delivery

Mandatory parameters

  • ioType: 0 - controller IO; 1 - extended IO

  • airControl: air delivery control 0 - stop air delivery; 1 - air delivery

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.25. Set the robot to resume welding after welding interruption

New in version python: SDK-v2.0.8

Prototype

WeldingStartReWeldAfterBreakOff()

Description

Set the robot to resume welding after welding interruption

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.26. Set the robot to exit welding after welding interruption

New in version python: SDK-v2.0.8

Prototype

WeldingAbortWeldAfterBreakOff()

Description

Set the robot to exit welding after welding interruption

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.27. Sample code for robot welding control

 1from fairino import Robot
 2# Establish a connection with the robot controller and return a robot object if the connection is successful
 3robot = Robot.RPC('192.168.58.2')
 4robot.SetForwardWireFeed(0, 1)
 5time.sleep(1)
 6robot.SetForwardWireFeed(0, 0)
 7robot.SetReverseWireFeed(0, 1)
 8time.sleep(1)
 9robot.SetReverseWireFeed(0, 0)
10robot.SetAspirated(0, 1)
11time.sleep(1)
12robot.SetAspirated(0, 0)
13robot.WeldingSetCurrent(1, 230, 0, 0)
14robot.WeldingSetVoltage(1, 24, 0, 1)
15p1Desc = [228.879, -503.594, 453.984, -175.580, 8.293, 171.267]
16p1Joint = [102.700, -85.333, 90.518, -102.365, -83.932, 22.134]
17p2Desc = [-333.302, -435.580, 449.866, -174.997, 2.017, 109.815]
18p2Joint = [41.862, -85.333, 90.526, -100.587, -90.014, 22.135]
19exaxisPos = [0, 0, 0, 0]
20offdese = [0, 0, 0, 0, 0, 0]
21robot.MoveJ(joint_pos=p1Joint, tool=13, user=0)
22robot.ARCStart(1, 0, 10000)
23robot.WeaveStart(0)
24robot.MoveL(desc_pos=p2Desc, tool=13, user=0)
25robot.ARCEnd(1, 0, 10000)
26robot.WeaveEnd(0)
27robot.WeldingStartReWeldAfterBreakOff()
28robot.WeldingAbortWeldAfterBreakOff()
29robot.CloseRPC()

14.28. Segmented welding startup

New in version python: SDK-v2.0.1

Prototype

SegmentWeldStart(startDesePos, endDesePos, startJPos, endJPos, weldLength, noWeldLength, weldIOType, arcNum, weldTimeout, isWeave. weaveNum,tool,user,vel=20.0, acc=0.0, ovl=100.0, blendR=-1.0,exaxis_pos=[0.0, 0.0, 0.0, 0.0], search=0, offset_flag=0, offset_pos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0])

Description

Segmented Welding Initiation

Mandatory parameters

  • startDesePos: Initial Cartesian position in [mm][°].

  • endDesePos: target Cartesian position in [mm][°].

  • startJPos: initial joint position in [°].

  • endJPos: target joint position in [°]

  • weldLength: weld length in [mm]

  • noWeldLength: non-weld length in [mm]

  • weldIOType: weld IO type (0-control box IO; 1-expansion IO) arcNum welder profile number

  • timeout: timeout for arc extinguishing

  • isWeave: welded False – not welded

  • weaveNum: Pendulum welding parameter configuration number

  • tool: tool number, [0 to 14]

  • user: artifact number, [0 to 14]

Default parameters

  • vel: percentage of speed, [0~100] default 20.0

  • acc: acceleration [0~100] Not open Default 0.0

  • ovl: velocity scaling factor, [0~100] default 100.0

  • blendR: [-1.0] - motion in place (blocking), [0~1000] - smoothing radius (non-blocking), unit [mm] default -1.0

  • exaxis_pos: external axis 1 position ~ external axis 4 position Default [0.0,0.0,0.0,0.0]

  • search: [0] - no wire seek, [1] - wire seek

  • offset_flag: [0] - no offset, [1] - offset in workpiece/base coordinate system, [2] - offset in tool coordinate system Default 0

  • offset_pos: position offset in [mm][°] default [0.0,0.0,0.0,0.0,0.0,0.0]

Return Value

  • errcode Success-0 Failure- errcode

14.29. Sample robot segment welding code

 1from fairino import Robot
 2import time
 3# Establish a connection with the robot controller and return a robot object if the connection is successful
 4robot = Robot.RPC('192.168.58.2')
 5robot.WeldingSetCurrent(1, 230, 0, 0)
 6robot.WeldingSetVoltage(1, 24, 0, 1)
 7p1Desc = [228.879, -503.594, 453.984, -175.580, 8.293, 171.267]
 8p1Joint = [102.700, -85.333, 90.518, -102.365, -83.932, 22.134]
 9p2Desc = [-333.302, -435.580, 449.866, -174.997, 2.017, 109.815]
10p2Joint = [41.862, -85.333, 90.526, -100.587, -90.014, 22.135]
11exaxisPos = [0, 0, 0, 0]
12offdese = [0, 0, 0, 0, 0, 0]
13rtn = robot.SegmentWeldStart(p1Desc, p2Desc, p1Joint, p2Joint, 20, 20, 0, 0, 5000, 0, 0, 0, 0)
14print(f"SegmentWeldStart rtn is {rtn}")
15robot.CloseRPC()

14.30. Simulated swing start

New in version python: SDK-v2.0.5

Prototype

WeaveStartSim(weaveNum)

Description

Simulation of swing start

Mandatory parameters

  • weaveNum: swing parameter number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.31. End of simulation swing

New in version python: SDK-v2.0.5

Prototype

WeaveEndSim(weaveNum)

description

end of simulation swing

Mandatory parameters

  • weaveNum: swing parameter number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.32. Start trajectory detection warning (no movement)

New in version python: SDK-v2.0.5

Prototype

WeaveInspectStart(weaveNum)

Description

Start Trajectory Detection Warning (No Movement)

Mandatory parameters

  • weaveNum: swing parameter number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.33. End trajectory detection warning (no movement)

New in version python: SDK-v2.0.5

Prototype

WeaveInspectEnd(weaveNum)

Description

End Trajectory Detection Warning (No Movement)

Mandatory parameters

  • weaveNum: swing parameter number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.34. Wobble start

New in version python: SDK-v2.1.2

Prototype

WeaveChangeStart(weaveNum)

Description

Wobble start

Mandatory parameters

  • weaveChangeFlag: Swing number 1- Variable swing parameters; 2- Variable swing parameters + welding speed

  • weaveNum: Swing number

  • velStart: Welding start speed, (cm/min)

  • velEnd: Welding end speed, (cm/min)

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.35. Robot swing gradient welding code example

 1from fairino import Robot
 2# Establish a connection with the robot controller and return a robot object if the connection is successful
 3robot = Robot.RPC('192.168.58.2')
 4p1Desc = [228.879, -503.594, 453.984, -175.580, 8.293, 171.267]
 5p1Joint = [102.700, -85.333, 90.518, -102.365, -83.932, 22.134]
 6p2Desc = [-333.302, -435.580, 449.866, -174.997, 2.017, 109.815]
 7p2Joint = [41.862, -85.333, 90.526, -100.587, -90.014, 22.135]
 8exaxisPos = [0, 0, 0, 0]
 9offdese = [0, 0, 0, 0, 0, 0]
10robot.MoveJ(joint_pos= p1Joint,tool= 13,user= 0)
11robot.WeaveStartSim(0)
12robot.MoveL(desc_pos= p2Desc,tool= 13,user= 0)
13robot.WeaveEndSim(0)
14robot.MoveJ(joint_pos= p1Joint,tool= 13,user= 0)
15robot.WeaveInspectStart(0)
16robot.MoveL(desc_pos= p2Desc,tool= 13,user= 0,)
17robot.WeaveInspectEnd(0)
18robot.WeldingSetVoltage(1, 19, 0, 0)
19robot.WeldingSetCurrent(1, 190, 0, 0)
20robot.MoveL(desc_pos= p1Desc,tool= 1,user= 1,vel= 100,acc= 100,ovl= 50)
21robot.ARCStart(1, 0, 10000)
22robot.ArcWeldTraceControl(1, 0, 1, 0.06, 5, 5, 60, 1, 0.06, 5, 5, 80, 0, 0, 4, 1, 10, 0, 0)
23robot.WeaveStart(0)
24robot.WeaveChangeStart(1, 0, 50, 30)
25robot.MoveL(desc_pos= p2Desc,tool= 1,user= 1,vel= 100)
26robot.WeaveChangeEnd()
27robot.WeaveEnd(0)
28robot.ArcWeldTraceControl(0, 0, 1, 0.06, 5, 5, 60, 1, 0.06, 5, 5, 80, 0, 0, 4, 1, 10, 0, 0)
29robot.ARCEnd(1, 0, 10000)
30robot.CloseRPC()

14.36. Wobble end

New in version python: SDK-v2.0.9-3.7.9

Prototype

WeaveChangeEnd()

Description

Wobble end

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.37. Extended IO-Configuration Welder Gas Detection Signal

New in version python: SDK-v2.0.5

Prototype

SetAirControlExtDoNum(DONum)

Description

Extended IO-Configuration Welder Gas Detection Signal

Mandatory parameters

  • DONum: gas detection signal extension DO number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.38. Extended IO-Configuration of welder arc start signal

New in version python: SDK-v2.0.5

Prototype

SetArcStartExtDoNum(DONum)

Description

Extended IO-Configuration Welder Arc Start Signal

Mandatory parameters

  • DONum: gas detection signal extension DO number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.39. Extended IO-Configuration of the welder’s reverse wire feed signal

New in version python: SDK-v2.0.5

Prototype

SetWireReverseFeedExtDoNum(DONum)

Description

Extended IO-Configuration Welder Reverse Wire Feed Signal

Mandatory parameters

  • DONum: gas detection signal extension DO number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.40. Extended IO-Configuration of the welder’s forward wire feed signal

New in version python: SDK-v2.0.5

Prototype

SetWireForwardFeedExtDoNum(DONum)

Description

Extended IO-Configure welder positive wire feed signal

Mandatory parameters

  • DONum: gas detection signal extension DO number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.41. Extended IO-Configuration of the welder’s arc start success signal

New in version python: SDK-v2.0.5

Prototype

SetArcDoneExtDiNum(DINum)

Description

Extended IO-Configuration Welder Arc Start Success Signal

Mandatory parameters

  • DINum: Welder Ready Signal Expansion DI Number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.42. Extended IO-Configuration Welder Ready Signal

New in version python: SDK-v2.0.5

Prototype

SetArcDoneExtDiNum(DINum)

Description

Extended IO-Configuration Welder Ready Signal

Mandatory parameters

  • DINum: Welder Ready Signal Expansion DI Number

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.43. Extended IO-Configuration Weld Interrupt Recovery Signal

New in version python: SDK-v2.0.5

Prototype

SetExtDIWeldBreakOffRecover(reWeldDINum, abortWeldDINum)

description

Extended IO-Configuration Weld Interrupt Recovery Signal

Mandatory parameters

  • reWeldDINum: Weld signal extension DI number for resumption of welding after a weld interruption

  • abortWeldDINum: exit weld signal extension DI number after weld interruption

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.44. Example code for setting up extended IO solder signals

 1from fairino import Robot
 2import time
 3# Establish a connection with the robot controller and return a robot object if the connection is successful
 4robot = Robot.RPC('192.168.58.2')
 5rtn = robot.SetArcStartExtDoNum(10)
 6print(f"SetArcStartExtDoNum rtn is {rtn}")
 7rtn = robot.SetAirControlExtDoNum(20)
 8print(f"SetAirControlExtDoNum rtn is {rtn}")
 9rtn = robot.SetWireForwardFeedExtDoNum(30)
10print(f"SetWireForwardFeedExtDoNum rtn is {rtn}")
11rtn = robot.SetWireReverseFeedExtDoNum(40)
12rtn = robot.SetWeldReadyExtDiNum(50)
13print(f"SetWeldReadyExtDiNum rtn is {rtn}")
14rtn = robot.SetArcDoneExtDiNum(60)
15print(f"SetArcDoneExtDiNum rtn is {rtn}")
16rtn = robot.SetExtDIWeldBreakOffRecover(70, 80)
17print(f"SetExtDIWeldBreakOffRecover rtn is {rtn}")
18rtn = robot.SetWireSearchExtDIONum(0, 1)
19print(f"SetWireSearchExtDIONum rtn is {rtn}")
20robot.CloseRPC()

14.45. Arc tracking control

New in version python: SDK-v2.0.9-3.7.9

Prototype

ArcWeldTraceControl(flag,delaytime, isLeftRight, klr, tStartLr, stepMaxLr, sumMaxLr, isUpLow, kud, tStartUd, stepMaxUd, sumMaxUd. axisSelect, referenceType, referSampleStartUd, referSampleCountUd, referenceCurrent, offsetType, offsetParameter)

Description

Arc tracking control

Mandatory parameters

  • flag: switch, 0-off; 1-on

  • delayTime: lag time in ms

  • isLeftRight: left-right deviation compensation 0 - off, 1 - on

  • klr: left/right adjustment factor (sensitivity)

  • tStartLr: left and right start compensation time cyc

  • stepMaxLr: Maximum compensation in mm for each left and right step.

  • sumMaxLr: total maximum compensation left and right mm

  • isUpLow: up and down deviation compensation 0 - off, 1 - on

  • kud: upward and downward adjustment factor (sensitivity)

  • tStartUd: up and down start compensation time cyc

  • stepMaxUd: Maximum compensation per step up and down mm

  • sumMaxUd: total maximum compensation up and down

  • axisSelect: upper and lower coordinate system selection, 0 - swing; 1 - tool; 2 - base

  • referenceType: upper and lower reference current setting mode, 0 - feedback; 1 - constant

  • referSampleStartUd: upper and lower reference current sampling start count (feedback), cyc

  • referSampleCountUd: upper and lower reference current sample cycle count (feedback), cyc

  • referenceCurrent: upper and lower reference currents mA

  • offsetType: bias tracking type, 0- no bias; 1- Sampling; 2- percent

  • offsetParameter: bias parameter; Sampling (offset sampling start time, default sampling cycle); Percentage (offset percentage (-100 ~ 100))

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.46. Arc tracking AI passband selection

New in version python: SDK-v2.0.5

Prototype

ArcWeldTraceExtAIChannelConfig(channel)

Description

Arc Tracking AI Passband Selection

Mandatory parameters

  • channel: arc tracking AI passband selection, [0-3]

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.47. Arc tracking + multi-layer multi-channel compensation on

New in version python: SDK-v2.0.5

prototype

ArcWeldTraceReplayStart()

Description

Arc Tracking + Multi-Layer Multi-Channel Compensation On

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.48. Arc Tracking + Multi-Layer Multi-Channel Compensation Off

New in version python: SDK-v2.0.5

Prototype

ArcWeldTraceReplayEnd()

Description

Arc Tracking + Multi-Layer Multi-Channel Compensation Shutdown

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

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

New in version python: SDK-v2.0.5

Prototype

MultilayerOffsetTrsfToBase(pointo, pointX, pointZ, dx, dy, db)

Description

Offset Coordinate Change - Multi-Layer Multi-Pass Welding

Mandatory parameters

  • pointo: datum Cartesian orientation

  • pointX: Cartesian position of point X in the offset direction from the reference point X.

  • pointZ: Cartesian position of point Z in the direction of offset from datum Z.

  • dx: x-direction offset (mm)

  • dz: z-direction offset (mm)

  • dry: offset around the y-axis (°)

Default parameters

NULL

Return Value

  • Error Code Success-0 Failure- errcode

  • offset: the offset of the result of the calculation

14.50. Example code for multi-layer multi-pass welding arc tracking

 1from fairino import Robot
 2import time
 3# Establish a connection with the robot controller and return a robot object if the connection is successful
 4robot = Robot.RPC('192.168.58.2')
 5mulitilineorigin1_joint = [-24.090, -63.501, 84.288, -111.940, -93.426, 57.669]
 6mulitilineorigin1_desc = [-677.559, 190.951, -1.205, 1.144, -41.482, -82.577]
 7mulitilineX1_desc = [-677.556, 211.949, -1.206]
 8mulitilineZ1_desc = [-677.564, 190.956, 19.817]
 9mulitilinesafe_joint = [-25.734, -63.778, 81.502, -108.975, -93.392, 56.021]
10mulitilinesafe_desc = [-677.561, 211.950, 19.812, 1.144, -41.482, -82.577]
11mulitilineorigin2_joint = [-29.743, -75.623, 101.241, -116.354, -94.928, 55.735]
12mulitilineorigin2_desc = [-563.961, 215.359, -0.681, 2.845, -40.476, -87.443]
13mulitilineX2_desc = [-563.965, 220.355, -0.680]
14mulitilineZ2_desc = [-563.968, 215.362, 4.331]
15epos = [0, 0, 0, 0]
16offset = [0, 0, 0, 0, 0, 0]
17time.sleep(0.01)
18error = robot.MoveJ(joint_pos= mulitilinesafe_joint,tool= 13,user= 0,vel= 10)
19print(f"MoveJ return: {error}")
20error = robot.MoveL(desc_pos= mulitilineorigin1_desc,tool= 13,user= 0,vel= 10,speedPercent=100)
21print(f"MoveL return: {error}")
22error = robot.MoveJ(joint_pos= mulitilinesafe_joint,tool= 13,user= 0,vel= 10)
23print(f"MoveJ return: {error}")
24error = robot.MoveL(desc_pos= mulitilineorigin2_desc,tool= 13,user= 0,vel= 10,speedPercent=100)
25print(f"MoveL return: {error}")
26error = robot.MoveJ(joint_pos= mulitilinesafe_joint,tool= 13,user= 0,vel= 10)
27print(f"MoveJ return: {error}")
28error = robot.MoveL(desc_pos= mulitilineorigin1_desc,tool= 13,user= 0,vel= 10,speedPercent=100)
29print(f"MoveL return: {error}")
30error = robot.ARCStart(1, 0, 3000)
31print(f"ARCStart return: {error}")
32error = robot.WeaveStart(0)
33print(f"WeaveStart return: {error}")
34error = robot.ArcWeldTraceControl(1, 0, 1, 0.06, 5, 5, 50, 1, 0.06, 5, 5, 55, 0, 0, 4, 1, 10,0,0)
35print(f"ArcWeldTraceControl return: {error}")
36error = robot.MoveL(desc_pos= mulitilineorigin2_desc,tool= 13,user= 0,vel= 1,speedPercent=100)
37print(f"MoveL return: {error}")
38error = robot.ArcWeldTraceControl(0, 0, 1, 0.06, 5, 5, 50, 1, 0.06, 5, 5, 55, 0, 0, 4, 1, 10,0,0)
39print(f"ArcWeldTraceControl return: {error}")
40error = robot.WeaveEnd(0)
41print(f"WeaveEnd return: {error}")
42error = robot.ARCEnd(1, 0, 10000)
43print(f"ARCEnd return: {error}")
44error = robot.MoveJ(joint_pos= mulitilinesafe_joint,tool= 13,user= 0,vel= 10)
45print(f"MoveJ return: {error}")
46error,offset = robot.MultilayerOffsetTrsfToBase(mulitilineorigin1_desc[:3], mulitilineX1_desc, mulitilineZ1_desc, 10.0, 0.0, 0.0)
47print(f"MultilayerOffsetTrsfToBase return: {error}")
48error = robot.MoveL(desc_pos= mulitilineorigin1_desc,tool= 13,user= 0,vel= 10,speedPercent=100)
49print(f"MoveL return: {error}")
50error = robot.ARCStart(1, 0, 3000)
51print(f"ARCStart return: {error}")
52error, offset = robot.MultilayerOffsetTrsfToBase(mulitilineorigin2_desc[:3], mulitilineX2_desc, mulitilineZ2_desc, 10, 0, 0)
53print(f"MultilayerOffsetTrsfToBase return: {error}")
54error = robot.ArcWeldTraceReplayStart()
55print(f"ArcWeldTraceReplayStart return: {error}")
56error = robot.MoveL(desc_pos= mulitilineorigin2_desc,tool= 13,user= 0,vel= 2,speedPercent=100)
57print(f"MoveL return: {error}")
58error = robot.ArcWeldTraceReplayEnd()
59print(f"ArcWeldTraceReplayEnd return: {error}")
60error = robot.ARCEnd(1, 0, 10000)
61print(f"ARCEnd return: {error}")
62error = robot.MoveJ(joint_pos= mulitilinesafe_joint,tool= 13,user= 0,vel= 10)
63print(f"MoveJ return: {error}")
64error, offset = robot.MultilayerOffsetTrsfToBase(mulitilineorigin1_desc[:3], mulitilineX1_desc, mulitilineZ1_desc, 0, 10, 0)
65print(f"MultilayerOffsetTrsfToBase return: {error}")
66error = robot.MoveL(desc_pos= mulitilineorigin1_desc,tool= 13,user= 0,vel= 10,speedPercent=100)
67print(f"MoveL return: {error}")
68error = robot.ARCStart(1, 0, 3000)
69print(f"ARCStart return: {error}")
70error, offset = robot.MultilayerOffsetTrsfToBase(mulitilineorigin2_desc[:3], mulitilineX2_desc, mulitilineZ2_desc, 0, 10, 0)
71error = robot.ArcWeldTraceReplayStart()
72print(f"ArcWeldTraceReplayStart return: {error}")
73error = robot.MoveL(desc_pos= mulitilineorigin2_desc,tool= 13,user= 0,vel= 2,speedPercent=100)
74print(f"MoveL return: {error}")
75error = robot.ArcWeldTraceReplayEnd()
76print(f"ArcWeldTraceReplayEnd return: {error}")
77error = robot.ARCEnd(1, 0, 3000)
78print(f"ARCEnd return: {error}")
79error = robot.MoveJ(joint_pos= mulitilinesafe_joint,tool= 13,user= 0,vel= 10)
80print(f"MoveJ return: {error}")
81robot.CloseRPC()

14.51. Selection of AI channels for current feedback in arc tracking welding machines

New in version python: SDK-v2.1.2

Prototype

ArcWeldTraceAIChannelCurrent(channel)

Description

Selection of AI channels for current feedback in arc tracking welding machines

Mandatory parameters

  • channel: Passage 0- Expand AI0; 1- Expand AI1; 2- Expand AI2; 3- Expand AI3; 4- Control Box AI0 5- Control Box AI1

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.52. Selection of AI channel for voltage feedback of arc tracking welding machine

New in version python: SDK-v2.1.2

Prototype

ArcWeldTraceAIChannelVoltage(channel)

Description

Selection of AI channel for voltage feedback of arc tracking welding machine

Mandatory parameters

  • channel: Passage 0- Expand AI0; 1- Expand AI1; 2- Expand AI2; 3- Expand AI3; 4- Control Box AI0 5- Control Box AI1

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.53. Current feedback conversion parameters of arc tracking welding machine

New in version python: SDK-v2.1.2

Prototype

ArcWeldTraceCurrentPara(AILow, AIHigh, currentLow, currentHigh)

Description

Current feedback conversion parameters of arc tracking welding machine

Mandatory parameters

NULL

Default parameters

  • AILow: Lower limit of AI channel, default value 0V, range [0-10V]

  • AIHigh: AI channel upper limit, default value 10V, range [0-10V]

  • currentLow: The lower limit of the AI channel corresponds to the current value of the welding machine. The default value is 0V, and the range is [0-200V]

  • currentHigh: The upper limit of the AI channel corresponds to the current value of the welding machine. The default value is 100V, and the range is [0-200V]

Return Value

Error Code Success-0 Failure- errcode

14.54. Voltage feedback conversion parameters of arc tracking welding machine

New in version python: SDK-v2.1.2

Prototype

ArcWeldTraceVoltagePara(AILow, AIHigh, voltageLow, voltageHigh)

Description

Voltage feedback conversion parameters of arc tracking welding machine

Mandatory parameters

NULL

Default parameters

  • AILow: Lower limit of AI channel, default value 0V, range [0-10V]

  • AIHigh: AI channel upper limit, default value 10V, range [0-10V]

  • voltageLow: The lower limit of the AI channel corresponds to the welding machine voltage value. The default value is 0V, and the range is [0-200V]

  • voltageHigh: The upper limit of the AI channel corresponds to the voltage value of the welding machine. The default value is 100V, and the range is [0-200V]

Return Value

Error Code Success-0 Failure- errcode

14.55. Example arc tracking code

 1from fairino import Robot
 2# Establish a connection with the robot controller and return a robot object if the connection is successful
 3robot = Robot.RPC('192.168.58.2')
 4
 5safetydescPose = [-504.043,275.181,40.908,-28.002,-42.025,-14.044]
 6safetyjointPos = [-39.078,-76.732,87.227,-99.47,-94.301,18.714]
 7startdescPose = [-473.86,257.879,-20.849,-37.317,-42.021,2.543]
 8startjointPos = [-43.487,-76.526,95.568,-104.445,-89.356,3.72]
 9enddescPose = [-499.844,141.225,7.72,-34.856,-40.17,13.13]
10endjointPos = [-31.305,-82.998,99.401,-104.426,-89.35,3.696]
11exaxisPos = [0, 0, 0, 0]
12offdese = [0, 0, 0, 0, 0, 0]
13robot.MoveJ(joint_pos=safetyjointPos, tool=1, user=0, vel=20, acc=100)
14robot.WeldingSetCurrentRelation(0, 495, 1, 10, 0)
15robot.WeldingSetVoltageRelation(10, 45, 1, 10, 1)
16robot.WeldingSetVoltage(0, 25, 1, 0)
17robot.WeldingSetCurrent(0, 260, 0, 0)
18rtn = robot.ArcWeldTraceAIChannelCurrent(4)
19print("ArcWeldTraceAIChannelCurrent rtn is", rtn)
20rtn = robot.ArcWeldTraceAIChannelVoltage(5)
21print("ArcWeldTraceAIChannelVoltage rtn is", rtn)
22rtn = robot.ArcWeldTraceCurrentPara(0, 5, 0, 500)
23print("ArcWeldTraceCurrentPara rtn is", rtn)
24rtn = robot.ArcWeldTraceVoltagePara(1.018, 10, 0, 50)
25print("ArcWeldTraceVoltagePara rtn is", rtn)
26robot.MoveJ(joint_pos=startjointPos, tool=1, user=0, vel=20, acc=100)
27robot.ArcWeldTraceControl(1, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0)
28robot.ARCStart(0, 0, 10000)
29robot.WeaveStart(0)
30robot.MoveL(desc_pos=enddescPose, tool=1, user=0, vel=100, ovl= 2, acc=100)
31robot.ARCEnd(0, 0, 10000)
32robot.WeaveEnd(0)
33robot.ArcWeldTraceControl(0, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0)
34robot.MoveJ(joint_pos=safetyjointPos, tool=1, user=0, vel=20, acc=100)

14.56. Setting Up the Weld Wire Seek Expansion IO Port

New in version python: SDK-v2.0.5

Prototype

SetWireSearchExtDIONum(searchDoneDINum, searchStartDONum)

Description

Setting up the Weld Wire Seeker Expansion IO Port

Mandatory parameter

  • searchDoneDINum: weld wire seek success DO port (0-127)

  • searchStartDONum: wire seek start/stop control DO port (0-127)

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.57. code example

 1from fairino import Robot
 2import time
 3# Establish a connection with the robot controller and return a robot object if the connection is successful
 4robot = Robot.RPC('192.168.58.2')
 5toolCoord = [0, 0, 200, 0, 0, 0]
 6robot.SetToolCoord(1, toolCoord, 0, 0, 1, 0)
 7wobjCoord = [0, 0, 0, 0, 0, 0]
 8robot.SetWObjCoord(1, wobjCoord, 0)
 9robot.ExtDevSetUDPComParam("192.168.58.88", 2021, 2, 50, 5, 50, 1, 50, 10)
10robot.ExtDevLoadUDPDriver()
11robot.SetWireSearchExtDIONum(0, 0)
12exaxisPos = [0, 0, 0, 0]
13offdese = [0, 0, 0, 0, 0, 0]
14descStart = [216.543, 445.175, 93.465, 179.683, 1.757, -112.641]
15jointStart = [-128.345, -86.660, 114.679, -119.625, -89.219, 74.303]
16descEnd = [111.143, 523.384, 87.659, 179.703, 1.835, -97.750]
17jointEnd = [-113.454, -81.060, 109.328, -119.954, -89.218, 74.302]
18error = robot.MoveL(desc_pos=descStart,tool= 1,user= 1,vel= 100)
19print(f"MoveL return: {error}")
20error = robot.MoveL(desc_pos=descEnd,tool= 1,user= 1,vel= 100)
21print(f"MoveL return: {error}")
22descREF0A = [142.135, 367.604, 86.523, 179.728, 1.922, -111.089]
23jointREF0A = [-126.794, -100.834, 128.922, -119.864, -89.218, 74.302]
24descREF0B = [254.633, 463.125, 72.604, 179.845, 2.341, -114.704]
25jointREF0B = [-130.413, -81.093, 112.044, -123.163, -89.217, 74.303]
26descREF1A = [92.556, 485.259, 47.476, -179.932, 3.130, -97.512]
27jointREF1A = [-113.231, -83.815, 119.877, -129.092, -89.217, 74.303]
28descREF1B = [203.103, 583.836, 63.909, 179.991, 2.854, -103.372]
29jointREF1B = [-119.088, -69.676, 98.692, -121.761, -89.219, 74.303]
30error = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0)
31print(f"WireSearchStart return: {error}")
32error = robot.MoveL(desc_pos=descREF0A,tool= 1,user= 1,vel= 100)
33print(f"MoveL return: {error}")
34error = robot.MoveL(desc_pos=descREF0B,tool= 1,user= 1,vel= 100,search=1)
35print(f"MoveL return: {error}")
36error = robot.WireSearchWait("REF0")
37print(f"WireSearchWait return: {error}")
38error = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0)
39print(f"WireSearchEnd return: {error}")
40error = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0)
41print(f"WireSearchStart return: {error}")
42error = robot.MoveL(desc_pos= descREF1A,tool= 1,user= 1,vel= 100)
43print(f"MoveL return: {error}")
44error = robot.MoveL(desc_pos= descREF1B,tool= 1,user= 1,vel= 100,search=1)
45print(f"MoveL return: {error}")
46error = robot.WireSearchWait("REF1")
47print(f"WireSearchWait return: {error}")
48error = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0)
49error = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0)
50print(f"WireSearchStart return: {error}")
51error = robot.MoveL(desc_pos= descREF0A,tool= 1,user= 1,vel= 100)
52print(f"MoveL return: {error}")
53error = robot.MoveL(desc_pos= descREF0B,tool= 1,user= 1,vel= 100,search=1)
54print(f"MoveL return: {error}")
55error = robot.WireSearchWait("RES0")
56print(f"WireSearchWait return: {error}")
57error = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0)
58print(f"WireSearchEnd return: {error}")
59error = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0)
60print(f"WireSearchStart return: {error}")
61error = robot.MoveL(desc_pos= descREF1A,tool= 1,user= 1,vel= 100)
62print(f"MoveL return: {error}")
63error = robot.MoveL(desc_pos= descREF1B,tool= 1,user= 1,vel= 100,search=1)
64print(f"MoveL return: {error}")
65error = robot.WireSearchWait("RES1")
66print(f"WireSearchWait return: {error}")
67error = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0)
68print(f"WireSearchEnd return: {error}")
69varNameRef = ["REF0", "REF1", "#", "#", "#", "#"]
70varNameRes = ["RES0", "RES1", "#", "#", "#", "#"]
71offectFlag = 0
72offectPos = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
73error, offectFlag, offectPos = robot.GetWireSearchOffset(0, 0, varNameRef, varNameRes)
74print(f"GetWireSearchOffset return: {error}")
75error = robot.PointsOffsetEnable(0, offectPos)
76print(f"PointsOffsetEnable return: {error}")
77error = robot.MoveL(desc_pos= descStart,tool= 1,user= 1,vel= 100)
78print(f"MoveL return: {error}")
79error = robot.MoveL(desc_pos= descEnd,tool= 1,user= 1,vel= 100,search=1)
80print(f"MoveL return: {error}")
81error = robot.PointsOffsetDisable()
82robot.CloseRPC()

14.58. Welding wire position finding start

New in version python: SDK-v2.0.5

Prototype

WireSearchStart(refPos,searchVel,searchDis,autoBackFlag,autoBackVel,autoBackDis,offectFlag)

Description

Welding wire seek start

Mandatory parameters

  • refPos: 1 - reference point 0 - contact point

  • searchVel: search velocity %

  • searchDis: search distance mm

  • autoBackFlag: autoBackFlag, 0 - not auto; - auto

  • autoBackVel: Automatic Back Velocity %

  • autoBackDis: automatic back distance mm

  • offectFlag: 1 - seek with offset; 0 - teach point seek

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.59. End of wire position finding

New in version python: SDK-v2.0.5

Prototype

WireSearchEnd(refPos,searchVel,searchDis,autoBackFlag,autoBackVel,autoBackDis,offectFlag)

Description

Welding wire seek end

Mandatory parameters

  • refPos: 1 - reference point 2 - contact point

  • searchVel: search velocity %

  • searchDis: search distance mm

  • autoBackFlag: autoBackFlag, 0 - not auto; - auto

  • autoBackVel: Automatic Back Velocity %

  • autoBackDis: automatic back distance mm

  • offectFlag: 1 - seek with offset; 2 - teach point seek

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.60. Calculate the wire finding offset

New in version python: SDK-v2.0.5

Prototype

GetWireSearchOffset(seamType, method,varNameRef,varNameRes)

Description

Calculate the welding wire seek offset

Mandatory parameters

  • seamType: weld type

  • method: method of calculation

  • varNameRef: datums 1-6, “#” denotes a pointless variable

  • varNameRes: Contacts 1-6, “#” for dotless variables

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • offsetFlag: 0 - the offset is superimposed directly on the instruction point; 1 - the offset requires a coordinate transformation of the instruction point

  • offset: offset position [x, y, z, a, b, c]

14.61. Waiting for wire seek to complete

New in version python: SDK-v2.0.5

Prototype

WireSearchWait(varname)

Description

Waiting for wire seek to complete.

Mandatory parameters

  • varName: contact name “RES0” ~ “RES99”

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.62. Wire seek contact points written to database

New in version python: SDK-v2.0.5

Prototype

SetPointToDatabase(varName,pos)

Description

Welding wire seeker contact points written to database

Mandatory parameters

  • varName: contact name “RES0” ~ “RES99”

  • pos: contact point data [x, y, x, a, b, c]

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.63. Example of robot wire locating code

 1from fairino import Robot
 2import time
 3# Establish a connection with the robot controller and return a robot object if the connection is successful
 4robot = Robot.RPC('192.168.58.2')
 5toolCoord = [0, 0, 200, 0, 0, 0]
 6robot.SetToolCoord(1, toolCoord, 0, 0, 1, 0)
 7wobjCoord = [0, 0, 0, 0, 0, 0]
 8robot.SetWObjCoord(1, wobjCoord, 0)
 9exaxisPos = [0, 0, 0, 0]
10offdese = [0, 0, 0, 0, 0, 0]
11descStart = [216.543, 445.175, 93.465, 179.683, 1.757, -112.641]
12jointStart = [-128.345, -86.660, 114.679, -119.625, -89.219, 74.303]
13descEnd = [111.143, 523.384, 87.659, 179.703, 1.835, -97.750]
14jointEnd = [-113.454, -81.060, 109.328, -119.954, -89.218, 74.302]
15error = robot.MoveL(desc_pos=descStart,tool= 1,user= 1,vel= 100)
16print(f"MoveL return: {error}")
17error = robot.MoveL(desc_pos=descEnd,tool= 1,user= 1,vel= 100)
18print(f"MoveL return: {error}")
19descREF0A = [142.135, 367.604, 86.523, 179.728, 1.922, -111.089]
20jointREF0A = [-126.794, -100.834, 128.922, -119.864, -89.218, 74.302]
21descREF0B = [254.633, 463.125, 72.604, 179.845, 2.341, -114.704]
22jointREF0B = [-130.413, -81.093, 112.044, -123.163, -89.217, 74.303]
23descREF1A = [92.556, 485.259, 47.476, -179.932, 3.130, -97.512]
24jointREF1A = [-113.231, -83.815, 119.877, -129.092, -89.217, 74.303]
25descREF1B = [203.103, 583.836, 63.909, 179.991, 2.854, -103.372]
26jointREF1B = [-119.088, -69.676, 98.692, -121.761, -89.219, 74.303]
27error = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0)
28print(f"WireSearchStart return: {error}")
29error = robot.MoveL(desc_pos=descREF0A,tool= 1,user= 1,vel= 100)
30print(f"MoveL return: {error}")
31error = robot.MoveL(desc_pos=descREF0B,tool= 1,user= 1,vel= 100,search=1)
32print(f"MoveL return: {error}")
33error = robot.WireSearchWait("REF0")
34print(f"WireSearchWait return: {error}")
35error = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0)
36print(f"WireSearchEnd return: {error}")
37error = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0)
38print(f"WireSearchStart return: {error}")
39error = robot.MoveL(desc_pos= descREF1A,tool= 1,user= 1,vel= 100)
40print(f"MoveL return: {error}")
41error = robot.MoveL(desc_pos= descREF1B,tool= 1,user= 1,vel= 100,search=1)
42print(f"MoveL return: {error}")
43error = robot.WireSearchWait("REF1")
44print(f"WireSearchWait return: {error}")
45error = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0)
46error = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0)
47print(f"WireSearchStart return: {error}")
48error = robot.MoveL(desc_pos= descREF0A,tool= 1,user= 1,vel= 100)
49print(f"MoveL return: {error}")
50error = robot.MoveL(desc_pos= descREF0B,tool= 1,user= 1,vel= 100,search=1)
51print(f"MoveL return: {error}")
52error = robot.WireSearchWait("RES0")
53print(f"WireSearchWait return: {error}")
54error = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0)
55print(f"WireSearchEnd return: {error}")
56error = robot.WireSearchStart(0, 10, 100, 0, 10, 100, 0)
57print(f"WireSearchStart return: {error}")
58error = robot.MoveL(desc_pos= descREF1A,tool= 1,user= 1,vel= 100)
59print(f"MoveL return: {error}")
60error = robot.MoveL(desc_pos= descREF1B,tool= 1,user= 1,vel= 100,search=1)
61print(f"MoveL return: {error}")
62error = robot.WireSearchWait("RES1")
63print(f"WireSearchWait return: {error}")
64error = robot.WireSearchEnd(0, 10, 100, 0, 10, 100, 0)
65print(f"WireSearchEnd return: {error}")
66varNameRef = ["REF0", "REF1", "#", "#", "#", "#"]
67varNameRes = ["RES0", "RES1", "#", "#", "#", "#"]
68offectFlag = 0
69offectPos = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
70error, offectFlag, offectPos = robot.GetWireSearchOffset(0, 0, varNameRef, varNameRes)
71print(f"GetWireSearchOffset return: {error}")
72error = robot.PointsOffsetEnable(0, offectPos)
73print(f"PointsOffsetEnable return: {error}")
74error = robot.MoveL(desc_pos= descStart,tool= 1,user= 1,vel= 100)
75print(f"MoveL return: {error}")
76error = robot.MoveL(desc_pos= descEnd,tool= 1,user= 1,vel= 100,search=1)
77print(f"MoveL return: {error}")
78error = robot.PointsOffsetDisable()
79robot.CloseRPC()

14.64. Set the welding voltage to start gradually

New in version python: SDK-v2.1.2

Prototype

WeldingSetVoltageGradualChangeStart(IOType, voltageStart, voltageEnd, AOIndex, blend)

Description

Set the welding voltage to start gradually

Mandatory parameters

  • IOType: Control type 0- Control Box IO 1- Digital Communication Protocol (UDP) 2- Digital Communication Protocol (ModbusTCP)

  • voltageStart: Initial welding voltage (V)

  • voltageEnd: Termination welding voltage (V)

  • AOIndex: The AO port number of the control box (0-1)

  • blend: Whether smooth 0- Not smooth; 1- Smooth

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.65. Set the welding voltage gradient to end

New in version python: SDK-v2.1.2

Prototype

WeldingSetVoltageGradualChangeEnd()

Description

Set the welding voltage gradient to end

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.66. Set the welding current to start gradually

New in version python: SDK-v2.1.2

Prototype

WeldingSetCurrentGradualChangeStart(IOType, currentStart, currentEnd, AOIndex, blend)

Description

Set the welding current to start gradually

Mandatory parameters

  • IOType: Control type 0- Control Box IO 1- Digital Communication Protocol (UDP) 2- Digital Communication Protocol (ModbusTCP)

  • currentStart: Initial welding current (A)

  • currentEnd: Termination welding current (A)

  • AOIndex: The AO port number of the control box (0-1)

  • blend: Whether smooth 0- Not smooth; 1- Smooth

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.67. Set the welding current to gradually end

New in version python: SDK-v2.1.2

Prototype

WeldingSetCurrentGradualChangeEnd()

Description

Set the welding current to gradually end

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.68. Robot welding current voltage gradient code example

 1from fairino import Robot
 2# Establish a connection with the robot controller and return a robot object if the connection is successful
 3robot = Robot.RPC('192.168.58.2')
 4startdescPose = [-484.707, 276.996, -14.013, -37.657, -40.508, -1.548]
 5startjointPos = [-45.421, -75.673, 93.627, -104.302, -87.938, 6.005]
 6enddescPose = [-508.767, 137.109, -13.966, -37.639, -40.508, -1.559]
 7endjointPos = [-32.768, -80.947, 100.254, -106.201, -87.201, 18.648]
 8safedescPose = [-484.709, 294.436, 13.621, -37.660, -40.508, -1.545]
 9safejointPos = [-46.604, -75.410, 89.109, -100.003, -88.012, 4.823]
10exaxisPos = [0, 0, 0, 0]
11offdese = [0, 0, 0, 0, 0, 0]
12robot.WeldingSetCurrentRelation(0, 495, 1, 10, 0)
13robot.WeldingSetVoltageRelation(10, 45, 1, 10, 1)
14robot.WeldingSetVoltage(0, 25, 1, 0)
15robot.WeldingSetCurrent(0, 260, 0, 0)
16robot.MoveJ(joint_pos=safejointPos, tool=1, user=0, vel=5, acc=100)
17rtn = robot.WeldingSetCurrentGradualChangeStart(0, 260, 220, 0, 0)
18print("WeldingSetCurrentGradualChangeStart rtn is", rtn)
19rtn = robot.WeldingSetVoltageGradualChangeStart(0, 25, 22, 1, 0)
20print("WeldingSetVoltageGradualChangeStart rtn is", rtn)
21rtn = robot.ArcWeldTraceControl(1, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0)
22print("ArcWeldTraceControl rtn is", rtn)
23robot.MoveJ(joint_pos=startjointPos, tool=1, user=0, vel=5, acc=100)
24robot.ARCStart(0, 0, 10000)
25robot.WeaveStart(0)
26robot.WeaveChangeStart(2, 1, 24, 36)
27robot.MoveL(desc_pos=enddescPose, tool=1, user=0, vel=100, ovl=2, acc=100)
28robot.ARCEnd(0, 0, 10000)
29robot.WeaveChangeEnd()
30robot.WeaveEnd(0)
31robot.ArcWeldTraceControl(0, 0, 1, 0.08, 5, 5, 300, 1, 0.06, 4, 4, 300, 1, 0, 4, 1, 10, 0, 0)
32robot.WeldingSetCurrentGradualChangeEnd()
33robot.WeldingSetVoltageGradualChangeEnd()

14.69. Set custom swing parameters

New in version python: SDK-v2.1.6

Prototype

CustomWeaveSetPara(id, pointNum, point, stayTime, frequency, incStayType, stationary)

Description

Set custom swing parameters

Mandatory parameters

  • id:Custom swing number: 0-2

  • pointNum:The number of swing points is 0-10

  • point:Move endpoint data x,y,z

  • stayTime:The swing residence time is ms

  • frequency:Swing frequency Hz

  • incStayType:Waiting mode: 0-cycle does not contain waiting time; The 1-cycle contains the waiting time

  • stationary:Swing position waiting: 0- continue to move within the waiting time; 1 -The position is stationary during the waiting time

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

14.70. Gets custom swing parameters

New in version python: SDK-v2.1.6

Prototype

CustomWeaveGetPara(id)

Description

Gets custom swing parameters

Mandatory parameters

  • id:Custom swing number: 0-2

Default parameters

NULL

Return Value

  • Error Code Success-0 Failure- errcode

  • pointNum:The number of swing points is 0-10

  • point:Move endpoint data x,y,z

  • stayTime:The swing residence time is ms

  • frequency:Swing frequency Hz

  • incStayType:Waiting mode: 0-cycle does not contain waiting time; The 1-cycle contains the waiting time

  • stationary:Swing position waiting: 0- continue to move within the waiting time; 1 -The position is stationary during the waiting time

14.71. Custom swing parameter code example

 1from fairino import Robot
 2# Establish a connection with the robot controller and return a robot object if the connection is successful
 3robot = Robot.RPC('192.168.58.2')
 4point = [0.0] * 30
 5point[0] = -3.0
 6point[1] = -3.0
 7point[2] = 0.0
 8point[3] = -6.0
 9point[4] = 0.0
10point[5] = 0.0
11point[6] = -3.0
12point[7] = 3.0
13point[8] = 0.0
14point[9] = 0.0
15point[10] = 0.0
16point[11] = 0.0
17stayTime = [0.0] * 10
18rtn = robot.CustomWeaveSetPara(2, 4, point, stayTime, 1.000, 0, 0)
19print(f"CustomWeaveSetPara rtn is {rtn}")
20time.sleep(1)
21pointNum = 0
22frequency = 0.0
23incStayType = 0
24stationary = 0
25rtn, pointNum, point, stayTime, frequency, incStayType, stationary = robot.CustomWeaveGetPara(2)
26print(f"pointNum is {pointNum}")
27for i in range(pointNum):
28    print(f"point {i}, point x y z {point[i * 3 + 0]},{point[i * 3 + 1]},{point[i * 3 + 2]}")
29print(f"fre is {frequency}, stay is {incStayType},{stationary}")
30robot.WeaveSetPara(0, 9, 1.000000, 1, 5.000000, 6.000000, 5.000000, 50, 100, 100, 0, 1, 0.000000, 0.000000)
31desc_p1 = [-288.650, 367.807, 288.404, 0.000, -0.001, 0.001]
32desc_p2 = [-431.714, 367.815, 288.415, 0.001, 0.001, 0.000]
33desc_p3 = [-348.666, 427.798, 288.404, -0.000, -0.000, 0.001]
34j1 = [140.656, -84.560, -91.707, -93.734, 90.000, 50.655]
35j2 = [149.873, -98.298, -77.599, -94.103, 90.000, 59.873]
36j3 = [139.773, -96.173, -80.014, -93.814, 90.000, 49.772]
37epos = [0.0] * 4
38offset_pos = [0.0] * 6
39robot.MoveJ(joint_pos=j1, tool=3, user=0, vel=100)
40robot.WeaveStart(0)
41robot.Circle(desc_pos_p=desc_p3, tool_p=3, user_p=0, vel_p=50, desc_pos_t=desc_p2, tool_t=3, user_t=0, vel_t=50, oacc=10)
42robot.WeaveEnd(0)
43robot.MoveJ(joint_pos=j1, tool=3, user=0, vel=100)
44robot.WeaveStart(0)
45robot.MoveC(desc_pos_p=desc_p3, tool_p=3, user_p=0, vel_p=50, desc_pos_t=desc_p2, tool_t=3, user_t=0, vel_t=50)
46robot.WeaveEnd(0)
47robot.MoveJ(joint_pos=j1, tool=3, user=0, vel=100)
48robot.WeaveStart(0)
49robot.MoveL(desc_pos=desc_p2, tool=3, user=0, vel=100, ovl=10, speedPercent=100)
50robot.WeaveEnd(0)
51robot.CloseRPC()