Hello all,
We have a Fadal with a MP control and a Renishaw tool length probe. I wrote a macro to establish a distance from the tool probe to the top of my part and write that number to a Z value in a fixture offset. The macro basically subtracts the actual absolute Z value from the tool length offset and writes the difference to the fixture offset. My problem is that the macro requires the operator to jog the slides in the middle of the program to touch the tool to the top of the part. When you continue the program the machine always returns the Z axis to where it was prior to the jogged move.
I hope this long-winded explanation makes sense!!

%
O9998( Z FIXTURE OFFSET PROBING MACRO TEST )
N20( VERSION 1 )
N25(BY: JIM )
N30G0E0G80G90G40G49X0Y0Z0H0
N35( PROBE LOCATION IS IN E48 )
N40(VARIABLES)
N45#CLEAR
N55( PROMPT FOR TOOL NUMBER )
N60#:INTOOL
N65#PRINT "ENTER TOOL NUMBER TO MEASURE PART TOP OR 0 TO QUIT"
N70#INPUT V1
N75#INFIX
N80#PRINT "ENTER FIXTURE OFFSET NUMBER"
N85#INPUT V2
N90
N95#IF V2=0 THEN GOTO :END
N100#IF V2<1 THEN GOTO :INVLDFIX
N105#IF V2>=48 THEN GOTO :INVLDFIX
N110
N115(V1 {R1} - TOOL NUMBER)
N120
N125( SAVE TOOL NUMBER IN V1)
N130( VERIFY VALID TOOL NUMBER "0" JUMPS TO END OF PROGRAM )
N135
N140#IF V1=0 THEN GOTO :END
N145#IF V1<1 THEN GOTO :INVLDTOL
N150#IF V1>21 THEN GOTO :INVLDTOL
N155
N160#GOTO :VLDTOL
N165
N170#:INVLDTOL
N175#PRINT " INVALID TOO NUMBER...... TRY AGAIN"
N180#GOTO :INTOOL
N185
N190#INVLDFIX
N195#PRINT "INVALID FIXTURE OFFSET.. TRY AGAIN
N200#GOTO :INFIX
N205
N210
N215#:VLDTOL
N220#R1=V1
N225( TOOL CHANGE )
N230T+R1M6
N235#PRINT " PRESS JOG AND POSITION TOOL TO TOP OF PART"
N240M00*PRESS JOG AND POSITION TOOL TO TOP OF PART"
N245#V2=R6
N250#V10=AZ
N255#V9=H(TN)
N260#R2=V10
N265#R3=V9
N270#R4=R3-R2
N275#V8=R4
N280#R4=FZ+R6
N285:END
N290( RETURN Z TO HOME )
N295G91G28Z0
N300G0X0Y0Z0E0H0
N305M30
%