top of page

Python 11.15. Get the number of rotation turns of the rotary gripper

New in version python: SDK-v2.0.7

Prototype

GetGripperRotNum()

Description

Get the number of rotation turns of the rotary gripper

Mandatory parameter

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • fault:0-correct,1-error

  • num:Number of turns

11.16. Gets the percentage of rotation speed of the rotating gripper

New in version python: SDK-v2.0.7

Prototype

GetGripperRotSpeed()

Description

Gets the percentage of rotation speed of the rotating gripper

Mandatory parameter

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • fault:0-correct,1-error

  • speed:Percent rotation speed

11.17. Obtains the percentage of rotating torque of the rotating gripper

New in version python: SDK-v2.0.7

Prototype

GetGripperRotTorque()

Description

Obtains the percentage of rotating torque of the rotating gripper

Mandatory parameter

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • fault:0-correct,1-error

  • torque:Percent torque of rotation

11.18. Get the rotary gripper status 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')
fault = 0
rotNum = 0.0
rotSpeed = 0
rotTorque = 0
error,fault, rotNum = robot.GetGripperRotNum()
error,fault, rotSpeed = robot.GetGripperRotSpeed()
error,fault, rotTorque = robot.GetGripperRotTorque()
print(f"gripper rot num:{rotNum},gripper rotSpeed:{rotSpeed},gripper rotTorque:{rotTorque}")
robot.CloseRPC()

11.19. Drive belt start and stop

Prototype

ConveyorStartEnd(status)

Description

Drive belt start, stop

Mandatory parameters

  • status: status of the drive belt, 1-start, 0-stop

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.20. Record IO detection points

Prototype

ConveyorPointIORecord()

Description

Record IO detection points

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.21. Record point A

Prototype

ConveyorPointARecord()

Description

Record point A.

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.22. Recording reference points

Prototype

ConveyorRefPointRecord()

Description

Record reference point

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.23. Record point B

Prototype

ConveyorPointBRecord()

Description

Record point B.

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.24. Conveyorized workpiece IO inspection

Prototype

ConveyorIODetect(max_t)

Description

Conveyorized workpiece IO detection

Mandatory parameter

  • max_t: Maximum detection time in ms

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.25. Get the current position of the object

Prototype

ConveyorGetTrackData(mode)

Description

Get the current position of the object.

Mandatory Parameters

  • mode: 1-Tracking Capture 2-Tracking Motion 3-TPD Tracking

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.26. Drive belt tracking started

Prototype

ConveyorTrackStart(status)

Description

Drive belt tracking started

Mandatory parameters

  • status: status, 1-start, 0-stop

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.27. Belt tracking stop

Prototype

ConveyorTrackEnd()

Description

Drive belt tracking stop

Mandatory parameters

NULL

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.28. Drive Belt Parameter Configuration

Prototype

ConveyorSetParam(param, followType, startDis, endDis)

Description

Configuration of drive belt parameters

Mandatory parameters

  • param= [encChannel,resolution,lead,wpAxis,vision,speedRadio]:

    • encChannel: encoder channels 1-2

    • resolution: encoder resolution Number of pulses per encoder revolution

    • lead: Mechanical transmission ratio Distance traveled by the conveyor belt in one revolution of the encoder

    • wpAxis: Workpiece coordinate system number Select the coordinate system number of the workpiece for the tracking motion function, and set the tracking gripping and TPD tracking to 0.

    • vision: whether or not to match vision 0 - no 1 - match,

    • speedRadio: speed ratio For conveyor tracking gripping speed range (1-100) Tracking motion, TPD tracking set to 1

  • followType: Track movement type, 0- track movement; 1- Follow-up campaign

Default parameters

  • startDis: Tracking grasp needs to be set, tracking start distance, -1: automatic calculation (automatic tracking after the workpiece reaches the robot), the unit is mm, the default value is 0

  • endDis: The tracking capture needs to be set. The tracking termination distance, in mm, is 100 by default

Return Value

