Programming Example 1
Sketch for machining file is as follows:
The corresponding programming is as follows:
N01 G92 X0 Y0 Z0 'workpiece coordinates system setting
N02 G91 G00 X50 Y50 M03 S600 M08 'incremental mode selected, the tool moves X50 Y50 at rapid traverse rate, spindle CW at 600 rpm, and
coolant on
N03 G43 Z-17 H01 'rapid traverse 17mm downward in Z axis, length compensation on
N04 G01 Z-16 F400 'linear interpolation 16mm downward at 400mm/min in Z-axis
N05 G04 P2000 'dwell for 2s
N06 G00 Z16 '16mm upward in Z axis at rapid traverse rate
N07 X50 Y10 '50mm and 10mm towards the positive direction of X axis and Y-axis respectively
at rapid traverse rate
N08 G01 Z-25 'linear interpolation 25mm downward in Z-axis
N09 G04 P2000 'dwell for 2s
N10 G00 Z25 'upward 25mm in Z axis at rapid traverse rate
N11 X-20 Y-40 '20mm and 40mm in the reverse direction of X axis and Y axis respectively
N12 G01 Z-40 'linear interpolation 40mm downward in Z-axis
N13 G00 Z57 'upward 57mm in Z axis at rapid traverse rate
N14 G49 X-80 Y-20 M05 M09 M30 'length compensation cancel, 80mm and 20mm in the reverse direction of X axis and Y axis
respectively, spindle stop, coolant off, end of program and return to the program header