top of page

Python 14.68. Robot welding current voltage gradient code example

from fairino import Robot
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
startdescPose = [-484.707276.996-14.013-37.657-40.508-1.548]
startjointPos = [-45.421-75.67393.627-104.302-87.9386.005]
enddescPose = [-508.767137.109-13.966-37.639-40.508-1.559]
endjointPos = [-32.768-80.947100.254-106.201-87.20118.648]
safedescPose = [-484.709294.43613.621-37.660-40.508-1.545]
safejointPos = [-46.604-75.41089.109-100.003-88.0124.823]
exaxisPos = [0000]
offdese = [000000]
robot.WeldingSetCurrentRelation(04951100)
robot.WeldingSetVoltageRelation(10451101)
robot.WeldingSetVoltage(02510)
robot.WeldingSetCurrent(026000)
robot.MoveJ(joint_pos=safejointPos, tool=1, user=0, vel=5, acc=100)
rtn = robot.WeldingSetCurrentGradualChangeStart(026022000)
print("WeldingSetCurrentGradualChangeStart rtn is", rtn)
rtn = robot.WeldingSetVoltageGradualChangeStart(0252210)
print("WeldingSetVoltageGradualChangeStart rtn is", rtn)
rtn = robot.ArcWeldTraceControl(1010.085530010.064430010411000)
print("ArcWeldTraceControl rtn is", rtn)
robot.MoveJ(joint_pos=startjointPos, tool=1, user=0, vel=5, acc=100)
robot.ARCStart(0010000)
robot.WeaveStart(0)
robot.WeaveChangeStart(212436)
robot.MoveL(desc_pos=enddescPose, tool=1, user=0, vel=100, ovl=2, acc=100)
robot.ARCEnd(0010000)
robot.WeaveChangeEnd()
robot.WeaveEnd(0)
robot.ArcWeldTraceControl(0010.085530010.064430010411000)
robot.WeldingSetCurrentGradualChangeEnd()
robot.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

from fairino import Robot
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
point = [0.0* 30
point[0= -3.0
point[1= -3.0
point[2= 0.0
point[3= -6.0
point[4= 0.0
point[5= 0.0
point[6= -3.0
point[7= 3.0
point[8= 0.0
point[9= 0.0
point[10= 0.0
point[11= 0.0
stayTime = [0.0* 10
rtn = robot.CustomWeaveSetPara(24, point, stayTime, 1.00000)
print(f"CustomWeaveSetPara rtn is {rtn}")
time.sleep(1)
pointNum = 0
frequency = 0.0
incStayType = 0
stationary = 0
rtn, pointNum, point, stayTime, frequency, incStayType, stationary = robot.CustomWeaveGetPara(2)
print(f"pointNum is {pointNum}")
for i in range(pointNum):
    print(f"point {i}, point x y z {point[i * 3 + 0]},{point[i * 3 + 1]},{point[i * 3 + 2]}")
print(f"fre is {frequency}, stay is {incStayType},{stationary}")
robot.WeaveSetPara(091.00000015.0000006.0000005.00000050100100010.0000000.000000)
desc_p1 = [-288.650367.807288.4040.000-0.0010.001]
desc_p2 = [-431.714367.815288.4150.0010.0010.000]
desc_p3 = [-348.666427.798288.404-0.000-0.0000.001]
j1 = [140.656-84.560-91.707-93.73490.00050.655]
j2 = [149.873-98.298-77.599-94.10390.00059.873]
j3 = [139.773-96.173-80.014-93.81490.00049.772]
epos = [0.0* 4
offset_pos = [0.0* 6
robot.MoveJ(joint_pos=j1, tool=3, user=0, vel=100)
robot.WeaveStart(0)
robot.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)
robot.WeaveEnd(0)
robot.MoveJ(joint_pos=j1, tool=3, user=0, vel=100)
robot.WeaveStart(0)
robot.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)
robot.WeaveEnd(0)
robot.MoveJ(joint_pos=j1, tool=3, user=0, vel=100)
robot.WeaveStart(0)
robot.MoveL(desc_pos=desc_p2, tool=3, user=0, vel=100, ovl=10, speedPercent=100)
robot.WeaveEnd(0)
robot.CloseRPC()

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