Foranyone curious as to how my difference between two offsets on an external axis worked out heres a clip to watch.
the code running looks like this:
!points for the axis offset search
VAR robtarget posrotateL:=[[416.06,-386.45,74.48],[0.327233,0.028379,0.015076,-0.944398],[-1,-1,1,0],[0.000962433,9E+09,9E+09,9E+09,9E+09,9E+09]];
VAR robtarget posrotateR:=[[416.06,-386.45,74.48],[0.327233,0.028379,0.015076,-0.944398],[-1,-1,1,0],[0.000962433,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget topointR:=[[225.9,762.02,317.87],[0.44038,0.566481,-0.541874,0.43765],[0,-1,-1,0],[110,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget topointL:=[[225.81,723.75,317.66],[0.478916,0.514777,-0.591305,0.394971],[0,-1,-1,0],[-20,9E+09,9E+09,9E+09,9E+09,9E+09]];
PERS extjoint jointposdiff:=[-0.675865,9E+09,9E+09,9E+09,9E+09,9E+09];
CONST robtarget Zset1nom:=[[229.66,779.4,285.75],[0.09581,0.369907,0.921339,-0.071583],[0,-1,0,0],[0.0473112,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget Zsettoopt1:=[[229.53,630,310],[0.095713,0.369881,0.92134,-0.071823],[0,-1,0,0],[0.0467033,9E+09,9E+09,9E+09,9E+09,9E+09]];
PERS robtarget zset1:=[[229.554,781.029,285.467],[0.095746,0.369924,0.921324,-0.0717741],[0,-1,0,0],[0.0472099,9E+09,9E+09,9E+09,9E+09,9E+09]];
PERS tooldata torch:=[TRUE,[[-40.21,2.86,472.9],[0.284403,0.002551,-0.958663,0.008598]],[5,[85,0,65],[1,0,0,0],0.01,0.01,0.01]];
VAR num eaxAright;
VAR num eaxAleft;
VAR num eaxdiff;
PROC ExtAxisOffs1()
ActUnit M7C1B2;
top:
EOffsOff;
PDispOff;
SetDO doFrTouchSense,0;
PulseDO\PLength:=0.3,doFrFeedFwd;
MoveJ [[295.49,800.79,596.26],[0.440504,0.566534,-0.541763,0.437594],[0,-1,-1,0],[0.0465514,9E+09,9E+09,9E+09,9E+09,9E+09]],v300,z5,torchwchanger\WObj:=positioner1;
PDispOn\ExeP:=zset1,Zset1nom,torchwchanger\WObj:=positioner1;
!MoveL to start point
MoveL [[225.87,762.04,317.86],[0.440387,0.566489,-0.541886,0.437618],[0,-1,-1,0],[60.1326,9E+09,9E+09,9E+09,9E+09,9E+09]],v200,fine,torchwchanger\WObj:=positioner1;
!Search to the Right
SetDO doFrTouchSense,1;
SearchL\SStop,diFrArcEst,posrotateR,topointR,speed2,torchwchanger\WObj:=positioner1;
WaitTime 0.2;
!extract ext axis angle to variable
eaxAright:=posrotateR.extax.eax_a;
!MoveL to start point number 2
MoveL [[225.87,762.04,317.86],[0.440387,0.566489,-0.541886,0.437618],[0,-1,-1,0],[60.1326,9E+09,9E+09,9E+09,9E+09,9E+09]],v200,z5,torchwchanger\WObj:=positioner1;
MoveL [[225.81,723.73,317.67],[0.478934,0.514795,-0.591266,0.394984],[0,-1,-1,0],[60,9E+09,9E+09,9E+09,9E+09,9E+09]],v200,fine,torchwchanger\WObj:=positioner1;
!Search to the left
SearchL\SStop,diFrArcEst,posrotateL,topointL,speed2,torchwchanger\WObj:=positioner1;
WaitTime 0.2;
!extract ext axis angle to variable
eaxAleft:=posrotateL.extax.eax_a;
eaxdiff:=(eaxAright+eaxAleft)/2-60;
!in case offset is backwards add in this
!eaxdiff:=eaxdiff * -1;
jointposdiff.eax_a:=eaxdiff;
EOffsSet jointposdiff;
WaitTime 0.5;
SetDO doFrTouchSense,0;
!Move to eaxct center between blades for good luck
MoveL [[225.72,806.43,358.14],[0.250125,0.672964,-0.647797,0.254786],[-1,-1,-1,0],[60.0025,0,0,0,0,0]],v200,fine,torchwchanger\WObj:=positioner1;
Break;
RETURN;
MoveL topointL,v300,fine,torchwchanger\WObj:=positioner1;
MoveL topointR,v300,fine,torchwchanger\WObj:=positioner1;
MoveAbsJ [[0,0,0,0,0,0],[0,9E+09,9E+09,9E+09,9E+09,9E+09]]\NoEOffs,v200,fine,torchwchanger\WObj:=positioner1;
ENDPROC