Here is a macro that can be added to the Renishaw macros to set P- Cool.
Credits go to user pit202...
Code:
%
O09880 ( spigot position calcutation )
( **************************** )
( * author : [email protected] * )
( * date : 2009.05.04 * )
( * usage : G65 P9880 Txx * )
( **************************** )
#9= #[ 2000 + #20 ]
#10= 66. ( min. tool length )
#11= 8. ( spig. pos. for min. tool )
#12= 185. ( max. tool length )
#13= 15. ( spig. pos. for max. tool )
#14= [ #13 - #11 ] / [ #12 - #10 ]
#15= [ [ - #10 ] * [ #13 - #11 ] - [ #12 - #10 ] * [ - #11 ] ] / [ #12 - #10 ]
#16= FIX[ #14 * #9 + #15 ]
#[ 3400 + #20 ]= #16
M99
%
look at the first lines :
Code:
#10= 66. ( min. tool length )
#11= 8. ( spig. pos. for min. tool )
#12= 185. ( max. tool length )
#13= 15. ( spig. pos. for max. tool )
all you need to do is change those lines , find a shortest tool , messure it and find out which coolant position is the best, the tool length put in #10 value , and spigot position in #11 , do the same with a long tool , and put the values into #12 and #13.
get a code from VQC to messure the tool , after G65 Pxxxx line put
Code:
G00 G90
G65 P9023 A12. T1
G65 P9880 T1 < ----- line added manually
to not writing every time this line I added a line in the O9996 VQC file like this :
Code:
N1301
(TEMPLATE)
(NAME Auto Length Only)
..................
(GCODE)
(T#ToolNo M06)
(G00 G90)
(G65 P9023 A12. T#ToolNo)
(G65 P9880 T#ToolNo) < ---- here is my line
(M30)
(END GCODE)