Professional Documents
Culture Documents
G and M
Programming
for CNC
Milling Machines
Denford Limited
Birds Royd
Brighouse
West Yorkshire
England
HD6 1NB
Tel: +44 (0) 1484 712264
+44FOR(0)
G AND MFax:
PROGRAMMING
CNC 1484
MILLING M722160
ACHINES - 1
Email: education@denford.co.uk
NOTES.
CONTENTS.
TITLE
Table of Contents
PAGE NO.
Introduction ..................................................6
What is CNC? ...............................................7
BASIC PROGRAMMING.
Composition of a Part Program ........................ 9
Main Program Structure ................................. 10
Sub Program Structure .................................. 12
Sub Program Commands - General Notes ......... 13
Sub Program Repeat Command .......................14
Billet Definition ............................................. 15
Program Numbering and Saving ...................... 16
Program Block Numbering .............................. 17
Block Configuration ....................................... 18
G Codes (Preparatory Functions) ..................... 18
Tool Movement ............................................. 19
Feed Function ...............................................21
M Codes (Miscellaneous Functions) .................21
Spindle Speed Function (Cutting Speed) ...........22
Tool Function ................................................ 23
Tool Compensation (Tool Offset) ...................... 24
Absolute and Incremental Co-ordinates ............ 25
Optional Block Skip ....................................... 26
Tutorials and Comments ................................. 26
CONTENTS.
TITLE
PAGE NO.
CONTENTS.
TITLE
PAGE NO.
INTRODUCTION.
WHAT IS CNC?
COMPUTER
PROGRAMMING
(CAD/CAM).
G&M
CODES.
CONTROL
SIGNALS.
COMPOSITION
OF A PART
PROGRAM.
PART PROGRAM EXAMPLE (Mill CAM Designer
- star.MCD)
(2/1/1997)
(Triac PC (metric))
(Post fanucm:1.2
24 June 1994)
O5 ;
N1 G21 ;
[BILLET X24 Y17 Z1
[EDGEMOVE X Y
[TOOLDEF T1 D2
N2 G91 G28 X Y Z ;
N3 M6 T1 ;
N4 G43 H1 ;
N5 M3 S3 ;
N6 G9 G X9 Y12 ;
N7 Z2 ;
N8 G1 Z-.5 F4 ;
N9 X15 Y16 F6 ;
BLOCK EXAMPLE - N8
G1 Z-.5 F4 ;
N1 X12 Y12 ;
N11 X165 ;
N12 X13 Y95 ;
N13 X145 Y5 ;
N14 X15 Y8 ;
N15 X65 Y5 ;
N16 X8 Y95 ;
WORD EXAMPLE - G1
ADDRESS EXAMPLE - G
BASIC PROGRAMMING - 9
MAIN PROGRAM
STRUCTURE.
ADDRESSES N
10 - BASIC PROGRAMMING
MAIN PROGRAM
STRUCTURE.
CAD/CAM software
package information.
Program number.
Units definition
(Metric or Imperial)
and billet size for
simulation.
Main program
information.
Program end.
BASIC PROGRAMMING - 11
SUB PROGRAM
STRUCTURE.
Main Program.
Sub Program - 1.
Sub Program - 2.
O1
O1
O2
N1 G21;
N1 ......
N1 ......
N2 ......
N2 ......
N2 ......
N3 ......
N3 ......
N3 ......
N4 ......
N4 ......
N4 ......
N5 ......
N5 ......
N5 ......
N6 ......
N6 ......
N6 ......
N7 ......
N7 ......
N7 ......
N8 ......
N8 ......
N8 M98 P1;
N9 ......
N9 ......
N9 ......
N1 ......
N1 ......
N1 ......
N11 ......
N11 ......
N12 ......
N12 ......
N12 ......
N13 ......
N13 ......
N13 ......
N14 ......
N14 ......
N14 ......
N15 ......
N15 ......
N15 M3;
N16 M99;
ONE-LOOP NESTING.
12 - BASIC PROGRAMMING
N16 M99;
TWO-LOOP NESTING.
SUB PROGRAM
COMMANDS GENERAL NOTES.
NOTE 1.
NOTE 2.
NOTE 3.
NOTE 4.
NOTE 5.
BASIC PROGRAMMING - 13
SUB PROGRAM
REPEAT
COMMAND.
Number of times
the sub program
is to be repeated.
Sub program
number.
14 - BASIC PROGRAMMING
BILLET
DEFINITION.
NOTE 1.
BASIC PROGRAMMING - 15
PROGRAM
NUMBERING
AND SAVING.
NOTE 1.
NOTE 2.
NOTE 3.
16 - BASIC PROGRAMMING
PROGRAM BLOCK
NUMBERING.
NOTE 1.
NOTE 2.
NOTE 3.
BASIC PROGRAMMING - 17
BLOCK
CONFIGURATION.
N
Block
sequence
number.
Preparatory
function.
X. Y. Z.
Interpolation
function.
Feedrate
function.
Miscellaneous Spindle
function.
function.
Tool
End of
function. block
signal.
NOTE 1.
G CODES
(PREPARATORY
FUNCTIONS).
18 - BASIC PROGRAMMING
+ Y AXIS DIRECTION.
TOOL
MOVEMENT.
+ X AXIS DIRECTION.
BASIC PROGRAMMING - 19
ARC.
G3 X _ _ _ _ Y _ _ _ _ R _ _ _ _ ; (P1 - P2)
+ Y AXIS DIRECTION.
TOOL
MOVEMENT.
+ X AXIS DIRECTION.
NOTE 1.
20 - BASIC PROGRAMMING
FEED
FUNCTION.
M CODES
(MISCELLANEOUS
FUNCTIONS).
BASIC PROGRAMMING - 21
SPINDLE SPEED
FUNCTION
(CUTTING SPEED).
NOTE 1.
NOTE 2.
22 - BASIC PROGRAMMING
TOOL
FUNCTION.
6
7
TOOL NUMBER 1
NOTE 1.
NOTE 2.
NOTE 3.
BASIC PROGRAMMING - 23
TOOL
COMPENSATION
(TOOL OFFSET).
NOTE 1.
24 - BASIC PROGRAMMING
+ Y AXIS DIRECTION.
ABSOLUTE AND
INCREMENTAL
CO-ORDINATES.
+ X AXIS DIRECTION.
BASIC PROGRAMMING - 25
OPTIONAL
BLOCK SKIP.
NOTE 1.
TUTORIALS
AND COMMENTS.
26 - BASIC PROGRAMMING
G CODES
(PREPARATORY
FUNCTIONS) INTRODUCTION.
2)
G CODES
(PREPARATORY
FUNCTIONS) INTRODUCTION
NOTES.
NOTE 1.
NOTE 2.
NOTE 3.
NOTES FOR G
CODES LISTING
SHOWN RIGHT.
NOTE 1.
G codes marked with an * are set/reactivated as default values at machine power up and when the machine is reset or the emergency stop button is activated.
NOTE 2.
Group.
Function.
G
1
Positioning (Rapid Traverse)
G1
1
Linear Interpolation (Cutting Feed)
G2
1
Circular Interpolation CW
G3
1
Circular Interpolation CCW
G4
G CODES -
G
(RAPID
POSITIONING/
TRAVERSE).
X, Y and Z
co-ordinate values.
NOTE 1.
NOTE 2.
NOTE 3.
NOTE 4.
G
(RAPID
POSITIONING/
TRAVERSE).
NOTE 5.
G - N ON -L INEAR
INTERPOLATION.
+ Y AXIS DIRECTION.
G CODES -
+ X AXIS DIRECTION.
G CODES -
G1
(LINEAR
INTERPOLATION).
X, Y and Z
co-ordinate values.
G1
G1 - LINEAR
INTERPOLATION.
+ Y AXIS DIRECTION.
G CODES -
+ X AXIS DIRECTION.
(LINEAR
INTERPOLATION).
NOTE 1.
NOTE 2.
NOTE 3.
NOTE 4.
NOTE 5.
G CODES -
G2
G3
(CIRCULAR
INTERPOLATION).
G3
G2
+X
G2
G3
(CIRCULAR
INTERPOLATION).
I AND J
G CODES -
G2/G3 - C IRCULAR
INTERPOLATION USING I AND J.
+ X AXIS DIRECTION.
G CODES -
G2
G3
(CIRCULAR
INTERPOLATION).
G CODES -
For example:
+ Y AXIS DIRECTION.
G2
G3
G2/G3 - CIRCULAR
INTERPOLATION EXAMPLE.
+ X AXIS DIRECTION.
(CIRCULAR
INTERPOLATION).
The above tool path can be programmed as follows (In
absolute mode, G9):
G1 X1 Y4 F125 ;
G3 X8 Y6 I-2 ;
G1 X6 ;
G2 X4 Y4 I-2 ;
or,
G1 X1 Y4 F125 ;
G3 X8 Y6 R2 ;
G1 X6 ;
G2 X4 Y4 R2 ;
or,
G3 X-2 Y2 R2 ;
G1 X-2 ;
G2 X-2 Y-2 R2 ;
G2
G3
+ Y AXIS DIRECTION.
G CODES -
+ X AXIS DIRECTION.
G2/G3 - CIRCULAR
INTERPOLATION ARC
DEFINITON.
(CIRCULAR
INTERPOLATION).
G CODES -
G2
G3
(CIRCULAR
INTERPOLATION).
NOTE 1.
NOTE 2.
NOTE 3.
NOTE 4.
NOTE 5.
A G2
ways.
G2 or
A G3
ways.
G3 or
G CODES -
G4
(DWELL).
G4 P _ _ _ _ ;
NOTE 1.
NOTE 2.
NOTE 3.
NOTE 4.
NOTE 5.
NOTE 6.
G CODES -
G2
G21
(IMPERIAL
/METRIC
DATA INPUT).
Type.
Units.
G2
G21
Imperial
Metric
Inch
Millimetre
.1 inch
.1 mm
NOTE 1.
NOTE 2.
NOTE 3.
NOTE 4.
G CODES -
G28
(REFERENCE
POINT RETURN).
G91 G28 X _ _ _ _ Y _ _ _ _ Z _ _ _ _ ;
G CODES -
G28
NOTE 1.
(REFERENCE
POINT RETURN).
+ X AXIS.
NOTE - GRAPHIC
SHOWS ELEVATION
OF BILLET, NOT
PLAN.
+ Z AXIS.
+ X AXIS.
NOTE - GRAPHIC
SHOWS ELEVATION
OF BILLET, NOT
PLAN.
G CODES -
G28
(REFERENCE
POINT RETURN).
NOTE 2.
+ X AXIS.
NOTE - GRAPHIC
SHOWS ELEVATION
OF BILLET, NOT
PLAN.
NOTE 3.
G CODES -
G4
G41
G42
(CUTTER
COMPENSATION).
TOOL PATH
G4
CANCEL
G41
LEFT HAND
G42
RIGHT HAND
G CODES -
G4
G41
G42
(CUTTER
COMPENSATION).
(G41 - G42).
NOTE 1.
NOTE 2.
NOTE 3.
G CODES -
G4
G41
G42
(CUTTER
COMPENSATION).
NOTE 1.
NOTE 2.
G4
G41
G42
G CODES -
+ X AXIS DIRECTION.
EXAMPLE - USING
CUTTER COMPENSATION
MODE.
(CUTTER
COMPENSATION).
O 1
N1
G X-15 Y-15 ;
N2
N3
Y4 ;
N4
X3 Y8 ;
N5
X6 ;
N6
G2 X1 Y4 R4 ;
N7
G1 Y3 ;
N8
G3 X7 Y R3 ;
N9
X ;
N1
G73G89
(CANNED
CYCLES).
+ Z AXIS DIRECTION.
G CODES -
G CODES -
G73G89
+ Z AXIS DIRECTION.
(CANNED
CYCLES).
+ Z AXIS DIRECTION.
(CANNED
CYCLES).
G99 - R POINT
LEVEL RETURN.
+ Z AXIS DIRECTION.
G73G89
+ Z AXIS DIRECTION.
G CODES -
G CODES -
G73G89
(CANNED
CYCLES).
NOTE 1.
NOTE 2.
Once the drilling data has been specified and read into
the machine controller, it is retained until it is either
changed, or the canned cycle cancelled. All the required data must be specified when the canned cycle
is started and only the data to be changed has to be
specified during the cycle.
G73G89
(CANNED
CYCLES).
(X axis move)
X3 Z-25 ;
(X and Z change)
X4 Z-15 ;
(X and Z change)
G8 ;
(Cancel)
+ Y AXIS DIRECTION.
G CODES -
+ X AXIS DIRECTION.
G CODES -
G73
+ Z AXIS DIRECTION.
(HIGH SPEED
PECK DRILLING).
When machining, the drill is positioned at the co-ordinate point of the first hole, for the X and Y axes and at
the initial level, for the Z axis. The G73 command is
then read into the machine controller and the cycle
begins. The drill will rapid traverse to the R point level
and begin to feed in, until a cut-in distance of Q is
attained. At this point, the drill will retract a small distance (set within the machine controller). A cut-in distance of Q at the same feedrate will begin again, followed by a similar retraction. These movements will
continue until the total Z depth has been reached. The
drill will rapid traverse out to the Initial level, if a G98
code is programmed within the cycle, or to the R point
level, if a G99 code is programmed within the cycle.
At this point the next block is read into the machine
controller. If this block contains an X, Y or X and Y coordinate the drill will position itself at that point and
the high speed peck drilling cycle will begin again.
G CODES -
G74
+ Z AXIS DIRECTION.
(COUNTER
TAPPING).
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the Initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth.
Op 4) Dwell P (time for spindle stop and start CW
direction).
Op 5) Feed to R point level.
Op 6) Dwell P (time for spindle stop and start CCW
direction).
If the G98 code is programmed within the cycle, the
next move will be a rapid traverse to the Initial level. If
the G99 code is programmed within the cycle, there
will be no movement.
NOTE 1.
G CODES -
G76
fol-
(G9) (G98)
or
or G76 X.... Y.... Z.... R.... P.... Q.... F.... ;
(G91) (G99)
please refer to page 52 for the variable definitions.
+ Z AXIS DIRECTION.
(FINE BORING).
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the Initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth.
Op 4) Dwell P (time for spindle stop and move Q value).
Op 5) Feed to R point level.
Op 6) Move back Q value.
The above moves vary depending on the setting of the
codes G98 and G99.
NOTE 1.
G CODES -
G8
(CANNED CYCLE,
CANCEL).
NOTE 1.
G CODES -
G81
+ Z AXIS DIRECTION.
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the Initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth.
Op 4) Rapid traverse to Initial level (G98) or R point
level (G99).
G CODES -
G82
+ Z AXIS DIRECTION.
(DRILLING COUNTER
BORING).
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the Initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth.
Op 4) Dwell for value P.
Op 5) Rapid traverse to Initial level (G98) or R point
level (G99).
G CODES -
G83
+ Z AXIS DIRECTION.
(DEEP HOLE
PECK DRILLING).
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed in to the value of Q.
Op 4) Rapid traverse out to R point. Rapid traverse back
to within 1mm of depth of Q cut.
Operation
moves 2 and 4 are repeated until Z depth is
reached.
Op 5) Rapid traverse to Initial level (G98) or R point
level (G99).
G CODES -
G84
+ Z AXIS DIRECTION.
(TAPPING).
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth.
Op 4) Dwell P (time for spindle stop and start CCW
direction).
Op 5) Feed to R point level.
Op 6) Dwell P (time for spindle stop and start CW
direction).
If the G98 code is programmed within the cycle, the
next move will be a rapid traverse to the Initial level. If
the G99 code is programmed within the cycle, there
will be no movement.
NOTE 1.
G CODES -
G85
+ Z AXIS DIRECTION.
(BORING).
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed in to the Z depth.
Op 4) Feed back to R point level.
If the G98 code is programmed within the cycle, the
next move will be a rapid traverse to the Initial level. If
the G99 code is programmed within the cycle, there
will be no movement.
G CODES -
G86
+ Z AXIS DIRECTION.
(BORING).
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth and spindle stop.
Op 4) Rapid traverse to the initial level and spindle CW
for G98, or rapid traverse to R point level and
spindle CW for G99.
G CODES -
G87
fol-
(G9) (G98)
or
or G87 X.... Y.... Z.... P..... Q.... R.... F.... ;
(G91) (G99)
please refer to page 52 for the variable definitions.
+ Z AXIS DIRECTION.
(BACK
BORING).
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Spindle stop and orientation. Move the value of Q.
Op 3) Rapid traverse to R point level.
Op 4) Spindle CW and move back the value of Q.
Op 5) Feed in to Z depth (positive direction) and dwell P.
Op 6) Spindle stop and orientate.
Op 7) Move the value of Q.
Op 8) Rapid traverse to R point level.
Op 9) Move back the value of Q and spindle CW.
NOTE 1.
NOTE 2.
G CODES -
G89
+ Z AXIS DIRECTION.
(BORING).
Sequence of moves:
Op 1) Rapid position to X, Y and Z (the initial level).
Op 2) Rapid traverse to R point level.
Op 3) Feed to Z depth and dwell for value P.
Op 4) Feed out to R point and rapid traverse to initial
level for G98, or feed out to R point for G99.
G CODES PROGRAM
EXAMPLE
USING CANNED
CYCLES.
N4 M6 T1 ;
Tool change.
N5 G9 G X1 Y3 Z12 S1 M3 ;
N7 Y1 ;
N8 X3 ;
N9 G98 Y3 ;
N1 G99 X9 ;
N11 Y1 ;
N12 X11 ;
N13 G98 Y3 ;
N15 M6 T2 ;
Tool change.
N2 M3 ;
Program stop.
G CODES -
G9
(ABSOLUTE
ZERO COMMAND).
G CODES -
G91
NOTE 1.
(INCREMENTAL
COMMAND).
G CODES -
G94
(FEED PER
MINUTE).
G CODES -
G95
(FEED PER
REVOLUTION).
G CODES -
G98
NOTE 1.
(RETURN TO
INITIAL LEVEL).
G CODES -
G99
(RETURN TO R
POINT LEVEL).
68 - G CODES - PREPARATORY FUNCTIONS
G CODES -
G17G173
(CIRCULAR/
RECTANGULAR
POCKET CANNED
CYCLES).
Circular pocket.
G172
G173
Rectangular pocket.
NOTE 1.
G CODES -
G17
G171
(CIRCULAR POCKET
CANNED
CYCLE EXAMPLE A).
NOTE 1.
Billet size.
[TOOLDEF T1 D6 Z ; ................................................
O 2 ; .................................................................
Program no.
N5 M6 T1 ; ...................................................
Tool no.
N6 G9 G X Y Z1 S3 M3 ; ................
N7 G1 Z F3 ; .............................................
N1 G Z25 M5 ; ............................................
Incremental,
return
reference point.
N12 M3 ; ..........................................................
Program reset.
to
G CODES -
G17
G171
(CIRCULAR POCKET
CANNED
CYCLE EXAMPLE A).
G CODES -
G17
G171
(CIRCULAR POCKET
CANNED
CYCLE EXAMPLE B).
G CODES -
G17
G171
(CIRCULAR POCKET
CANNED
CYCLE EXAMPLE B).
G CODES -
G17
G171
(CIRCULAR POCKET
CANNED
CYCLE EXAMPLE C).
G CODES -
G17
G171
(CIRCULAR POCKET
CANNED
CYCLE EXAMPLE C).
NOTE 1.
G CODES -
G172
G173
(RECTANGULAR
POCKET CANNED
CYCLE EXAMPLE A).
NOTE 1.
Billet size.
[TOOLDEF T1 D6 Z ; ......................................................
O 5 ; .......................................................................
Program no.
N5 M6 T1 ; .........................................................
Tool no.
N6 G X Y Z1 S3 M3 ; .............................
N7 G1 Z F3 ; ...................................................
N1 G Z25 M5 ; ..................................................
Incremental, return to
reference point.
N12 M3 ; ................................................................
Program reset.
G CODES -
G172
G173
(RECTANGULAR
POCKET CANNED
CYCLE EXAMPLE A).
G CODES -
G172
G173
(RECTANGULAR
POCKET CANNED
CYCLE EXAMPLE A).
G CODES -
G172
G173
(RECTANGULAR
POCKET CANNED
CYCLE EXAMPLE B).
G CODES -
G172
G173
(RECTANGULAR
POCKET CANNED
CYCLE EXAMPLE B).
G CODES -
G172
G173
(RECTANGULAR
POCKET CANNED
CYCLE EXAMPLE C).
G CODES -
G172
G173
(RECTANGULAR
POCKET CANNED
CYCLE EXAMPLE C).
NOTE 1.
M CODES
(MISCELLANEOUS
FUNCTIONS) INTRODUCTION.
LIST OF
M CODES
SUPPORTED BY
DENFORD CNC
CONTROLS.
Function.
M*
Program Stop
M1*
Optional Stop
M2*
Program Reset
M3
M4
M5*
Spindle Stop
M6
M8
Coolant On
M9*
Coolant Off
M1
M11
M13
M14
M19
Spindle Orientation
M2
ATC Arm In
M21
M22
M23
ATC Arm Up
M24
M25
M27
M3*
M32
Carousel CW
M33
Carousel CCW
M38
Door Open
M39
Door Close
M62
Auxiliary Output 1 On
M63
Auxiliary Output 2 On
LIST OF
M CODES
SUPPORTED BY
DENFORD CNC
CONTROLS.
continued....
M code.
Function.
M64
M65
M66*
M67*
M7
Mirror in X On
M71
Mirror in Y On
M76
M77
M8
Mirror in X Off
M81
Mirror in Y Off
M98
M99
NOTES FOR M
CODES LISTING
SHOWN LEFT.
NOTE 1.
NOTE 2.
NOTE 3.
M CODES -
M* - Program Stop.
When the machine controller reads the code M
within a block, it halts the program. The [CYCLE
START] key must be pressed to allow the program to
continue.
(PROGRAM STOP).
M CODES -
M1
(OPTIONAL STOP).
M CODES -
M2
(PROGRAM RESET).
M CODES -
M3
(SPINDLE FORWARD).
M CODES -
M4
(SPINDLE REVERSE).
M CODES -
M5
(SPINDLE STOP).
M CODES -
M6
(AUTOMATIC
TOOL CHANGE).
M CODES -
M8
M8 - Coolant On.
This code switches the coolant pump on.
(COOLANT ON).
M CODES -
M9
(COOLANT OFF).
M CODES -
M1
(VICE OPEN).
M CODES -
M11
(VICE CLOSE).
M CODES -
M13
(SPINDLE FORWARD
AND COOLANT ON).
M CODES - MISCELLANEOUS FUNCTIONS - 89
M CODES -
M14
(SPINDLE REVERSE
AND COOLANT ON).
M CODES -
M19
(SPINDLE
ORIENTATION).
M CODES -
M2
M CODES -
M21
M CODES -
M22
(ATC ARM
DOWN).
M CODES -
M23
M CODES -
M24
(ATC DRAWBAR
UNCLAMP).
M CODES -
M25
(ATC DRAWBAR
CLAMP).
M CODES -
M27
(RESET CAROUSEL
TO POCKET ONE).
92 - M CODES - MISCELLANEOUS FUNCTIONS
M CODES -
M3
(PROGRAM RESET
AND REWIND).
M CODES -
M32
(CAROUSEL CW).
M CODES -
M33
(CAROUSEL CCW).
M CODES -
M38
(DOOR OPEN).
M CODES -
M39
(DOOR CLOSE).
M CODES -
M62
M63
M64
M65
M66
M67
M76
M77
(AUXILIARY OUTPUT
FUNCTIONS).
M CODES - MISCELLANEOUS FUNCTIONS - 95
M CODES -
M7
(MIRROR IN
X ON).
M CODES -
M71
M7 - Mirror in X On.
This code changes the sign of X within a program
around the datum.
For example:
G1 X25.5 ;
M7
G1 X25.5 ; (Tool would move to X-25.5).
(MIRROR IN
Y ON).
M CODES -
M8
(MIRROR IN
X OFF).
M8 - Mirror in X Off.
This code cancels the mirror image in the X axis.
M CODES -
M81
(MIRROR IN Y
OFF).
M CODES -
M98
(SUB PROGRAM
CALL).
M CODES -
M99
(SUB PROGRAM
END AND
RETURN).