Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Control robot and turn table through python api

#9
Thanks Albert for your answer. For example, with program in bellow, I get the result in the attached file. My purpose, is to have x,y,z,w,p,r format at P[3] and avoit joint fomat in GP1.

p_home = Fanuc_2_Pose([Ox,Oy,Oz,0,0,90])
robot.MoveL(p_home)

p_target = Fanuc_2_Pose([Ox+170,Oy,Oz,0,0,90])
robot.MoveL(p_target)

# Set the value of the external axis
e6 = 30 # in deg for a turntable
e7 = 180 # in deg for a turntable

# Create target and set the desired external axes and pose
t = RDK.AddTarget("Start", reference, robot)
t.setJoints([0,0,0,0,0,0, e6, e7])
t.setPose(robot.Pose())

t.setAsCartesianTarget ()
t.Joints()

jnts = t.Joints()
print(t.Name() + "-Joints: " + str(jnts.list()))

robot.MoveJ(t)


Messages In This Thread
RE: Control robot and turn table through python api -byDavid-04-06-2022, 02:07 PM



Users browsing this thread:
1 Guest(s)