Delta Ia-Cnc Milling-Machine PM en 20190313
Delta Ia-Cnc Milling-Machine PM en 20190313
Delta Ia-Cnc Milling-Machine PM en 20190313
Asia EMEA
Delta Electronics (Shanghai) Co., Ltd. Headquarters: Delta Electronics (Netherlands) B.V.
No.182 Minyu Rd., Pudong Shanghai, P.R.C. Sales: [email protected]
Post code : 201209 Marketing: [email protected]
TEL: 86-21-6872-3988 / FAX: 86-21-6872-3996 Technical Support: [email protected]
Customer Service: 400-820-9595 Customer Support: [email protected]
Service: [email protected]
Delta Electronics (Japan), Inc. TEL: +31(0)40 800 3800
Tokyo Office
Industrial Automation Sales Department BENELUX: Delta Electronics (Netherlands) B.V.
2-1-14 Shibadaimon, Minato-ku De Witbogt 20, 5652 AG Eindhoven, The Netherlands
Tokyo, Japan 105-0012 Mail: [email protected]
TEL: 81-3-5733-1155 / FAX: 81-3-5733-1255 TEL: +31(0)40 800 3800
Delta Electronics (India) Pvt. Ltd. Iberia: Delta Electronics Solutions (Spain) S.L.U
Machine Solution
C/Llull, 321-329 (Edifici CINC) | 22@Barcrelona, 08019 Barcelona
Delta Electronics (Thailand) PCL.
Mail: [email protected]
909 Soi 9, Moo 4, Bangpoo Industrial Estate (E.P.Z),
TEL: +34 93 303 00 60
Pattana 1 Rd., T.Phraksa, A.Muang,
G Command Guidelines
Samutprakarn 10280, Thailand Italy: Delta Electronics (Italy) S.r.l.
TEL: 66-2709-2800 / FAX : 662-709-2827 Ufficio di Milano Via Senigallia 18/2 20161 Milano (MI)
Piazza Grazioli 18 00186 Roma Italy
Delta Energy Systems (Australia) Pty Ltd. Mail: [email protected]
Unit 20-21/45 Normanby Rd., Notting Hill Vic 3168, Australia TEL: +39 02 64672538
TEL: 61-3-9543-3720
Russia: Delta Energy System LLC
Americas Vereyskaya Plaza II, office 112 Vereyskaya str.
17 121357 Moscow Russia
Delta Electronics (Americas) Ltd.
Mail: [email protected]
Raleigh Office
TEL: +7 495 644 3240
P.O. Box 12173, 5101 Davis Drive,
Research Triangle Park, NC 27709, U.S.A. Turkey: Delta Greentech Elektronik San. Ltd. Sti. (Turkey)
TEL: 1-919-767-3813 / FAX: 1-919-767-3969 Şerifali Mah. Hendem Cad. Kule Sok. No:16-A
34775 Ümraniye – İstanbul
Delta Greentech (Brasil) S/A Mail: [email protected]
São Paulo Office TEL: + 90 216 499 9910
Rua Itapeva, 26 – 3˚ Andar - Bela Vista
CEP: 01332-000 – São Paulo – SP - Brasil GCC: Delta Energy Systems AG (Dubai BR)
TEL: 55-11-3530-8642 / 55-11-3530-8640 P.O. Box 185668, Gate 7, 3rd Floor, Hamarain Centre
Dubai, United Arab Emirates
Delta Electronics International Mexico S.A. de C.V. Mail: [email protected]
Mexico Office TEL: +971(0)4 2690148
Vía Dr. Gustavo Baz No. 2160, Colonia La Loma,
54060 Tlalnepantla Estado de Mexico Egypt + North Africa: Delta Electronics
TEL: 52-55-2628-3015 #3050/3052 511 Cairo Business Plaza, North 90 street,
New Cairo, Cairo, Egypt
Mail: [email protected] www.deltaww.com
*We reserve the right to change the information in this guidelines without prior notice.
Preface
Thank you for purchasing this product. Before using this product, please read through this manual carefully to
ensure the correct use of the product. Please keep this manual handy for quick reference whenever needed.
Built-in 32-bit high-speed dual CPU for multi-task execution and performance improvement
User-friendly HMI interface
Servo Gain Auto-tuning Interface for different machine characteristics
CNCSoft software tools to facilitate the development of customized screen images
Front USB interface (port) to facilitate data access, data backup, and parameters copy
Different spindle control forms for you to choose from: communication type or analog voltage
type
Serial I/O modules for flexible I/O configuration
You can use this manual as a reference for writing G-codes and using macro and variable syntax.
Please read through this manual before using and setting your NC controller.
Please consult your Delta equipment distributor or Delta Customer Service Center if you counter
any problems.
March, 2019 i
Safety Precautions:
Please refer to the pin assignment when connecting and wires and ensure this product is
correctly grounded.
To avoid electric shock, do not disassemble the controller, change the wiring, or touch the
power source when power is on.
Pay attention to the following safety precautions at all times during installation, wiring, operation, maintenance,
and examination of the controller.
Danger. May cause severe or fatal injuries to personnel if the instructions are not followed.
Warning. May cause moderate injury to personnel, or lead to several damage or even
malfunction of the product if the instructions are not followed.
Absolutely prohibited activities. May cause serious damage or even malfunction of the
product if the instructions are not followed.
Installation
Comply with the methods specified in this user manual for installation, or it may cause
damage to the device.
Do not expose this product to an environment containing vapor, corrosive gas,
inflammable gas, or other foreign matter, or it may result in electric shock or fire.
Wiring
Connect the ground terminal to the class-3 ground system. Ground resistance should not
exceed 100Ω. Improper grounding may result in electric shock or fire.
Operation
Correctly plan out the I/O actions with MLC Editor, or it may cause abnormal operation.
Properly adjust the parameter settings of the machine before operation, or it may result in
abnormal operation or malfunction.
Ensure the emergency stop can be activated at any time to avoid operating the machine in
an unprotected condition.
ii March, 2019
Do not change the wiring when power is on, or it may result in personnel injury caused
by electric shock.
Never use a sharp object to touch the panel, or it may make a dent in the panel and
thus cause abnormal operation of the controller.
Do not disassemble the panel or touch the internal parts of the controller when power is
on, or it may result in electric shock.
Do not touch the wiring terminals within 10 minutes after turning off the power, or the
residual voltage may result in electric shock.
Turn off the power before replacing the backup battery, and recheck the system settings
afterwards.
Do not obstruct the ventilation holes when operating the controller, or poor heat
dissipation may cause malfunction.
Wiring
Power supply: to avoid danger, use a 24 VDC power supply for the controller and comply
with the wire specification when wiring.
Wire selection: use stranded wires and multi-core shielded-pair wires for all signal
cables.
Cable length: the maximum cable length for remote I/O and DMCNET is 20 m (65.62 ft);
for other signal cables, 10 m (32.81 ft).
To control the input and output signals, an additional 24 VDC power supply is required for
the controller I/O and remote I/O.
DMCNET: the wiring materials should comply with the standard specification.
Ensure the wiring between the controller and servo drive is secure, or it may cause
abnormal operation.
Note: the content of this manual may be revised without prior notice. Download the latest version at Delta’s website
(http://www.delta.com.tw/industrialautomation/).
iv March, 2019
Table of Contents
G-code List
1.1 G-code list for milling system ··············································································· 1-2
G-code Description
2.1 G-codes for milling system ················································································· 2-3
G00: Rapid positioning ······················································································ 2-3
G01: Linear interpolation ···················································································· 2-4
G01: Automatic chamfer and corner rounding ························································· 2-5
G02/G03: Circular interpolation············································································ 2-6
G04: Dwell time······························································································ 2-10
G05: Parameter group change ·········································································· 2-11
G09: Exact stop ····························································································· 2-12
G10/G11: Data setting / cancellation ··································································· 2-13
G15: Cancel polar coordinate ············································································ 2-15
G16: Polar coordinate ······················································································ 2-16
G17/G18/G19: Plane designation ······································································· 2-17
G21/G20: Metric / imperial input ········································································· 2-17
G24/G25: Mirroring / cancel mirroring ································································· 2-18
G28: Return through reference point ··································································· 2-20
G29: Return from reference point ······································································· 2-22
G30: Return to the 2nd, 3rd, or 4th reference point ················································ 2-23
G31: Skip command ························································································ 2-25
G40: Cancel tool radius compensation ································································ 2-26
G41/G42: Tool radius compensation left / right ······················································ 2-27
G43/G44: Tool length compensation ··································································· 2-33
G49: Cancel tool length compensation ································································ 2-35
G51/G50: Scaling / cancel scaling ······································································ 2-35
G52: Local coordinate system setting ·································································· 2-36
G53: Machine coordinate system setting ····························································· 2-38
G54 - G59: Workpiece coordinate system selection ··············································· 2-39
G61: Exact stop mode ····················································································· 2-40
G64: Cutting mode ·························································································· 2-40
G65: Macro call (one-shot) ··············································································· 2-41
G66/G67: Continuous macro call / cancel continuous macro call ······························· 2-43
G68/G69: Coordinate system rotation / cancel coordinate system rotation ·················· 2-44
G73: Peck drilling cycle ···················································································· 2-45
March, 2019
G74: Reverse tapping cycle ·············································································· 2-49
G76: Fine boring cycle ····················································································· 2-52
G80: Cancel cycle ·························································································· 2-56
G81: Drilling cycle ··························································································· 2-57
G82: Drilling cycle (counter boring) ····································································· 2-60
G83: Deep-hole peck drilling cycle ····································································· 2-63
G84: Tapping cycle ························································································· 2-66
G85: Boring cycle (no dwell time) ······································································· 2-69
G86: Boring cycle (spindle stop) ········································································ 2-72
G87: Back boring cycle ···················································································· 2-75
G88: Boring cycle (manual retraction) ································································· 2-77
G89: Boring cycle (with dwell time) ····································································· 2-80
G90: Absolute coordinates ················································································ 2-83
G91: Incremental coordinates············································································ 2-84
G92: Coordinate system setting ········································································· 2-86
G94: Feed per minute (mm/min) ········································································ 2-87
G98: Return to start point after fixed cycle ···························································· 2-88
G99: Return to reference point (R) after fixed cycle ················································ 2-89
M-code Description
3.1 M-codes Description ·························································································· 3-2
M00: Program stop (non-optional) ········································································· 3-3
M01: Program stop (optional) ··············································································· 3-3
M02: End of program ·························································································· 3-3
M30: End of program with return to program start position ·········································· 3-3
M96: Program interruption ··················································································· 3-4
M97: Cancel program interruption ········································································· 3-5
M98: Subprogram call ························································································ 3-5
M99: Return from subprogram ·············································································· 3-7
March, 2019
G-code list
This chapter provides the G-code list for you to quickly view all of the G-codes.
1
G00 01 Rapid positioning
G24 17 Mirroring
G51 11 Scaling
G57
G58
G59
12
12
12
4th workpiece coordinate system selection
2
G80: Cancel cycle ·········································································· 2-56
G81: Drilling cycle ·········································································· 2-57
G82: Drilling cycle (counter boring) ···················································· 2-60
G83: Deep-hole peck drilling cycle ····················································· 2-63
G84: Tapping cycle········································································· 2-66
G85: Boring cycle (no dwell time) ······················································ 2-69
G86: Boring cycle (spindle stop) ························································ 2-72
G87: Back boring cycle ··································································· 2-75
G88: Boring cycle (manual retraction) ················································ 2-77
G89: Boring cycle (with dwell time) ···················································· 2-80
G90: Absolute coordinates ······························································· 2-83
G91: Incremental coordinates ··························································· 2-84
G92: Coordinate system setting ························································ 2-86
G94: Feed per minute (mm/min) ······················································· 2-87
G98: Return to start point after fixed cycle ··········································· 2-88
G99: Return to reference point (R) after fixed cycle ······························· 2-89
2
Format: G00 Xˍ Yˍ Zˍ (applicable to single-axis, double-axis, and triple-axis synchronous motion
controls)
Xˍ Yˍ Zˍ: end coordinates.
Description: G00 can move the tool center to the specified X-, Y-, and Z-coordinates.
When using G00, you can adjust the moving speed with the Rapid % key on the
secondary control panel instead of parameter F.
Assume that the maximum speed of the X, Y, and Z axes is 15 m/min:
1. When the rapid feed rate is 100%, the axes operate at the maximum speed of
15 m/min.
2. When the rapid feed rate is 50%, the axes operate at a speed of 7.5 m/min.
3. When the rapid feed rate is 25%, the axes operate at a speed of 3.75 m/min.
4. When the rapid feed rate is 0%, the axial moving speed is determined by the
speed set in the parameter.
G00 is mainly used for rapid positioning instead of feed cutting. It is for applications
such as the tool moving from the machine origin to the cutting start point in rapid
traverse, or the tool retraction of Z axis and positioning of X and Y axes after cutting.
[Example]
The following diagram illustrates the usage of G00. The tool moves from point A to point B in
rapid traverse.
Express with absolute values: G90 G00 X92. Y35.
Express with incremental values: G91 G00 X62. Y-25.
Format: G01 Xˍ Yˍ Zˍ Fˍ
Xˍ Yˍ Zˍ: end coordinates.
2
Fˍ: cutting feed rate in the unit of mm/min.
Description: G01 enables the tool to perform linear interpolation from the current position to the
next command position at feed rate F. X-, Y-, and Z-coordinates represent the
cutting end point. This command is applicable to single-axis, double-axis, or
triple-axis synchronous motion controls. The feed rate is set by parameter F as well
as Rapid % on the secondary control panel in the unit of mm/min.
[Example]
The following diagram illustrates the usage of G01. G01 enables the tool to cut towards the +Y
direction from the program start point.
Parameter F is continuously effective, so you do not need to set it again if the cutting speed is the
same, as shown in the above program.
2
XˍYˍZˍ: end coordinates.
Cˍ: distance from the point of the hypothetical intersection to the start or end point of the
chamfer.
Rˍ: radius for the round corner.
Fˍ: cutting feed rate in the unit of mm/min.
Description: you can use this G01 command to simplify the program for chamfering or corner
rounding if a 45-degree angle or round corner is required for a workpiece.
[Example]
The following diagram illustrates the G01 command for chamfering and corner rounding.
2
G17 G02 (G03) Xˍ Yˍ Rˍ Fˍ or
G17 G02 (G03) Xˍ Yˍ Iˍ Jˍ Fˍ
Input parameter Zˍ to generate a helical path in the X-Y plane.
Description: G02 and G03 are circular interpolation commands. Since the workpiece is
three-dimensional, the circular interpolation direction (G02 or G03) varies in
different planes, as shown in the following diagrams. Definition: based on the
right-handed coordinate system, G02 is for clockwise direction while G03 is for
counterclockwise direction.
Statement expressions with center format and radius format are as follows:
1. Radius format: R is the arc radius. Specify the start point, end point, and arc
radius to form an arc. There will be two arc segments as shown in the following
2
figure. When R is a positive value, it means the central angle ≦ 180°. When R is a
negative value, it means the central angle > 180°.
In the above diagram, assume that R = 50 mm and the end coordinates in absolute
values are (100.0, 80.0), then:
(1) Central angle > 180° (path B) G90 G03 X100.0 Y80.0 R-50.0 F80
(2) Central angel ≦ 180° (path A) G90 G03 X100.0 Y80.0 R50.0 F80
2. Center format: I, J, and K are the relative distances from the arc start point to the
circle center, which are the incremental values from the start point to the center in
the X-, Y-, and Z-axis directions, as shown in the following figure.
Using the command in radius or center format to perform the circular motion is
necessary for making the programming easier whereas the command can only be
in center format for milling a full circle. If you use the command in radius format to
connect two semicircles, the roundness deviation will be too great.
[Example]
Refer to the following diagram. The command for milling a full circle is G02 I-50.0.
The following diagram illustrates the usage of G01, G02, and G03. Assume that the tool mills
along the workpiece contour upwards from the program start point:
O0100
2
(2) If a block has parameters I, J, and R at the same time, only parameter R is valid.
(3) I0, J0, or K0 can be omitted.
(4) If the end X-, Y-, and Z-coordinates are not specified, it means the start and end points are
the same, which cutting path will be a full circle. If the command is set in radius format, the
tool does not move.
(5) An alarm message occurs when the system is unable to form an arc using the end
coordinates with the specified radius.
(6) For a linear interpolation followed by a circular interpolation, you must use G02 or G03 to
switch the motion. To switch to linear interpolation, you must use G01.
(7) If the circular interpolation command (G02 or G03) has no R, I, J, and K parameters
specified, the motion path is the same as that of G01.
Format: G04 Xˍ or
2
G04 Pˍ
Description: this command specifies the dwell time of the current block. Parameter X sets the
dwell time and this value can be a decimal. Parameter P also sets the dwell time but
you can only input integers.
Setting range:
[Example]
G04 X1.5
or
G04 P1500
When you use either of the above two formats, the execution result is the same: the dwell time
during program execution is 1.5 seconds.
Format: G05 Pˍ
2
Pˍ: parameter group number.
Description: use G05 to select the parameter group (20 groups available).
G05 Pˍ: set 1 - 20 to enable the group function; set G05P0 to cancel the parameter
group function and restore to the default settings.
You can individually set each parameter in a group. When you move the cursor to the
field, the status bar below shows its setting range. Input the values in the entry row
and press Enter to enter the values. Meanwhile, the system checks whether the
range is valid; if the input value exceeds the range, the system prompts a warning
window.
2
Description: because the tool cuts at a constant feed rate, the cutting command execution of the
next block will start before the current block execution completes. In this case, there
will be a small arc generated at the corner between motion blocks. To eliminate this
arc, you can use G09 to have the system confirm the tool position each time it
executes a motion block. Once the tool is in the right position that is consistent with
the command value, the system executes the next block. Therefore, there will be a
minor discontinuity between blocks when G09 is used, which improves the precision
at the cost of speed. This enables high-precision machining. This command is valid
only for cutting commands (G01, G02, and G03) of a single block.
(1) Tool feeding direction; (2) With G09; (3) Without G09
[Example]
G09 G01 X100.0. F150 (The system has the tool decelerate to stop and then executes the next block after
confirming the position.)
G01 Y-100.
2
G10 L10 Pˍ Rˍ; set the tool length compensation.
G10 L11 Pˍ Rˍ; set the tool length wear compensation.
G10 L12 Pˍ Rˍ; set the tool radius compensation.
G10 L13 Pˍ Rˍ; set the tool radius wear compensation.
G10 L20 Pˍ Xˍ Yˍ Zˍ; set the extension workpiece coordinate system.
G10 L21 Pˍ Xˍ Yˍ Zˍ; set the software limit coordinates.
G10 L30 Pˍ; set the spindle positioning offset.
G10 L1100 Rˍ Sˍ; set the maximum and current rotation speed.
G10 L2100 Xˍ Yˍ Zˍ; set the machine coordinates.
G10 L3100 Pˍ; trigger the status M-code without stopping the motion.
G10 L4100 Pˍ; cancel the status M-code without stopping the motion.
Description:
(1) G10 L2 Pˍ Xˍ Yˍ Zˍ is for workpiece coordinate system data entry. When you input 0 for Pˍ,
it means you are setting the offset coordinates of the workpiece coordinate system; P1 - P6
correspond to G54 - G59 workpiece coordinate systems; X, Y, and Z specify the position of
coordinate system origin.
(2) G10 L10 - L13 Pˍ Rˍ are for setting the compensation value. Pˍ is the compensation
number and Rˍ is the actual compensation data. These commands correspond to the
settings for tool radius and tool length compensation value.
(3) In G10 L20, you can input 1 - 64 for Pˍ to set the corresponding extension workpiece
coordinate systems.
(4) For G10 L21 Pˍ: input 1 for Pˍ to set the first set of the software positive limit; input 2 for Pˍ
to set the first set of the software negative limit; input 3 for Pˍ to set the second set of the
software positive limit; input 4 for Pˍ to set the second set of the software negative limit.
The G10 commands mentioned above can either be expressed with absolute values (G90) or
with incremental values (G91).
(5) G10 L30 Pˍ is for setting the spindle positioning offset. Pˍ sets the offset angle in the unit of
0.01 degree; G11 L30 cancels the spindle positioning offset setting (resets to Pr405
settings).
(6) In G10 L1100 Rˍ Sˍ, Rˍ sets the maximum rotation speed and Sˍ sets the current rotation
speed. When you select DMCNET for the spindle, you can use this command to control the
analog output.
(7) G10 L2100 Xˍ Yˍ Zˍ is for setting the machine coordinates with the data of X, Y, and Z
entered to the machine coordinates individually.
2
(8) G10 L3100 Pˍ triggers the status M-code without stopping the motion; G10 L4100 Pˍ
cancels the status M-code without stopping the motion; P2080 - P2111 (Pˍ value)
correspond to M2080 - M2111.
[Example]
2
G10 L10 P2 R-100.0
The two programs above set the tool length compensation value as -300.0 for tool No.1 and
-100.0 for tool No.2 separately.
P: compensation number or workpiece coordinate number.
R: compensation value for the tool.
The following programs are expressed in absolute and incremental values separately:
In the program above, it inputs -300.0 to the data field for the length of tool No.1 in absolute
format.
G91 G10 L10 P1 R-100.0
In the program above, it increments -100.0 to the current length value of tool No.1.
Note:
(1) G10 is a one-shot command which functions only within the block where it is specified. Compensation
amounts of the offset coordinates and the workpiece coordinate systems both refer to the origin of the
machine coordinate system. To cancel the data entry, you can use G11.
(2) When you use L2 or L20 to change the coordinates, it functions in the next motion block. When using
L10 - L13 to change the tool compensation data, you must use the compensation command (G41, G42,
G43, or G44) and specify the compensation data number (D or H number) again to update the
compensation value.
Format: G15
Description: use G15 to cancel the polar coordinate command and then the program continues
the motion path with Cartesian coordinate values.
2
G18 G16 Zˍ Xˍ or
G19 G16 Yˍ Zˍ
Xˍ Yˍ: in G17 plane, Xˍ specifies the radius for the polar coordinates and Yˍ specifies the
angle for the polar coordinates.
Zˍ Xˍ: in G18 plane, Zˍ specifies the radius for the polar coordinates and Xˍ specifies the
angle for the polar coordinates.
Yˍ Zˍ: in G19 plane, Yˍ specifies the radius for the polar coordinates and Zˍ specifies the
angle for the polar coordinates.
Description: the polar coordinate command is defined with the radius and angle. If you select
G17 plane, the first axis (X axis) refers to the radius value and the second axis (Y
axis) refers to the angle degree. For the angle degree, the counterclockwise
direction of the selected plane is positive and the clockwise direction is negative. If
the radius is specified as negative value, it is regarded as an absolute value in the
command. The angle can be specified with either incremental or absolute values.
[Example]
2
Z-X plane: G18 {G01 - G03} Zˍ Xˍ{Kˍ Iˍ or Rˍ}Fˍ
Y-Z plane: G19 {G01 - G03} Yˍ Zˍ{Jˍ Kˍ or Rˍ}Fˍ
Description: this command is for switching among the planes. If it is a triple-axis synchronous
motion, setting this command is not required. G17 - G19 can only be used in the
condition that allows linear interpolation, circular interpolation, or tool compensation.
The milling system’s default plane after booting is G17. In this case, you do not need
to set G17 additionally when selecting the X-Y plane for machining.
Format: G21 or
G20
G21: metric unit settings.
G20: imperial unit settings.
Description: you can use this command to specify the unit in metric or inch. G21 and G20 are
only applicable to linear axes and do not affect the rotation angles of the rotation
axes. You must input this command before starting the program; changing the
metric or imperial settings is not allowed during program execution. This command
changes the numeric units relevant to the system, such as the cutting feed rate (F
value), coordinates command values, workpiece coordinate offset amount, tool
compensation amount, and moving distance. G21 and G20 commands are
continuously effective. Once you have specified the system unit at the beginning of
the program, the program refers to this setting and uses metric or inch as the unit.
You cannot use both G21 and G20 in the same program.
Format: G24 Xˍ Yˍ Zˍ
G24: mirroring.
2
Xˍ Yˍ Zˍ: specify the mirroring axis and center.
G25 Xˍ Yˍ Zˍ
G25: cancel mirroring.
Xˍ Yˍ Zˍ: cancel the mirroring axis.
Description: you can use G24 to specify the X axis, Y axis, or the X- and Y-coordinates as the
mirroring center to convert the original path to the mirror path. In this case, if the
paths to be cut are left-right or up-down symmetric, you can use the program path of
one side to mirror the motion path of the other side to save the time for editing the
program again. To cancel mirroring with G25, you need to specify the axis to be
canceled. For example, G25 Yˍ cancels the Y-axis mirroring function without
affecting the function in other axes.
[Example]
2
G55 X0 Y0
G01 X5.Y10. F1000
X35. Y10.
X5. Y70.
X5. Y10.
G00 X0 Y0
G24 X0
G01 X5. Y10. F1000
X35. Y10.
X5. Y70.
X5. Y10.
G00 X0 Y0
G25 X0
M30
The original program machines for the dotted path in the diagram above. If you use the mirroring
command and run the original program, the program machines for the solid path shown in the
diagram above (the specified mirroring axis is X axis in the example).
Use G25 to specify an axis to cancel the mirroring function for the corresponding axis; when the
mirroring function is canceled, the program resumes its original motion path.
2
G91 G28 Xˍ Yˍ Zˍ
Xˍ Yˍ Zˍ: intermediate point coordinates.
Description: G28 can have the tool pass through the reference point and return to the machine
origin in rapid traverse (G00). This command ensures the motion path from the
current position to the specified intermediate point does not interfere with the
workpiece and then returns the tool to the machine origin. Xˍ Yˍ Zˍ represents the
intermediate point coordinates. The unspecified axes neither pass through the
intermediate point nor return to the origin. If you have set the tool radius
compensation (G41 or G42), you need to cancel the setting; otherwise, when the
system is running G28, the tool radius compensation and its compensation distance
setting are temporarily canceled when the tool goes to the intermediate point and
then returns to the machine origin without compensation. Then, the tool radius
compensation function resumes in the next motion block. When G28 is in use, the
tool length compensation function (G43 or G44) remains effective when the tool
reaches the reference point. Next, the tool returns to the machine origin without the
tool length compensation. The tool length compensation does not resume in the
following motion blocks, so you need to set it again when running the next block.
[Example]
Machine origin
+Z G28
+X
G90 G28. Z50. (Go through the intermediate point B from point A and return to the machine origin (Z axis).)
M06 T02 (Change to tool No.2.)
[Example]
When G28 is in execution, the G90 or G91 status setting affects the process of returning to the
machine origin, as shown in the following diagrams.
A (Z20.0) A (Z20.0)
+X +X
G90 G28 Z50.0 G91 G28 Z50.0
G28
+Z +Z
G28
B (Z0,0)
+X +X
G90 G28 Z0.0 G91 G28 Z0.0
2
G91 G29 Xˍ Yˍ Zˍ
Xˍ Yˍ Zˍ: end point coordinates.
Description: G29 can have the tool pass through the intermediate point from the machine origin
or any point to the specified point in the block. Xˍ Yˍ Zˍ represents the end point
coordinates. G29 and G28 must be used together, so the tool moves to the
intermediate point specified in G28 and then moves to the position specified in G29
without calculating the actual moving distance from the intermediate point to the
machine origin. If you use G29 solely without setting the intermediate point using
G28, the system displays the alarm message and stops the motion.
[Example]
Expressed with incremental values (Tool path: A > B > D > B > C)
G28 G91 X70.0 Y40.0
M06
G29 X20.0 Y-40.0
Expressed with absolute values (Tool path: A > B > D > B > C)
G28 G90 X100.0 Y80.0
M06
G29 X120.0 Y40.0
Format: G30 P2 Xˍ Yˍ Zˍ or
G30 P3 Xˍ Yˍ Zˍ or
2
G30 P4 Xˍ Yˍ Zˍ
Pˍ: selection of the 2nd, 3rd, or 4th reference point.
Xˍ Yˍ Zˍ: intermediate point coordinates.
Description: P2, P3, and P4 commands correspond to the 2nd, 3rd, and 4th reference points
respectively. When you select the 2nd reference point, you can omit P2 in the
command format. Xˍ Yˍ Zˍ represents the intermediate point coordinates. The tool
passes through the specified intermediate point from the current position and
returns to the 2nd, 3rd, or 4th reference point, whose coordinates are set with system
parameters. G30 is mostly used for tool change. When the command is set with
absolute values and the motion block G30 Z0.0 is executed, the Z axis returns to
the intermediate point (Z0.0) and then moves to the 2nd reference point to complete
the assigned motion.
You must cancel the tool compensation setting (using G40 or G49) before using
G28 or G30. If you use G30 or G28, the block including this command cancels the
tool radius compensation and tool length compensation; therefore, the tool length
compensation function stops in the next block and will resume until you use G43 or
G44 again. The tool radius compensation function resumes in the motion block
following the block including G28 or G30.
G28
Machine origin
+Z
+X
As shown in the figure above, when you use G30 Z0 in G90 mode, the Z axis first
returns to the intermediate point (set to the machine origin in the example) and
then goes to the coordinates specified in G30 (the second origin) to complete the
homing procedure.
[Program illustration]
G90 G30 P2 X100. Y80. G91 G30 P2 X0. Y0. (no intermediate point)
Format: G31 Xˍ Yˍ Zˍ Fˍ Pˍ
2
Description: you can use G31 to input an external skip signal for the specified axis that is making
a linear motion, so the execution of the motion path is interrupted and the system
starts executing the next block. This G-code is a one-shot command that is effective
in one block. You cannot use G31 when the tool radius compensation (G41 or G42)
is functioning. Thus, cancel the tool radius compensation (G40) before using this
command.
[Example 1] [Example 2]
The motion path in solid line shows the path without the skip command input during the process.
On the other hand, if there is a skip signal input, the program stops the current block execution
once the signal is input and starts the execution of the next block, as the path in dotted line
shows.
Format: G40 or
2
G40 Xˍ Yˍ
Description: if the tool path does not need the tool radius compensation, you can use G40 to
cancel the compensation path. The compensation command is a status command,
so it continues to function unless you cancel it. When using the homing command,
the tool radius compensation function is temporarily canceled while the tool is
returning to the reference point. Then, the compensation function resumes in the
next motion block. Note that the tool radius compensation cancellation is not
applicable to an arc motion path.
2
G41: tool radius compensation left
G42: tool radius compensation right
Dˍ: the number for tool radius compensation data
Description: the tool center cuts the workpiece along its contour if there is no tool radius
compensation function programmed in the motion path, meaning that the motion
path is not adjusted to compensate the tool radius. Thus, the actual size after
machining is one radius smaller. If you take the tool radius into consideration for
calculating the motion path when programming, you may get wrong coordinates and
have difficulty in size control. See the following figures for illustration.
External contour milling without compensation Internal contour milling without compensation
According to the figures shown above, when the tool cuts along the workpiece
contour, the output size of the workpiece is one diameter larger or smaller because
of the tool diameter.
You can decide when to use the tool radius compensation left or right command
according to the following conditions:
Use G42 to set the right tool radius compensation if you look from the milling
direction and the tool is on the right side of the workpiece.
Use G41 to set the left tool radius compensation if you look from the milling
direction and the tool is on the left side of the workpiece.
Dˍ represents the number for tool radius compensation data, which is represented
with 2 digits. This number refers to the number for tool compensation data in the
[OFS group] of the controller. For example, D11 means the tool radius
compensation number is No.11; if the data of No.11 is 4.0, it means the tool radius is
4.0 mm. The controller reads the tool radius data in the [OFS group] as the
compensation distance according to the tool radius compensation number specified
in D when using G41 or G42.
2
command). It cannot be used in a block that includes G02 or G03. To use the tool radius
compensation function for an arc path, you have to first set the tool radius compensation
function for the linear motion path. When the compensation is active, canceling the tool
radius compensation in the arc path is not allowed. See the following figure for description.
The program for enabling the tool radius compensation right command when moving the tool from point
A to point C is as follows:
G90 G00 X120.0 Y-20.0 (Move the tool to point A in rapid traverse.)
G01 G42 X100.0 Y0 D20 F80 (from point A to point C)
Y52.0 (from point C to point D)
G03 X92.0 Y60.0 R8.0 (from point D to point E)
G01 X0 (from point E to point F)
Y0 (from point F to point G)
X100.0 (from point G to point C)
(2) Specify the tool radius compensation number (e.g. D11, D12, etc.) during program editing.
Each tool radius compensation number corresponds to a number in the compensation data
table. You need to key in the tool radius compensation value to the corresponding number in
the tool setting function of the [OFS group] in advance.
(3) If there is a change in the signs (+, -) of the compensation value, the compensation direction
specified in G41 and G42 will change accordingly. For example, when you assign a positive
value in G41, the compensation direction is left; when you assign a negative value, the
compensation direction becomes right. Likewise, when you assign a positive value in G42,
the compensation direction is right; when you assign a negative value, the compensation
direction becomes left.
(4) If the tool radius compensation function (continuously effective) is active and G28 or G29 is
used, the compensation will be temporarily canceled. However, the system will reserve this
state setting so the compensation resumes in the next motion block.
(5) When the tool radius compensation is used and the tool completes the programmed path,
you must use G40 to cancel the compensation function for the tool center to return to the
actual coordinates. In other words, the motion path shifts to the left or right, which is opposite
2
to the compensation direction, to cancel the compensation distance. The best timing to use
G40 to cancel the tool radius compensation is after the tool has disengaged from the
workpiece. See the following program for description.
F(60,100)
E(25,60)
D(20,35) G(90,35)
C(0,35)
I(45,10)
B(0,0) H(90,0)
+Y
A(-20,-20)
+X
G90 G00 X-20.0 Y-20.0 (Move the tool to point A in rapid traverse.)
G01 G41 X0 Y0 D12 F80 (Enable G41 tool radius compensation left when the tool
moves from point A to point B.)
Y35. (from point B to point C)
X20. (from point C to point D)
G03 X25.0 Y60.0 R65.0 (from point D to point E)
G02 X60.0 Y100.0 R25. (from point E to point F)
G01 X90.0 Y35.0 (from point F to point G)
G01 Y0 (from point G to point H)
X45. Y10. (from point H to point I)
X0 Y0 (from point I to point B)
X -20. Y -20. (from point B to point A)
G40 (Cancel the compensation after the tool has disengaged
from the workpiece.)
(6) When compensation is enabled, the linear moving amount and inner arc interpolation radius
must be ≧ the tool radius. Otherwise, there will be interference with the compensation
vector thus causing overcutting. When this issue occurs, the controller stops running and
2
displays the alarm message, as shown in the following figure.
Straight line
Program path movement a mount
Overcutting
(7) The canceled moving amount of the tool radius compensation must be ≧ the tool radius.
Otherwise, there will be interference with the cutting path thus causing overcutting. When
this issue occurs, the controller stops running and displays the alarm message, as shown in
the following figure.
Overcutting
Program path
(8) The tool radius compensation is not operable in motion blocks following the block that
contains G40. Or, when you use the tool radius compensation in the last moving block
without any more motion blocks following it, the tool radius compensation is not operable in
the last motion block.
2
0<θ<90°, the tool radius motion path is outward-shaped. See the following diagram for
illustration.
The compensation motion diagrams are shown in the following table. The controller
compensates for both the start and end points of the tool path.
Line to line
Intersection point s
s
r Tool path
Tool path
r
θ Program path
G41 r
Program path
θ
G41
Start point Start point
Line to arc
Tool path
Center
Intersection point s
Program path
r s
G41
r
θ θ
r
Start point Center Program Tool path
path G41
Start point
Compensation path change: the following diagrams show that the motion path without
compensation transits to the tool center motion path with
compensation. When the compensation command is in execution, it
2
continues to function for the motion path; if you use G40 to cancel
the compensation path or directly change the compensation
direction, the motion paths are shown as follows.
s Start point
Tool path
r
G41 θ
Program path
θ
Program path s
r r
Program path
G40
s
θ
G40
Format: G43 Zˍ Hˍ
G44 Zˍ Hˍ
2
G43: tool length compensation in positive direction. If the tool length data is a positive
value, the tool axis moves towards the positive direction.
G44: tool length compensation in negative direction. If the tool length data is a positive
value, the tool axis moves towards the negative direction.
Description: during the same machining process, a number of tools may be required for a
numeric machine. Since the length for each tool differs from each other, you can use
this command to specify the number for the length data of each tool in the program
to perform the height compensation. This function compensates the length for each
tool to meet the programmed depth of cut as well as simplifying the programming.
2
Z-axis m achine origin
400
Z-axis p rogram origin
5
Workpiece
Work bench
Note:
(1) When the tool length compensation is enabled, if you use G53, G28, or G30, the system cancels the
tool length compensation function automatically. You need to re-specify the Hˍ value in the following
blocks to enable the tool length compensation.
(2) Parameter 307 (Pr307) sets the tool length compensation mode for commands G43, G44, or G49
without a specified Zˍ value. If you set Pr307 to 0, when you use G43, G44, or G49 without setting Zˍ,
the tool moves by the compensation height; if you set Pr307 to 1, when you use G43, G44, or G49
without setting Zˍ, the tool does not move unless you set the Zˍ value to move the tool for the
compensation height.
(3) When the tool length compensation (G43 or G44) is enabled, if you use G28 or G30 to move the tool to
the reference point, the tool length compensation function remains effective. Next, the tool returns to
the machine origin without the tool length compensation. Then, the tool length compensation does not
(4) When the tool length compensation is enabled, if you use the two program end commands, M30 and
M02, the system cancels the tool length compensation and enables G49.
(5) When the tool length compensation is enabled, if the system receives a reset signal, it cancels the tool
Format: G49
2
Description: since the tool length compensation command is a status command, the system
reserves the tool length data after performing compensation and updates the data
until it reads other compensation numbers. In this case, you should cancel the
previous tool length compensation command before selecting different tools or use
a tool length compensation command for the tool you have changed after tool
change. Use G49 to cancel the tool length compensation function.
Format: G51 Xˍ Yˍ Zˍ Pˍ or
G51 Xˍ Yˍ Zˍ Iˍ Jˍ Kˍ
Xˍ Yˍ Zˍ: center of scaling.
Iˍ Jˍ Kˍ: scaling factors corresponding to the X, Y, and Z axes individually.
Pˍ: scaling factor.
Description: Xˍ Yˍ Zˍ is for setting the X-, Y-, and Z-coordinates of the center of the scaling; Pˍ
refers to the scaling factor, and you can also specify the scaling factor for the X, Y,
and Z axes individually with the format Iˍ Jˍ Kˍ. The command is applicable to the
machining programs for cutting products of different sizes. Set Xˍ Yˍ Zˍ as the center
of the scaling and set the scaling factor to P to scale the machining path.
The minimum value for Pˍ and Iˍ Jˍ Kˍ is 1, whose factor ranges from 0.001 to
999.999. For example, P100 means the size is reduced by 0.1 time.
As shown in the diagram above, you specify the scaling factor to Pˍ in the G51
command, and the system scales the tool path generated by the original factor.
Then, the new path is generated according to the specified scaling factor. The
scaling function does not affect the compensation amount for the tool radius
2
also press the RESET key to cancel the scaling. To cancel the scaling, you can use
G50 in the program, then the system refers to the original factor and continues the
original cutting path before scaling.
Format: G52 Xˍ Yˍ
Xˍ Yˍ: local coordinates system origin.
Description: during program editing, you can designate a sub-coordinate system based on the
workpiece coordinates for specifying the path. And this assigned sub-coordinate
system is called a local coordinate system. Set absolute values in G52 and then you
can create a local coordinate system in the current workpiece coordinate system
(G54 - G59). Note that G52 is valid only when it is set with absolute values instead
of incremental values (G91). G52 specified with zero cancels the local coordinate
system settings. When G52 is enabled, the tool radius compensation function is
temporarily canceled.
[Example 1]
G90 G54 X0 Y0
G52 X40.0 Y40.0
G00 X20.0 Y20.0
[Example 2]
G90 G54 G00 X10. Y10.
G52 X30. Y20.
G00 X20. Y20. (from point A to point B)
2
G56 G00 X50. Y10. (from point B to point C)
When G52 is effective, it converts the current workpiece coordinate system to another coordinate
system, and the shift setting of G52 is also effective after the conversion.
To cancel the local coordinate setting, set 0 for X, Y, Z in G52 (format: G52 X0 Y0 Z0).
Format: G53 Xˍ Yˍ Zˍ
2
Xˍ Yˍ Zˍ: actual arrival position in the machine coordinate system.
Description: the coordinates (X, Y, Z) specify the actual arriving end point in the machine
coordinate system set in the program. Machine suppliers usually use this command
to set the tool change position, which is given based on the machine coordinates.
You must set this command in the absolute format; G53 in increment format will be
omitted.
G53 is a one-shot G command and is valid for one single block. After booting and
before using G53 to set the coordinate system, you must complete the homing
procedure in auto or manual mode. When G53 is used, the tool moves in rapid
traverse (G00) and both the tool radius compensation and tool length compensation
are canceled automatically. The tool radius compensation resumes in the next
motion block while the tool length compensation will not function until you set it
again.
Note:
(1) G53 functions only in G90 mode. G53 in G91 mode will be omitted; however, the status commands
such as G00, G01, G90, or G91 in the same block will remain effective and continue to function in
(2) If the block contains G53 and includes an axial command, the axis moves to the specified position;
(3) When one block contains both commands G53 and G28, the command read later is effective. If G53
is effective, the movement is made based on the machine coordinates. If G28 is effective, the
[Example]
(1) G91G53X150.Y-150. (This block is omitted.)
X-30.Y-30. (The motion in this block is in incremental mode.)
2
G90 G56 Xˍ Yˍ Zˍ or
G90 G57 Xˍ Yˍ Zˍ or
G90 G58 Xˍ Yˍ Zˍ or
G90 G59 Xˍ Yˍ Zˍ
Description: commands G54 - G59 allow you to assign any one of the 6 general coordinate
systems as the workpiece coordinate system. To create a workpiece coordinate
system, you can first move the tool from the machine origin to the program origin
(X, Y). Then, input the position data in the [OFS group] for the workpiece
coordinates system settings (G54 - G59). Next, use the workpiece coordinate
system ID to set the workpiece coordinate origin. In addition, the system also
provides 64 extension workpiece coordinate systems for selection. You can
designate one by setting the Pˍ value within the range of 1 - 64 in G54. For example,
if G54 P10 Xˍ Yˍ Zˍ is set, it means the 10th coordinate system in the extension
workpiece coordinate system is used.
[Example]
O1000
G00 G90 G55 X0 Y0
G00 X100.0
Y50.0
X0.0
Y0.0
M30
With the workpiece coordinate system settings, you can easily calculate and design the
programming path, and create multiple coordinate systems on the work platform for switching
among programs. As shown in the figure above, when the coordinate origin is changed, you can
simply edit the workpiece coordinate data instead of creating another program to carry out
machining operations.
Format: G61
2
Description: G61 and G09 function the same except that G09 is a one-shot command (only
becomes effective when specified) while G61 is not. After G61 is used, each time
the system executes G01, G02, and G03, it decelerates to stop for inspection. You
can use G64 (cutting mode) to cancel G61 mode or it remains effective.
[Example]
Format: G64
Description: when G64 is used and during the transition between blocks, the tool moves at a
constant speed instead of decelerating to full stop at the end of each motion block.
Normally, the initial status of the system is set to G64 cutting mode. Unlike the
motion status of G61, G64 enables the tool to cut at a constant feed rate and the tool
does not decelerate to stop between motion blocks. However, deceleration to full
stop for inspection takes place in the following circumstances when G64 is in use:
(1) The system executes the block that contains G00 rapid positioning command.
(2) The system executes the block that contains G09 exact stop command.
(3) The next block does not contain motion commands.
Format: G65 Pˍ Lˍ lˍ
2
Pˍ: program number.
Lˍ: number of repetitions.
lˍ: independent variable.
Description: you can use G65 to call a macro program. Macro programs are used for commands
such as operations, MLC interface data input and output, control, making statement
and discrepancy, and can enable the system to perform calculations and
measurements. In the main program, these macro programs are active only when
they are called by specified macro programs. This command works the same way
as M98 does except that G65 is a one-shot command.
[Example]
After the macro program is executed, the program returns to the block following G65 in the main
program, which means the block following G65 is executed. See the example above, A5.0
means the value of variable #1 is 5.0. Refer to the following table.
A #1 I #9 T #20
B #2 J #10 U #21
C #3 K #11 V #22
D #4 M #13 W #23
E #5 Q #17 X #24
F #6 R #18 Y #25
H #8 S #19 Z #26
[Program illustration]
2
… G65P1; ...
M98P1000; … #1=2;
… M98P2000; …
M30; (16) M99; (3) M99;
(4)
O2000; (5) O0002;
(15) G65P2; …
… #1=2;
M98P3000; …
M99; (6) M99;
(7)
O3000; (8) O0003;
G65P3; …
(14) … #1=2;
M98P4000; …
M99; M99;
(9)
(10)
O4000; (11) O0004;
G65P4; …
(13) … #1=2;
… …
M99; M99;
(12)
Commands G65 and G66 can nest macros up to 8 layers. When using with M98 subprogram call,
the maximum layers it can call remains 8.
Format: G66 Pˍ Lˍ lˍ or
2
G67
Pˍ: program number.
Lˍ: number of repetitions.
lˍ: independent variable.
Description: G66 and G65 function the same except that G65 is a one-shot command. When
G66 is used, each block will start the macro program call unless there is a G67
command that cancels G66. If G67 is not used, then the macro call command
continues to function.
[Example]
Format: G68 Xˍ Yˍ Rˍ
2
XˍYˍ: center of rotation.
Rˍ: rotation angle. If the rotation direction is counterclockwise, Rˍ is a positive value; if
the rotation direction is clockwise, Rˍ is a negative value. The minimum unit of
rotation is 0.001°, whose setting range is 0° - 360°.
Description: you can use G68 to assign the specified coordinates as the center of rotation for
converting the path of the original machining program by the specified rotation angle.
Thus, when the workpiece is positioned at an angle that is different from the
direction of the original machining program, you can use G68 to simplify the
complicated calculation for the program path and save the time for creating another
program. G68 can be enabled in absolute mode (G90) as well as in incremental
mode (G91).
[Example]
Original path:
O1000
G00 G90 G55 X0 Y0
G00 X100.0
Y50.0
X0.0
Y0.0
M30
Use the upper program if the original program machines for the dotted path in the diagram above.
If the workpiece is positioned in a different direction, you should have created a new program
path. However, you can use G68 to rotate the program path, so a new program is not required (in
the example above, the coordinate system and program path rotate by 90°). G69 cancels the
function of G68: when the rotation function is canceled, the system restores the motion path to
the original motion path.
Format: G73 Xˍ Yˍ Zˍ Rˍ Qˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Qˍ: depth of each drill.
Fˍ: cutting feed rate.
Kˍ: number of cycle repetitions.
Description: each time the tool drills by the distance (depth) of Q, it retracts by a fixed distance d
in rapid traverse, and then this motion continues until reaching point Z. The
intermittent Z-axis feed allows a small retraction amount to be set in the deep hole
drilling, which simplifies the chip evacuation. Q is an absolute value. d is the moving
distance specified by the parameter; when d = 1 mm, it means the default retraction
amount is 1 mm. See the following diagrams for the motion assigned by G73.
[Program illustration]
q q
d d
q q
d d
q q
Z point Z point
Note:
(1) The tool radius compensation function is canceled when the drilling cycle command is enabled.
2
(3) Q can only be a positive value. If you set a negative value to Q, a G-code format error occurs.
(4) If you set a decimal to K, the value is unconditionally rounded down. For example, K2.6 becomes K2
(5) When you specify an absolute value for K, the tool repeats the motion for the specified times at the
same position; when you specify an incremental value, the tool repeats the incremental equidistant
(6) When you use G73 with K specified as 0, the tool moves according to the specified coordinates (Xˍ Yˍ)
(7) If you specify a negative value to K, such as K-1.5, the result is the same as that of K1.
(8) If you specify negative decimals to K, such as K-0.8, the result is the same as that of K0.
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G99 G73 X0. Y0. Z-30. R10. Q4. K1 F100. -------------------------------------------------------------(1)
X-15. -------------------------------------------------------------(2)
X-30. -------------------------------------------------------------(3)
X-30. Y15. -------------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G98 G73 X0. Y0. Z-30. R10. Q4. K1 F100. -------------------------------------------------------------(1)
X-15. -------------------------------------------------------------(2)
X-30. -------------------------------------------------------------(3)
X-30. Y15. -------------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G74 Xˍ Yˍ Rˍ Qˍ Zˍ Pˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Qˍ: depth of each tap.
Pˍ: dwell time (unit: 1/1000 seconds). No decimals.
Fˍ: cutting feed rate for the thread.
Kˍ: number of cycle repetitions.
Cutting feed rate for the thread (mm/min) = lead (mm/rev) x spindle speed (rev/min).
F=PxS
Description: G74 is used for the left-hand thread machining application, which requires the
left-hand threading taps and spindle rotation in reverse (CCW) direction. The motion
steps for this command are as follows: move the tool center to the designated X-
and Y-coordinates in rapid traverse then to the point R level, and then perform
thread cutting at the specified feed rate F until the tool reaches the specified depth Z.
After that, the spindle rotates in forward (CW) direction and the tool retracts to the
point R level in positive direction in the meantime. After reaching the point R level,
the spindle rotates in the preset reverse direction.
ccw cw ccw cw
P Z point P Z point
When the tapping cycle is enabled, the tool cuts at the feed rate, 100%, specified by
the program. In this case, you cannot adjust the spindle speed rate or the cutting
feed rate on the control panel. Moreover, when the tapping cycle command is
enabled, you must disable the function of the FEED HOLD key before finishing the
thread cutting or tapping to ensure the correct pitch.
[Example]
G17 G90 G00 G54 X0. Y0.
G00 Z100.
2
M29 S1000
G99 G73 X0. Y0. Z-30. R10. P1000. K1 F1000. --------------------------------------------------------(1)
X-15. --------------------------------------------------------(2)
X-30. --------------------------------------------------------(3)
X-30. Y15. --------------------------------------------------------(4)
M28
G91 G80 G28 X0. Y0. Z0.
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
G17 G90 G00 G54 X0. Y0.
G00 Z100.
2
M29 S1000
G98 G73 X0. Y0. Z-30. R10. P1000. K1 F1000. --------------------------------------------------------(1)
X-15. --------------------------------------------------------(2)
X-30. --------------------------------------------------------(3)
X-30. Y15. --------------------------------------------------------(4)
M28
G91 G80 G28 X0. Y0. Z0.
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G76 Xˍ Yˍ Rˍ Pˍ Zˍ Qˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Rˍ: initial point level.
Pˍ: dwell time (unit: 1/1000 seconds). No decimals.
Zˍ: Z-axis coordinate of the bottom of the hole.
Qˍ: shift amount.
Fˍ: cutting feed rate.
Kˍ: number of cycle repetitions.
Description: this command is used for fine boring. When the tool cuts until reaching the specified
point, it dwells for the time specified for Pˍ, and the spindle stops in an oriented
position. Then, the tool center shifts from the workpiece surface by the specified
distance Qˍ to disengage from the workpiece. This prevents the tool from scratching
the workpiece when retracting the tool to the point R level or the start point. After the
tool retracts to point R or the start point, the tool center shifts back by the amount Qˍ
and returns to the start point in Z axis, then the spindle continues to rotate.
Back to
Start point start point Start point
Z point Z point
oss P oss P
q q
Tool
The spindle
stops at given
direction
2
Shift amount Q
As shown in Figure 1, the boring tool moves to the specified X- and Y-coordinates in
rapid traverse then to the point R level, and then bores at the specified feed rate F
until reaching the specified depth Z. After that, the spindle stops in an oriented
position to align the tool tip to the fixed direction, and then the tool center shifts by
the specified distance Q to disengage the tool tip from the hole wall (as shown in
Figure 2). This prevents the tool from scratching the machining surface when
retracting the tool from the hole. When the system retracts the boring tool to point R
or the start point, the tool center returns to the original center and the spindle
continues rotating.
The shift amount shown in Figure 2 is specified by Q. The Q value must be positive
(if you set a negative value to Q, the negative sign is omitted. So, you should set
Q1.0 if the desired shift distance is 1.0 mm), and you can set +X, +Y, -X, or -Y as the
fixed shift direction with the parameter. Setting the Q value within a reasonable
range to prevent the tool from colliding with the workpiece.
The Q value of the fixed cycle functions is a status value, and the Q value can be
used as the depth of each drill for G73 and G83, and as the shift amount for G87. As
a result, when using commands G73, G76, G83, and G87, you should set a proper
Q value to prevent the tool from colliding with the workpiece (G76 and G87) or avoid
improper cutting amount (G73 and G83).
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G99 G76 X0. Y0. Z-30. R10. P1000 Q5. K1 F100. -------------------------------------------------(1)
X-15. -------------------------------------------------(2)
X-30. -------------------------------------------------(3)
X-30. Y15. -------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G98 G76 X0. Y0. Z-30. R10. P1000 Q5. K1 F100. -------------------------------------------------(1)
X-15. -------------------------------------------------(2)
X-30. -------------------------------------------------(3)
X-30. Y15. -------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G80
2
Description: all cycle commands are status commands. You must first cancel the cycle command
to restore to the general motion mode. Use G80 to cancel the cycle functions set by
G73, G74, G76, and G81 - G89.
[Example]
G17 G90 G00 G54 X0. Y0.
Z100.
G99 G73 X0. Y0. Z-20. R10. Q4. K1 F100.
G80 (Cancel G73.)
G17 G90 G00 G54 X0. Y0.
Z100.
Format: G81 Xˍ Yˍ Zˍ Rˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Fˍ: cutting feed rate.
Kˍ: number of cycle repetitions.
Description: G81 is a drilling cycle command used for general applications. The system does not
retract the tool during the drilling operation; instead, it retracts the tool to point R or
the start point in rapid traverse (G00) after drilling to the specified depth Z to
complete a cycle. See the following diagram for the motion assigned by G81.
Z point Z point
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G99 G81 X0. Y0. Z-30. R10. K1 F100. ---------------------------------------------------------(1)
X-15. ---------------------------------------------------------(2)
X-30. ---------------------------------------------------------(3)
X-30. Y15. ---------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start point
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G98 G81 X0. Y0. Z-30. R10. K1 F100. ---------------------------------------------------------(1)
X-15. ---------------------------------------------------------(2)
X-30. ---------------------------------------------------------(3)
X-30. Y15. ---------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start point
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Pˍ: dwell time (unit: 1/1000 seconds). No decimals.
Fˍ: cutting feed rate.
Kˍ: number of cycle repetitions.
Description: G82 and G81 function the same except that you can use G82 to specify the dwell
time for Pˍ in the block when the tool cuts until reaching the bottom of the hole. This
command is used for counter bore, spot face, and hole machining that requires
precise depth. This command specifies the dwell time when the tool cuts to the
bottom of the hole to make a smoother hole wall and more precise hole depth.
P Z point P Z point
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G99 G82 X0. Y0. Z-30. R10. P1000. K1 F100. ---------------------------------------------------------(1)
X-15. ---------------------------------------------------------(2)
X-30. ---------------------------------------------------------(3)
X-30. Y15. ---------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start point
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G98 G82 X0. Y0. Z-30. R10. P1000. K1 F100. ---------------------------------------------------------(1)
X-15. ---------------------------------------------------------(2)
X-30. ---------------------------------------------------------(3)
X-30. Y15. ---------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start point
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G83 Xˍ Yˍ Rˍ Qˍ Zˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Qˍ: depth of each drill.
Fˍ: cutting feed rate.
Kˍ: number of cycle repetitions.
Description: G83 and G73 function the same except that G83 retracts the tool to the point R level
each time it performs a drilling operation, which allows more coolant to flow into the
hole and evacuate more chips. The following describes the motion steps: each time
the tool drills for the depth Qˍ, it retracts to point R and moves to the point which is
higher than the previous drilling endpoint by the distance d in rapid traverse and
then starts the next drilling with the depth of drilling as q+d. The motion continues
until the tool reaches the specified position Z. Then, the tool retracts to point R or the
start point to complete the deep-hole drilling cycle.
q q
d d
q q
d d
q q
Z point Z point
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G99 G83 X0. Y0. Z-30. R10. Q4. K1 F100. ---------------------------------------------------------(1)
X-15. ---------------------------------------------------------(2)
X-30. ---------------------------------------------------------(3)
X-30. Y15. ---------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start point
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G99 G83 X0. Y0. Z-30. R10. Q4 K1 F100. ---------------------------------------------------------(1)
X-15. ---------------------------------------------------------(2)
X-30. ---------------------------------------------------------(3)
X-30. Y15. ---------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start point
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G84 Xˍ Yˍ Rˍ Qˍ Zˍ Pˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Qˍ: depth of each tap.
Pˍ: dwell time (unit: 1/1000 seconds). No decimals.
Fˍ: cutting feed rate for the thread.
Kˍ: number of cycle repetitions.
Description: use G84 with right-hand tap to perform the thread cutting cycle. G84 and G74
function the same except that the spindle rotation direction for G84 is opposite to
that of G74.
cw ccw cw ccw
P Z point P Z point
[Example]
G17 G90 G00 G54 X0. Y0.
G00 Z100.
2
M29 S1000
G99 G84 X0. Y0. Z-30. R10. P1000 K1 F1000. ------------------------------------------------------(1)
X-15. ------------------------------------------------------(2)
X-30. ------------------------------------------------------(3)
X-30. Y15. ------------------------------------------------------(4)
M28
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
G17 G90 G00 G54 X0. Y0.
G00 Z100.
2
M29 S1000
G98 G84 X0. Y0. Z-30. R10. P1000 K1 F1000. ------------------------------------------------------(1)
X-15. ------------------------------------------------------(2)
X-30. ------------------------------------------------------(3)
X-30. Y15. ------------------------------------------------------(4)
M28
G80 G91 G28 X0. Y0. Z0.
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G85 Xˍ Yˍ Rˍ Zˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Fˍ: cutting feed rate.
Kˍ: number of cycle repetitions.
Description: this command increases precision of the hole cutting. You can use G85 to cut with
reamers or boring bars for applications that require high precision in hole diameters
such as reaming or boring. The command is used in the following steps: the tool
cuts at the specified feed rate F until reaching the specified depth Z, and then
retracts to point R at the same speed. Finally, the tool returns to point R (G99) or the
start point (G98) with G00 rapid positioning command.
Z point Z point
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G99 G85 X0. Y0. Z-30. R10. K1 F100. ------------------------------------------------------(1)
X-15. ------------------------------------------------------(2)
X-30. ------------------------------------------------------(3)
X-30. Y15. ------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G98 G85 X0. Y0. Z-30. R10. K1 F100. ------------------------------------------------------(1)
X-15. ------------------------------------------------------(2)
X-30. ------------------------------------------------------(3)
X-30. Y15. ------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G86 Xˍ Yˍ Rˍ Zˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Fˍ: cutting feed rate.
Kˍ: number of cycle repetitions.
Description: the following figures illustrate the command. The tool cuts until reaching the
specified position Z, and then the spindle stops rotating and the tool retracts with
G00 rapid positioning command. After the tool returns to the initial level, the spindle
starts rotating in clockwise direction and thus completes a boring cycle. The tool
does not shift or tap for a fixed amount since no Q value is specified in the command.
Since the tool and workpiece are in contact, the tool retraction causes slight line
scratches on the hole wall because the tool is not rotating. As a result, this cycle
command is usually used for rough boring applications.
Z point Z point
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G99 G86 X0. Y0. Z-30. R10. K1 F100. ------------------------------------------------------(1)
X-15. ------------------------------------------------------(2)
X-30. ------------------------------------------------------(3)
X-30. Y15. ------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G98 G86 X0. Y0. Z-30. R10. K1 F100. ------------------------------------------------------(1)
X-15. ------------------------------------------------------(2)
X-30. ------------------------------------------------------(3)
X-30. Y15. ------------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G87 Xˍ Yˍ Rˍ Zˍ Qˍ Pˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Qˍ: shift amount.
Pˍ: dwell time (unit: 1/1000 seconds). No decimals.
Fˍ: cutting feed rate.
Kˍ: number of cycle repetitions.
Description: the system has the tool move to the specified X- and Y-coordinates in rapid traverse,
stops the spindle in an oriented position to align the tool tip to the fixed direction, and
shifts the tool center by the shift amount specified by Q. In this case, the blade does
not touch the hole wall when the tool moves to the point R level.
After moving to the point R level in rapid traverse, the tool center moves to the
specified X- and Y-coordinates, and in the meantime the spindle rotates in clockwise
direction. At this time, the tool starts cutting the workpiece from point R to point Z.
After reaching point Z, the system shifts the tool center by the amount Q and
positions the spindle, then it has the tool move back to the start point on Z axis in
rapid traverse. After returning to the start point, the tool center shifts back to the
original position by the shift amount Q. The value and direction of the shift amount Q
is the same as that of G76. In addition, you cannot use G87 with G99 (Return to
reference point after fixed cycle).
Action G87(G98)
in steps
Start Back to
point Q start point
oss
Z point
oss P
R point
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G98 G87 X0. Y0. Z-30. R10. P1000 Q5. K1 F100. ---------------------------------------------------(1)
X-15. ---------------------------------------------------(2)
X-30. ---------------------------------------------------(3)
X-30. Y15. ---------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G88 Xˍ Yˍ Rˍ Zˍ Pˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Pˍ: dwell time (unit: 1/1000 seconds). No decimals.
Fˍ: cutting feed rate.
Kˍ: number of cycle repetitions.
Description: when G88 is used, the tool cuts from point R to the specified point Z and dwells for
the specified time P at point Z. After that, the spindle stops rotating and the program
stops (the same effect as using M00). Then, when you press Cycle start, the tool
retracts to point R or the start point in rapid traverse. In addition, when the tool cuts
to point Z, you can retract the tool in positive direction manually by setting the
system to MPG mode. To resume the program, set the system to Auto mode and
press Cycle start. At this time, the system retracts the tool to point R (G99) or the
start point (G98) to complete G88 boring cycle. This command is applicable for
boring blind holes.
Start Back to
point start point Start point
P Z point P Z point
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G99 G88 X0. Y0. Z-30. R10. P1000 K1 F100. ----------------------------------------------------(1)
X-15. ----------------------------------------------------(2)
X-30. ----------------------------------------------------(3)
X-30. Y15. ----------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G98 G88 X0. Y0. Z-30. R10. P1000 K1 F100. ----------------------------------------------------(1)
X-15. ----------------------------------------------------(2)
X-30. ----------------------------------------------------(3)
X-30. Y15. ----------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G89 Xˍ Yˍ Rˍ Zˍ Pˍ Fˍ Kˍ
2
Xˍ Yˍ: end position of a single block.
Zˍ: Z-axis coordinate of the bottom of the hole.
Rˍ: initial point level.
Pˍ: dwell time (unit: 1/1000 seconds). No decimals.
Fˍ: cutting feed rate.
Kˍ: number of cycle repetitions.
Description: G89 is mainly used for reaming blind holes. Except that the tool dwells for the time
specified by P at point Z, G89 and G85 function similarly by feeding and retracting
the tool at the feed rate F. You can get more precise hole depth and hole diameter
because you set the dwell time in the command to stop the tool after it reaches point
Z.
P Z point P Z point
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G99 G89 X0. Y0. Z-30. R10. P1000 K1 F100. ----------------------------------------------------(1)
X-15. ----------------------------------------------------(2)
X-30. ----------------------------------------------------(3)
X-30. Y15. ----------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
R point
100
(Tool retreat)
10
30
+Z
(3) (2) (1)
+X (4)
[Example]
M03 S1000
G17 G90 G00 G54 X0. Y0.
2
G00 Z100.
G98 G89 X0. Y0. Z-30. R10. P1000 K1 F100. ----------------------------------------------------(1)
X-15. ----------------------------------------------------(2)
X-30. ----------------------------------------------------(3)
X-30. Y15. ----------------------------------------------------(4)
G80 G91 G28 X0. Y0. Z0.
M05
15 15
(4)
15
+Y
(3) (2) (1)
+X
Start p oint
(Tool retreat)
100
R point
10
30
+Z
(3) (2) (1)
+X (4)
Format: G90 Xˍ Yˍ Zˍ
2
Description: this command is continuously effective. When you use this command, it means you
assign all axial commands in the absolute format. In other words, the tool moves
based on the workpiece coordinate origin. After you send an axial movement
command, the tool calculates the actual required moving distance according to the
workpiece coordinate origin.
[Example]
When the first point is (10, 10) and the second point is (30, 30), the actual moving distance is (20,
20), as shown in the following diagram.
O1000
G01 G90 X10.0 Y10.0 F500.0
X30.0 Y30.0
Format: G91 Xˍ Yˍ Zˍ
2
Description: when you use G91, values assigned for the axial movements in the block are
incremental. The tool makes incremental movements or incremental rotations from
the current position to the specified position. G91 is a status command.
If you use G91, G91 immediately replaces G90.
[Example]
When the first point is (10, 10) and the second point is (20, 20), the actual moving distance is (20,
20), and the actual machine coordinates is (30, 30), as shown in the following diagram.
O1001
G01 G91 X10.0 Y10.0 F500.0
X20.0 Y20.0
O0010
G01 G90 X0 Y0 F1000
X40.0
G91 Y20.0
X-5.0 Y5.0
2
G90 X5.0
X0 Y20.0
Y0
M30
Format: G92 Xˍ Yˍ Zˍ
2
Description: G92 X0 Y0 Z0 command can set the current tool position as the absolute coordinate
system origin. The absolute commands in this program refer to this origin when
calculating the position. In G92 Xˍ Yˍ Zˍ, if you have specified the value for X, Y, or Z,
the absolute coordinates and the current position display will update according to
the G92 command.
Note:
(1) G92 continues to function unless M02 or M30 is used (program end command).
(2) Pressing the RESET key can cancel the G92 setting.
[Example]
O0005
G00 G90 G54 X0.0 Y0.0
G00 G92 X0.0 Y0.0
G01 X100.0 Y0.0 F1000.0
X100.0 Y50.0
X0.0 Y50.0
X0.0 Y0.0
M30
2
Description: the unit for G94 feed per minute is mm/min. This means the tool performs cutting
each minute at speed Fˍ. You can use G94 with motion blocks at the same time and
use G94 independently in one block. This command is continuously effective and its
format is set based on the tool feeding calculation for the milling system.
2
Description: G98 and G99 are status commands used for moving the tool back to the specified
height after a fixed cycle command. G98 is used for retracting the tool to the
specified start point after a fixed cycle. After completing the cutting of a fixed cycle,
you can use G98 to return the tool to the start point of the fixed cycle. Since G98 is a
status command, you can only cancel it with G99. The default homing command is
G98. See the following figure for illustration.
A ction G81(G98)
in s teps
R point
Z point
2
Description: G98 and G99 are status commands used for moving the tool back to the specified
height after a fixed cycle command. G99 is used for retracting the tool to the
reference (R) point after a fixed cycle. Use G98 to cancel G99 if you desire to retract
the tool to the start point.
Action G81(G99)
in steps
Start point
Z point
3
controller has some system-defined M-codes that do not require MLC coding to run and are
usually used for program control. The following table is the commonly used M-codes. Except the
system-defined codes, you need to use MLC to specify the M-code functions.
Format: M00
3
Description: when there is an M00 command in the block, the program stops after executing this
block. To resume the program execution, re-press Cycle Start. You can use this
command to inspect the tools or workpiece appearance and dimensions when
cutting.
Format: M01
Description: when M01 is executed and functioning, its function is the same as M00 except that
M01 has to work with the Optional stop key on the secondary control panel. If the
Optional stop key is disabled and there is an M01 command in the block, the
controller automatically skips M01 and continues to run the program.
Format: M02
Description: M02 is usually placed at the end of a machining program to notify the controller that
the program has ended. If you place an M02 in the middle of the program, when the
controller executes M02, the program stops at M02 and regards the program as
ended; meanwhile, the cursor stops at the block that includes M02.
Format: M30
Description: M30 is usually placed at the end of a machining program to notify the controller that
the program has ended. If you place an M30 in the middle of the program, when the
controller executes M30, the program stops at M30 and regards the program as
ended; meanwhile, the cursor returns to the program start position. M30 and M02
commands are similar. The only difference is that M02 stops the cursor at the block
that includes M02 whereas M30 returns the cursor to the program start position.
Format: M96 Pˍ
3
M96: enable program interruption.
Pˍ: the subprogram code to be interrupted.
Description: when there is an M96 command in the block, the controller enables the monitoring
and continues executing the program until the special M-code M1078 is triggered to
have the main program stop and call the subprogram. When the controller executes
M99 in the subprogram, it returns to the interrupted block in the main program and
then carries on the execution.
Note:
1. You can check if the M96 command is executed with the special M-code M2216 when M1078 is
triggered.
2. You can only trigger the interrupt signal in the main program.
3. When G02 or G03 is executed, if you trigger the interrupt signal to jump to the subprogram, the
controller has the tool move to the endpoint of the G02 or G03 path by linear interpolation after
4. You cannot use M96 when the following functions are enabled:
Mirroring: G24
Scaling: G51
[Example]
Format: M97
3
Description: if you no longer need to use the M96 command, place an M97 command in the
block; when it is executed, M96 is canceled.
Format: M98 Pˍ Hˍ Lˍ
Pˍ: subprogram code.
Hˍ: the block number to jump to.
Lˍ: number of call for the subprogram.
Description: if there are fixed or highly repetitive actions, you can write these actions into a
subprogram to simplify the whole program. The main program can call a
subprogram; a subprogram can call another subprogram with up to eight
consecutive layers. When the controller reads an M98 command, it jumps to the
designated subprogram and executes the subprogram commands in the specified
block repeating for the set times.
[Example]
Can be used as: M98 Hˍ Lˍ: when the main program and subprogram are written in the same file,
you can use the M98 command in this format in which H refers to
3
the block specified with the sequence number N.
Main program
N0010
…
…
N0050 M98 H0130 L2
…
…
N0090 M30
…
…
N0130
…
…
N0160 M99
3
Format: M99 or M99 Pˍ
M99: return to the main program.
Pˍ: the block number to return to.
Description: after M98 is executed, to return to the main program, you need to use M99 to have
the cursor return to the block following the block that has called the subprogram and
then carry on the execution in the main program. You can use M99 Pˍ to have the
cursor jump to the specified block in the main program and then carry on the
execution.
[Example]
4.1 Variables
When performing variable operations in the NC program, you can use variables to replace the
4
NC program code to batch modify the values, which makes the program editing and variable
calculation easier. A variable is formatted as a symbol "#" suffixed with a variable number. Types
of variables are as follows.
MLC bit output #1801 - #1832 For reading the MLC signal status (MLC > NC). ★
#1801 - #1832 for bit format and #1833 - #1848 for
MLC word output #1833 - #1848 word format. ★
MLC bit input #1864 - #1895 For writing the MLC signal status (NC > MLC). ★
#1864 - #1895 for bit format and #1896 - #1911 for
MLC word input #1896 - #1911 word format. ★
Except for the G, L, N, O, and P-codes, all the other variable codes can be used as arguments.
When these arguments are used for G65 and G66 subprogram call, they are sent as local
variables.
#1 #2 #3 #4 #5 #6 #7 #8 #9 #10
A B C D E F G H I J
#11 #12 #13 #14 #15 #16 #17 #18 #19 #20
K L M D E F Q R S T
U V W X Y Z
The system variables are used for reading and writing the system internal data during NC
4
operations. The MLC output and input are used for the data exchange between the NC program
and the MLC. The special M-codes correspond to the bit format and special D-codes correspond
to the word format.
No. Function
#2009 Cycle: G73, G74, G76, G80, G83, G84, G85, G86, G87, G88, and G89
#2012 Workpiece coordinates: G54, G55, G56, G57, G58, and G59
You can use variables #2100 - #2220 to read the following coordinates (read-only).
4
Machine
Machine Relative coordinates when Absolute coordinates of
coordinates coordinates G31 skip command breakpoint search line
Position is triggered
data
Axis Absolute Offset between machine
Absolute Block end coordinates when coordinates of breakpoint
coordinates coordinates G31 skip command search line and current
is triggered machine coordinates
You can use variables #3000 - #4030 to read the offset coordinates and workpiece coordinates
4
(read-only).
(5) Others
4
The variable corresponding to single block I when an arc
#2300 ★
command is executed.
The variable corresponding to single block J when an arc
#2301 ★
command is executed.
The variable corresponding to single block K when an arc
#2302 ★
command is executed.
You can use variables #1801 - #1911 to get the interface data as well as read and write the MLC
4
signal status. Variable values can be in bit or word format. For the bit-type signals, the variables
can only be 1 or 0; for the word-type signals, the variables can be any value.
MLC bit output; read the MLC signal status (MLC > NC)
Read MLC signal status Macro output point Read MLC signal status Macro output point
MLC word output; read the MLC signal status (MLC > NC)
Read MLC signal status Macro output register Read MLC signal status Macro output register
MLC bit input; write the MLC signal status (NC > MLC)
Write MLC signal status Macro input point Write MLC signal status Macro input point
4
#1864 M2080 #1880 M2096
MLC word input; write the MLC signal status (NC > MLC)
Write MLC signal status Macro input register Write MLC signal status Macro input register
4
program for better flexibility and universality as you can use the variables for mathematical
operations.
#[#20] (Correct)
#[#20] = … (Correct)
#20 =… (Correct)
(Correct)
#[#20 - #10] = …
Placing mathematical operators before an equal sign is not allowed.
G#20 equals G1 #20 = 1 (When G#20 is used, it can only be written with the program.)
4
can turn the calculation result into a variable, or combine and replace the result into other
variables. You can use constants to replace #i, #j, and #k.
+ #i = #j + #k Addition
- #i = #j - #k Subtraction
* #i = #j * #k Multiplication
Elementary
arithmetic
/ #i = #j / #k Division
= #i = #j Substitution
[ ] #i = #j * [ #p + #q ] Parentheses
Logic | #i = #j | #k OR logic
operation Λ #I = #j^#k XOR logic
! #i = ! #j NOT logic
PI PI = π Pi
Constant TRUE TRUE = 1 Return 1 when the statement is true.
FALSE FALSE = 0 Return 0 when the statement is false.
4
repetitively executes the set of statements until it executes the first ENDW. Otherwise, the
program jumps to the block of code following ENDW for execution.
WHILE [statement]
︴
ENDW
Example:
WHILE[#80<=360.] (Enter the loop for repetitive execution when #80 is less than or equal to 360.)
WHILE[#60>=20.] (Enter the inner loop when #60 is greater than or equal to 20.)
#60=#60-2.
ENDW (Execute the first ENDW and the inner loop ends.)
#80=#80+15.
#50=#50-0.05
ENDW (Execute the second ENDW and the outer loop ends.)
Branch conditions:
When the IF [statement] is true, the program switches the execution from GOTO to statement N.
Otherwise, the program executes the next block of code following the IF statement, as shown in
the following example .
IF [Statement] GOTO N (Execute the IF statement, conditionally jump to statement N for execution.)
The N in “GOTO N” must be used in the same program or an alarm will occur.
N10 #12=#10
#13=#11+2;
IF[#2=1]GOTO200;
#12=#10-#3; When #2 = 1,
#13=#11-#4; branch to N200.
N200 X#12 Z#13;
#5=#5+2;
Note: when searching the sequence number in the branch, the system searches from the start of the
program. An alarm will occur if the target number is not found. If the same sequence number repeats
in the program, the system will execute the block of code that is first found.
4
TRUE; return value: #i = 1
#j > #k #j is greater than #k #i = #j > #k
FALSE; return value: #i = 0
Example:
#100 = 1.234; (Define: #100 is 1.234)
#100 = [[#101+#102]/2.0]; (Define: #100 is #101 plus #102 and then divided by 2)
4
corresponding setting is as follows.
O9016 0 - 1000
O9017 0 - 1000
O9018 0 - 1000
O9019 0 - 1000
Constraint: if you use a macro to call G-codes, M-codes, or T-codes, the nested macro will not be
executed (the G-codes in this macro are treated as general G-codes).
(2) To use the M-code to call a macro, go to [CONFIG] to set the number to be called. The
corresponding setting is as follows.
O9020 0 - 1000
O9021 0 - 1000
O9022 0 - 1000
O9023 0 - 1000
O9024 0 - 1000 Set the M-code number to 0 if not using the macro call
O9025 0 - 1000 function.
O9026 0 - 1000
O9027 0 - 1000
O9028 0 - 1000
O9029 0 - 1000
Constraint: if you use a macro to call G-codes, M-codes, or T-codes, the nested macro will not be
executed (the M-codes in this macro are treated as general M-codes).
(3) To use the T-code to call a macro, go to [CONFIG] to enable the function. The setting is as
follows.
4
Macro function T-code number Note
0: disabled Set the T-code number to 0 if not using the macro call
O9000 function. The T-code number is defined as local variable
else: enabled #20.
Constraint: if you use a macro to call G-codes, M-codes, or T-codes, the nested macro will not be
executed (the T-codes in this macro are treated as general T-codes).
#2020 F-code ★
#2021 H-code ★
#2022 D-code ★
#2023 T-code ★
#2024 S-code ★
4
The variable corresponding to single block K when an arc command
#2302 ★
is executed.
4
#5016 Breakpoint search function: the last used S-code ★
V1.0
March, 2019
(First edition)
For relevant information about [Milling Machine Solution G Command Guidelines], please
refer to:
(1) Delta CNC Milling Machine Solution - Operation and Maintenance Manual
(2) Delta CNC Solution – NC Series MLC Application Manual
March, 2019 1
Revision History Milling Machine Solution G Command Guidelines
2 March, 2019