(program skeleton for use as basis for NC programs)
N0010 G17 G20 G40 G49 (XY plane select, inch mode, cancel diameter comp, cancel length offset)
N0020 G54 G80 G90 G94 (coordinate system 1, cancel motion, non-incremental motion, feed/minute mode)
N0030 G53 G0 Z0 (temporarily cancel offsets, retract quill)
N0040 X0 Y0 (move X and Y to the tool change position, change as required)
N0050 M05 M09 (spindle and coolant off)
(display a message for the operator)
N0060 (MSG,Load tool #1)
N0070 M00 (don't move until the operator presses the S key)
N0080 T1 M06 G43 H1 (change to tool 1 and get its length from the tool table)
(start G0 lines with a .001 second pause to avoid motion blending problems)
N0090 G04 P.001 G0 X1.0 Y1.0 S1000 M3 M8 (rapid to the starting XY, spindle CW, coolant ON, change as required)
N0100 G04 P.001 G0 Z0.25 (rapid to .25" above the part, change as required)
N0110 G0 Z0.25 (rapid to .25" above the part, change as required)
N0120 M05 M09 (spindle and coolant off)
N0130 G53 G0 Z0 (temporarily cancel offsets, retract quill)
N0140 X0. Y0. (move X and Y to the tool change position, change as required)
N0150 T0 M6 (remove tool)
N0160 (MSG,Remove tool)
N0170 M00 (don't do anything until operator presses the S key)
N0180 G49 (cancel length offset)
N0150 M2 (end program)
