Home› Programming
Discussion
Back to discussions page
Zach
Posts: 7 Apprentice
360 Degree Fixed Circle Move |
254 views
|
Answered | |
/ Most recent by Parshan
in Programming
|
9 comments |

in Programming
This code basically takes a known center point and then we are calculating based on where we are around the circle in x, y and rz, we used a fixed z so that we could control the height of the bead but change it without needing to change the center point, it was defaulted to 0 and then adjusted up or down as needed. You could also use the
Another way to get the x and y coordinates would be this function:
you could then assign the z for each step into that function. WIth this function you need to pass in the total theta that you have gone, this is in radians, not degrees.
Here is an explanation from UR that does a pretty good job. https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/circle-using-movec/
You will see that point 5 is the same as point 1 so they are only breaking the circle into 2 halves.
That should cause the rotation you are dealing with as that will rotate the point around the Z axis of the center point at the same time you are moving the points away from the center. Sometimes you will need to break the two actions apart and do one step before you do the other step but I would try this.
You can also dop things like pose_add (base frame pose addition) or pose_trans (translation in the frame of reference of the first point in the function, generally aligned with the tool frame)
The nice thing about the pose_trans function is that you can move things that are not aligned with the base frame of reference along the axes of that pose frame of reference. So for instance if I teach a plane and it is not parallel to the base axis, maybe its rotated at 45 degrees as its a sliding table, I could move along the axes of that frame of reference by doing something like
That would move the robot 50 mm in the Y axis of the frame of reference, not the base frame of reference. Using this I could have a variable that represents the center point of the circle. I could then use that point to create the first point, I could then rotate the variable of the center point 90 degree and using the same offset create another point.
Hope that gives you some more insight into how to manipulate points with the robot using the built-in robot math functions.