I’m working on a program to unload part from drawer and for that, I attached a part of my code. My Offset_X and my Offset_Y is related to my frame, Offset_Z also related to my frame but for Offset_Z I want to be related to my tool not to my frame . Could anyone help me with that.(the reason because my part is not perpendicular to my frame)
$base=base_data[6] ; cDrawer 1 frame
$tool=tool_data[6] ; raw part tool
For Column=1 to 4
For Row=1 to 9
;fold Position Pick Calculation
Calculated_Pick_POS=Xpp3
Calculated_Pick_POS.x=Calculated_Pick_POS.x+Offset_X*(Column-1)
Calculated_Pick_POS.y=Calculated_Pick_POS.y+Offset_Y*(Row-1)
Above_Part=Calculated_Pick_POS
Above_Part.z=Above_Part.z+Offset_Z
;endfold Position Pick Calculation
SPTP Above_Part
GRIPPER1_OPEN()
SLIN Calculated_Pick_POS
GRIPPER1_CLOSE()
SLIN Above_Part
Note: i followed Kuka training but we don't cover tool offset, we cover only base frame offset