hi all, I am writing subrutine for automatic tool length measuring, as I have to change tool manually on my 5 axis ...
for now I came this far: o<tool_probe>sub #1002 = #5223 (store G54 Z offset) G49 (cancel existing offset if it is any) G30 (to probe location) G91 (incremental mode) G38.2 Z-150 F300 (probe fast) G0 Z5 G38.2 Z-10 F80 (probe slow) #1003 = #5063 (store probe resault) #1000 = -[#1001 - [#1003]-[#5223]] (calcutaing tool length ~ #1001 is previous probed distance without tool) #5223 = [#1002-[#1000]] (correction in G54 Z offset) G10 L1 P1 W[#1000] (Updating tool table) G90 (absolute mode) G30 (to safe distance) T1 G43 (selecting tool) G1 W0 F500 (zeroing W axis for kinematics) o<tool_probe>endsub So, with this I get correct tool length in my tool table, but problem I still have is that when subrutine ends, and for example next line in code is just going to Z0, machine goes higher for the distance of measured tool length (G54 Z variable number is correct Z offset according to new tool length), and if I enter in MDI manually G0 Z0, then it goes to correct Z height, which is on same location as before calling subrutine and without any tool compensation. For test purpose I was calling subrutine with: G0 x0y0z0 o<tool_probe>CALL G0 x0 y0 Z0 M30 What am I missing or doing wrong? ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