Error Code Success-0 Failure- errcode

11.29. Belt Grip Point Compensation

Prototype

ConveyorCatchPointComp(cmp)

Description

Drive belt grip point compensation

Mandatory parameters

  • cmp: Compensate for position [x,y,z]

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.30. linear motion

prototype

ConveyorTrackMoveL(name,tool,wobj,vel=20,acc=100,ovl=100,blendR=-1.0)

Description

Linear motion

Mandatory parameters

  • name: cvrCatchPoint or cvrRaisePoint

  • tool: tool number

  • wobj: workpiece number

Default Parameters

  • vel: speed default 20

  • acc: acceleration default 100

  • ovl: velocity scaling factor default 100

  • blendR: [-1.0]-motion in place (blocking), [0~1000]-smoothing radius (non-blocking) in [mm] default -1.0

Return Value

Error Code Success-0 Failure- errcode

11.31. Conveyor communication input detection

New in version python: SDK-v2.1.1

Prototype

ConveyorComDetect(timeout)

Description

Conveyor communication input detection

Mandatory parameters

  • timeout: Wait timeout duration ms

Default Parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.32. Conveyor communication input detection triggered

New in version python: SDK-v2.1.1

Prototype

ConveyorComDetectTrigger()

Description

Conveyor communication input detection triggered

Mandatory parameters

NULL

Default Parameters

NULL

Return Value

Error Code Success-0 Failure- errcode

11.33. Robot conveyor operation code example

from fairino import Robot
import time
import threading
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
retval = robot.ConveyorStartEnd(1)
print(f"ConveyorStartEnd retval is:{retval}")
retval = robot.ConveyorPointIORecord()
print(f"ConveyorPointIORecord retval is:{retval}")
retval = robot.ConveyorPointARecord()
print(f"ConveyorPointARecord retval is:{retval}")
retval = robot.ConveyorRefPointRecord()
print(f"ConveyorRefPointRecord retval is:{retval}")
retval = robot.ConveyorPointBRecord()
print(f"ConveyorPointBRecord retval is:{retval}")
retval = robot.ConveyorStartEnd(0)
print(f"ConveyorStartEnd retval is:{retval}")
param = [1.010000.0200.00.00.020.0]
retval = robot.ConveyorSetParam(param,0)
print(f"ConveyorSetParam retval is:{retval}")
cmp = [0.00.00.0]
retval = robot.ConveyorCatchPointComp(cmp)
print(f"ConveyorCatchPointComp retval is:{retval}")
index = 1
max_time = 30000
block = 0
retval = 0
p1Desc = [-419.524-13.000351.569-178.1180.3143.833]
p2Desc = [-321.222185.189335.520-179.030-1.284-29.869]
retval = robot.MoveCart(p1Desc, 10100.0)
print(f"MoveCart retval is:{retval}")
retval = robot.WaitMs(1)
print(f"WaitMs retval is:{retval}")
retval = robot.ConveyorIODetect(10000)
print(f"ConveyorIODetect retval is:{retval}")
retval = robot.ConveyorGetTrackData(1)
print(f"ConveyorGetTrackData retval is:{retval}")
retval = robot.ConveyorTrackStart(1)
print(f"ConveyorTrackStart retval is:{retval}")
retval = robot.ConveyorTrackMoveL("cvrCatchPoint"10100)
print(f"TrackMoveL retval is:{retval}")
retval = robot.MoveGripper(index, 514030, max_time, block, 0000)
print(f"MoveGripper retval is:{retval}")
retval = robot.ConveyorTrackMoveL("cvrRaisePoint"10100)
print(f"TrackMoveL retval is:{retval}")
retval = robot.ConveyorTrackEnd()
print(f"ConveyorTrackEnd retval is:{retval}")
robot.MoveCart(p2Desc, 10100.0100.0)
retval = robot.MoveGripper(index, 1004010, max_time, block, 0000)
print(f"MoveGripper retval is:{retval}")
robot.CloseRPC()

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