Macro C2
G91 G21 G38.3 F100 X-10.; G10 P0 L20 X1.588
G91 Switch to incremental distance mode
G21 After this, units will be in mm / G20 After this, units will be in inches
G38.3 Move toward the work piece, stop on contact
F100 Feed at 100mm/minute (CAUTION! If you use G20 you'll want to reduce this to something very small, like 4.)
X-10 Go 10mm to the left, change the sign to + to go to the right (CAUTION! If you use G20 you'll want to reduce this to something very small, like .5. This is the farthest the machine will move.)
“;” the semicolon is exactly like a line feed
G10 Set Work Coordinate Origin
P0 This is PARAMETER ZERO, it means your working with a single work offset
L20 X1.588 Sets the Work Coordinate System (WCS) offsets such that the current position becomes what you say in the axis words (X, Y, Z). The offsets depend on the current machine position. (I'm telling the machine control that the center axis of the tool is 1.588mm to the right of X = 0. 1.588mm = the RADIUS of the 1/8 inch diameter tool in millimeters. You will change this to the radius of the tool you are using EXPRESSED IN THE UNITS FROM G20/G20 PRIOR TO THIS.)
Macro C3
G91 G21 G38.3 F100 Y10.; G10 P0 L20 Y-1.588
G91 Switch to incremental distance mode
G21 After this, units will be in mm / G20 After this, units will be in inches
G38.3 Move toward the work piece, stop on contact
F100 Feed at 100mm/minute (CAUTION! If you use G20 you'll want to reduce this to something very small, like 4.)
Y10 Go 10mm away, change the sign to - to come closer (CAUTION! If you use G20 you'll want to reduce this to something very small, like .5. This is the farthest the machine will move.)
“;” the semicolon is exactly like a line feed
G10 Set Work Coordinate Origin
P0 This is PARAMETER ZERO, it means your working with a single work offset
L20 Y-1.588 Sets the Work Coordinate System (WCS) offsets such that the current position becomes what you say in the axis words (X, Y, Z). The offsets depend on the current machine position. (I'm telling the machine control that the center axis of the tool is 1.588mm CLOSER THAN Y=0. 1.588mm = the RADIUS of the 1/8 inch diameter tool in millimeters. You will change this to the radius of the tool you are using EXPRESSED IN THE UNITS FROM G20/G20 PRIOR TO THIS.)
Macro C4
G91 G21 G38.3 F100 Z-10.; G10 P0 L20 Z14.88; G01 F100 Z2.
G91 Switch to incremental distance mode
G21 After this, units will be in mm / G20 After this, units will be in inches
G38.3 Move toward the work piece, stop on contact
F100 Feed at 100mm/minute (CAUTION! If you use G20 you'll want to reduce this to something very small, like 4.)
Z-10 Go 10mm down (CAUTION! If you use G20 you'll want to reduce this to something very small, like .5. This is the farthest the machine will move.)
“;” the semicolon is exactly like a line feed
G10 Set Work Coordinate Origin
P0 This is PARAMETER ZERO, it means your working with a single work offset
L20 Z14.88 Sets the Work Coordinate System (WCS) offsets such that the current position becomes what you say in the axis words (X, Y, Z). The offsets depend on the current machine position. (I'm telling the machine control that the tool tip is 14.88mm above the point I want.
G01 Go straight
F100 Feed at 100mm/minute (CAUTION! If you use G20 you'll want to reduce this to something very small, like 4.)
Z2. Move up 2mm. This is for clearance to remove the plate/block/cylinder that is now pinned between the tool and work piece or sacrifice piece.
Link to shapeoko G-Codes: https://www.shapeoko.com/wiki/index.php/G-Code