New in version python: SDK-v2.0.5
Prototype | SetAxleLuaEnable(enable) |
Description | Set Enable End LUA Enforcement |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
11.46. End LUA file exception error recovery
New in version python: SDK-v2.0.5
Prototype | SetRecoverAxleLuaErr(enable) |
Description | End LUA File Exception Error Recovery |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
11.47. Get end LUA execution enable status
New in version python: SDK-v2.0.5
Prototype | GetAxleLuaEnableStatus() |
description | Get end LUA execution enable state |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
11.48. Setting the end LUA end device enable type
New in version python: SDK-v2.0.5
prototype | SetAxleLuaEnableDeviceType(forceSensorEnable, gripperEnable, IOEnable) |
Description | Set end LUA end device enable type |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
11.49. Get End LUA End Device Enablement Type
New in version python: SDK-v2.0.5
Prototype | GetAxleLuaEnableDeviceType() |
Description | Get End LUA End Device Enablement Type |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
11.50. Get the currently configured end device
New in version python: SDK-v2.0.5
Prototype | GetAxleLuaEnableDevice() |
Description | Get the currently configured end device |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
11.51. Setting to enable the jaw movement control function
New in version python: SDK-v2.0.5
Prototype | SetAxleLuaGripperFunc(id, func) |
Description | Set to enable the jaw motion control function |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
11.52. Getting to Enable Jaw Motion Control
New in version python: SDK-v2.0.5
Prototype | GetAxleLuaGripperFunc(id) |
Description | Get the Enable Jaw Motion Control function |
Mandatory parameter |
|
Default parameters | NULL |
Return Value |
|
11.53. The Ethercat slave file is written by the robot
New in version python: SDK-v2.0.5
Prototype | SlaveFileWrite(type,slaveID,fileName) |
Description | The Ethercat slave file is written by the robot |
Mandatory parameter |
|
Default parameters | NULL |
Return Value | errorcode Success-0 Failure- errcode |
11.54. Upload the end Lua open protocol file
New in version python: SDK-v2.0.5
Prototype | AxleLuaUpload(filePath) |
Description | Upload the end Lua open protocol file |
Mandatory parameter |
|
Default parameters | NULL |
Return Value | errorcode Success-0 Failure- errcode |
11.55. The robot Ethercat enters boot mode from the station
New in version python: SDK-v2.0.5
Prototype | SetSysServoBootMode(filePath) |
Description | The robot Ethercat enters boot mode from the station |
Mandatory parameter | NULL |
Default parameters | NULL |
Return Value | errorcode Success-0 Failure- errcode |
11.56. Example of LUA file manipulation code at the end of the robot
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')
robot.AxleLuaUpload("D://zUP/AXLE_LUA_End_DaHuan.lua")
param = [7, 8, 1, 0, 5, 3, 1] # 对应AxleComParam参数
robot.SetAxleCommunicationParam(7, 8, 1, 0, 5, 3, 1)
error,getParam0,getParam1,getParam2,getParam3,getParam4,getParam5,getParam6 = robot.GetAxleCommunicationParam()
print(f"GetAxleCommunicationParam param is:{getParam0} {getParam1} {getParam2} {getParam3} {getParam4} {getParam5} {getParam6}")
robot.SetAxleLuaEnable(1)
error,luaEnableStatus = robot.GetAxleLuaEnableStatus()
robot.SetAxleLuaEnableDeviceType(0, 1, 0)
error,forceEnable, gripperEnable, ioEnable = robot.GetAxleLuaEnableDeviceType()
print(f"GetAxleLuaEnableDeviceType param is:{forceEnable} {gripperEnable} {ioEnable}")
func = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
robot.SetAxleLuaGripperFunc(1, func)
error,getFunc = robot.GetAxleLuaGripperFunc(1)
error,getforceEnable, getgripperEnable, getioEnable = robot.GetAxleLuaEnableDevice()
print("\ngetforceEnable status:", end=" ")
for i in range(8):
print(f"{getforceEnable[i]},", end="")
print("\ngetgripperEnable status:", end=" ")
for i in range(8):
print(f"{getgripperEnable[i]},", end="")
print("\ngetioEnable status:", end=" ")
for i in range(8):
print(f"{getioEnable[i]},", end="")
print()
robot.ActGripper(1, 0)
time.sleep(2)
robot.ActGripper(1, 1)
time.sleep(2)
robot.MoveGripper(1, 90, 10, 100, 50000, 0, 0, 0, 0, 0)
while True:
error,pkg = robot.GetRobotRealTimeState()
print(f"gripper pos is:{pkg.gripper_position}")
time.sleep(0.1)
robot.CloseRPC()
11.57. Obtain the status of the SmartTool button
New in version python: SDK-v2.1.2
Prototype | GetSmarttoolBtnState() |
Description | Obtain the status of the SmartTool button |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
11.58. SmartTool button code example
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')
while True:
error,state = robot.GetSmarttoolBtnState()
print(f"{state:016b}")
time.sleep(0.1)
11.59. Set the load detection before drag is started
New in version python: SDK-v2.1.6
Prototype | SetTorqueDetectionSwitch(flag) |
Description | Set the load detection before drag is started |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
11.60. Laser peripheral open and close function
New in version python: SDK-v2.1.6
Prototype | LaserTrackingLaserOnOff(OnOff, weldId) |
Description | Laser peripheral open and close function |
Mandatory parameters |
|
Default parameters |
|
Return Value | Error Code Success-0 Failure- errcode |
11.61. Laser tracking start-end function
New in version python: SDK-v2.1.6
Prototype | LaserTrackingTrackOnOff(OnOff, coordId) |
Description | Laser tracking start-end function |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |