CNCMill: Difference between revisions
Line 267: | Line 267: | ||
G1 X6.3 (feed to bore size) | G1 X6.3 (feed to bore size) | ||
G2 X6.3 Y0 I0 J0 (bore circle to same location around machine zero) | G2 X6.3 Y0 I0 J0 (bore circle to same location around machine zero) | ||
G1 X0 Y0 (feed to origin) | |||
G0 Z20 (traverse to 20mm above part) | |||
</pre> | |||
=== Arc Cut Perimeter === | |||
Zero Tool Z w/ 3/8 Square End Mill | |||
==== Bearing Retainer ==== | |||
<pre> | |||
G21 (set units to millimeters) | |||
G90 (set measurements to absolute, relative to machine zero) | |||
G0 Z20 (traverse to 20mm above part) | |||
G0 X0 Y0 (traverse to origin XY) | |||
F300 (set feed rate to 300mm per minute) | |||
G0 Z5 (traverse to 5mm above part) | |||
G1 Z1 (feed to 1mm above part) | |||
G1 X4.23 (feed to bore size) | |||
G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) | |||
G1 X0 Y0 (feed to origin) | |||
G1 Z-2 (feed to 2mm below surface) | |||
G1 X4.23 (feed to bore size) | |||
G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) | |||
G1 X0 Y0 (feed to origin) | |||
G1 Z-4 (feed to 4mm below surface) | |||
G1 X4.23 (feed to bore size) | |||
G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) | |||
G1 X0 Y0 (feed to origin) | |||
G1 Z-6 (feed to 6mm below surface) | |||
G1 X4.23 (feed to bore size) | |||
G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) | |||
G1 X0 Y0 (feed to origin) | |||
G1 Z-8 (feed to 8mm below surface) | |||
G1 X4.23 (feed to bore size) | |||
G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) | |||
G1 X0 Y0 (feed to origin) | |||
G1 Z-10 (feed to 10mm below surface) | |||
G1 X4.23 (feed to bore size) | |||
G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) | |||
G1 X0 Y0 (feed to origin) | |||
G1 Z-12 (feed to 12mm below surface) | |||
G1 X4.23 (feed to bore size) | |||
G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) | |||
G1 X0 Y0 (feed to origin) | |||
G1 Z-14 (feed to 14mm below surface) | |||
G1 X4.23 (feed to bore size) | |||
G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) | |||
G1 X0 Y0 (feed to origin) | G1 X0 Y0 (feed to origin) | ||
G0 Z20 (traverse to 20mm above part) | G0 Z20 (traverse to 20mm above part) | ||
</pre> | </pre> |
Revision as of 01:30, 20 July 2022
G-Code
This may be specific to Acorn CNC at HSL.
Comments
Comments are in parentheses.
G0X0Y0 (rapid traverse to origin - the traverse will be executed, but this parenthetical comment is ignored)
Active Units
G20 (set active units to inches) G21 (set active units to millimeters)
Absolute v. Incremental
G90 (absolute measurements, relative to machine zero) G91 (incremental measurements, relative to previous ending position)
Feeds
F sets the feed rate in the active units.
G20 (inches) F15 (15 inches per minute) G1 X0 Y0 (traverse to origin at 15 IPM) (spaces are optional) G21 (millimeters) F375 (375 mm per minute) G1X0Y0 (traverse to origin at 375mmPM)
Straight Line Traversal
G0 is fast traversal. Careful not to run the tool into the part. Each axis is run at full speed until reaching its destination (ie: the tool follows multiple line segments, not an interpolated straight line).
G21 (set millimeters) G90 (set absolute coordinates) G0X3 (fast traverse the X axis to origin + 3 millimeters) G0X1Y-2.6Z3 (fast traverse to { 1, -2.6, 3 } millimeters) G0X0Y0Z0 (fast traverse to origin) G0 X1 Y-2.6 Z3 (fast traverse to { 1, -2.6, 3} mm with spaces for readability)
Straight Line Cuts
G1 is an interpolated straight line from current position to the new position, moving at feed rate.
G21 (set millimeters) G90 (set absolute coordinates) F350 (set feed speed to 350mm per minute) G0X0Y0Z0 (move to origin) G1X10Y20Z-5 (move in a straight line from {0,0,0} to {10,20,-5} at 350mm per minute)
Plane Selection
G17, G18, G19 select XY, ZX, or YZ as the active plane.
Arc Cuts
G2 is a clockwise cut from the current position to the destination at { X, Y, Z } about the center { I, J, K }.
If the active plane is XY, all three Z's must be the same and do not need to be specified. The same applies for ZX and Y, and for YZ and X.
G17 (set plane to XY) G90 (set absolute coordinates) G1 X-1 Y0 Z0 (cut line to {-1, 0, 0 } at feed rate) G2 X1 Y0 I0 J0 (cut arc to { 1, 0, 0 } about center at { 0, 0, 0 } )
Drill Array Pecking
Example
Bearing Cup
Find Center of Part
- 25.4mm from long edge
- 13mm from short edge
Face Material
Drill Center
Zero Tool Z Manually w/ 5/16 drill, zero Z to drill shoulder.
G21 (set units to millimeters) G90 (set measurements to absolute, relative to machine zero) G0 Z20 (traverse to 20mm above part) G0 X0 Y0 (traverse to origin XY) F100 (set feed rate to 100mm per minute) G1 Z-6 (peck to 6mm deep) G0 Z6 (retract to 6mm above) G0 Z0 (traverse to 0mm above) G1 Z-12 (peck to 12mm deep) G0 Z20 (traverse to 20mm above)
Zero Tool Z Manually w/ 5/8 drill, zero Z to drill shoulder.
G21 (set units to millimeters) G90 (set measurements to absolute, relative to machine zero) G0 Z20 (traverse to 20mm above part) G0 X0 Y0 (traverse to origin XY) F100 (set feed rate to 100mm per minute) G1 Z-4 (peck to 4mm deep) G0 Z6 (retract to 6mm above) G0 Z0 (traverse to 0mm above) G1 Z-9 (peck to 9mm deep) G0 Z20 (traverse to 20mm above)
Drill Screw Holes
Drill Threaded Hole
Use bit that came with M4-0.7 tap.
Remove parallels.
Zero Z to drill bit shoulder.
G21 (set units to millimeters) G90 (set measurements to absolute, relative to machine zero) G0 Z20 (traverse to 20mm above part) G0 X9.5 Y9.5 (traverse to screw hole center XY) F150 (set feed rate to 150mm per minute) G1 Z-5 (peck to 5mm deep) G0 Z6 (retract to 6mm above) G0 Z0 (traverse to 0mm above) G1 Z-10 (peck to 10mm deep) G0 Z6 (retract to 6mm above) G0 Z0 (traverse to 0mm above) G1 Z-15 (peck to 15mm deep) G0 Z20 (traverse to 20mm above)
Drill Slip Hole
Use .166" or 4.25mm bit.
Remove parallels.
Zero Z to drill bit shoulder.
G21 (set units to millimeters) G90 (set measurements to absolute, relative to machine zero) G0 Z20 (traverse to 20mm above part) G0 X-9.5 Y-9.5 (traverse to screw hole XY) F150 (set feed rate to 150mm per minute) G1 Z-5 (peck to 5mm deep) G0 Z6 (retract to 6mm above) G0 Z0 (traverse to 0mm above) G1 Z-10 (peck to 10mm deep) G0 Z6 (retract to 6mm above) G0 Z0 (traverse to 0mm above) G1 Z-15 (peck to 15mm deep) G0 Z20 (traverse to 20mm above)
Arc Bore Center
Zero Tool Z w/ 3/8 Square End Mill
Bearing Retainer
G21 (set units to millimeters) G90 (set measurements to absolute, relative to machine zero) G0 Z20 (traverse to 20mm above part) G0 X0 Y0 (traverse to origin XY) F300 (set feed rate to 300mm per minute) G0 Z5 (traverse to 5mm above part) G1 Z1 (feed to 1mm above part) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-2 (feed to 2mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-4 (feed to 4mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-6 (feed to 6mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-8 (feed to 8mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-10 (feed to 10mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-12 (feed to 12mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-14 (feed to 14mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G0 Z20 (traverse to 20mm above part)
Bearing Cup
G21 (set units to millimeters) G90 (set measurements to absolute, relative to machine zero) G0 Z20 (traverse to 20mm above part) G0 X0 Y0 (traverse to origin XY) F300 (set feed rate to 300mm per minute) G0 Z5 (traverse to 5mm above part) G1 Z1 (feed to 1mm above part) G1 X6.3 (feed to bore size) G2 X6.3 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-2 (feed to 2mm below surface) G1 X6.3 (feed to bore size) G2 X6.3 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-4 (feed to 4mm below surface) G1 X6.3 (feed to bore size) G2 X6.3 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-6 (feed to 6mm below surface) G1 X6.3 (feed to bore size) G2 X6.3 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-7 (feed to 7mm below surface) G1 X6.3 (feed to bore size) G2 X6.3 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G0 Z20 (traverse to 20mm above part)
Arc Cut Perimeter
Zero Tool Z w/ 3/8 Square End Mill
Bearing Retainer
G21 (set units to millimeters) G90 (set measurements to absolute, relative to machine zero) G0 Z20 (traverse to 20mm above part) G0 X0 Y0 (traverse to origin XY) F300 (set feed rate to 300mm per minute) G0 Z5 (traverse to 5mm above part) G1 Z1 (feed to 1mm above part) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-2 (feed to 2mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-4 (feed to 4mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-6 (feed to 6mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-8 (feed to 8mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-10 (feed to 10mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-12 (feed to 12mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G1 Z-14 (feed to 14mm below surface) G1 X4.23 (feed to bore size) G2 X4.23 Y0 I0 J0 (bore circle to same location around machine zero) G1 X0 Y0 (feed to origin) G0 Z20 (traverse to 20mm above part)