Here's a snippet of my code with tool heights taken from the table at tool change:
N10 G21
N20 G0 G80 G17 G40 G94 G54 G49 G64 G90
N30 (2 1/2 Axis Profiling – Roughing-1)
N40 M09
N50 T01 G43 H01 M06
N60 S4000 M03
N70 G04 P3
N80 G90
N90 M08
N100 G00 Z1.500
N110 X-4.000 Y-85.100
N120 G01 Z-0.800 F600.0
N130 G01 Y-82.100 F150.0
There are a few oddities in the toolchange code, such as the G90, which is there for historical reasons, must get rid of it sometime. The G04 delay is to allow the spindle to get up to speed before moving axes when machine tapping. The following is the sequence I use after powering up the Tormach:
RESET the controller using the button on the screen
Reference all active axes using the buttons – I reference Z first in case there's anything in the way. This sets the machine co-ordinates using the limit switches
Set Z=0 on the mill table using tool 0, which in my case is a length of silver steel with a ballnose end and longer than any tool I'm likely to use
If I need to fill the tool table I use the electronic tool setter and the offsets screen making sure the tool number box represents the tool I want each time
Once the work is in place I set X=0 and Y=0 on the work, or fixture, according to where I've set the origin in the CAM program
I then set Z=0, using tool 0 with 0 selected in the tool window, on the work or fixture, again according to where the CAM program origin is set
Once that is done putting tool 1 in the spindle,and selecting tool 1 in the box, should give Z=0 at the same origin as set with tool 0
It may not be the most elegant method but it works for me. When I updated to PathPilot I had a disagreement with Tormach about using tool 0. They now recommend using the spindle nose rather than a master tool. But the spindle nose is big and clumsy, and you can't see what you're doing. So I don't use it.
The post-processor is part of the CAM program rather than part of the Tormach controller. It is normal to write ones own. Which is what I did for my CAM program (VisualMill). I've got two, one using tool tables and one not. I use tool tables 95% of the time. But when I use the high speed spindle I don't want to use tables, as the spindle has no repeatable way to swap tools.
Homing for tool changes is something I must sort out. At the moment I simply edit the G-code to put in a G0 Z100.00 to move the spindle up far enough for a manual tool change.
Roll on retirement, then I'll have time to sort out all these little issues!
Andrew