I like to move by the Manual Control Pendant (MCP) the tool of a RX90 Staubli Robot with CS7 - MV controller V+ 11.4, aligned with two work spaces (or reference frames), pick & spindle frames, to facilitate teaching to the operator.
>In the pick frame (pick.jpg) the base of the arm is rotated 45 degrees approx, and simply by the command
TOOL HERE:RZ(-45)
when I move the tool by the MCP is parallel to the in-feed conveyor, or more or less is enough for pick&place operation.
>In the spindle frame (spindle.jpg) the tool has two rotations with respect to the base of the robot, first one is 45º around Z axis, like at pick frame, and a second one of 90 degrees around Y axis to get parallel to the rack of the spindles. In this situation is needed a more complex calculation of the TOOL offset, and I use the following code to teach a reference frame.
I defined a reference frame (
http://www1.adept.com/main/ke/DATA/v%20plus/v%20language%20user/locations4.html)
1.- I did TOOL null
2.- I align the gripper with the spindle rack, by the use of the pendant in World, Tool or Joint mode, as needed.
3.- I did the reference frame procedure, I teach origin location as the gripper was.
4.- I move the gripper to the X-axis reference point, by the pendant, in Tool mode, only X, Y axis push buttons.
5.- I move the gripper to the Y-axis reference point, by the pendant, in Tool mode, only X, Y axis push buttons.
6.- I calculate the FRAME and then the data values of y,p,r component are set to the new TOOL, as in the code.
After that procedure,when I use the pendant in TOOL mode, by pressing Y+ the EOAT moves to the Z+ (red one)
by pressing Z+ the EOAT moves to the Y+ (green one) and it is not parallel to the spindle rack
by pressing X+ the EOAT moves to the X+ (blue one) but not parallel to the spindle rack.
The results are not good, please see picture spindle.jpg for the expected moves, because in spindle frame I need to move the tool perfectly aligned with the rack to drill the part on the gripper.
I think that the calculation of the offset it is not very well, because the movements are not as expected.
I need help to calculate this one to move the tool by the Manual Control Pendant, because when I move the robot by code to a location, by reference frame, it works fine.
Thanks in advance
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<
; Get the locations to define the pallet frame
.PROGRAM teach.frame.spindle()
DETACH () ;Release robot for use by the MCP
PROMPT "Place robot at assembly origin. ", $ans
HERE loc.origin ;Record the frame origin
PROMPT "Place robot at point on the assm. x-axis. ", $ans
HERE loc.x.axis ;Record point on x-axis
PROMPT "Place robot at point in positive y direction. ", $ans
HERE loc.pos.y ;Record positive y direction
; Create the local reference frame "assm.frame"
SET assm.frame = FRAME(loc.origin, loc.x.axis, loc.pos.y, loc.origin)
DECOMPOSE dec[1] = assm.frame
SET new_tool = TRANS (0, 0, 0, dec[4], dec[5], dec[6])
TOOL new_tool
; Teach the locations on the assembly
PROMPT "Place the robot in the first location. ", $ans
HERE assm.frame:loc.1 ;Record the first location
PROMPT "Place the robot in the second location. ", $ans
HERE assm.frame:loc.2 ;Record the second location
; etc.
; Move to the locations on the assembly
ATTACH () ;Reattach the robot
APPRO assm.frame:loc.1, 25
MOVE assm.frame:loc.1
;Activate gripper
DEPART 25
APPRO assm.frame:loc.1, 25
MOVE assm.frame:loc.2
;Activate gripper
DEPART 25
.END
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<