top of page

Python 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

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')
robot.WeldingSetProcessParam(117727100017828176261000)
robot.WeldingSetProcessParam(2188285551992913323333)
start_current = 0
start_voltage = 0
start_time = 0
weld_current = 0
weld_voltage = 0
end_current = 0
end_voltage = 0
end_time = 0
error, start_current, start_voltage, start_time, weld_current, weld_voltage, end_current,end_voltage, end_time = robot.WeldingGetProcessParam(1)
print(f"the Num 1 process param is {start_current} {start_voltage} {start_time} {weld_current} {weld_voltage} {end_current} {end_voltage} {end_time}")
error, start_current, start_voltage, start_time, weld_current, weld_voltage, end_current,end_voltage, end_time = robot.WeldingGetProcessParam(2)
print(f"the Num 2 process param is {start_current} {start_voltage} {start_time} {weld_current} {weld_voltage} {end_current} {end_voltage} {end_time}")
rtn = robot.WeldingSetCurrentRelation(04000100)
print(f"WeldingSetCurrentRelation rtn is: {rtn}")
rtn = robot.WeldingSetVoltageRelation(0400101)
print(f"WeldingSetVoltageRelation rtn is: {rtn}")
current_min = 0
current_max = 0
vol_min = 0
vol_max = 0
output_vmin = 0
output_vmax = 0
cur_index = 0
vol_index = 0
rtn,current_min, current_max, output_vmin, output_vmax, cur_index = robot.WeldingGetCurrentRelation()
print(f"WeldingGetCurrentRelation rtn is: {rtn}")
print(f"current min {current_min} current max {current_max} output vol min {output_vmin} output vol max {output_vmax}")
rtn,vol_min, vol_max, output_vmin, output_vmax, vol_index = robot.WeldingGetVoltageRelation()
print(f"WeldingGetVoltageRelation rtn is: {rtn}")
print(f"vol min {vol_min} vol max {vol_max} output vol min {output_vmin} output vol max {output_vmax}")
rtn = robot.WeldingSetCurrent(110000)
print(f"WeldingSetCurrent rtn is: {rtn}")
time.sleep(3)
rtn = robot.WeldingSetVoltage(11000)
print(f"WeldingSetVoltage rtn is: {rtn}")
rtn = robot.WeaveSetPara(002.000000010.0000000.0000000.00000000000,0.060.000000)
print(f"rtn is: {rtn}")
robot.WeaveOnlineSetPara(0010200000)
rtn = robot.WeldingSetCheckArcInterruptionParam(1200)
print(f"WeldingSetCheckArcInterruptionParam {rtn}")
rtn = robot.WeldingSetReWeldAfterBreakOffParam(15.798.20)
print(f"WeldingSetReWeldAfterBreakOffParam {rtn}")
enable = 0
length = 0
velocity = 0
move_type = 0
check_enable = 0
arc_interrupt_time_length = 0
rtn,check_enable, arc_interrupt_time_length = robot.WeldingGetCheckArcInterruptionParam()
print(f"WeldingGetCheckArcInterruptionParam checkEnable {check_enable} arcInterruptTimeLength {arc_interrupt_time_length}")
rtn,enable, length, velocity, move_type = robot.WeldingGetReWeldAfterBreakOffParam()
print(f"WeldingGetReWeldAfterBreakOffParam enable = {enable}, length = {length}, velocity = {velocity}, moveType = {move_type}")
robot.SetWeldMachineCtrlModeExtDoNum(17)
for i in range(5):
    robot.SetWeldMachineCtrlMode(0)
    time.sleep(1)
    robot.SetWeldMachineCtrlMode(1)
    time.sleep(1)
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