top of page

Python 12. Force Control

12.1. Force Sensor Configuration

Prototype

FT_SetConfig(company,device,softversion=0,bus=0)

Description

Force Sensor Configuration

Required Parameters

  • company: Sensor Manufacturer, 17 - Kunwei Technology, 19 - Aerospace 11th Academy, 20 - ATI Sensors, 21 - Zhongke MiDot, 22 - Weihang Minxin,23-NBIT,24-XJC,26-NSR;

  • device: device number, Kunwei (0-KWR75B), Aisino Eleventh Academy (0-MCS6A-200-4), ATI (0-AXIA80-M8), Zhongke MiDot (0-MST2010), Weihang Minxin (0-WHC6L-YB-10A),NBIT(0-XLH93003ACS),XJC(0-XJC-6F-D82),NSR(0-NSR-FTSensorA);

Default parameters

  • softversion: software version number, not used for now, default is 0;

  • bus: device mount end bus location, not used yet, default is 0;

Return Value

Error Code Success-0 Failure- errcode

12.2. Get Force Sensor Configuration

Prototype

FT_GetConfig()

Description

Get Force Sensor Configuration

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • [number,company,device,softversion,bus]:number 传感器编号;company 力传感器厂商,17-坤维科技,19-航天十一院,20-ATI 传感器,21-中科米点,22-伟航敏芯;device 设备号,坤维 (0- KWR75B), Aisino Eleven (0-MCS6A-200-4), ATI (0-AXIA80-M8), Zhongke MiDot (0-MST2010), Weihang Minxin (0-WHC6L-YB10A); softvesion software version number, not used for the time being, the default is 0.

12.3. Force sensor activation

Prototype

FT_Activate(state)

Description

Force sensor activation

Mandatory parameters

  • state: 0-reset, 1-activate

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

12.4. Force Sensor Zeroing

Prototype

FT_SetZero(state)

Description

Force Transducer Zeroing

Mandatory parameters

  • state: 0-removal of zeros, 1-zero correction

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

12.5. Setting the force transducer reference coordinate system

Changed in version python: SDK-v2.0.5

prototype

FT_SetRCS(ref,coord=[0,0,0,0,0,0,0])

Description

Setting the force transducer reference coordinate system

Mandatory parameters

  • ref: 0 - tool coordinate system, 1 - base coordinate system

Default parameters

  • coord: [x,y,z,rx,ry,rz] customized coordinate system values, default [0,0,0,0,0,0,0]

Return Value

Error Code Success-0 Failure- errcode

12.6. Setting the load weight under the force transducer

New in version python: SDK-v2.0.5

Prototype

SetForceSensorPayload(weight)

Description

Set the load weight under the force transducer

Mandatory parameters

weight: load weight kg

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

12.7. Setting the load center of mass under the force transducer

New in version python: SDK-v2.0.5

Prototype

SetForceSensorPayloadCog(x,y,z)

Description

Setting the center of mass of the load under the force transducer

Mandatory parameters

  • x: load center of mass x mm

  • y: load center of mass y mm

  • z: load center of mass z mm

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

12.8. Getting the load weight under the force transducer

New in version python: SDK-v2.0.5

Prototype

GetForceSensorPayload()

Description

Get the weight of the load under the force transducer.

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • weight: loaded weight kg

12.9. Obtaining the center of mass of the load under the force transducer

New in version python: SDK-v2.0.5

Prototype

GetForceSensorPayloadCog()

Description

Getting the center of mass of the load under the force transducer

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • x: load center of mass x mm

  • y: load center of mass y mm

  • z: load center of mass z mm

12.10. Automatic zeroing of force sensors

New in version python: SDK-v2.0.5

Prototype

ForceSensorAutoComputeLoad()

Description

Automatic zeroing of force sensors

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • weight: sensor mass kg

  • pos=[x,y,z]: sensor center of mass mm

12.11. Obtaining force/torque data in the reference coordinate system

Prototype

FT_GetForceTorqueRCS()

Description

Get force/torque data in reference coordinate system

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • data=[fx,fy,fz,tx,ty,tz]: force/torque data in the reference coordinate system.

12.12. Obtaining Force Sensor Raw Force/Torque Data

Prototype

FT_GetForceTorqueOrigin()

Description

Get force sensor raw force/torque data

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • data=[fx,fy,fz,tx,ty,tz]: Force sensor raw force/torque data

12.13. Force sensor configuration and automatic zero correction code example

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')
company = 24
device = 0
softversion = 0
bus = 1
index = 1
robot.FT_SetConfig(company, device, softversion, bus)
time.sleep(1)
error,[company, device, softversion, bus] = robot.FT_GetConfig()
print(f"FT config:{company},{device},{softversion},{bus}")
time.sleep(1)
robot.FT_Activate(0)
time.sleep(1)
robot.FT_Activate(1)
time.sleep(1)
time.sleep(1)
robot.FT_SetZero(0)
time.sleep(1)
error,ft = robot.FT_GetForceTorqueOrigin()
print(f"ft origin:{ft[0]},{ft[1]},{ft[2]},{ft[3]},{ft[4]},{ft[5]}")
robot.FT_SetZero(1)
time.sleep(1)
ftCoord = [000000]
robot.FT_SetRCS(0, ftCoord)
robot.SetForceSensorPayload(0.824)
robot.SetForceSensorPayloadCog(0.7782.55448.765)
error,weight = robot.GetForceSensorPayload()
error,x, y, z = robot.GetForceSensorPayloadCog()
print(f"the FT load is  {weight}, {x} {y} {z}")
robot.SetForceSensorPayload(0)
robot.SetForceSensorPayloadCog(000)
error,computeWeight, tran = robot.ForceSensorAutoComputeLoad()
print(f"the result is weight {computeWeight} pos is {tran[0]} {tran[1]} {tran[2]}")
robot.CloseRPC()

12.14. Load weight identification records

Prototype

FT_PdIdenRecord(tool_id)

Description

Load weight identification record

Mandatory parameters

  • tool_id: sensor coordinate system number, range [0~14]

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

12.15. Load weight identification calculation

Prototype

FT_PdIdenCompute()

Description

Load weight identification calculation

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • weight: weight of the load in kg

12.16. Load center of mass identification records

prototype

FT_PdCogIdenRecord(tool_id,index)

Description

Load center of mass identification record

Mandatory parameter

  • tool_id: sensor coordinate system number, range [0~14].

  • index: point number [1 to 3]

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

12.17. Load center of mass identification calculation

Prototype

FT_PdCogIdenCompute()

Description

Load center of mass identification calculation

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • cog=[cogx,cogy,cogz]: center of mass of load in mm


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