top of page

Python 6.22. Setting the global speed

Prototype

SetSpeed(vel)

Description

Set global speed

Mandatory parameter

  • vel: percentage of speed, range [0~100]

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

6.23. Setting robot acceleration

New in version python: SDK-v2.0.4

Prototype

SetOaccScale(acc)

Description

Setting the robot acceleration

Mandatory parameter

  • acc: percentage of robot acceleration

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

6.24. Getting the default speed

Prototype

GetDefaultTransVel()

Description

Get Default Speed

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • vel: default speed in [mm/s]

6.25. Setting the end load weight

Prototype

SetLoadWeight(loadNum, weight)

Description

Set the end load weight, incorrect load weight setting may cause the robot to go out of control in drag mode

Mandatory parameters

  • loadNum:load number

  • weight: unit [kg]

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

6.26. Setting the end load center of mass coordinates

Prototype

SetLoadCoord(x,y,z,loadNum = 0)

Description

Set end-load center of mass coordinates, incorrect load center of mass setting may cause robot to go out of control in drag mode

Mandatory parameter

  • x: center of mass coordinates in [mm].

  • y: coordinates of the center of mass in [mm].

  • z: coordinates of the center of mass in [mm]

Default parameters

  • loadNum: Payload number, 0 by default

Return Value

Error Code Success-0 Failure- errcode

6.27. Get the weight of the current load

Prototype

GetTargetPayload(flag=1)

Description

Get the quality of the current load

Mandatory parameters

NULL

Default parameters

flag: 0-blocking, 1-non-blocking Default 1

Return Value

  • errorcode Success-0 Failure- errcode

  • weight: current load weight in [kg]

6.28. Get the center of mass of the current load

Prototype

GetTargetPayloadCog(flag=1)

Description

Get the center of mass of the current load

Mandatory parameters

NULL

Default parameters

flag: 0-blocking, 1-non-blocking Default 1

Return Value

  • errorcode Success-0 Failure- errcode

  • cog=[x,y,z]: coordinates of the current center of mass in [mm]

6.29. Setting the robot mounting method - fixed mounting

Prototype

SetRobotInstallPos(method)

description

set robot mounting method - fixed mounting, wrong mounting method setting can cause robot to lose control in drag mode

Mandatory parameters

  • method: 0-flat loading, 1-side loading, 2-hanging loading

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

6.30. Setting the robot mounting angle - free mounting

Prototype

SetRobotInstallAngle(yangle,zangle)

Description

Setting the robot mounting angle - free mounting, wrong mounting angle setting can cause the robot to go out of control in drag mode

Mandatory parameters

  • yangle: angle of inclination;

  • zangle: angle of rotation

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

6.31. Getting the robot mounting angle

Prototype

GetRobotInstallAngle()

Description

Get robot mounting angle

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • [yangle,zangle]: yangle - angle of inclination, zangle - angle of rotation.

6.32. Setting system variable values

Prototype

SetSysVarValue(id,value)

Description

Setting System Variables

Mandatory parameters

  • id: variable number, in the range [1~20].

  • value: variable value

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

6.33. Getting system variable values

Prototype

GetSysVarValue(id)

Description

Get system variable values

Mandatory parameters

  • id: system variable number, range [1~20]

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • var_value: system variable value

6.34. Robot common setup code examples

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')
for i in range(1100):
    robot.SetSpeed(i)
    robot.SetOaccScale(i)
    time.sleep(0.03)
error,defaultVel = robot.GetDefaultTransVel()
print(f"GetDefaultTransVel is {defaultVel}")
for i in range(121):
    robot.SetSysVarValue(i, i + 0.5)
    time.sleep(0.1)
for i in range(121):
    value = robot.GetSysVarValue(i)
    print(f"sys value {i} is: {value}")
    time.sleep(0.1)
robot.SetLoadWeight(02.5)
robot.SetLoadCoord(3.0,4.0,5.0)
time.sleep(1)
error,getLoad = robot.GetTargetPayload(0)
error,getLoadTran = robot.GetTargetPayloadCog(0)
print(f"get load is {getLoad}; get load cog is {getLoadTran[0]} {getLoadTran[1]} {getLoadTran[2]}")
robot.SetRobotInstallPos(0)
robot.SetRobotInstallAngle(15.025.0)
error,[anglex, angley] = robot.GetRobotInstallAngle()
print(f"GetRobotInstallAngle x: {anglex}; y: {angley}")
robot.CloseRPC()

6.35. Joint Friction Compensation Switch

Prototype

FrictionCompensationOnOff(state)

Description

Joint Friction Compensation Switch

Mandatory parameters

  • state: 0-off, 1-on

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

6.36. Setting the joint friction compensation coefficients - positive loading

Prototype

SetFrictionValue_level(coeff)

Description

Setting the joint friction compensation coefficient - Fixed mounting - Positive mounting

Mandatory parameters

  • coeff=[j1,j2,j3,j4,j5,j6]: six joint compensation coefficients

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

6.37. Setting the joint friction compensation coefficient - side mounting

Prototype

SetFrictionValue_wall(coeff)

Description

Setting the joint friction compensation coefficient - fixed mounting - side mounting

Mandatory parameters

  • coeff=[j1,j2,j3,j4,j5,j6]: six joint compensation coefficients

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

6.38. Setting the Joint Friction Compensation Factor - Inverted

Prototype

SetFrictionValue_ceiling(coeff)

Description

Setting the joint friction compensation coefficient - fixed mounting - inverted mounting

Mandatory parameters

  • coeff=[j1,j2,j3,j4,j5,j6]: six joint compensation coefficients

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

6.39. Setting the joint friction compensation factor - free mounting

Prototype

SetFrictionValue_freedom(coeff)

Description

Setting the joint friction compensation factor - free mounting

Mandatory parameters

  • coeff=[j1,j2,j3,j4,j5,j6]: six joint compensation coefficients

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode


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