Hi there,
This is my first topic. I've found many valuable solutions on this forum by the past. But no clues for this one :
I'm working with a KR500-2MT / KRC2 / KSS5.6 and a home made turntable (for stone milling).
I need to improve the calibration of the turn table, that is to find its rotation axis regarding $world.
For several reasons this is the method I want to use :
1) place a fixed spike on the table. The spike head describes a circle around the turn table axis when the table turns.
2) record the position of the head of the spike by touching it (manual jog) with a properly calibrated spike mounted on my robot arm ($POS_ACT)
3) do that for several angles along a full turn (more points => greater accuracy)
4) fit the best circle through the measured points (least square method)
5) from the circle, deduce the turn table center and axis
My concern is that I need to touche and record a good bunch of points to increase the accuracy (10/20). I know how to get "almost" from one position to the next one (it is just a matter of rotation in the table basis). I have already written a program so that the robot arm follows the spike from position to position.
My question is how can I pause my program at each step, then manually jog the robot so the two spikes touch each others, then save the teach position by reading $POS_ACT, then return to the automatic execution of the program that will move table and robot to the (almost) next position, ... ??
Thanks,
Lionel
$BASE is set to the actual base of the turn table
stepAngle = 360.0/20.0
turnTable = {A1 0, A2 0, A3 0, A4 0, A5 0, A6 0, E1 0, E2 0}
turnTable.E2 = stepAngle ; E2 si for the turn table, E1 for a linear track
Rotation = {X 0, Y 0, Z 0, A 0, B 0, C 0}
Rotation.A = stepAngle
FOR i=1 TO 20 STEP 1
WAIT FOR $IN[1] ; Here I need to do the teaching by manually joging the arm. How ? I'm triggering the next step by pressing a push button to leave the wait instruction
; we have left the wait : we recorde the $POS_ACT
PTS[i] = $POS_ACT
; escape the spike head by moving up 50mm
LIN_REL {Z 50}
; turn the table by +stepAngle
PTP_REL turnTable ;
; Move the arm by rotating the TCP by +stepAngle but keep the previous orientation
RPT = Rotation:$POS_ACT ;
RPT.A = $POS_ACT.A
RPT.B = $POS_ACT.B
RPT.C = $POS_ACT.C
LIN RPT
ENDFOR
PTP HOME
END
Display More