I'm programming my first Yaskawa (SG-650). I have an application where I wish to take an object to a dynamically defined point in space and rotate it more than a full revolution while a camera scans it.
- Robot picks parts at top, center of part. Part is cylindrical. Height and diameter vary per part.
- Robot calculates an offset for the specific part to bring the edge of the part to the camera's focal point.
- Robot presents part with axis T rotated -300 degrees (or so)
- Robot rotates axis T to 300 degrees (or so)
CAMERA_FOCAL_XYZ
Frame: Base
X = ***.***
Y = ***.***
Z = ***.***
OFFSET_PART_XYZ
Frame: Base
X = Part_Diameter/2
Y = 0
Z = Part_Height/2
Here was the original plan:
- Define an origin where the camera's focal point isCAMERA_FOCAL_XYZ
- Create a modified origin for rotation using the part parametersNEW_ORIGIN_XYZ
MULMAT NEW_ORIGIN_XYZ CAMERA_FOCAL_XYZ OFFSET_PART_XYZ - Convert NEW_ORIGIN_XYZ to NEW_ORIGIN_PULSE. << impossible on Yaskawa!!!??
- Copy NEW_ORIGIN_PULSE to START_PULSE andEND_PULSE
SET START_PULSE NEW_ORIGIN_PULSE
SET END_PULSE NEW_ORIGIN_PULSE - Modify T pulses for Start and End points
SETE START_PULSE (4) -60000
SETE END_PULSE (4) 60000 - Execute motion
MOVJ START_PULSE
MOVJ END_PULSE
The issue, as noted above is that there doesn't seem to be a method to convert XYZ to Pulse.
Alternatively, I can substitute step #3 above with a motion command followed by a GET to record the pulses
MOVJ NEW_ORIGIN_XYZ
GETS NEW_ORIGIN_PULSE $PX000
I really would like to avoid that extra motion, however. While functional, it would look sloppy.
Another alternative I've considered is doing everything in XYZ:
- Define an origin where the camera's focal point isCAMERA_FOCAL_XYZ
- Create a modified origin for rotation using the part parametersNEW_ORIGIN_XYZ
MULMAT NEW_ORIGIN_XYZ CAMERA_FOCAL_XYZ OFFSET_PART_XYZ - Copy NEW_ORIGIN_XYZ to START_XYZ andEND_XYZ
- SET START_XYZ NEW_ORIGIN_XYZ
SET END_XYZ NEW_ORIGIN_XYZ - Modify zz rotation for Start and End points
SETE START_XYZ (6) some_start_angle
SETE END_XYZ (6) some_end_angle - Execute motion
MOVJ START_XYZ
MOVJ END_XYZ
My fear with this method is multifaceted:
- I need to be very careful in defining the start and end angles, or I risk hitting T axis pulse limits as the center point changes positions around the cell. (no, it's not really changing, but I want to try to make this reusable elsewhere)
- From my reading, Motoman will try to take the "optimal" paths between points. I haven't found a way to configure a Point to tell it -300 degrees, without it assuming I mean +60 degrees.
I come from a FANUC background. There we can configure a Position Register with NUT/NDB rotations. E.g., NUT01-2 would mean that the 4th axis is rotated 1 revolution and the 6th axis rotated 2 full revolutions to reach the point. When you go to a point, the robot will honor those NUT/FDB parameters. I haven't found that option yet with Motoman. - If Motoman MUST take the shortest path, I have to teach multiple steps in order to wind and unwind the T axis. Talk about ugly code ... I'd have to make eight points to wind and unwind T.
rZ_1 = -150 (anything less than -180?
rZ_2 = -300 (Start)
rZ_3 = -150 (interim 1)
rZ_4 = 0 (interim 1)
rZ_5 = 150 (interim 1)
rZ_6 = 300 (end)
rZ_7 = 150 (unwind 1)
rZ_8 = 0 (unwind 2)
I'm all ear's guys. What's your recommended approach for forcefully winding, then unwinding the T axis at any given XYZ location?
Also, I understand that Endless Function (limitless T rotation) is an option. Unfortunately, no one had the forethought to buy it for this robot. That would've been the best method to accomplish this!