While I'm waiting for delivery of my cnc mill, its been recommended to me to learn g-code rather than just relying on conversational programming. Its all pretty bizarre to me, but after watching a bunch of videos have made my first try at it.
The project consists of a 5" x 5" x 0.5" piece of aluminum with four 0.5 holes drilled in it as a 3" square. This code is for the four center drill holes. X0 Y0 is the front left corner. Z0 is the top of the work piece.
This is presented as my work process rather than the way the actual code will be (has all my notes and expanations included so I can check whther it makes sense. Please let me know whether it will work.
% begin
O00123 program number
N5 G90 G20 G54 G28 G40 G80; Safe line G90 absolute positioning command
G20 verify inch coordinate positioning
G54 work offset positioning coordinate #1
G28 machine zero return thru reference point
G40 cutter compensation cancel G41/G42/G141
G80 cancel canned cycle
N10 T01; Load tool 1 (center drill)
N15 G43 H01; Tool length compensation Tool 1
N20 S1000 M03; Set spindle speed 2000rpm Turn spindle on clockwise
N25 G00 X-1.0 Y1.0; Fast movement to X,Y coordinates (first hole coordinates)
N30 Z -1.0; Fast movement to Z coordinate
N35 G01 Z 0.1; Slow movement to Z .1000 above workpiece N40 F20 Z-0.35 Z0.35; Drill start hole .25" deep and return
N45 X-1.0 Y3.0; Coordinates for second hole
N50 Z-0.35 Z0.35; Drill start hole .25" deep and return
N55 X-3.0 Y3.0; Coordinates for third hole
N60 Z-0.35 Z0.35; Drill start hole .25" deep and return
N65 X-3.0 Y-3.0; Coordinates for fourth hole
N70 Z-0.35 Z0.35; Drill start hole .25" deep and return
N75 Z1.0 M05 Raise 1" above work spindle stop
N80 G28 Machine zero return
% End
Thanks
Sorry. Formatting got all screwed up when I posted