14. Weld
14.1. Setting Welding Process Curve Parameters
New in version python: SDK-v2.0.5
Prototype |
|
|---|---|
Description |
Set weld process profile parameters |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Get welding process curve parameters |
Mandatory parameters |
|
Default parameters |
NULL |
Return Value |
|
14.3. Setting of welding current and output analog correspondences
Changed in version python: SDK-v2.0.5
Prototype |
|
|---|---|
Description |
Setting the welding current to correspond to the output analog |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Setting the weld voltage to correspond to the output analog |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Get weld current to output analog correspondence |
Mandatory parameters |
NULL |
Default parameters |
NULL |
Return Value |
|
14.6. Getting welding voltage and output analog correspondence
Changed in version python: SDK-v2.0.5
Prototype |
|
|---|---|
Description |
Get weld voltage to output analog correspondence |
Mandatory parameters |
NULL |
Default parameters |
NULL |
Return Value |
|
14.7. Setting the welding current
Changed in version python: SDK-v2.0.5
Prototype |
|
|---|---|
Description |
Setting the welding current |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Set weld voltage |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Setting swing parameters |
Mandatory parameters |
|
Default parameters |
|
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 |
|
|---|---|
Description |
Set swing parameters on the fly |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
The detection parameters of unexpected interruption of robot welding arc were obtained |
Mandatory parameters |
NULL |
Default parameters |
NULL |
Return Value |
|
14.13. Set the detection parameters of robot welding arc unexpected interruption
New in version python: SDK-v2.0.8
Prototype |
|
|---|---|
Description |
Set the detection parameters of robot welding arc unexpected interruption |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Obtain the robot welding interrupt recovery parameters |
Mandatory parameters |
NULL |
Default parameters |
NULL |
Return Value |
|
14.15. Set the robot welding interrupt recovery parameters
New in version python: SDK-v2.0.8
Prototype |
|
|---|---|
Description |
Set the robot welding interrupt recovery parameters |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Set welder control mode to extend DO port |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Set welding machine control mode |
Required Parameters |
|
Default Parameters |
None |
Return Value |
Error code Success-0 Failure-errcode |
14.18. Welding Start
New in version python: SDK-v2.0.1
Prototype |
|
|---|---|
Description |
Welding Start |
Required Parameters |
|
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 |
|
|---|---|
Description |
End of welding |
Mandatory parameters |
|
Default parameters |
NULL |
Return Value |
Error Code Success-0 Failure- errcode |
14.20. swing start
New in version python: SDK-v2.0.1
Prototype |
|
|---|---|
Description |
Swing Start |
Mandatory parameters |
|
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 |
|
|---|---|
description |
end of swing |
Mandatory parameter |
|
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 |
|
|---|---|
Description |
Positive Wire Feed |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Reverse Wire Feed |
Mandatory parameters |
|
Default parameters |
NULL |
Return Value |
Error Code Success-0 Failure- errcode |
14.24. aspiration
New in version python: SDK-v2.0.1
Prototype |
|
|---|---|
Description |
Air delivery |
Mandatory parameters |
|
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 |
|
|---|---|
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 |
|
|---|---|
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 |
|
|---|---|
Description |
Segmented Welding Initiation |
Mandatory parameters |
|
Default parameters |
|
Return Value |
|
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 |
|
|---|---|
Description |
Simulation of swing start |
Mandatory parameters |
|
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 |
|
|---|---|
description |
end of simulation swing |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Start Trajectory Detection Warning (No Movement) |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
End Trajectory Detection Warning (No Movement) |
Mandatory parameters |
|
Default parameters |
NULL |
Return Value |
Error Code Success-0 Failure- errcode |
14.34. Wobble start
New in version python: SDK-v2.1.2
Prototype |
|
|---|---|
Description |
Wobble start |
Mandatory parameters |
|
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 |
|
|---|---|
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 |
|
|---|---|
Description |
Extended IO-Configuration Welder Gas Detection Signal |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Extended IO-Configuration Welder Arc Start Signal |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Extended IO-Configuration Welder Reverse Wire Feed Signal |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Extended IO-Configure welder positive wire feed signal |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Extended IO-Configuration Welder Arc Start Success Signal |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Extended IO-Configuration Welder Ready Signal |
Mandatory parameters |
|
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 |
|
|---|---|
description |
Extended IO-Configuration Weld Interrupt Recovery Signal |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Arc tracking control |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Arc Tracking AI Passband Selection |
Mandatory parameters |
|
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 |
|
|---|---|
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 |
|
|---|---|
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 |
|
|---|---|
Description |
Offset Coordinate Change - Multi-Layer Multi-Pass Welding |
Mandatory parameters |
|
Default parameters |
NULL |
Return Value |
|
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 |
|
|---|---|
Description |
Selection of AI channels for current feedback in arc tracking welding machines |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Selection of AI channel for voltage feedback of arc tracking welding machine |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Current feedback conversion parameters of arc tracking welding machine |
Mandatory parameters |
NULL |
Default parameters |
|
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 |
|
|---|---|
Description |
Voltage feedback conversion parameters of arc tracking welding machine |
Mandatory parameters |
NULL |
Default parameters |
|
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 |
|
|---|---|
Description |
Setting up the Weld Wire Seeker Expansion IO Port |
Mandatory parameter |
|
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 |
|
|---|---|
Description |
Welding wire seek start |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Welding wire seek end |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Calculate the welding wire seek offset |
Mandatory parameters |
|
Default parameters |
NULL |
Return Value |
|
14.61. Waiting for wire seek to complete
New in version python: SDK-v2.0.5
Prototype |
|
|---|---|
Description |
Waiting for wire seek to complete. |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Welding wire seeker contact points written to database |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Set the welding voltage to start gradually |
Mandatory parameters |
|
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 |
|
|---|---|
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 |
|
|---|---|
Description |
Set the welding current to start gradually |
Mandatory parameters |
|
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 |
|
|---|---|
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 |
|
|---|---|
Description |
Set custom swing parameters |
Mandatory parameters |
|
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 |
|
|---|---|
Description |
Gets custom swing parameters |
Mandatory parameters |
|
Default parameters |
NULL |
Return Value |
|
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()