top of page

Python 14.63. Example of robot wire locating code

from fairino import Robot
import time
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
toolCoord = [00200000]
robot.SetToolCoord(1, toolCoord, 0010)
wobjCoord = [000000]
robot.SetWObjCoord(1, wobjCoord, 0)
exaxisPos = [0000]
offdese = [000000]
descStart = [216.543445.17593.465179.6831.757-112.641]
jointStart = [-128.345-86.660114.679-119.625-89.21974.303]
descEnd = [111.143523.38487.659179.7031.835-97.750]
jointEnd = [-113.454-81.060109.328-119.954-89.21874.302]
error = robot.MoveL(desc_pos=descStart,tool= 1,user= 1,vel= 100)
print(f"MoveL return: {error}")
error = robot.MoveL(desc_pos=descEnd,tool= 1,user= 1,vel= 100)
print(f"MoveL return: {error}")
descREF0A = [142.135367.60486.523179.7281.922-111.089]
jointREF0A = [-126.794-100.834128.922-119.864-89.21874.302]
descREF0B = [254.633463.12572.604179.8452.341-114.704]
jointREF0B = [-130.413-81.093112.044-123.163-89.21774.303]
descREF1A = [92.556485.25947.476-179.9323.130-97.512]
jointREF1A = [-113.231-83.815119.877-129.092-89.21774.303]
descREF1B = [203.103583.83663.909179.9912.854-103.372]
jointREF1B = [-119.088-69.67698.692-121.761-89.21974.303]
error = robot.WireSearchStart(0101000101000)
print(f"WireSearchStart return: {error}")
error = robot.MoveL(desc_pos=descREF0A,tool= 1,user= 1,vel= 100)
print(f"MoveL return: {error}")
error = robot.MoveL(desc_pos=descREF0B,tool= 1,user= 1,vel= 100,search=1)
print(f"MoveL return: {error}")
error = robot.WireSearchWait("REF0")
print(f"WireSearchWait return: {error}")
error = robot.WireSearchEnd(0101000101000)
print(f"WireSearchEnd return: {error}")
error = robot.WireSearchStart(0101000101000)
print(f"WireSearchStart return: {error}")
error = robot.MoveL(desc_pos= descREF1A,tool= 1,user= 1,vel= 100)
print(f"MoveL return: {error}")
error = robot.MoveL(desc_pos= descREF1B,tool= 1,user= 1,vel= 100,search=1)
print(f"MoveL return: {error}")
error = robot.WireSearchWait("REF1")
print(f"WireSearchWait return: {error}")
error = robot.WireSearchEnd(0101000101000)
error = robot.WireSearchStart(0101000101000)
print(f"WireSearchStart return: {error}")
error = robot.MoveL(desc_pos= descREF0A,tool= 1,user= 1,vel= 100)
print(f"MoveL return: {error}")
error = robot.MoveL(desc_pos= descREF0B,tool= 1,user= 1,vel= 100,search=1)
print(f"MoveL return: {error}")
error = robot.WireSearchWait("RES0")
print(f"WireSearchWait return: {error}")
error = robot.WireSearchEnd(0101000101000)
print(f"WireSearchEnd return: {error}")
error = robot.WireSearchStart(0101000101000)
print(f"WireSearchStart return: {error}")
error = robot.MoveL(desc_pos= descREF1A,tool= 1,user= 1,vel= 100)
print(f"MoveL return: {error}")
error = robot.MoveL(desc_pos= descREF1B,tool= 1,user= 1,vel= 100,search=1)
print(f"MoveL return: {error}")
error = robot.WireSearchWait("RES1")
print(f"WireSearchWait return: {error}")
error = robot.WireSearchEnd(0101000101000)
print(f"WireSearchEnd return: {error}")
varNameRef = ["REF0""REF1""#""#""#""#"]
varNameRes = ["RES0""RES1""#""#""#""#"]
offectFlag = 0
offectPos = [0.00.00.00.00.00.0]
error, offectFlag, offectPos = robot.GetWireSearchOffset(00, varNameRef, varNameRes)
print(f"GetWireSearchOffset return: {error}")
error = robot.PointsOffsetEnable(0, offectPos)
print(f"PointsOffsetEnable return: {error}")
error = robot.MoveL(desc_pos= descStart,tool= 1,user= 1,vel= 100)
print(f"MoveL return: {error}")
error = robot.MoveL(desc_pos= descEnd,tool= 1,user= 1,vel= 100,search=1)
print(f"MoveL return: {error}")
error = robot.PointsOffsetDisable()
robot.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


robotic arm
FAIRINO ROBOTIC ARMS

Contact

Location: 10637 Scripps Summit Court,

San Diego, CA. 92131
Phone: (619) 333-FAIR
Email: hello@fairino.us

© 2023 Fairino US official site Proudly created By G2T

bottom of page