Re: CNC a tree
Posted: Thu Oct 29, 2015 6:55 pm
The program is really pretty simple. The following would mill a pocket that is about an inch and an eighth square by half an inch deep.
G21
G90
G91 G28 X0 Y0 Z0 M05
M5
G90 M6 T0101
M03 S2800
G00 X13.055 Y13.388
G00 Z2.000
G01 Z-0.500 F62.5
G01 X13.026 Y13.408 F250.0
X12.935 Y13.547
X13.055 Y13.388
X13.231 Y13.275
G01 X13.189 Y13.419 F250.0
X13.215 Y13.330
X13.175 Y13.511
X13.182 Y36.539
X13.222 Y36.667
X13.228 Y36.679
X13.275 Y36.769
X13.419 Y36.811
X13.330 Y36.785
X13.511 Y36.825
X36.539 Y36.818
X36.769 Y36.725
X36.811 Y36.581
X36.785 Y36.670
X36.825 Y36.489
X36.818 Y13.461
X36.725 Y13.231
X36.581 Y13.189
X36.670 Y13.215
X36.489 Y13.175
X13.461 Y13.182
X13.231 Y13.275
X15.716 Y15.722
G01 X15.722 Y34.284 F250.0
X34.284 Y34.278
X34.278 Y15.716
X15.716 Y15.722
X18.257 Y18.261
G01 X18.261 Y31.743 F250.0
X31.743 Y31.739
X31.739 Y18.257
X18.257 Y18.261
X20.797 Y20.800
G01 X20.800 Y29.203 F250.0
X29.203 Y29.200
X29.200 Y20.797
X20.797 Y20.800
X23.338 Y23.339
G01 X23.339 Y26.662 F250.0
X26.662 Y26.661
X26.661 Y23.338
X23.338 Y23.339
G00 Z2.000
G00 X36.453 Y12.935
G01 Z-0.500 F62.5
G01 X36.612 Y13.055 F250.0
X36.592 Y13.026
X36.453 Y12.935
G00 Z2.000
G00 X37.065 Y36.453
G01 Z-0.500 F62.5
G01 X36.970 Y36.574 F250.0
X36.945 Y36.612
X36.974 Y36.592
X37.065 Y36.453
X36.623 Y37.407
G01 X36.621 Y37.416 F250.0
X36.603 Y37.568
X36.623 Y37.407
G00 Z2.000
G00 X13.388 Y36.945
G01 Z-0.500 F62.5
G01 X13.408 Y36.974 F250.0
X13.547 Y37.065
X13.426 Y36.970
X13.388 Y36.945
X12.432 Y36.603
G01 X12.593 Y36.623 F250.0
X12.584 Y36.621
X12.432 Y36.603
G00 Z2.000
G0 Z2.000
G91 G28 X0 Y0 Z0 M05
G90
M30
The codes that start with "G" are machine codes that tell the machine to move in a certain direction (linear / circular etc) The Z coordinates set the depth of the cutter, the X / Y coordinates are where the cutter is going. The F codes are the feed rate in mm / minute. the S code sets maximum spindle speed. The M codes turn the spindle on and off and end the program. The T code sets the tool (length of cutter / flutes and diameter are stored)
G21
G90
G91 G28 X0 Y0 Z0 M05
M5
G90 M6 T0101
M03 S2800
G00 X13.055 Y13.388
G00 Z2.000
G01 Z-0.500 F62.5
G01 X13.026 Y13.408 F250.0
X12.935 Y13.547
X13.055 Y13.388
X13.231 Y13.275
G01 X13.189 Y13.419 F250.0
X13.215 Y13.330
X13.175 Y13.511
X13.182 Y36.539
X13.222 Y36.667
X13.228 Y36.679
X13.275 Y36.769
X13.419 Y36.811
X13.330 Y36.785
X13.511 Y36.825
X36.539 Y36.818
X36.769 Y36.725
X36.811 Y36.581
X36.785 Y36.670
X36.825 Y36.489
X36.818 Y13.461
X36.725 Y13.231
X36.581 Y13.189
X36.670 Y13.215
X36.489 Y13.175
X13.461 Y13.182
X13.231 Y13.275
X15.716 Y15.722
G01 X15.722 Y34.284 F250.0
X34.284 Y34.278
X34.278 Y15.716
X15.716 Y15.722
X18.257 Y18.261
G01 X18.261 Y31.743 F250.0
X31.743 Y31.739
X31.739 Y18.257
X18.257 Y18.261
X20.797 Y20.800
G01 X20.800 Y29.203 F250.0
X29.203 Y29.200
X29.200 Y20.797
X20.797 Y20.800
X23.338 Y23.339
G01 X23.339 Y26.662 F250.0
X26.662 Y26.661
X26.661 Y23.338
X23.338 Y23.339
G00 Z2.000
G00 X36.453 Y12.935
G01 Z-0.500 F62.5
G01 X36.612 Y13.055 F250.0
X36.592 Y13.026
X36.453 Y12.935
G00 Z2.000
G00 X37.065 Y36.453
G01 Z-0.500 F62.5
G01 X36.970 Y36.574 F250.0
X36.945 Y36.612
X36.974 Y36.592
X37.065 Y36.453
X36.623 Y37.407
G01 X36.621 Y37.416 F250.0
X36.603 Y37.568
X36.623 Y37.407
G00 Z2.000
G00 X13.388 Y36.945
G01 Z-0.500 F62.5
G01 X13.408 Y36.974 F250.0
X13.547 Y37.065
X13.426 Y36.970
X13.388 Y36.945
X12.432 Y36.603
G01 X12.593 Y36.623 F250.0
X12.584 Y36.621
X12.432 Y36.603
G00 Z2.000
G0 Z2.000
G91 G28 X0 Y0 Z0 M05
G90
M30
The codes that start with "G" are machine codes that tell the machine to move in a certain direction (linear / circular etc) The Z coordinates set the depth of the cutter, the X / Y coordinates are where the cutter is going. The F codes are the feed rate in mm / minute. the S code sets maximum spindle speed. The M codes turn the spindle on and off and end the program. The T code sets the tool (length of cutter / flutes and diameter are stored)