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

MoveC target can't be reached

#1
I'm trying to create a Python script which is creating a Circle with the MoveC movement command. Right now I cant make the robot do the circle. In these lines I'm reading a file which contains the center of a circle(data[i]) and r which is the radius of the circle. And it can't reach the target2 in the line:
Code:
robot.MoveC(targetA, targetB) 

Sample code:
Code:
for i in range(len(data)):
    pose_i = pose_ref  # Use a different variable name for clarity
    x, y, z = data[i][0], data[i][1], data[i][2]
    xyz_values = [x, y, z]
    print(xyz_values)
    POINTA = xyz_values[0] + r, xyz_values[1], xyz_values[2]
    POINTB = xyz_values[0], xyz_values[1] - r, xyz_values[2]
    POINTC = xyz_values[0] - r, xyz_values[1], xyz_values[2]
    POINTD = xyz_values[0], xyz_values[1] + r, xyz_values[2]
    targetA = RDK.AddTarget("POINTA", frame)
    targetB = RDK.AddTarget("POINTB", frame)
    targetC = RDK.AddTarget("POINTC", frame)
    targetD = RDK.AddTarget("POINTD", frame)
    robot.MoveC(targetA, targetB)  # First quarter (START → RIGHT → TOP)
    robot.MoveC(targetB, targetC)  # Second quarter (RIGHT → TOP → LEFT)
    robot.MoveC(targetC, targetD)  # Third quarter (TOP → LEFT → BOTTOM)
    robot.MoveC(targetD, targetA)  # Fourth quarter (LEFT → BOTTOM → START)


Attached Files
.png   ss.png (Size: 20.56 KB / Downloads: 58)
#2
If the target is not reachable you may need to change it. A quick workaround would be to turn around the Z axis of the TCP to make your target reachable.
  




Users browsing this thread:
1 Guest(s)