top of page

Python 13.44. UDP extension axes synchronized with robot linear motion 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')
# Set the UDP communication parameters and load
robot.ExtDevSetUDPComParam("192.168.58.88"202121003100110010)
robot.ExtDevLoadUDPDriver()
# Set the parameters of the extended axis
robot.SetAxisDHParaConfig(4200200000000)
robot.SetRobotPosToAxis(1)
robot.ExtAxisParamConfig(101100-1001010121310720100)
# Expand the axis to enable and return to zero
robot.ExtAxisServoOn(10)
robot.ExtAxisSetHoming(10203)
# Extended axis coordinate system calibration
pos = []  # Please fill in the coordinates of the marking points
robot.SetRefPointInExAxisEnd(pos)
robot.PositionorSetRefPoint(1)  # It needs to be called four times for calibration
error,coord = robot.PositionorComputeECoordSys()
robot.ExtAxisActiveECoordSys(11, coord, 1)
# Synchronize the starting and ending points of the movement
startdescPose = []  # Please fill in the coordinates of the marking points
startjointPos = []  # Please fill in the coordinates of the marking points
startexaxisPos = []  # Please fill in the coordinates of the marking points
enddescPose = []  # Please fill in the coordinates of the marking points
endjointPos = []  # Please fill in the coordinates of the marking points
endexaxisPos = []  # Please fill in the coordinates of the marking points
# Move to the starting point
robot.ExtAxisMove(startexaxisPos, 20-1)
offdese = [000000]
robot.MoveJ(joint_pos=startjointPos, tool= 1,user= 1,vel= 100,acc= 100,ovl= 100,exaxis_pos= startexaxisPos,blendT= 0)
# Perform synchronous linear motion
robot.ExtAxisSyncMoveL(endjointPos, enddescPose, 11, endexaxisPos, 10010010000, offdese)
robot.CloseRPC()

13.45. UDP extension axes synchronized with robot circular motion

New in version python: SDK-v2.1.5

Prototype

ExtAxisSyncMoveC(desc_pos_p, tool_p, user_p,exaxis_pos_p, desc_pos_t, tool_t, user_t,exaxis_pos_t,joint_pos_p=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], joint_pos_t=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],vel_p =20.0, acc_p=100.0, offset_flag_p=0, offset_pos_p =[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], vel_t=20.0, acc_t=100.0, offset_flag_t=0, offset_pos_t=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], ovl=100.0, blendR=-1.0, config=-1)

Description

UDP extension axis synchronized with robot circular motion

Mandatory parameters

  • desc_pos_p: path point Cartesian position in [mm][°];

  • tool_p: pathpoint tool number, [0~14];

  • user_p: pathpoint artifact number, [0~14];

  • exaxis_pos_p: path point external axis 1 position ~ external axis 4 position Default [0.0,0.0,0.0,0.0];

  • desc_pos_t: Cartesian position of the target point in [mm][°];

  • tool_t: tool number, [0~14];

  • user_t: artifact number, [0~14];

  • exaxis_pos_t: target point external axis 1 position ~ external axis 4 position default [0.0,0.0,0.0,0.0];

Default Parameters

  • joint_pos_p: target joint position in [°] Default initial value is [0.0,0.0,0.0,0.0,0.0,0.0,0.0], default value calls inverse kinematics to solve for the return value.

  • joint_pos_t: target joint position in [°] Default initial value is [0.0,0.0,0.0,0.0,0.0,0.0,0.0], default value calls inverse kinematics to solve for the return value.

  • vel_p: path point velocity percentage, [0~100] default 20.0;

  • acc_p: path point acceleration percentage, [0~100] not open yet, default 0.0;

  • offset_flag_p: whether the path point is offset [0]-no offset, [1]-offset in workpiece/base coordinate system, [2]-offset in tool coordinate system Default 0;

  • offset_pos_p: path point position offset in [mm][°] Default [0.0,0.0,0.0,0.0,0.0,0.0];

  • vel_t: Target point velocity percentage, [0~100] default 20.0;

  • acc_t: target point acceleration percentage, [0~100] Not open yet Default 0.0;

  • offset_flag_t: whether the target point is offset or not [0]-no offset, [1]-offset in workpiece/base coordinate system, [2]-offset in tool coordinate system Default 0;

  • offset_pos_t: target point attitude offset in [mm][°] Default [0.0,0.0,0.0,0.0,0.0,0.0];

  • ovl: velocity scaling factor, [0~100] default 100.0;

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

  • config: Reverse the joint space configuration, [-1]- calculate based on the current joint position, [0~7]- solve based on the specific joint space configuration, default -1

Return Value

Error Code Success-0 Failure- errcode;

13.46. UDP extension axes synchronized with robot circular motion 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')
# Set the UDP communication parameters and load
robot.ExtDevSetUDPComParam("192.168.58.88"202121003100110010)
robot.ExtDevLoadUDPDriver()
# Set the parameters of the extended axis
robot.SetAxisDHParaConfig(4200200000000)
robot.SetRobotPosToAxis(1)
robot.ExtAxisParamConfig(101100-1001010121310720100)
# Expand the axis to enable and return to zero
robot.ExtAxisServoOn(10)
robot.ExtAxisSetHoming(10203)
# Extended axis coordinate system calibration
pos = []  # Enter the coordinates of the reference point
robot.SetRefPointInExAxisEnd(pos)
robot.PositionorSetRefPoint(1)  # Call four times to complete the calibration
coord = []
error,coord = robot.PositionorComputeECoordSys()
robot.ExtAxisActiveECoordSys(11, coord, 1)
# Synchronous arc starting point, middle point and end point
startdescPose = []# Input coordinates
startjointPos = []# Input coordinates
startexaxisPos =[]  # Enter the coordinates of the extended axis
middescPose = []# Input the midpoint
midjointPos = []
midexaxisPos =[]
enddescPose = []
endjointPos = []
endexaxisPos =[]
# Move to the starting point
robot.ExtAxisMove(startexaxisPos, 20-1)
offdese = [000000]
robot.MoveJ(joint_pos=startjointPos,tool= 1,user= 1,vel= 100,acc= 100,ovl= 100,exaxis_pos= startexaxisPos,blendT= 0,offset_flag= 0,offset_pos= offdese)
# Start synchronous circular arc movement
robot.ExtAxisSyncMoveC(midjointPos,middescPose,1,1,midexaxisPos,
                       endjointPos,enddescPose,1,1,endexaxisPos,
                       100,100,0,offdese,
                       100,100,0,offdese,
                       100,0)
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