Methods
Arc Welding Process Package Commands
getArcOnData()
def getArcOnData(self, arconDataName: str, ec: dict) -> ArcOnData:
Get arc-on parameters. This function returns the corresponding arc-on parameter data according to the specified arc-on parameter name. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [in] arconDataName: Arc-on parameter name, used to specify the arc-on parameters to be obtained
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setArcOnData()
def setArcOnData(self, arconData: ArcOnData, ec: dict) -> None:
Set arc-on parameters. This function is used to save the specified arc-on parameter data to the system for subsequent use.
- Parameters:
- [in] arconData: Arc-on parameters, containing the arc-on parameter data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeArcOnData() [1/2]
def removeArcOnData(self, arconDataName: str, ec: dict) -> None:
Delete the specified arc-on parameters. This function removes the corresponding arc-on parameter data from the system according to the arc-on parameter name.
- Parameters:
- [in] arconDataName: Arc-on parameter name, specifying the arc-on parameters to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeArcOnData() [2/2]
def removeArcOnData(self, arconDataNames: list[str], ec: dict) -> None:
Batch delete arc-on parameters. This function removes multiple arc-on parameter data from the system at once according to the provided arc-on parameter name list.
- Parameters:
- [in] arconDataNames: Arc-on parameter name list, containing all arc-on parameter names to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getArcData()
def getArcData(self, arcDataName: str, ec: dict) -> ArcData:
Get welding parameters. This function returns the corresponding welding parameter data according to the specified welding parameter name. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [in] arcDataName: Welding parameter name, used to specify the welding parameters to be obtained
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setArcData()
def setArcData(self, arcData: ArcData, ec: dict) -> None:
Set welding parameters. This function is used to save the specified welding parameter data to the system for subsequent use.
- Parameters:
- [in] arcData: Welding parameters, containing the welding parameter data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeArcData() [1/2]
def removeArcData(self, arcDataName: str, ec: dict) -> None:
Delete welding parameters. This function removes the corresponding welding parameter data from the system according to the welding parameter name.
- Parameters:
- [in] arcDataName: Welding parameter name, specifying the welding parameters to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeArcData() [2/2]
def removeArcData(self, arcDataNames: list[str], ec: dict) -> None:
Batch delete welding parameters. This function removes multiple welding parameter data from the system at once according to the provided welding parameter name list.
- Parameters:
- [in] arcDataNames: Welding parameter name list, containing all welding parameter names to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
enableArcData()
def enableArcData(self, arcData: ArcData, ec: dict) -> None:
Enable welding parameters. Send welding parameters to the welder when not running, you can check whether communication is established and settings are accurate by observing the welder panel display, this operation will not save parameters.
- Parameters:
- [in] arcData: Welding parameters, containing the welding parameter data to be temporarily enabled
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getArcOffData()
def getArcOffData(self, arcoffDataName: str, ec: dict) -> ArcOffData:
Get arc-off parameters. This function returns the corresponding arc-off parameter data according to the specified arc-off parameter name. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [in] arcoffDataName: Arc-off parameter name, used to specify the arc-off parameters to be obtained
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setArcOffData()
def setArcOffData(self, arcoffData: ArcOffData, ec: dict) -> None:
Set arc-off parameters. This function is used to save the specified arc-off parameter data to the system for subsequent use.
- Parameters:
- [in] arcoffData: Arc-off parameters, containing the arc-off parameter data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeArcOffData() [1/2]
def removeArcOffData(self, arcoffDataName: str, ec: dict) -> None:
Delete arc-off parameters. This function removes the corresponding arc-off parameter data from the system according to the arc-off parameter name.
- Parameters:
- [in] arcoffDataName: Arc-off parameter name, specifying the arc-off parameters to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeArcOffData() [2/2]
def removeArcOffData(self, arcoffDataNames: list[str], ec: dict) -> None:
Batch delete arc-off parameters. This function removes multiple arc-off parameter data from the system at once according to the provided arc-off parameter name list.
- Parameters:
- [in] arcoffDataNames: Arc-off parameter name list, containing all arc-off parameter names to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getWeaveData()
def getWeaveData(self, weaveDataName: str, ec: dict) -> WeaveData:
Get weave parameters. This function returns the corresponding weave parameter data according to the specified weave parameter name. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [in] weaveDataName: Weave parameter name, used to specify the weave parameters to be obtained
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setWeaveData()
def setWeaveData(self, weaveData: WeaveData, ec: dict) -> None:
Set weave parameters. This function is used to save the specified weave parameter data to the system for subsequent use.
- Parameters:
- [in] weaveData: Weave parameters, containing the weave parameter data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeWeaveData() [1/2]
def removeWeaveData(self, weaveDataName: str, ec: dict) -> None:
Delete weave parameters. This function removes the corresponding weave parameter data from the system according to the weave parameter name.
- Parameters:
- [in] weaveDataName: Weave parameter name, specifying the weave parameters to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeWeaveData() [2/2]
def removeWeaveData(self, weaveDataNames: list[str], ec: dict) -> None:
Batch delete weave parameters. This function removes multiple weave parameter data from the system at once according to the provided weave parameter name list.
- Parameters:
- [in] weaveDataNames: Weave parameter name list, containing all weave parameter names to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getWeaveAdaptiveData()
def getWeaveAdaptiveData(self, ec: dict) -> WeaveAdaptiveData:
Get weave-adaptive parameters. This function returns the current weave adaptive parameter data in the system. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setWeaveAdaptiveData()
def setWeaveAdaptiveData(self, weaveAdaptiveData: WeaveAdaptiveData, ec: dict) -> None:
Set weave-adaptive parameters. This function is used to save the specified weave adaptive parameter data to the system for subsequent use.
- Parameters:
- [in] weaveAdaptiveData: Weave-adaptive parameters, containing the weave adaptive parameter data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getSegData()
def getSegData(self, segDataName: str, ec: dict) -> SegData:
Get segment welding parameters. This function returns the corresponding segment welding parameter data according to the specified segment welding parameter name. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [in] segDataName: Segment welding parameter name, used to specify the segment welding parameters to be obtained
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setSegData()
def setSegData(self, segData: SegData, ec: dict) -> None:
Set segment welding parameters. This function is used to save the specified segment welding parameter data to the system for subsequent use.
- Parameters:
- [in] segData: Segment welding parameters, containing the segment welding parameter data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeSegData() [1/2]
def removeSegData(self, segDataName: str, ec: dict) -> None:
Delete segment welding parameters. This function removes the corresponding segment welding parameter data from the system according to the segment welding parameter name.
- Parameters:
- [in] segDataName: Segment welding parameter name, specifying the segment welding parameters to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeSegData() [2/2]
def removeSegData(self, segDataNames: list[str], ec: dict) -> None:
Batch delete segment welding parameters. This function removes multiple segment welding parameter data from the system at once according to the provided segment welding parameter name list.
- Parameters:
- [in] segDataNames: Segment welding parameter name list, containing all segment welding parameter names to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getLaserTrackData()
def getLaserTrackData(self, laserTrackDataName: str, ec: dict) -> LaserTrackData:
Get laser tracking parameters. This function returns the corresponding laser tracking parameter data according to the specified laser tracking parameter name. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [in] laserTrackDataName: Laser tracking parameter name, used to specify the laser tracking parameters to be obtained
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setLaserTrackData()
def setLaserTrackData(self, laserTrackData: LaserTrackData, ec: dict) -> None:
Set laser tracking parameters. This function is used to save the specified laser tracking parameter data to the system for subsequent use.
- Parameters:
- [in] laserTrackData: Laser tracking parameters, containing the laser tracking parameter data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeLaserTrackData() [1/2]
def removeLaserTrackData(self, laserTrackDataName: str, ec: dict) -> None:
Delete laser tracking parameters. This function removes the corresponding laser tracking parameter data from the system according to the laser tracking parameter name.
- Parameters:
- [in] laserTrackDataName: Laser tracking parameter name, specifying the laser tracking parameters to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeLaserTrackData() [2/2]
def removeLaserTrackData(self, laserTrackDataNames: list[str], ec: dict) -> None:
Batch delete laser tracking parameters. This function removes multiple laser tracking parameter data from the system at once according to the provided laser tracking parameter name list.
- Parameters:
- [in] laserTrackDataNames: Laser tracking parameter name list, containing all laser tracking parameter names to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getLaserSearchData()
def getLaserSearchData(self, laserSearchDataName: str, ec: dict) -> LaserSearchData:
Get laser search parameters. This function returns the corresponding laser search parameter data according to the specified laser search parameter name. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [in] laserSearchDataName: Laser search parameter name, used to specify the laser search parameters to be obtained
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setLaserSearchData()
def setLaserSearchData(self, laserSearchData: LaserSearchData, ec: dict) -> None:
Set laser search parameters. This function is used to save the specified laser search parameter data to the system for subsequent use.
- Parameters:
- [in] laserSearchData: Laser search parameters, containing the laser search parameter data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeLaserSearchData() [1/2]
def removeLaserSearchData(self, laserSearchDataName: str, ec: dict) -> None:
Delete laser search parameters. This function removes the corresponding laser search parameter data from the system according to the laser search parameter name.
- Parameters:
- [in] laserSearchDataName: Laser search parameter name, specifying the laser search parameters to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
removeLaserSearchData() [2/2]
def removeLaserSearchData(self, laserSearchDataNames: list[str], ec: dict) -> None:
Batch delete laser search parameters. This function removes multiple laser search parameter data from the system at once according to the provided laser search parameter name list.
- Parameters:
- [in] laserSearchDataNames: Laser search parameter name list, containing all laser search parameter names to be deleted
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getIOSetting()
def getIOSetting(self, ec: dict) -> IOSetting:
Get IO settings. This function returns the current IO configuration parameters. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setIOSetting()
def setIOSetting(self, ioSetting: IOSetting, ec: dict) -> None:
Set IO settings. This function is used to configure the system's IO parameters, note: this interface can only be called for setting when welding is not enabled.
- Parameters:
- [in] ioSetting: IO settings, containing the IO parameter data to be configured
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getCurrentCharacteristicCurveData()
def getCurrentCharacteristicCurveData(self, name: str, ec: dict) -> CharacteristicCurveData:
Get current characteristic curve parameters. This function returns the corresponding current characteristic curve data according to the specified file name. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [in] name: File name, used to specify the current characteristic curve to be obtained
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setCurrentCharacteristicCurveData()
def setCurrentCharacteristicCurveData(self, data: CharacteristicCurveData, ec: dict) -> None:
Set current characteristic curve parameters, and perform calculation and save operations simultaneously. This function is used to configure and save the current characteristic curve, only need to pass in the name and key point data.
- Parameters:
- [in] data: Current characteristic curve parameters, containing the name and key point data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getVoltageCharacteristicCurveData()
def getVoltageCharacteristicCurveData(self, name: str, ec: dict) -> CharacteristicCurveData:
Get voltage characteristic curve parameters. This function returns the corresponding voltage characteristic curve data according to the specified file name. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [in] name: File name, used to specify the voltage characteristic curve to be obtained
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setVoltageCharacteristicCurveData()
def setVoltageCharacteristicCurveData(self, data: CharacteristicCurveData, ec: dict) -> None:
Set voltage characteristic curve parameters, and perform calculation and save operations simultaneously. This function is used to configure and save the voltage characteristic curve, only need to pass in the name and key point data.
- Parameters:
- [in] data: Voltage characteristic curve parameters, containing the name and key point data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
calculateCurrentCurve()
def calculateCurrentCurve(self, data: CharacteristicCurveData, ec: dict) -> CharacteristicCurveData:
Calculate current characteristic curve parameters, only perform calculation operations, not save. This function is used to calculate the current characteristic curve based on the incoming key point data, suitable for previewing or verifying calculation results.
- Parameters:
- [in] data: Current characteristic curve parameters, containing the name and key point data to be calculated
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
calculateVoltageCurve()
def calculateVoltageCurve(self, data: CharacteristicCurveData, ec: dict) -> CharacteristicCurveData:
Calculate voltage characteristic curve parameters, only perform calculation operations, not save. This function is used to calculate the voltage characteristic curve based on the incoming key point data, suitable for previewing or verifying calculation results.
- Parameters:
- [in] data: Voltage characteristic curve parameters, containing the name and key point data to be calculated
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getWelderStatus()
def getWelderStatus(self, ec: dict) -> WelderStatus:
Get welder status. This function returns the current welder's running status information. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setWelder() [1/2]
def setWelder(self, protocol: str, mfr: str, type: str, current: int, ec: dict) -> None:
Set welder parameters. This function configures the welder by specifying the communication protocol, manufacturer, type, and current specification. Note: Must be called when welding is not enabled.
- Parameters:
- [in] protocol: Communication protocol, such as "ethercat"
- [in] mfr: Manufacturer, such as "aotai"
- [in] type: Welder type, such as "RL/RPL", "RP/RPH"
- [in] current: Current type, such as 350, 500, 630, 800
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setWelder() [2/2]
def setWelder(self, welderSetting: WelderSetting, ec: dict) -> None:
Set welder parameters. This function configures the welder by passing in a complete welder setting parameter structure.
- Parameters:
- [in] welderSetting: Welder setting parameters, containing all welder information to be configured
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getWelderSetting()
def getWelderSetting(self, ec: dict) -> WelderSetting:
Get welder settings. This function returns the currently configured welder setting parameters. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
connectToWelder()
def connectToWelder(self, ec: dict) -> None:
Connect to welder, enable arc welding function. This function is used to establish a connection with the welder and make the arc welding function available.
- Parameters:
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
disconnectFromWelder()
def disconnectFromWelder(self, ec: dict) -> None:
Disconnect from welder, close arc welding function. This function is used to disconnect from the welder and disable arc welding related functions.
- Parameters:
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
isEniHaveWeld()
def isEniHaveWeld(self, ec: dict) -> bool:
Read whether currently connected to physical welder (only for EtherCAT welders, determined by the currently used ENI file). This function is used to detect whether an actual physical welder is currently connected.
- Parameters:
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
- Return value:
- Valid when error code is 0, returns false if error code is non-zero
setIsEniHaveWeld()
def setIsEniHaveWeld(self, isHaveWeld: bool, ec: dict) -> None:
Set whether to connect to physical welder (only for EtherCAT welders, requires switching ENI file and restarting controller to take effect). This function is used to configure whether to connect to an actual physical welder, usually requiring corresponding ENI file support.
- Note: The reason for failure is mostly due to missing corresponding ENI file, please ensure the corresponding ENI file has been imported.
- Parameters:
- [in] isEniHaveWeld: Whether to connect to physical welder, true means connect, false means not connect
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getWeldMode()
def getWeldMode(self, ec: dict) -> WeldMode:
Get welding mode. This function returns the currently configured welding mode parameters. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setWeldMode()
def setWeldMode(self, weldMode: WeldMode, ec: dict) -> None:
Set welding mode. This function is used to configure the system to use the specified welding mode.
- Parameters:
- [in] weldMode: Welding mode, containing the welding mode parameters to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
getRunningParam()
def getRunningParam(self, ec: dict) -> ArcWeldRunningParam:
Read welding running parameters. This function returns the currently configured welding running parameters. If the operation is successful (error code is 0), the returned parameters are valid; if it fails (error code is non-zero), the default value is returned.
- Parameters:
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setRunningParam()
def setRunningParam(self, runningParam: ArcWeldRunningParam, ec: dict) -> None:
Set welding running parameters. This function is used to configure the system to use the specified welding running parameters.
- Parameters:
- [in] runningParam: Welding running parameters, containing the running parameter data to be set
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
feedOnWire()
def feedOnWire(self, time: float, enable: bool, ec: dict) -> None:
Wire feeding. This function is used to control the welder to perform wire feeding operation, wire feeding time unit is seconds (needs to be greater than 0.1 seconds), only takes effect when enable is True.
- Parameters:
- [in] time: Wire feeding time, unit: seconds, range needs to be greater than 0.1
- [in] enable: Whether to enable wire feeding,
Trueto enable,Falseto stop, defaultTrue - [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
feedBackWire()
def feedBackWire(self, time: float, enable: bool, ec: dict) -> None:
Wire retracting. This function is used to control the welder to perform wire retracting operation, wire retracting time unit is seconds (needs to be greater than 0.1 seconds), only takes effect when enable is True.
- Parameters:
- [in] time: Wire retracting time, unit: seconds, range needs to be greater than 0.1
- [in] enable: Whether to enable wire retracting,
Trueto enable,Falseto stop, defaultTrue - [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
detectGas()
def detectGas(self, time: float, enable: bool, ec: dict) -> None:
Gas detection. This function is used to control the welder to perform gas detection operation, gas detection time unit is seconds (needs to be greater than 0.1 seconds), only takes effect when enable is True.
- Parameters:
- [in] time: Gas detection time, unit: seconds, range needs to be greater than 0.1
- [in] enable: Whether to enable gas detection,
Trueto enable,Falseto stop, defaultTrue - [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
setCurrentAndVoltage()
def setCurrentAndVoltage(self, current: float, voltage: float, ec: dict) -> None:
Set current and voltage online. This function is used to set current and voltage parameters in real-time during welding state, only takes effect in welding state. Current unit can be A or mm/s (depending on current current mode), voltage unit can be V or % (depending on current voltage mode).
- Parameters:
- [in] current: Current or wire feeding speed, unit can be A or mm/s according to current mode
- [in] voltage: Voltage, unit can be V or % according to current mode
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
saveCurrentAndVoltage()
def saveCurrentAndVoltage(self, current: float, voltage: float, ec: dict) -> None:
Save current and voltage online. This function is used to save the set current and voltage parameters in real-time during welding state, only takes effect in welding state. Current unit can be A or mm/s (depending on current current mode), voltage unit can be V or % (depending on current voltage mode).
- Parameters:
- [in] current: Current or wire feeding speed, unit can be A or mm/s according to current mode
- [in] voltage: Voltage, unit can be V or % according to current mode
- [out] ec: Error code, used to indicate whether the function execution is successful (0 indicates success, non-zero indicates failure)
startWelding()
def startWelding(self, current: float, voltage: float, voltage_mode: str = 'unified', current_mode: str = 'current', work_mode: str = 'flat_characteristic', ec: dict) -> None:
Start spot welding.
- Note:
ecis located after several parameters with default values, please use keyword to passecwhen calling, for examplestartWelding(100.0, 20.0, ec=ec_dict). - Parameters:
- [in] current: Current, unit: A, range [1,300]
- [in] voltage: Voltage, unit: V or %, range [-30,30]
- [in] voltage_mode: Voltage mode,
"separate"separate,"unified"unified, default"unified" - [in] current_mode: Current mode,
"current"current,"wire_feed"wire feed speed, default"current" - [in] work_mode: Work mode, consistent with process parameters, default
"flat_characteristic" - [out] ec: Error code
stopWelding()
def stopWelding(self, ec: dict) -> None:
Stop spot welding.
- Parameters:
- [out] ec: Error code
setHandeyeData()
def setHandeyeData(self, handeyeData: HandeyeData, ec: dict) -> None:
Add and set hand-eye calibration result parameters.
- Parameters:
- [in] handeyedata: Hand-eye calibration result
- [out] ec: Error code
getHandeyeData()
def getHandeyeData(self, name: str, ec: dict) -> HandeyeData:
Get currently set hand-eye calibration result.
- Parameters:
- [in] name: Hand-eye calibration result file number
- [out] ec: Error code
- Return value:
- Hand-eye calibration result
removeHandeyeData() [1/2]
def removeHandeyeData(self, name: str, ec: dict) -> None:
Delete hand-eye calibration result.
- Parameters:
- [in] name: Hand-eye calibration file number
- [out] ec: Error code
removeHandeyeData() [2/2]
def removeHandeyeData(self, names: list[str], ec: dict) -> None:
Delete multiple hand-eye calibration results.
- Parameters:
- [in] names: Hand-eye calibration file number list
- [out] ec: Error code
startHandeyeCalibration()
def startHandeyeCalibration(self, name: str, type: int, ec: dict) -> None:
Start hand-eye calibration, need to have laser sensor connected.
- Parameters:
- [in] name: Hand-eye calibration file number
- [in] type: Calibration points, currently only 6
- [out] ec: Error code
calibratePoint()
def calibratePoint(self, id: int, ec: dict) -> CalibrationResult:
Add calibration point for hand-eye calibration.
- Parameters:
- [in] id: Point number, 0: tip collection point, 1-6: calibration points
- [out] ec: Error code
- Return value:
- Point result
calibrateEnd()
def calibrateEnd(self, loss: list, ec: dict) -> HandeyeData:
End hand-eye calibration, calculate calibration result.
- Parameters:
- [in] loss: Self-calibration error list, elements are
[max, min, mean](float) - [out] ec: Error code
- [in] loss: Self-calibration error list, elements are
- Return value:
HandeyeData: Hand-eye calibration result; only valid whenecindicates success
setLaserSensorCfg()
def setLaserSensorCfg(self, cfg: LaserSensorCfg, ec: dict) -> None:
Add and set laser sensor configuration parameters.
- Parameters:
- [in] cfg: Laser sensor basic configuration data
- [out] ec: Error code
getLaserSensorCfg()
def getLaserSensorCfg(self, name: str, ec: dict) -> LaserSensorCfg:
Get laser sensor configuration parameters.
- Parameters:
- [in] name: Laser sensor name
- [out] ec: Error code
- Return value:
- Sensor configuration parameters
removeLaserSensorCfg() [1/2]
def removeLaserSensorCfg(self, name: str, ec: dict) -> None:
Delete laser sensor configuration parameters.
- Parameters:
- [in] name: Laser sensor name (consistent with interfaces like
getLaserSensorCfg) - [out] ec: Error code
- [in] name: Laser sensor name (consistent with interfaces like
removeLaserSensorCfg() [2/2]
def removeLaserSensorCfg(self, names: list[str], ec: dict) -> None:
Delete multiple laser sensor configuration parameters.
- Parameters:
- [in] names: Laser sensor name list
- [out] ec: Error code
connLaserSensorDev()
def connLaserSensorDev(self, device_name: str, ec: dict) -> None:
Connect laser sensor. This function is used to connect to the laser sensor device with the specified name.
- Parameters:
- [in] device_name: Laser sensor device name
- [out] ec: Error code
disconnLaserSensorDev()
def disconnLaserSensorDev(self, device_name: str, ec: dict) -> None:
Disconnect laser sensor. This function is used to disconnect from the laser sensor device with the specified name.
- Parameters:
- [in] device_name: Laser sensor device name
- [out] ec: Error code
openLaserTrack()
def openLaserTrack(self, device_name: str, ec: dict) -> None:
Open weld seam tracker, start acquiring laser weld seam data. This function is used to start the weld seam tracking function of the specified laser sensor device.
- Parameters:
- [in] device_name: Laser sensor device name
- [out] ec: Error code
closeLaserTrack()
def closeLaserTrack(self, device_name: str, ec: dict) -> None:
Close weld seam tracker, stop acquiring laser weld seam data. This function is used to stop the weld seam tracking function of the specified laser sensor device.
- Parameters:
- [in] device_name: Laser sensor device name
- [out] ec: Error code
setArcTrackParam()
def setArcTrackParam(self, param: ArcTrackParam, ec: dict) -> None:
Set arc tracking parameters. This function is used to configure arc tracking related parameters.
- Parameters:
- [in] param: Arc tracking parameters
- [out] ec: Error code
getArcTrackParam()
def getArcTrackParam(self, name: str, ec: dict) -> ArcTrackParam:
Get arc tracking parameter settings. This function is used to get the arc tracking parameters for the specified file number.
- Parameters:
- [in] name: Arc tracking parameter file number
- [out] ec: Error code
- Return value:
- Arc tracking parameters
removeArcTrackParam() [1/2]
def removeArcTrackParam(self, name: str, ec: dict) -> None:
Delete arc tracking parameters. This function is used to delete the arc tracking parameters for the specified file number.
- Parameters:
- [in] name: Arc tracking parameter file number
- [out] ec: Error code
removeArcTrackParam() [2/2]
def removeArcTrackParam(self, names: list[str], ec: dict) -> None:
Delete multiple arc tracking parameters. This function is used to batch delete multiple arc tracking parameter files.
- Parameters:
- [in] names: Arc tracking parameter file number list
- [out] ec: Error code
setAnticollision()
def setAnticollision(self, signal: str, enable: bool, block: bool, countdown: int, ec: dict) -> None:
Set anti-collision sensor. This function is used to configure anti-collision related parameters, including DI signal, enable state, block switch and countdown.
- Parameters:
- [in] signal: DI signal name
- [in] enable: Enable/Disable
- [in] block: Block switch
- [in] countdown: Countdown, anti-collision will be turned on after countdown ends
- [out] ec: Error code, -260 - Missing necessary parameters; -14510 - Failed to bind system input (DI signal does not exist or has been bound as system input)
getAnticollisionState()
def getAnticollisionState(self, ec: dict) -> AnticollisionState:
Get anti-collision sensor settings or state. This function is used to query the current anti-collision configuration or state information.
- Parameters:
- [out] ec: Error code
- Return value:
- Anti-collision settings or state, invalid if error code is not 0
cancelAutoGoBackOnce()
def cancelAutoGoBackOnce(self, ec: dict) -> None:
When the welding parameter - restart back distance is not zero, the real welding mode will back a distance and then re-arc weld. Calling this interface in pause state can temporarily disable back once, and start movement from the pause point.
- Parameters:
- [out] ec: Error code
executeLaserSearch()
def executeLaserSearch(self, cmd: LaserSearchCommand, isMove: bool, timeout: datetime.timedelta, ec: dict) -> tuple[bool, xCoreSDK_python.CartesianPosition]:
Laser search, block waiting for motion to end. If timeout is non-zero duration, the function will block until search ends or times out.
- Parameters:
- [in] cmd: Laser search command
- [in] isMove: Whether to start movement immediately.
False: only add search command, need to callmoveStart()again;True: add and execute - [in] timeout: Timeout time, type is
datetime.timedelta. When total duration is 0, return default value without waiting for search result; when greater than 0, wait until completion or timeout - [out] ec: Error code
- Return value:
- (Whether found, found pose), the found pose is based on tool workpiece coordinate system
calcIntersection()
def calcIntersection(self, points: list[xCoreSDK_python.CartesianPosition], ec: dict) -> xCoreSDK_python.CartesianPosition:
Laser search - four-point intersection calculation. Only calculates position, pose takes the first point's pose in points.
- Parameters:
- [in] points: 4 found points, first two form line 1, last two form line 2
- [out] ec: Error code, generally calculation failure, see SDK log for calculation failure reasons
- Return value:
- Calculated intersection point, valid when no error code
getRefBy3Points()
def getRefBy3Points(self, points: list[xCoreSDK_python.CartesianPosition], withOrigin: bool, dt: DirType, ec: dict) -> xCoreSDK_python.Frame:
Laser search - three-point method to obtain a coordinate system.
- Parameters:
- [in] points: 3 found points
- [in] withOrigin: Whether to directly determine coordinate system origin through search points
- [in] dt: Workpiece coordinate system pose calibration order (
DirType) - [out] ec: Error code
- Return value:
Frame: Calculated coordinate system, valid when no error code
getLaserPos()
def getLaserPos(self, pos: xCoreSDK_python.CartesianPosition, laserHandEyeData: str, ec: dict, refSys: str = 'R_WORLD') -> xCoreSDK_python.CartesianPosition:
Get laser position. Only calculates position, pose is the same as pos.
- Parameters:
- [in] pos: Taught pose point
- [in] laserHandEyeData: Hand-eye calibration result file number (string)
- [out] ec: Error code
- [in] refSys: Coordinate system, optional
"R_WORLD"(world),"R_BASE"(base coordinate),"R_WOBJ"(workpiece), default"R_WORLD"
- Return value:
- Calculated weld seam point, valid when no error code
getLayerData()
def getLayerData(self, layerDataName: str, ec: dict) -> LayerData:
Get multi-layer multi-pass parameter configuration.
- Parameters:
- [in] layerDataName: Multi-layer multi-pass parameter name
- [out] ec: Error code
- Return value:
- Valid
LayerDatawhenecis successful, otherwise default value
- Valid
setLayerData()
def setLayerData(self, layerData: LayerData, ec: dict) -> None:
Set multi-layer multi-pass parameter configuration.
- Parameters:
- [in] layerData: Multi-layer multi-pass parameter object
- [out] ec: Error code
removeLayerData()
def removeLayerData(self, layerDataName: str, ec: dict) -> None:
Delete multi-layer multi-pass parameters with specified name.
- Parameters:
- [in] layerDataName: Multi-layer multi-pass parameter name
- [out] ec: Error code
getWelderWorkModes()
def getWelderWorkModes(self, ec: dict) -> list[str]:
Get the list of work mode strings supported by the current welder brand and model.
- Parameters:
- [out] ec: Error code
- Return value:
- May be empty list when error code is non-0 or no corresponding work mode
clearWelderAlarm()
def clearWelderAlarm(self, ec: dict) -> None:
Clear welder alarm.
- Parameters:
- [out] ec: Error code
weldOffsetJog()
def weldOffsetJog(self, dir: WeldOffsetJogDir, ec: dict) -> None:
Overlay weave offset Jog: During welding process, jog robot TCP along path coordinate system Y, Z directions.
- Parameters:
- [in] dir: Offset direction (
WeldOffsetJogDir) - [out] ec: Error code
- [in] dir: Offset direction (