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 |
|
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 |
|
Default parameters | NULL |
Return Value |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
Default parameters |
|
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(1, 177, 27, 1000, 178, 28, 176, 26, 1000)
robot.WeldingSetProcessParam(2, 188, 28, 555, 199, 29, 133, 23, 333)
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(0, 400, 0, 10, 0)
print(f"WeldingSetCurrentRelation rtn is: {rtn}")
rtn = robot.WeldingSetVoltageRelation(0, 40, 0, 10, 1)
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(1, 100, 0, 0)
print(f"WeldingSetCurrent rtn is: {rtn}")
time.sleep(3)
rtn = robot.WeldingSetVoltage(1, 10, 0, 0)
print(f"WeldingSetVoltage rtn is: {rtn}")
rtn = robot.WeaveSetPara(0, 0, 2.000000, 0, 10.000000, 0.000000, 0.000000, 0, 0, 0, 0, 0,0.0, 60.000000)
print(f"rtn is: {rtn}")
robot.WeaveOnlineSetPara(0, 0, 1, 0, 20, 0, 0, 0, 0)
rtn = robot.WeldingSetCheckArcInterruptionParam(1, 200)
print(f"WeldingSetCheckArcInterruptionParam {rtn}")
rtn = robot.WeldingSetReWeldAfterBreakOffParam(1, 5.7, 98.2, 0)
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()