0% found this document useful (0 votes)
1K views

NC Programming Manual

This document is a programming manual for an NC machine. It provides instructions on how to program the machine for drilling, tapping, and facing operations. It explains the structure of NC programs and describes various G-code preparatory functions for positioning, cutting, dwells, exact stop checks, and programmable data input. The manual is divided into sections covering program structure, coordinate commands, and specific G-code functions. It contains warnings, operation procedures, screenshots, and illustrations to aid understanding.

Uploaded by

wslee
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

NC Programming Manual

This document is a programming manual for an NC machine. It provides instructions on how to program the machine for drilling, tapping, and facing operations. It explains the structure of NC programs and describes various G-code preparatory functions for positioning, cutting, dwells, exact stop checks, and programmable data input. The manual is divided into sections covering program structure, coordinate commands, and specific G-code functions. It contains warnings, operation procedures, screenshots, and illustrations to aid understanding.

Uploaded by

wslee
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 382

PROGRAMMING MANUAL

(NC)

Read this manual before performing work.

2016/03/16 1 eCOM3NCPRTP
Introduction

Thank you for purchasing this machine.


Always be sure to read this manual carefully first, in order to use the machine
functions properly and safely.
Always be sure to carefully read this Programming Manual as well as the
Operation Manual before use.

This manual gives a description of NC programming.


This machine can be used to carry out drilling, tapping and facing.

This machine manual is divided into the following sections.


• Operation Manual
This manual describes the operation procedure for the machine.
• Installation Manual
This manual describes the machine’s installation procedure and
inspections.
• Programming Manual
This manual provides a program description.

Brother is not responsible or liable for accidents that occur during special
machine use or handling that does not follow the general safety usage
guidelines.
Keep this manual for future reference.
Attach this manual to the machine if it is resold.
Contact the nearest Brother sales office or Brother approved service dealer if
this manual or the safety labels are damaged, lost or missing. (Charges apply)

The re-exporting and resale of this machine is regulated by Japan’s export laws and
regulations in accordance with international export management.
When exporting, permission from the exporting country’s government and/or from the
Japanese government may be required.
Contact a Brother Industries dealer in advance before re-transferring, reselling or
re-exporting this machine.

Copying and reprinting all or part of the content in this manual without permission is illegal.
The content of this manual may be changed without prior notice.
Brother has taken steps to ensure this manual is accurate and complete. However, if you notice
or suspect that there is an error, please contact the nearest Brother sales office or Brother
approved service dealer.

2016/03/16 2 eCOM3NCPRTP
How to Read This Manual
This manual is divided into the following sections.
(1) Overview ------- A summary of the content is provided for the corresponding section.

(2) Warning -------- A warning is provided for any hazards that could potentially cause serious bodily
injury, death or damage to the machine.
The hazards are described in the following order.
(2-1) Hazard level
(2-2) Type of hazard
(2-3) Potential damage
(2-4) Safety directions to avoid danger

(3) Operation procedure --- The procedure describes how to operate each function.

(4) Screenshot ---- A screenshot is inserted into places to highlight certain points in the operation
procedure. The screenshot messages are shown at an approximate position and may
differ slightly from the actual position of the line or column. The same applies to the
font.

(5) Illustration ----- Illustrations, such as explanatory drawings, diagrams that show the dimensions,
positioning, ranges, figures or configurations, are used in certain places where a
written explanation alone may be hard to understand.

(2) Warning (3) Operation procedure (1) Overview

1.3 Take the necessary steps to ensure 1.3.1 Before starting operation
safe operation Review the following items before starting
operation.
(1) Turn the main power breaker handle on the control
box door to the OFF position.
Do not touch the primary power and terminal for the
WARNING main power breaker because it has a high voltage.
(2) A sign must be posted to warn others that work is
You may break or fracture your foot in progress.
if you drop a heavy object on it. (3) Do not let others approach the machine or the
moving parts on the machine.
Therefore, use safety footwear when (4) Make sure that there are no unnecessary objects
lifting or carrying heavy objects. around the machine.

1-2 1-3

(5) Illustration (4) Screenshot

2016/03/16 3 eCOM3NCPRTP
(This page was intentionally left blank.)

2016/03/16 4 eCOM3NCPRTP
Contents

CHAPTER 1 PROGRAM STRUCTURE -------------------------------- 1-1


1.1 Program Types and Structure ---------------------------------------------------- 1-2
1.2 Block Structure ------------------------------------------------------------------------ 1-2
1.3 Word Structure ------------------------------------------------------------------------- 1-3
1.4 Number Commands ------------------------------------------------------------------ 1-3
1.5 Sequence Numbers------------------------------------------------------------------- 1-5
1.6 Optional Block Skip ------------------------------------------------------------------ 1-5
1.7 Control Out-In Function ------------------------------------------------------------- 1-5

CHAPTER 2 COORDINATE COMMANDS ---------------------------- 2-1


2.1 Coordinate System and Coordinate Commands --------------------------- 2-2
2.2 Machine Zero Point and Machine Coordinates ----------------------------- 2-2
2.3 Workpiece Coordinates ------------------------------------------------------------- 2-3

CHAPTER 3 PREPARATION FUNCTION ----------------------------- 3-1


3.1 Outline of G Code --------------------------------------------------------------------- 3-2
3.2 Positioning (G00, G60) -------------------------------------------------------------- 3-5
3.2.1 Positioning (G00) ------------------------------------------------------------------------------------------- 3-5
3.2.2 Single Direction Positioning Function (G60) ---------------------------------------------------------- 3-6
3.2.3 Precautions for Programming Involving Use of Rotation Axis (Index Table) ------------------- 3-7
3.3 Cutting (G01 to 03, G12/13, G102/103, G202/203) -------------------------- 3-8
3.3.1 Linear Interpolation (G01) -------------------------------------------------------------------------------- 3-8
3.3.1.1 Chamfering to Desired Angle and Cornering R ------------------------------------------------ 3-9
3.3.2 Circular Interpolation/Helical Thread Cutting Interpolation ---------------------------------------3-12
3.3.2.1 Circular Interpolation (G02, G03) ---------------------------------------------------------------3-12
3.3.2.2 XZ Circular Interpolation (G102, G103) -------------------------------------------------------3-13
3.3.2.3 YZ Circular Interpolation (G202, G203) -------------------------------------------------------3-14
3.3.2.4 Precautions for Circular Interpolation -----------------------------------------------------------3-15
3.3.2.5 Helical Thread Cutting Interpolation ------------------------------------------------------------3-18
3.3.2.6 Spiral Interpolation ---------------------------------------------------------------------------------3-19
3.3.2.7 Conical Interpolation -------------------------------------------------------------------------------3-21
3.3.2.8 Cutter Compensation for Spiral and Conical Interpolation ----------------------------------3-24
3.3.2.9 Involute interpolation ------------------------------------------------------------------------------3-25
3.3.3 Circle Cutting (G12, G13)--------------------------------------------------------------------------------3-26
3.4 Dwell (G04) ---------------------------------------------------------------------------- 3-28
3.5 Exact Stop Check (G09, G61, G64) -------------------------------------------- 3-29
3.6 Programmable Data Input (G10) ----------------------------------------------- 3-30
3.6.1 Entering Workpiece Coordinate Zero ------------------------------------------------------------------3-30
3.6.2 Entering Tool Length/Cutter Compensation Data ----------------------------------------------------3-30
3.6.3 Tool Wear Compensation --------------------------------------------------------------------------------3-31
3.6.4 Tool Offset Data Input ------------------------------------------------------------------------------------3-31
3.6.5 Tool Offset wear Data input -----------------------------------------------------------------------------3-32
3.6.6 Data Input of Extended Workpiece Coordinate ------------------------------------------------------3-32
3.6.7 Workpiece Coordinate System Using the Results of Measurements ------------------------------3-32
3.6.8 Data Input of Extended Workpiece Coordinate Zero Based on Measurement Results --------3-33
3.6.9 Data Input for Reference Rotary Fixture Offset ------------------------------------------------------3-33
3.6.10 Tool Information Input ----------------------------------------------------------------------------------3-34
3.7 Coordinate System (G17 to 19, G52 to 59, G54.1, G92) ---------------- 3-35
3.7.1 Plane Selection (G17, G18, G19) -----------------------------------------------------------------------3-35
3.7.2 Machine Coordinate System Selection (G53)---------------------------------------------------------3-35
3.7.3 Workpiece Coordinate System Selection (G54 to G59)---------------------------------------------3-35
3.7.4 Extended Workpiece Coordinate System Selection (G54.1) ---------------------------------------3-36
3.7.5 Workpiece Coordinate System Setting (G92)---------------------------------------------------------3-36
3.7.6 Local Coordinate System Function (G52) -------------------------------------------------------------3-39
3.7.7 Rotary Fixture Offset Function (G54.2) ---------------------------------------------------------------3-39
3.7.7.1 Overview --------------------------------------------------------------------------------------------- 3-39
3.7.7.2 Command Format-----------------------------------------------------------------------------------3-40
3.7.8 Tilt Plane Coordinate Setting Function ----------------------------------------------------------------3-41

2019/09/02 1 eCOM3NCPRCO
Contents

3.7.8.1 Overview --------------------------------------------------------------------------------------------- 3-41


3.7.8.2 Command Format-----------------------------------------------------------------------------------3-42
3.7.8.3 Restrictions ------------------------------------------------------------------------------------------ 3-47
3.8 Soft Limit ------------------------------------------------------------------------------- 3-48
3.8.1 Stroke -------------------------------------------------------------------------------------------------------- 3-48
3.8.2 Stroke Limit ------------------------------------------------------------------------------------------------ 3-48
3.8.3 Programmable Stroke Limit (G22) ---------------------------------------------------------------------3-49
3.9 Reference Position (G28 to G30)----------------------------------------------- 3-50
3.9.1 Return to the Reference Point (G28) -------------------------------------------------------------------3-50
3.9.2 Return from the Reference Point (G29) ----------------------------------------------------------------3-50
3.9.3 Return to the 2nd to 6th Reference Point (G30) ------------------------------------------------------3-51
3.10 Skip Function (G31, G131/G132) --------------------------------------------- 3-52
3.10.1 Before using the skip function -------------------------------------------------------------------------3-52
3.10.2 Skip Function (G31, G131/G132) ---------------------------------------------------------------------3-52
3.10.3 Continuous Skip Function (G31) ----------------------------------------------------------------------3-53
3.11 Scaling (G50/G51) ----------------------------------------------------------------- 3-54
3.12 Programmable Mirror Image (G50.1/51.1) --------------------------------- 3-57
3.13 Rotational Transformation Function (G68/69, 168) -------------------- 3-60
3.13.1 Coordinate Rotation (G68/69) -------------------------------------------------------------------------3-60
3.13.2 Coordinate Rotation Using Measured Results (G168)---------------------------------------------3-61
3.14 Absolute Command and Incremental Command (G90/91) ---------- 3-62
3.15 Change of Tap Twisting Direction (G133/134) --------------------------- 3-64
3.16 G Code Priority --------------------------------------------------------------------- 3-64
3.17 Programmable Data Input (High Accuracy) (G210) -------------------- 3-71
3.17.1 High Accuracy Mode A Parameter Changes --------------------------------------------------------3-71
3.17.2 High Accuracy Mode B Parameter Changes --------------------------------------------------------3-72
3.18 Thread Cutting ---------------------------------------------------------------------- 3-73
3.18.1 Single Start Lead Thread Cutting (G33) -------------------------------------------------------------3-73
3.18.2 Thread Cutting Cycle (G392) --------------------------------------------------------------------------3-75
3.18.2.1 Thread Cutting Cycle for Straight Screws ----------------------------------------------------3-75
3.18.2.2 Thread Cutting Cycle for Taper Screws -------------------------------------------------------3-76
3.18.3 Thread Cutting in Complex Thread Cutting Cycle (G376) ---------------------------------------3-78
3.18.3.1 Infeed ----------------------------------------------------------------------------------------------- 3-79
3.18.3.2 Detailed Description of Operation -------------------------------------------------------------3-80
3.18.4 Thread Runout -------------------------------------------------------------------------------------------- 3-83
3.18.5 Program Example ---------------------------------------------------------------------------------------- 3-84
3.18.5.1 Machining and Thread Cutting Straight Screws ---------------------------------------------3-84
3.18.5.2 Machining and Thread Cutting Taper Screws ------------------------------------------------3-85
3.19 Lathe Machining Infeed Direction -------------------------------------------- 3-86

CHAPTER 4 PREPARATION FUNCTIONS


(COMPENSATION FUNCTIONS) ---------------------- 4-1
4.1 Cutter Compensation (G40, G41 and G42) ----------------------------------- 4-2
4.1.1 Cutter Compensation Function --------------------------------------------------------------------------- 4-2
4.1.1.1 Cutter Wear Offset ---------------------------------------------------------------------------------- 4-2
4.1.2 Cancel Mode ------------------------------------------------------------------------------------------------- 4-3
4.1.3 Startup -------------------------------------------------------------------------------------------------------- 4-4
4.1.3.1 Inner Side Cutting (180° ≤ θ) ---------------------------------------------------------------------- 4-4
4.1.3.2 Outer Side (Obtuse Angle Cutting) (90º ≤ θ < 180º) ------------------------------------------ 4-5
4.1.3.3 Outer Side (Acute Angle Cutting) (θ < 90º) ----------------------------------------------------- 4-6
4.1.4 Offset Mode ------------------------------------------------------------------------------------------------- 4-7
4.1.4.1 Inner Side Cutting (180º ≤ θ) ---------------------------------------------------------------------- 4-7
4.1.4.2 Outer Side (Obtuse Angle Cutting) (90º ≤ θ < 180º) ------------------------------------------ 4-9
4.1.4.3 Outer Side (Acute Angle Cutting) (θ < 90º) ----------------------------------------------------4-10
4.1.4.4 Exceptional Cases ----------------------------------------------------------------------------------4-11
4.1.5 Offset Cancel ----------------------------------------------------------------------------------------------- 4-12
4.1.5.1 Inner Side Cutting (180º ≤ θ) ---------------------------------------------------------------------4-12
4.1.5.2 Outer Side (Obtuse Angle Cutting) (90º ≤ θ < 180º) -----------------------------------------4-13
4.1.5.3 Outer Side (Acute Angle Cutting) (θ < 90º) ----------------------------------------------------4-14

2019/09/02 2 eCOM3NCPRCO
Contents

4.1.6 G40 Individual Command --------------------------------------------------------------------------------4-15


4.1.7 Compensation Direction Change in Offset Mode ----------------------------------------------------4-16
4.1.8 Offset Direction Change in Offset Mode --------------------------------------------------------------4-17
4.1.8.1 When There is an Intersection --------------------------------------------------------------------4-17
4.1.8.2 When There is No Intersection -------------------------------------------------------------------4-18
4.1.8.3 When an Arc Laps Around in a Circle ----------------------------------------------------------4-19
4.1.8.4 Arc angle check when offset direction changes -----------------------------------------------4-20
4.1.9 G Code Command for Cutter Compensation in Offset Mode ------------------------------------4-21
4.1.10 Special Notes for Cutter Compensation --------------------------------------------------------------4-22
4.1.11 Override Function Related to Cutter Compensation -----------------------------------------------4-28
4.1.11.1 Automatic Corner Override ---------------------------------------------------------------------4-28
4.1.11.2 Inner Arc Override --------------------------------------------------------------------------------4-29
4.1.12 Arc Angle Check During Inner Side Cutting --------------------------------------------------------4-30
4.1.13 Interference Check for Cutter Compensation / Nose R Compensation -------------------------4-31
4.1.13.1 Interference detection method ------------------------------------------------------------------4-31
4.1.13.2 Operation when interference is detected ------------------------------------------------------4-33
4.1.13.3 Restrictions and special notes -------------------------------------------------------------------4-33
4.2 Tool Length Offset (G43, G44 and G49) ------------------------------------- 4-34
4.2.1 Tool Length Offset Function-----------------------------------------------------------------------------4-34
4.2.2 Tool Length Wear Offset ---------------------------------------------------------------------------------4-35
4.2.3 Z-axis Travel with Tool Length Offset Command ---------------------------------------------------4-35
4.3 Nose R Compensation (G141 and G142 - Option) ----------------------- 4-37
4.3.1 Command Format ------------------------------------------------------------------------------------------ 4-38
4.3.1.1 Nose R Wear Offset --------------------------------------------------------------------------------4-39
4.3.2 Virtual Teeth------------------------------------------------------------------------------------------------ 4-40
4.3.3 Cancel Mode ------------------------------------------------------------------------------------------------ 4-40
4.3.4 Startup ------------------------------------------------------------------------------------------------------- 4-41
4.3.4.1 Inner Side Cutting (180º ≤ θ) ---------------------------------------------------------------------4-43
4.3.4.2 Outer Side (Obtuse Angle Cutting) (90º ≤ θ < 180º) -----------------------------------------4-44
4.3.4.3 Outer Side (Acute Angle Cutting) (θ < 90º) ----------------------------------------------------4-45
4.3.5 Offset Mode ------------------------------------------------------------------------------------------------ 4-46
4.3.5.1 Inner Side Cutting (180º ≤ θ) ---------------------------------------------------------------------4-46
4.3.5.2 Outer Side (Obtuse Angle Cutting) (90º ≤ θ < 180º) -----------------------------------------4-48
4.3.5.3 Outer Side (Acute Angle Cutting) (θ < 90º) ----------------------------------------------------4-49
4.3.5.4 Exceptional Cases ----------------------------------------------------------------------------------4-50
4.3.6 Offset Cancel ----------------------------------------------------------------------------------------------- 4-51
4.3.6.1 Inner Side Cutting (180º ≤ θ) ---------------------------------------------------------------------4-51
4.3.6.2 Outer Side (Obtuse Angle Cutting) (90º ≤ θ < 180º) -----------------------------------------4-52
4.3.6.3 Outer Side (Acute Angle Cutting) (θ < 90º) ----------------------------------------------------4-53
4.3.7 G40 Individual Command --------------------------------------------------------------------------------4-54
4.3.8 Compensation Direction Change in Offset Mode ----------------------------------------------------4-55
4.3.9 Offset Direction Change in Offset Mode --------------------------------------------------------------4-55
4.3.9.1 When There is an Intersection --------------------------------------------------------------------4-55
4.3.9.2 When There is No Intersection -------------------------------------------------------------------4-56
4.3.10 G Code Command for Nose R Compensation in Offset Mode -----------------------------------4-58
4.3.11 Special Notes for Nose R Compensation ------------------------------------------------------------4-59
4.3.12 Override Function Related to Nose R Compensation ----------------------------------------------4-64
4.3.12.1 Automatic Corner Override ---------------------------------------------------------------------4-64
4.3.12.2 Inner Arc Override --------------------------------------------------------------------------------4-65
4.3.13 Arc Angle Check During Inner Side Cutting --------------------------------------------------------4-66
4.4 Tool Position Compensation (G143, G144 and G49 - Option) ------- 4-67
4.4.1 Tool Position Compensation Function -----------------------------------------------------------------4-67
4.4.2 Axis Travel with Tool Position Compensation -------------------------------------------------------4-68

CHAPTER 5 PREPARATION FUNCTION (CANNED CYCLE) -- 5-1


5.1 Outline ------------------------------------------------------------------------------------ 5-2
5.2 List of Canned Cycle Function --------------------------------------------------- 5-2
5.3 Basic Operation of Canned Cycle ----------------------------------------------- 5-3
5.4 General Rules of Canned Cycle -------------------------------------------------- 5-4
5.4.1 Canned Cycle Operation Commands -------------------------------------------------------------------- 5-4
5.4.2 Data in Absolute and Incremental Mode---------------------------------------------------------------- 5-4

2019/09/02 3 eCOM3NCPRCO
Contents

5.4.3 Types of Return Points (G98, G99)---------------------------------------------------------------------- 5-5


5.4.4 Canned Cycle Operating Conditions -------------------------------------------------------------------- 5-5
5.4.5 Canned Cycle Machining Data --------------------------------------------------------------------------- 5-6
5.4.6 Canned Cycle Repetition Count -------------------------------------------------------------------------- 5-7
5.5 Details of Canned Cycle ------------------------------------------------------------ 5-8
5.5.1 High Speed Peck Drilling Cycle (G73) --------------------------------------------------------------- 5-8
5.5.2 Reverse Tapping Cycle (G74) -------------------------------------------------------------------------- 5-9
5.5.3 Fine Boring Cycle (G76) -------------------------------------------------------------------------------5-10
5.5.4 Tapping Cycle (Synchro Mode) (G77) ---------------------------------------------------------------5-11
5.5.5 Reverse Tapping Cycle (Synchro Mode) (G78) ----------------------------------------------------5-12
5.5.6 Drilling Cycle (G81, G82)------------------------------------------------------------------------------5-14
5.5.7 Peck Drilling Cycle (G83) ------------------------------------------------------------------------------5-15
5.5.8 Tapping Cycle (G84) ------------------------------------------------------------------------------------5-16
5.5.9 Boring Cycle (G85, G89) -------------------------------------------------------------------------------5-17
5.5.10 Boring Cycle (G86) --------------------------------------------------------------------------------------5-18
5.5.11 Back Boring Cycle (G87)-------------------------------------------------------------------------------5-19
5.5.12 End Milling/Tapping Cycle (G177)-------------------------------------------------------------------5-20
5.5.13 End Milling/Tapping Cycle (G178)-------------------------------------------------------------------5-21
5.5.14 Double Drilling Cycle (G181, G182) -----------------------------------------------------------------5-22
5.5.15 Double Boring Cycle (G185, G189) ------------------------------------------------------------------5-23
5.5.16 Double Boring Cycle (G186) --------------------------------------------------------------------------5-24
5.5.17 Deep Hole Tapping Cycle (Synchro Mode) (G277) -----------------------------------------------5-25
5.5.18 Reverse Deep Hole Tapping Cycle (Synchro Mode) (G278)-------------------------------------5-26
5.5.19 Reducing Step of Canned Cycle -----------------------------------------------------------------------5-27
5.5.20 Canned Cycle Cancel (G80) ---------------------------------------------------------------------------5-34
5.5.21 General Precautions for Canned Cycle ---------------------------------------------------------------5-34
5.6 One-shot Canned Cycle ----------------------------------------------------------- 5-35
5.6.1 High Speed Peck Drilling Cycle (G173) ---------------------------------------------------------------5-35
5.6.1.1 High Speed Peck Drilling Cycle (G173) (Reducing Step) -----------------------------------5-36
5.6.2 Peck Drilling Cycle (G183) ------------------------------------------------------------------------------5-37
5.6.2.1 Peck Drilling Cycle (G183) (Reducing Step) --------------------------------------------------5-38
5.7 Canned Cycle for Tool Change (Non-stop ATC) (G100) --------------- 5-39
5.7.1 S300X1/S500X1/S700X1/S1000X1/R450X1/R650X1/
S300X2/S500X2/S700X2/F600X1/R450X2/R650X2 ----------------------------------------------5-39
5.7.2 M140X1/M140X2/M200X3/M300X3 -----------------------------------------------------------------5-41
5.7.2.1 Operation When Spindle is Selected (M141 Modal) -----------------------------------------5-41
5.7.2.2 Operation When Turning Spindle is Selected (M142 Modal)-------------------------------5-41
5.7.2.3 Tool change operation when lathe spindle is selected ----------------------------------------5-42
5.7.2.4 Notes -------------------------------------------------------------------------------------------------- 5-42
5.7.3 R650X2 40MG --------------------------------------------------------------------------------------------- 5-43
5.7.3.1 Notes -------------------------------------------------------------------------------------------------- 5-44
5.7.3.2 When changing from standard tool to standard tool or from large tool to large tool ----5-45
5.7.3.3 When changing from standard tool to large tool or from large tool to standard tool ----5-45
5.7.3.4 Next tool preparation operation ------------------------------------------------------------------5-46
5.7.4 Simultaneously Commandable M Codes --------------------------------------------------------------5-46
5.7.5 Automatic Command of Tool Data in Tool Change -------------------------------------------------5-49
5.8 Coordinate Calculation Function ---------------------------------------------- 5-50
5.8.1 Outline ------------------------------------------------------------------------------------------------------- 5-50
5.8.2 Coordinate Calculation -----------------------------------------------------------------------------------5-50
5.8.3 C Coordinates Calculation Parameters -----------------------------------------------------------------5-50
5.8.4 Description of Coordinate Calculation Function -----------------------------------------------------5-51
5.8.4.1 Bolt Hole Circle (G36)-----------------------------------------------------------------------------5-51
5.8.4.2 Line (Angle) (G37) ---------------------------------------------------------------------------------5-51
5.8.4.3 Line (X, Y) (G38) ----------------------------------------------------------------------------------5-52
5.8.4.4 Grid (G39) ------------------------------------------------------------------------------------------- 5-53
5.8.5 Examples of Application ---------------------------------------------------------------------------------5-54

CHAPTER 6 MACRO -------------------------------------------------------- 6-1


6.1 What is Macro? ------------------------------------------------------------------------ 6-2
6.2 Variables Function -------------------------------------------------------------------- 6-4
6.2.1 Outline -------------------------------------------------------------------------------------------------------- 6-4

2019/09/02 4 eCOM3NCPRCO
Contents

6.2.2 Expression of Variables ----------------------------------------------------------------------------------- 6-4


6.2.3 Undefined Variables---------------------------------------------------------------------------------------- 6-4
6.2.4 Types of Variables ------------------------------------------------------------------------------------------ 6-5
6.2.5 Display and Setting of Variables ------------------------------------------------------------------------- 6-6
6.2.6 System Variables ------------------------------------------------------------------------------------------- 6-6
6.2.6.1 Interface I/O Signals ------------------------------------------------------------------------------- 6-6
6.2.6.2 Workpiece Coordinate Zero Point -------------------------------------------------------------- 6-7
6.2.6.3 Tool Data -------------------------------------------------------------------------------------------- 6-7
6.2.6.4 Alarm Display -------------------------------------------------------------------------------------- 6-8
6.2.6.5 Message Display and Stop------------------------------------------------------------------------ 6-8
6.2.6.6 Time -------------------------------------------------------------------------------------------------- 6-8
6.2.6.7 Operation Control ---------------------------------------------------------------------------------- 6-8
6.2.6.8 Mirror Image ---------------------------------------------------------------------------------------- 6-9
6.2.6.9 Modal Info ------------------------------------------------------------------------------------------ 6-9
6.2.6.10 Current Position -----------------------------------------------------------------------------------6-11
6.2.6.11 ATC Tool------------------------------------------------------------------------------------------- 6-11
6.2.6.12 Workpiece Counter -------------------------------------------------------------------------------6-12
6.2.6.13 Result of Auto Workpiece Measurement -----------------------------------------------------6-12
6.2.6.14 Rotary Fixture Offset -----------------------------------------------------------------------------6-12
6.2.6.15 Machining load monitor -------------------------------------------------------------------------6-13
6.3 Calculation Function --------------------------------------------------------------- 6-14
6.3.1 Types of Calculation --------------------------------------------------------------------------------------6-14
6.3.2 Precedence of Calculation --------------------------------------------------------------------------------6-14
6.3.3 Precautions for Calculation ------------------------------------------------------------------------------6-15
6.4 Control Function -------------------------------------------------------------------- 6-16
6.4.1 GOTO Instruction (Unconditional Branching) -------------------------------------------------------6-16
6.4.2 IF Instruction (Conditional Branching) ----------------------------------------------------------------6-16
6.4.3 WHILE Instruction (Repetition) ------------------------------------------------------------------------6-17
6.4.4 Precautions for Control Function -----------------------------------------------------------------------6-18
6.5 Call Function -------------------------------------------------------------------------- 6-21
6.5.1 Simple Call Function --------------------------------------------------------------------------------------6-21
6.5.2 Modal Call Function --------------------------------------------------------------------------------------6-22
6.5.3 G Code Macro Call ---------------------------------------------------------------------------------------- 6-23
6.5.4 M Code Macro Call ---------------------------------------------------------------------------------------6-24
6.5.5 Macro Call Arguments ------------------------------------------------------------------------------------6-25
6.5.6 Difference between G65 and M98 ----------------------------------------------------------------------6-27
6.5.7 Multiple Call ------------------------------------------------------------------------------------------------ 6-27
6.6 External Output Function -------------------------------------------------------- 6-28
6.6.1 POPEN ------------------------------------------------------------------------------------------------------ 6-28
6.6.2 BPRNT ------------------------------------------------------------------------------------------------------ 6-29
6.6.3 DPRNT ------------------------------------------------------------------------------------------------------ 6-30
6.6.4 PCLOS------------------------------------------------------------------------------------------------------- 6-31
6.6.5 External Output to Memory Card -----------------------------------------------------------------------6-31
6.6.6 External Output to FTP Server --------------------------------------------------------------------------6-32
6.6.7 Precautions for External Output Command -----------------------------------------------------------6-33
6.7 Interrupt Macro (Option) ---------------------------------------------------------- 6-34
6.7.1 Interrupt Type ---------------------------------------------------------------------------------------------- 6-36
6.7.2 Call Type ---------------------------------------------------------------------------------------------------- 6-38
6.7.3 Acceptance Type ------------------------------------------------------------------------------------------- 6-38
6.7.4 Interrupt Macro and Modal Information ---------------------------------------------------------------6-39
6.7.5 Interrupt Macro and Current Position ------------------------------------------------------------------6-40
6.7.6 Macro Statement and NC Statement--------------------------------------------------------------------6-40
6.7.7 Restrictions ------------------------------------------------------------------------------------------------- 6-41
6.7.8 Reference Folder When Interrupt Type Macro is Executed ----------------------------------------6-42

CHAPTER 7 AUTOMATIC WORKPIECE MEASUREMENT ------ 7-1


7.1 List of Automatic Workpiece Measurement Functions ------------------ 7-2
7.2 Before Automatic Workpiece Measurement --------------------------------- 7-4
7.3 Setting Data for Automatic Workpiece Measurement -------------------- 7-5
7.4 Command Procedure for Automatic Workpiece Measurement ----- 7-10

2019/09/02 5 eCOM3NCPRCO
Contents

7.4.1 Corner-------------------------------------------------------------------------------------------------------- 7-10


7.4.2 Parallel ------------------------------------------------------------------------------------------------------- 7-14
7.4.3 Circle Center ------------------------------------------------------------------------------------------------ 7-16
7.4.4 Z axis Height ----------------------------------------------------------------------------------------------- 7-20
7.4.5 Positioning to Measurement Position ------------------------------------------------------------------7-20
7.5 Measurement Results Processing -------------------------------------------- 7-21
7.5.1 Display Screen for Measurement Results --------------------------------------------------------------7-21
7.5.2 Apply Measurement Results to Workpiece Coordinates --------------------------------------------7-22
7.6 Lock Key Operations--------------------------------------------------------------- 7-23
7.7 Program Restart Operation ------------------------------------------------------ 7-23

CHAPTER 8 SUB PROGRAM FUNCTION ---------------------------- 8-1


8.1 Overview --------------------------------------------------------------------------------- 8-2
8.2 Create Sub Program------------------------------------------------------------------ 8-3
8.3 Simple Call Function ----------------------------------------------------------------- 8-4
8.4 Specify Return Number from Sub Program Function -------------------- 8-6
8.5 Call Specifying Sequence No. ---------------------------------------------------- 8-8

CHAPTER 9 FEED FUNCTION ------------------------------------------- 9-1


9.1 Feed Function -------------------------------------------------------------------------- 9-2
9.1.1 Feedrate per Minute (G94) -------------------------------------------------------------------------------- 9-2
9.1.2 Feedrate per Rotation (G95) ------------------------------------------------------------------------------ 9-2
9.1.3 Inverse Time Feed (G93) ---------------------------------------------------------------------------------- 9-2
9.1.4 Command Range -------------------------------------------------------------------------------------------- 9-3
9.1.5 Switching Between Feedrate per Minute / Feedrate per Rotation / Inverse Time Feed--------- 9-4
9.2 Automatic F Command at Tool Change --------------------------------------- 9-4

CHAPTER 10 SPINDLE RELATED FUNCTIONS


(S FUNCTION) ---------------------------------------------- 10-1
10.1 S Function ---------------------------------------------------------------------------- 10-2
10.1.1 Spindle Speed Command -------------------------------------------------------------------------------10-2
10.1.2 Constant Peripheral Speed Control (G96, G97) (Option) -----------------------------------------10-2
10.1.3 Spindle Speed Clamp (G92) (Option) ----------------------------------------------------------------10-4
10.1.4 Automatic S Command at Tool Change -------------------------------------------------------------10-4
10.1.5 Register Maximum Speed ------------------------------------------------------------------------------10-4
10.2 M Function (Spindle Control) -------------------------------------------------- 10-5
10.2.1 Spindle Normal Rotation (M03) -----------------------------------------------------------------------10-5
10.2.2 Spindle Reverse Rotation (M04) ----------------------------------------------------------------------10-5
10.2.3 Spindle Stop (M05) --------------------------------------------------------------------------------------10-5
10.2.4 Spindle Orientation (M19) -----------------------------------------------------------------------------10-5
10.2.4.1 Spindle Orientation to a Given Angle ---------------------------------------------------------10-5
10.2.5 Spindle Orientation (M111) ----------------------------------------------------------------------------10-5
10.3 M Function (Lathe Spindle Control) ----------------------------------------- 10-6
10.3.1 Lathe Spindle Normal Rotation (M303) -------------------------------------------------------------10-6
10.3.2 Lathe Spindle Reverse Rotation (M304) -------------------------------------------------------------10-6
10.3.3 Lathe Spindle Stop (M305)-----------------------------------------------------------------------------10-6
10.4 M Function (Spindle Selection) ----------------------------------------------- 10-6
10.4.1 Spindle Selection (M141) ------------------------------------------------------------------------------10-6
10.4.2 Lathe Spindle Selection (M142) -----------------------------------------------------------------------10-6

CHAPTER 11 TOOL RELATED FUNCTIONS (T FUNCTION) ---- 11-1


11.1 T Function ---------------------------------------------------------------------------- 11-2
11.1.1 When Issuing a Command Using the Tool Number -----------------------------------------------11-2
11.1.2 When Issuing a Command Using the Pot Number (Magazine Number) -----------------------11-2
11.1.3 When Issuing a Command Using the Group Number ---------------------------------------------11-2
11.2 M Function (Tool Control) ------------------------------------------------------ 11-3
11.2.1 Tool Change (M06) --------------------------------------------------------------------------------------11-3

2019/09/02 6 eCOM3NCPRCO
Contents

11.2.2 Tool Life Counters (M230 to M231) -----------------------------------------------------------------11-3


11.2.3 Changing ATC Arm Turn Speed (M420 to M423, M432) ---------------------------------------11-3
11.2.4 Shutter and Cover Related M Codes (M434, M438, M439) --------------------------------------11-4
11.2.5 Specify Magazine Turn Speed (M435, M436, M437) ---------------------------------------------11-4
11.2.6 Magazine Turns to the Tool Installation Position (M501 to M599) -----------------------------11-4
11.2.7 Machining Load Monitor Function (M340 to M343) ----------------------------------------------11-4

CHAPTER 12 M FUNCTION ----------------------------------------------- 12-1


12.1 Outline of M Function ------------------------------------------------------------ 12-2
12.2 M Code List -------------------------------------------------------------------------- 12-3
12.2.1 Multiple M Code Commands in One Block ---------------------------------------------------------12-6
12.3 M Function (Program control) ------------------------------------------------- 12-9
12.3.1 Program Stop (M00) -------------------------------------------------------------------------------------12-9
12.3.2 Optional Stop (M01) ------------------------------------------------------------------------------------12-9
12.3.3 End of Program (M02, M30)---------------------------------------------------------------------------12-9
12.3.4 Workpiece Counter Specification (M211 to M214)------------------------------------------------12-9
12.3.5 Workpiece Counter Cancel (M221 to M224) -------------------------------------------------------12-9
12.3.6 To Prohibit Reading Ahead (M159) ------------------------------------------------------------------12-9
12.4 M Function (Signal Control) --------------------------------------------------- 12-10
12.4.1 2-digit BCD Signal Output --------------------------------------------------------------------------- 12-10
12.4.2 To Check TOUCH Signal (M120, M121) --------------------------------------------------------- 12-10
12.4.3 M Signal Level Outputs (M400 to M409, M480 to M487) ------------------------------------- 12-10
12.4.4 One-shot Output (M450, M451, M455, M456) --------------------------------------------------- 12-10
12.4.5 Waiting until Response is Given (M460 to M469) ----------------------------------------------- 12-10
12.4.6 Signal Output to PLC (M801 to M899) ------------------------------------------------------------ 12-11
12.4.7 Expansion Signal Output (M900 to M999) -------------------------------------------------------- 12-11
12.4.8 Checking Measurement Instrument Detection Signal (M320, M321) ------------------------ 12-11
12.5 M Function (Additional Axis Control) -------------------------------------- 12-12
12.5.1 Pallet-related M Codes (M410, M411, M430, M431) ------------------------------------------- 12-12
12.5.2 C-axis Unclamp/Clamp (M444/M430 and M445/M431) --------------------------------------- 12-12
12.5.3 B-axis Unclamp/Clamp (M440 and M441)-------------------------------------------------------- 12-12
12.5.4 A-axis Unclamp/Clamp (M442 and M443) ------------------------------------------------------- 12-13
12.6 M Function (Positioning Check Distance) ------------------------------- 12-14
12.6.1 Positioning Finished Check Distance (M270 to M279) ----------------------------------------- 12-14
12.7 M Function (Time Constant Switch) ---------------------------------------- 12-14
12.7.1 Tap Time Constant Selection (M241 to M249, M250, M251, M252 to M254) ------------- 12-14

CHAPTER 13 HIGH-ACCURACY MODE ---------------------------- 13-1-1


13.1 High-accuracy Mode AIII ------------------------------------------------------ 13-1-1
1 Outline ------------------------------------------------------------------------------------------------------ 13-1-2
1.1 Outline of High-accuracy Mode AIII ------------------------------------------------------------- 13-1-2
1.2 Functions of High-accuracy Mode AIII ---------------------------------------------------------- 13-1-2
2 How to Use ------------------------------------------------------------------------------------------------ 13-1-4
2.1 To Select a Machining Level ----------------------------------------------------------------------- 13-1-4
2.2 How to Use the Program ---------------------------------------------------------------------------- 13-1-7
2.3 Usable Conditions ------------------------------------------------------------------------------------ 13-1-7
2.4 Conditions to be Cancelled ------------------------------------------------------------------------- 13-1-7
3 Restrictions ------------------------------------------------------------------------------------------------ 13-1-8
3.1 Commandable Functions---------------------------------------------------------------------------- 13-1-8
3.2 Additional Axis Movement Commands ---------------------------------------------------------- 13-1-9
3.3 Imposition Checked by High-accuracy Mode A Command ---------------------------------- 13-1-9
3.4 Feedrate when Commanding of High-accuracy Mode A-------------------------------------- 13-1-9
3.5 Notes in Motions by Smooth Path Offset Function -------------------------------------------- 13-1-9
4 Detailed Explanations and Adjustments of Parameters ------------------------------------------ 13-1-10
4.1 Detailed Explanations ----------------------------------------------------------------------------- 13-1-10
4.2 Explanation About Parameters ------------------------------------------------------------------- 13-1-13
4.3 Relationship Between Parameters and Shape Errors ----------------------------------------- 13-1-16
4.4 Adjusting Parameters ------------------------------------------------------------------------------ 13-1-18

13.2 High-accuracy Mode B --------------------------------------------------------- 13-2-1

2019/09/02 7 eCOM3NCPRCO
Contents

1 Outline ------------------------------------------------------------------------------------------------------ 13-2-2


2 How to Use ------------------------------------------------------------------------------------------------ 13-2-3
2.1 To Select a Machining Level ----------------------------------------------------------------------- 13-2-3
2.2 How to Use Programs ------------------------------------------------------------------------------- 13-2-3
2.3 Usable Conditions ------------------------------------------------------------------------------------ 13-2-3
2.4 Conditions to be Cancelled ------------------------------------------------------------------------- 13-2-3
3 Restrictions ------------------------------------------------------------------------------------------------ 13-2-4
3.1 Commandable Functions---------------------------------------------------------------------------- 13-2-4
3.2 Temporary Stop of Operation ---------------------------------------------------------------------- 13-2-5
3.3 Single Operation ------------------------------------------------------------------------------------- 13-2-5
3.4 Cutting Override ------------------------------------------------------------------------------------- 13-2-5
3.5 Dry Run ------------------------------------------------------------------------------------------------ 13-2-5
3.6 Feedrates when Commanding the High-accuracy Mode B ----------------------------------- 13-2-5
3.7 Notes in Smooth Ppath Offset Function ---------------------------------------------------------- 13-2-5
3.8 Additional Axis Travel Command ---------------------------------------------------------------- 13-2-5
4 Explanations on Parameters ---------------------------------------------------------------------------- 13-2-6

13.3 Quick Setting for High Accuracy Mode ---------------------------------- 13-3-1


1 Overview ---------------------------------------------------------------------------------------------------- 13-3-2
2 High Accuracy (Adjustment) Function ----------------------------------------------------------------- 13-3-2
2.1 Usage ----------------------------------------------------------------------------------------------------- 13-3-3
2.1.1 Machining mode ---------------------------------------------------------------------------------- 13-3-3
2.1.2 Machining mode adjustment -------------------------------------------------------------------- 13-3-4
2.2 Restrictions ---------------------------------------------------------------------------------------------- 13-3-7
3 High Accuracy (Accuracy Specification) Function -------------------------------------------------- 13-3-8
3.1 Usage ----------------------------------------------------------------------------------------------------- 13-3-8
3.2 Restrictions ---------------------------------------------------------------------------------------------- 13-3-9
4 Mode Selection Using Program Command ---------------------------------------------------------- 13-3-10
5 Check Current Mode------------------------------------------------------------------------------------- 13-3-12

2019/09/02 8 eCOM3NCPRCO
Index

CHAPTER 1 PROGRAM COMPOSITION 1

CHAPTER 2 COORDINATE COMMAND 2

CHAPTER 3 PREPARATION FUNCTION 3


PREPARATION FUNCTION 4
CHAPTER 4
(COMPENSATION FUNCTION)
PREPARATION FUNCTION 5
CHAPTER 5
(CANNED CYCLE)
CHAPTER 6 MACRO 6

CHAPTER 7 AUTOMATIC WORKPIECE MEASUREMENT 7

CHAPTER 8 SUBPROGRAM FUNCTION 8

CHAPTER 9 FEED FUNCTION 9

CHAPTER 10 SPINDLE SPEED FUNCTION (S FUNCTION) 10

CHAPTER 11 TOOL FUNCTION (T FUNCTION) 11

CHAPTER 12 M FUNCTION 12

CHAPTER 13 HIGH-ACCURACY MODE 13

2015/03/09 1 eCOM3NCPRIN
Index

(This page was intentionally left blank.)

2015/03/09 2 eCOM3NCPRIN
Chapter 1 Program Structure

CHAPTER 1

PROGRAM STRUCTURE

1.1 Program Types and Structure


1.2 Block Structure
1.3 Word Structure
1.4 Number Commands
1.5 Sequence Numbers
1.6 Optional Block Skip
1.7 Control Out-In Function

2018/11/22 1-1 eCOM3NCPR1


Chapter 1 Program Structure

1.1 Program Types and Structure


The programs are divided into two types: main programs and sub programs.

1. Main programs
This program is used for machining one workpiece. Sub programs are called in the middle of
the main program in order to create a program more efficiently.
1 Lastly, M02 (or M30) is used to end the program.

Main program
N0001 G92X100;
N0002 G00Z30;
:
:
:
:
M02;

2. Sub programs
Sub programs are used and called from the main program or other sub programs.
Lastly, M99 is used to end the program.

Sub program
N0010 G91X10
:
:
:
:
M99;

1.2 Block Structure


The programs are made up of a number of commands. One command unit is referred to as a block.
A block is made up of one or multiple words.
One block is delimited by an end of block (EOB) code.
(The explanation in this manual uses a semicolon “;” for the end of block code.)

••• ; N0001G92X100 ; ••• ; M02 ;


← Block → ←Block→

(Note 1) The end of block code in ISO code is “LF” OA (hexadecimal).


In EIA code, it is “CR” 80 (hexadecimal).
(Note 2) The maximum number of characters in 1 block is 128.

2018/11/22 1-2 eCOM3NCPR1


Chapter 1 Program Structure

1.3 Word Structure


A word is made up of an address followed by a number of multiple digits.
(There may be a positive (+) or negative (-) sign that is used before the number.)
X -1000

Address Number 1

Word
(Note 1) The address is one character that is a letter between A and Z.
(Note 2) The address “0” is only used for comments.

1.4 Number Commands


1. Decimal point command
There are two systems (Base/Least) when issuing a number command.

• Coordinate value and travel amount commands


Select the <Program unit> in User parameter (Switch 1) for the coordinate values and
travel amount.
In addition, the minimum unit setting (Type 1 (micron) and Type 2 (submicron)) can be
selected using an optional function.

<Program unit>: 0 (Base)


Command
Specifying program Actual amount (mm) Actual amount (inches)
axis
Feed axis 1 mm 1 inch
1 Rotation
1 deg 1 deg
axis
Feed axis 1 mm 1 inch
1. Rotation
1 deg 1 deg
axis

<Program unit>: 1 (Least)


Command
Specifying program Actual amount (mm) Actual amount (inches)
axis
Feed axis 0.001 mm 0.0001 inch
1 Rotation
0.001 deg 0.001 deg
axis
Feed axis 1 mm 1 inch
1. Rotation
1 deg 1 deg
axis

However, if Type 2 (submicron) and <Program unit>: 1 (Least) are used for the minimum
unit settings, the following applies.

<Program unit>: 1 (Least)


Command
Specifying program Actual amount (mm) Actual amount (inches)
axis
Feed axis 0.0001 mm 0.00001 inch
1 Rotation
0.0001 deg 0.0001 deg
axis
Feed axis 1 mm 1 inch
1. Rotation
1 deg 1 deg
axis

2018/11/22 1-3 eCOM3NCPR1


Chapter 1 Program Structure

• Feedrate command
Use <Program feed rate unit> in User parameter (Switch 1) to select the feedrate.

<Program feed rate unit>: 0 (Basic)


Command
Specifying program Actual amount (mm) Actual amount (inches)
axis
1 mm/min 1 inch/min
1 Feed axis 1 mm/rev 1 inch/rev
1(1/min) 1(1/min)
1
1 deg/min 1 deg/min
Rotation
1 deg/rev 1 deg/rev
axis
1(1/min) 1(1/min)
1 mm/min 1 inch/min
Feed axis 1 mm/rev 1 inch/rev
1(1/min) 1(1/min)
1.
1 deg/min 1 deg/min
Rotation
1 deg/rev 1 deg/rev
axis
1(1/min) 1(1/min)

<Program feed rate unit>: 1 (Minimum)


Command
Specifying program Actual amount (mm) Actual amount (inches)
axis
0.01 mm/min 0.001 inch/min
Feed axis 0.0001 mm/rev 0.00001 inch/rev
1(1/min) 1(1/min)
1
0.01 deg/min 0.001 deg/min
Rotation
0.0001 deg/rev 0.00001 deg/rev
axis
1(1/min) 1(1/min)
1 mm/min 1 inch/min
Feed axis 1 mm/rev 1 inch/rev
1(1/min) 1(1/min)
1.
1 deg/min 1 deg/min
Rotation
1 deg/rev 1 deg/rev
axis
1(1/min) 1(1/min)

However, if Type 2 (submicron) and <Program feed rate unit>: 1 (Minimum) are used for
the minimum unit settings, the following applies.

<Program feed rate unit>: 1 (Minimum)


Command
Specifying program Actual amount (mm) Actual amount (inches)
axis
0.001 mm/min 0.0001 inch/min
Feed axis 0.00001 mm/rev 0.000001 inch/rev
1(1/min) 1(1/min)
1
0.001 deg/min 0.0001 deg/min
Rotation
0.00001 deg/rev 0.000001 deg/rev
axis
1(1/min) 1(1/min)
1 mm/min 1 inch/min
Feed axis 1 mm/rev 1 inch/rev
1(1/min) 1(1/min)
1.
1 deg/min 1 deg/min
Rotation
1 deg/rev 1 deg/rev
axis
1(1/min) 1(1/min)

2. Range for address number commands


The range for commands varies depending on the significance or use of the address.
Anything below the minimum unit setting in a command is rounded off.

2018/11/22 1-4 eCOM3NCPR1


Chapter 1 Program Structure

1.5 Sequence Numbers


A sequence number (1 to 999999) can be attached to address N for each block unit.

Command format N******;

1. Specify a number between 0 and 9 after N.


2. A sequence number can be specified using a maximum of 6 digits. 1
(Note 1) Do not use “N0”.
(Note 2) Specify the header for the block.
N0100 G90X100;

If an optional block skip (“/”) is used at the header for the block, a command can be issued before
or after that.
N0100/ G90X100;
or
/N0100 G90X100;

(Note 3) The sequence numbers can be in any given order and do not necessarily
have to be sequential.
(Note 4) The sequence number is recognized as a numerical value.
Therefore, 0001, 001, 01, and 1 are treated as the same number.

1.6 Optional Block Skip


This method ignores the block information specified during automatic operation. A slash (“/”) is
used at the header of the block.
Turn ON the [B.SKIP] key on the operation panel to ignore the block information during
automatic operation.
Turn OFF the [B.SKIP] key to enable the block information.
The block skip ignores the entire block.

······; /N0100G00X100··········; N0101······;


←This range is ignored→

(Note 1) If a slash “/” is not inserted at the header of the block, an alarm is
triggered.
Note that it can be inserted immediately after the sequence number.
(Note 2) When the [B.SKIP] key is turned ON in single block mode during
automatic operation, it does not stop at the block with a slash “/” but the
next block thereafter.

1.7 Control Out-In Function


A comment can be inserted to make the program easier to read.
A comment must be enclosed with parentheses “( )” to distinguish it from the operation
information.

( ············ )
Control out Control in
Comment
code code

Ex: N1000 G00X200 (PRO-1);

(Note) Make sure that the comment including the control out and control in
codes fit inside 1 block.

2018/11/22 1-5 eCOM3NCPR1


Chapter 1 Program Structure

(This page was intentionally left blank.)

2018/11/22 1-6 eCOM3NCPR1


Chapter 2 Coordinate Commands

2
CHAPTER 2

COORDINATE COMMANDS

2.1 Coordinate System and Coordinate Commands


2.2 Machine Zero Point and Machine Coordinates
2.3 Workpiece Coordinates

2016/04/07 2-1 eCOM3NCPR2


Chapter 2 Coordinate Commands

2.1 Coordinate System and Coordinate Commands


Coordinate commands in a coordinate system are required to move the tool to the target position.
There are two types of coordinate systems shown below.

1. Machine coordinates
2. Workpiece coordinates

The coordinates are expressed in components using the program axes (X-, Y- and Z-axes on this
machine).

2 Z
Y
X20Y10Z15
Tool target position for
command

15

10

X
0 20

2.2 Machine Zero Point and Machine Coordinates


1. Machine zero point
The machine zero point refers to the origin that acts as a reference point on the machine.
2. Machine coordinates
The machine coordinates refer to the coordinate system that uses the machine zero point as the
origin and is unique to each machine.

X-axis stroke
Machine zero point
(0, 0, 0)
-X
Y-axis stroke

Table

-Y

2016/04/07 2-2 eCOM3NCPR2


Chapter 2 Coordinate Commands

2.3 Workpiece Coordinates


The workpiece coordinates refer to the coordinate system that is used to specify machining on
each workpiece.
Select 1 set of coordinates that is preset in the data bank for machining.
Those coordinates are used to issue commands in the program thereafter.
However, each set of coordinates is configured following the amount that is offset between the
machine zero point and the workpiece zero point.

2016/04/07 2-3 eCOM3NCPR2


Chapter 2 Coordinate Commands

(This page was intentionally left blank.)

2016/04/07 2-4 eCOM3NCPR2


Chapter 3 Preparation Function

CHAPTER 3
3

PREPARATION FUNCTION

3.1 Outline of G Code


3.2 Positioning (G00, G60)
3.3 Cutting (G01 to 03, G12/13, G102/103, G202/203)
3.4 Dwell (G04)
3.5 Exact Stop Check (G09, G61, G64)
3.6 Programmable Data Input (G10)
3.7 Coordinate System (G17 to 19, G52 to 59, G54.1, G92)
3.8 Soft Limit
3.9 Reference Position (G28 to 30)
3.10 Skip Function (G31, G131/G132)
3.11 Scaling (G50/G51)
3.12 Programmable Mirror Image (G50.1/51.1)
3.13 Rotational Transformation Function (G68/69, G168)
3.14 Absolute Command and Incremental Command
(G90/91)
3.15 Change of Tap Twisting Direction (G133/134)
3.16 G code Priority
3.17 Programmable Data Input (High Accuracy) (G210)
3.18 Thread Cutting
3.19 Lathe Machining Infeed Direction

2019/09/02 3-1 eCOM3NCPR3


Chapter 3 Preparation Function

3.1 Outline of G Code


Within 3-digit number following the address G determines the meaning of the command of the block
concerned.
The G codes are divided into the following two types.
Type Meaning
Modal The G code is effective until another G code in the same group is commanded.
One-shot The G code is effective only at the block in which it is specified.

List of G code
The G codes with * mark indicates the modal status when the power is turned ON.
Group G code Description Modal/One-shot
G00* positioning
G01 Linear interpolation
G02 Circular/ helical interpolation (CW)
3 G03 Circular/ helical interpolation (CCW)
G02.2 Involute interpolation (CW)
G03.2 Involute interpolation (CCW)
Modal
G102 XZ Circular interpolation (CW)
G103 XZ Circular interpolation (CCW)
G202 YZ Circular interpolation (CW)
G203 YZ Circular interpolation (CCW)
G33 Thread cutting
G392 Thread cutting cycle
G04 Dwell One-shot
G09 Exact stop check One-shot
G10 Programmable data input One-shot
G12 Circular cutting CCW One-shot
G13 Circular cutting CCW One-shot
G17* XY plane selection
G18 ZX plane selection Modal
G19 YZ plane selection
G22* Programmable stroke limit ON
Modal
G23 Programmable stroke limit cancel
G28 Return to the reference point
G29 Return from the reference point One-shot
G30 Return to the 2nd to 6th reference point
G31 Skip function One-shot
G36 Coordinate calculation function
G37 Coordinate calculation function (Line-angle)
One-shot
G38 Coordinate calculation function (Line-X, Y)
G39 Coordinate calculation function (grid)
G40* Tool diameter / nose R compensation cancel
G41 Tool dia. offset left
G42 Tool dia. offset right Modal
G141 Nose R left compensation
G142 Nose R right compensation
G43 Tool length offset +
G44 Tool length offset -
G143 Tool position offset + Modal
G144 Tool position offset -
G49* Tool length/position offset cancel
G50* Scaling cancel
Modal
G51 Scaling
G50.1* Mirror image cancel
Modal
G51.1 Mirror image
G52 Local coordinate system
G53 Machine coordinate system selection One-shot
G53.1 Feature coordinate index
G54* Working coordinate system selection 1
Modal
G55 Working coordinate system selection 2

2019/09/02 3-2 eCOM3NCPR3


Chapter 3 Preparation Function

Group G code Description Modal/One-shot


G56 Working coordinate system selection 3
G57 Working coordinate system selection 4
G58 Working coordinate system selection 5
G59 Working coordinate system selection 6
G54.1 Extended working coordinate system selection
G54.2P0* Rotary fixture offset cancel
Modal
G54.2Pn Rotary fixture offset (n: 1 to 8)
G60 Single direction positioning One-shot
G61 Exact stop mode
Modal
G64* Cutting mode
G65 Macro call One-shot
G66 Macro modal call
Modal
G67* Cancel macro modal call
G68 Coordinate rotation function 3
Coordinate rotation function cancel
G69*
Feature coordinate manufacturing mode cancel Modal
G168 Coordinate rotation using measured results
G68.2 Feature coordinate setting
G73 Canned cycle (High-speed peck drilling cycle)
G74 Canned cycle (Reverse tapping cycle)
G76 Canned cycle fine boring cycle
G77 Canned cycle tapping cycle (synchro mode)
Canned cycle (Reverse tapping cycle) (synchro
G78
mode)
G80* Canned cycle (Cancel mode)
G81 Canned cycle (Drill, spot drilling cycle)
G82 Canned cycle (Drill, spot drilling cycle)
G83 Canned cycle (Peck drilling cycle)
G84 Canned cycle (Tapping cycle)
G85 Canned cycle (Boring cycle)
G86 Canned cycle (Boring cycle)
Modal
G87 Canned cycle (Back balling cycle)
G89 Canned cycle (Boring cycle)
G177 Canned cycle (End mill tapping cycle)
G178 Canned cycle (End mill tapping cycle)
G181 Canned cycle (Double drilling cycle)
G182 Canned cycle (Double drilling cycle)
G185 Canned cycle (Double boring cycle)
G186 Canned cycle (Double boring cycle)
G189 Canned cycle (Double boring cycle)
Canned cycle (Deep hole tapping cycle) (synchro
G277
mode)
Canned cycle (Counter deep hole tapping cycle)
G278
(synchro mode)
G173 Canned cycle (High-speed peck drilling cycle) One-shot
G183 Canned cycle (Peck drilling cycle) One-shot
G100 Non-stop automatic tool change One-shot
G90* Absolute command
Modal
G91 Incremental command
Workpiece coordinate system setting
G92 One-shot
Spindle speed clamp
G93 Inverse time feed
G94* Feed rate per minute Modal
G95 Feed rate per revolution
G96 Constant peripheral speed control
Modal
G97 Constant peripheral speed control cancel
G98* Return to the initial point level
Modal
G99 Return to the R point level
G120 Positioning to the measuring point One-shot

2019/09/02 3-3 eCOM3NCPR3


Chapter 3 Preparation Function

Group G code Description Modal/One-shot


G121 Automatic measurement Corner (Boss)
G122 Automatic measurement Parallel (Groove)
G123 Automatic measurement Parallel (Boss)
Automatic measurement Circle center (Hole, 3
G124
points)
Automatic measurement circle center (Boss, 3
G125
points) One-shot
Automatic measurement Circle center (Hole, 4
G126
points)
Automatic measurement Circle center (Boss, 4
G127
points)
G128 Automatic measurement Z axis height
G129 Automatic measurement Corner (Groove)
3 G131 Measurement feed
One-shot
G132 Measurement feed
G133 Changeover of tap twisting direction (CW)
One-shot
G134 Changeover of tap twisting direction (CW)
G210 Programmable data input (high accuracy) One-shot
G321 Lathe machining infeed direction on X-axis
G322 Lathe machining infeed direction on Y-axis Modal (Note)
G323 Lathe machining infeed direction on Z-axis
G376 Thread angle in complex thread cutting cycle One-shot

(Note) Specify the modal during power startup in the user parameter (switch 1)
<Lathe machining infeed direction when power is turned ON>.

2019/09/02 3-4 eCOM3NCPR3


Chapter 3 Preparation Function

3.2 Positioning (G00, G60)


3.2.1 Positioning (G00)
Command format G00 X_ Y_ Z_ A_ B_ C_;

If an additional axis command is issued when there is no additional axis option, an alarm is
triggered.
When carrying out G00 based positioning, it first performs an in-position check (Note 1) and then
proceeds to the next block.

One of the following options can be selected for the tool path in the user parameter <Positioning
method>.

<0: Non-linear interpolation type positioning>


Positioning is carried out on each axis independently using rapid feedrate on each axis. The tool
3
path is not a straight line.

<1: Linear interpolation type - Positioning method 1>


Positioning is carried out so the tool path is a straight line and is completed in the shortest time
period at a speed that does not exceed the rapid feedrate on each axis. However, the alarm
<<Positioning command error for linear interpolation type>> is triggered when there are
simultaneous commands issued for 2 or more additional axes.
Be careful of collisions because if the margin of error on the path for positioning (including the
additional axis) is greater than the positioning only on the linear axis, then the positioning
changes depending on the feedrate and the load.

<2: Linear interpolation type - Positioning method 2>


Positioning is carried out so the tool path is a straight line and is completed in the shortest time
period at a speed that does not exceed the rapid feedrate on each axis. However, the positioning
operation on the additional axis is a non-linear interpolation type.

If the user parameter <Positioning method> is changed, use idling, for example, to check the tool
path and cycle time before operating, because the tool path during rapid feed or the positioning time
changes.
In addition, be careful because the margin of error due to thermal distortion also changes, adversely
affecting the machining accuracy.

Non-linear interpolation type

End point

Linear interpolation type

Start point
X

2019/09/02 3-5 eCOM3NCPR3


Chapter 3 Preparation Function

(Note 1) The in-position check refers to checking whether or not the position
detected on the machine has reached a range within the target position
(end point).
However, when there are successive Z-axis only operations, such as G0Z
→ G0Z, the in-position check may not be carried out.
(Note 2) The in-position range used for the in-position check varies according to
the <Machine parameter> that is used for the command that follows.
When the command sequence is G0→G0, the <Positioning end check
distance> applies, and when the command sequence is a cutting
command such as G0→ G1/G2, the <In-position width> applies. However,
when the command sequence is an operation in the same direction such
as G0Z_ → G1Z_, the <Positioning end check distance> applies.
(Note 3) The rapid feedrate is set for each axis in the machine parameter. As a
result, an F command for the feedrate cannot be carried out.
3 (Note 4) The positioning operation during a tool change (G100 and M06) is a
non-linear interpolation type regardless of the type that is selected in the
user parameter <Positioning method>.

3.2.2 Single Direction Positioning Function (G60)


Command format G60 X_ Y_ Z_ A_ B_ C_;

X,Y,Z,A,B,C: Command value of the axis for which single direction positioning is performed.
Coordinate of end point for G90 and travel amount for G91

Will not single-stop

Start point

Start point

Stops temporarily
End point
Overshoot

When the above command is executed, the axis moves from the end point for the preset travel
amount, and then moves to the end point.
G60 is a one shot command and the axis travel path is the same as that for G00.
Overshoot is set by the <single direction positioning excess travel amount> of <user parameter>.

(Note 1) Z axis will not perform single direction positioning in canned cycle
operation. This also applies to X and Y axes traveling a shift amount in
G76 and G87 cycles.
(Note 2) Single direction positioning is not performed for any axis that does not
have the travel amount set for the parameter.
(Note 3) Single direction positioning is performed even when 0 is specified for the
travel amount.
(Note 4) The alarm <<Compensating diameter>> is triggered when the G60
command is issued during cutter compensation and nose R
compensation operations.
(Note 5) Travel to the end point from a position that is passed the end point and
travel from a temporary stop position to the end point are a non-linear
interpolation type regardless of the type that is selected in the user
parameter <Positioning method>.

2019/09/02 3-6 eCOM3NCPR3


Chapter 3 Preparation Function

3.2.3 Precautions for Programming Involving Use of


Rotation Axis (Index Table)
Be sure to insert indexing commands for rotation axes A and B before cutting commands in the
program when using an index table.

When opening a door with the door interlock function enabled, the axis may become misaligned due
to the load of the workpiece, etc., because the servo for the rotation axis is turned OFF. Thereafter, if
the shift amount when closing the door is smaller than the machine parameter <Return angle with
servo controller ON>, then it returns to the position prior to turning OFF the servo. However, the
alarm <<Return distance too long>> is triggered when the shift amount is larger than the <Return
angle with servo controller ON>. If you continue in this state, the workpiece will not be machined in
correct position.

2019/09/02 3-7 eCOM3NCPR3


Chapter 3 Preparation Function

3.3 Cutting (G01 to 03, G12/13, G102/103, G202/203)


3.3.1 Linear Interpolation (G01)
Linear interpolation moves a tool linearly from the current position to the target position at the
specified feed rate.

Command format G01 X_ Y_ Z_ A_ F_;


G01 X_ Y_ Z_ B_ F_;
G01 X_ Y_ Z_ C_ F_;

Axis command is effective for up to 3 linear axes plus one additional axis. The alarm <<Invalid
Command>> occurs when you command 2 additional axes simultaneously.

The alarm <<No *axis Option>> occurs when you command additional axes in their absence.
3 The feedrate is set by address F. Once the feed rate is commanded, it is effective until another value
is specified.
X, Y, and Z axes, when commanded, are recognized with the feed rate of mm/min (mm/rev) and
additional axis °/min (°/rev).

Y
End point

Start point

Feed rate of each axis is calculated in the equation below.

When "G01 G91 Xα Yβ Zγ Ff;" is programmed:

α
Feed rate along X axis: Fx = ─── · f
L

β
Feed rate along Y axis: Fy = ─── · f
L

γ
Feed rate along Z axis Fz = ─── · f
L

(L = α2 + β2 + γ2 )

2019/09/02 3-8 eCOM3NCPR3


Chapter 3 Preparation Function

The example below shows linear interpolation of linear axis and rotation axis.

When "G01 G91 Xα Yβ Zγ Bδ Ff " is programmed

L
Time for B axis distribution Tb = ───
f

δ
Feed rate along B axis Fb = ────
Tb

α
Feed rate along X axis Fx = ─── · f
L
3
β
Feed rate along Y axis Fy = ─── · f
L

γ
Feed rate along Z axis Fz = ─── · f
L

(L= α2 + β2 + γ2 + δ2 )

3.3.1.1 Chamfering to Desired Angle and Cornering R


Chamfering to the desired angle or rounding can be performed between interpolation commands.

Chamfering Command format G01 X_ Y_, C_;

C : Distance from virtual corner to the chamfer start point and end point.
This can be commanded only for the selected plane surface.

Imaginary
corner Chamfer end point
intersection

Chamfer start point


C

C
X

(Note 1) The corner chamfering command block and subsequent block must
contain the interpolation command (G01-G03). The alarm <<Specified G
Code Cannot Be Used>> occurs when interpolation command is missing
or the next block is not a travel command.
(Note 2) The inserted block belongs to the corner chamfer command block. Even if
the feed rate of the next block is different than that of the coner chamfer
command block, the inserted block moves at the feed rate of the corner
chamfer command block. In single block operation, the system does not
stop before the inserted block but stops after it.

2019/09/02 3-9 eCOM3NCPR3


Chapter 3 Preparation Function

(Note 3) The cutter compensation / nose R compensation is applied to the shape


after the corner chamfering is performed.
(Note 4) When the commanded chamfering size is greater than travel distance of
the chamfer command block or the next block, the block is extended as
required to define the chamfer start or end point.

Example.1: Linear cutting

C (4)
(7)
(3)

3 (2)
C
(6)
(1)
(5)

When set the programmed path to (1)→(2)→(3)→(4) and the block C as (2), operate to
(1)→(5)→(6)→(7)→(4).

Example.2: Circular cutting

(4)

(3)
C

(7)
(2)
C (6)
(1)

(5)

When the programmed path is (1)→(2)→(3)→(4) and the block (2) is C-specified, the machine
operates through(1)→(5)→(6)→(7)→(4).

2019/09/02 3 - 10 eCOM3NCPR3
Chapter 3 Preparation Function

Cornering R Command format G01 X_ Y_, R_;

R : Radius of cornering
This can be commanded only for the selected plane surface.

3
Corner radius
R end point

Virtual corner
intersection
Corner radius start point
X

(Note 1) Corner rounding command block and the next block must be a corner
interpolation command (G01 to G03). The alarm <<Specified G Code
Cannot Be Used>> occurs if they are not an interpolation command or the
next corner is unable to execute travel command.
(Note 2) The inserted block belongs to the corner rounding command block. Even
if the feed rate of the next block is different than that of the coner rounding
command block, the inserted block moves at the feed rate of the corner
rounding command block. In single block operation, the system does not
stop before the inserted block but stops after it.
(Note 3) The cutter compensation / nose R compensation is applied to the shape
after the corner R operation is performed.
(Note 4) When the commanded radius is greater than corner rounding command
block or the next command block, the block is extended as required to
define the corner rounding start or end point
(Note 5) After the feature coordinate setting, the corner R command cannot be
issued before the feature coordinate index.

Example.1: Linear cutting

(7)
R
(4)

(3)
(6)

(5) (2)
(1)

When the programmed path is (1)→(2)→(3)→(4) and the block (2) is R-specified, the machine
operates through (1)→(5)→(6)→(7)→(4).

2019/09/02 3 - 11 eCOM3NCPR3
Chapter 3 Preparation Function

3.3.2 Circular Interpolation / Helical Thread Cutting


Interpolation
3.3.2.1 Circular Interpolation (G02, G03)
Circular interpolation moves a tool along a circular arc from the current position to the end point at
the specified feed rate.
XY plane:
Command
G17 G02 X_ Y_ I_ J_ F_;
format
R_

G17 G03 X_ Y_ I_ J_ F_;


R_

3 ZX plane:
G18 G02 Z_ X_ K_ I_ F_;
R_

G18 G03 Z_ X_ K_ I_ F_;


R_

YZ plane:
G19 G02 Y_ Z_ J_K_ F_;
R_

G19 G03 Y_ Z_ J_K_ F_;


R_

The commands are given in the following format:


Rotation direction G02 Clockwise (CW).
G03 Counterclockwise (CCW).
End point G90 mode X,Y,Z End point in the working coordinate system.
G91 mode X Distance from the start point to the end point in the X
direction.
Y Distance from the start point to the end point in the Y
direction.
Z Distance from the start point to the end point in the Z
direction.
Distance between start point I Distance from the start point to the center of arc in the
and arc center X direction.
J Distance from the start point to the center of arc in the
Y direction.
K Distance from the start point to the center of arc in the
Z direction.
Arc radiusArc radius R Arc radiusArc radius
Feedrate F Feedrate in the tangential direction of circular arc.

Clockwise and counterclockwise are the rotation direction viewed from the positive direction to the
negative direction on the Z axis of the X-Y plane.

2019/09/02 3 - 12 eCOM3NCPR3
Chapter 3 Preparation Function

3.3.2.2 XZ Circular Interpolation (G102, G103)


Circular interpolation moves a tool along a circular arc from the current position to the end point at
the specified feed rate.

G102 I_K_
Command X_Z_ F_;
format G103 R_

The commands are given in the following format:


Rotation direction G102 Clockwise (CW).
G103 Counterclockwise (CCW).
End point G90 mode X,Z End point in the working coordinate system.
G91 mode X Distance from the start point to the end point in the
X direction. 3
Z Distance from the start point to the end point in the Z
direction.
Distance between start point and I Distance from the start point to the center of arc in
arc center the X direction.
K Distance from the start point to the center of arc in
the Z direction.
Arc radiusArc radius R Arc radiusArc radius
Feedrate F Feedrate in the tangential direction of circular arc.

Clockwise and counterclockwise are the rotation direction viewed from the positive direction to the
negative direction on the Y axis of the X-Z plane.

(Note) When X- and Y- arcs differ, and when any of the following commands are
issued: diameter compensation command (G41 and G42), nose R
compensation command (G141 and G142) and rotational transformation
command (G68 and G168), the respective alarms <<Compensating
diameter>> and <<During rotational transformation>> are triggered, and
operation stops.
In addition, the alarm <<Feature coordinate manufacturing mode
engaged>> is triggered while in feature coordinate manufacturing mode
(G68.2 modal in progress).

2019/09/02 3 - 13 eCOM3NCPR3
Chapter 3 Preparation Function

3.3.2.3 YZ Circular Interpolation (G202, G203)


Circular interpolation moves a tool along a circular arc from the current position to the end point at
the specified feed rate.

G202 J_K_
Command Y_Z_ F_;
Format G203 R_

The commands are given in the following format:


Rotation direction G202 Clockwise (CW).
G203 Counterclockwise (CCW).
End G90 mode Y,Z End point in the working coordinate system.
point G91 mode Y Distance from the start point to the end point in the
3 Y direction.
Z Distance from the start point to the end point in the Z
direction.
Distance between start point and J Distance from the start point to the center of arc in
arc center the Y direction.
K Distance from the start point to the center of arc in
the Z direction.
Arc radiusArc radius R Arc radiusArc radius
Feedrate F Feedrate in the tangential direction of circular arc.

Clockwise and counterclockwise are the rotation direction viewed from the positive direction to the
negative direction on the X axis of the Y-Z plane.

(Note) When X- and Y- arcs differ, and when any of the following commands are
issued: diameter compensation command (G41 and G42), nose R
compensation command (G141 and G142) and rotational transformation
command (G68 and G168), the respective alarms <<Compensating
diameter>> and <<During rotational transformation>> are triggered, and
operation stops.
In addition, the alarm <<Feature coordinate manufacturing mode
engaged>> is triggered while in feature coordinate manufacturing mode
(G68.2 modal in progress).

2019/09/02 3 - 14 eCOM3NCPR3
Chapter 3 Preparation Function

3.3.2.4 Precautions for Circular Interpolation


End point of an arc is set by an absolute or incremental value by G90 and G91, respectively.
Incremental value is the distance from start to end point of the arc.
Center of the arc is specified by I, J, and K with respect to X, Y, and Z axis.
Vectors I, J, and K view the center of the arc from the start point. They are always specified by
incremental values irrespective of G90 and G91.

• Absolute positioning
G90 G03 Xx Yy Ii Jj Ff;

Y
End point (x, y)

X
Start point 3
j

Center

• Incremental positioning
G91 G03 Xx Yy Ii Jj Ff;
Y
x
End point
X
y

Start point

Center
i

2019/09/02 3 - 15 eCOM3NCPR3
Chapter 3 Preparation Function

Absolute command
G03 X-60.Y-10.I-50.J-20.F1000;

Incremental command
G03 X-30.Y30.I-50.J-20.F1000;

-100 -50 (0, 0 )


-X
Machine zero
End point (-60, -10)

3 Start point
(-30, -40)
-50

Center (-80, -60)

-Y

You may define the center with radius R instead of using vectors I, J, and K. Two different arcs are
possible: an arc less than and the other greater than a half circle. Use a negative value for radius R
when commanding an arc greater than a half circle.

1. G02 X-70.Y-50.R25.F1000;
2. G02 X-70.Y-50.R-25.F1000;

-100 -50 (0, 0)


-X
Machine zero

Start point(-60,-20)

R>0
R<0

(1)
(2)

-50

End point (-70,-50)

-Y

• I, J, and K are considered zero if not specified.


• You cannot command an arc of R=0.
• When you omit X, Y, and Z, the end point is considered the same as start point and:
(1) an arc of 360º (a circle) is commanded when the center is defined by I, J, and K; or
(2) the alarm <<Arc Command Error>> occurs when the center is defined by R.
• You cannot define R and the set of I, J, and K simultaneously. The alarm <<Arc Command
Error>> occurs.

2019/09/02 3 - 16 eCOM3NCPR3
Chapter 3 Preparation Function

• The tool moves as shown below when an end point is missing on the arc defined by a start point
and the center of the arc.

Motion of radius

Re

Rs

3
θs θe

End point Re

Start point Rs
θe
θs

Center ( I , J )

• The alarm <<Curve Speed Error>> may occur when commanding an end point radius that is
much greater than the start point radius.
• You may not command G36 to G39 in the circular mode. The alarm During <<Arc Mode>>
occurs.
• After the feature coordinate setting, an arc command cannot be issued before the feature
coordinate index.

2019/09/02 3 - 17 eCOM3NCPR3
Chapter 3 Preparation Function

3.3.2.5 Helical Thread Cutting Interpolation


Putting the other than selected plane axis command in the circular arc block permits a helical thread
cutting.

Command format XY plane:


G17 G02 X_ Y_ Z_ I_ J_ A_ F_;
G03 R_ B_
C_

ZX plane:
G18 G02 Z_ X_ Y_ K_ I_ A_ F_;
G03 R_ B_
C_

3 YZ plane:
G19 G02 Y_ Z_ X_ J_ K_ A_ F_;
G03 R_ B_
C_

Up to one linear axis and one additional axis can be controlled simultaneously when commanded for
the surface other than selected plane.
The F code commands the feedrate in the circular interpolation axis..

The alarm <<Feed Rate Error>> occurs when F is greater than the maximum cutting travel speed or
rapid feed.

The feedrate in the other than selected plane axis is determined by the values of "feedrate" in the
circular interpolation axis, "end point X", "end point Y" and "end point Z". It can be calculated as
follows:

180×L F : Command speed (Selected plane axis)


Fz = × F
π×R×θ R : Radius
θ : Angle
Fz : Other than selected plane of feedrate speed.
L : Other than selected plane of feed distance.

Ex)
Setting following values: F=500 (mm/min), R=10 (mm),
θ=360 (º), L=2 (mm)

Fz = (180×2×500) / (π×10×360)
≒ 15.9 (mm/min)

The alarm <<Feed Rate Error>> occurs when the feed rate calculated for the axis of other than the
selected plane is greater than the maximum cutting travel speed of Machine parameter (System 1) or
rapid feed.

When tool dia offset command is given, an offset is applied to the selected plane.

Helical thread cutting interpolation command is not possible while in the inverse time feed (G93)
modal.
If a command is issued, the alarm <<Command not possible during inverse time feed>> is triggered.

2019/09/02 3 - 18 eCOM3NCPR3
Chapter 3 Preparation Function

3.3.2.6 Spiral Interpolation


An increment or decrement per rotation is specified for the circular interpolation command to
perform spiral interpolation.

Command format XY plane:


{ G17 } G02 X_ Y_ I_ J_ Q_ L_ F_;
{ G17 } G03 X_ Y_ I_ J_ Q_ L_ F_;

ZX plane:
{ G18 } G02 Z_ X_ K_ I_ Q_ L_ F_;
{ G18 } G03 Z_ X_ K_ I_ Q_ L_ F_;

YZ plane:
{ G19 } G02 Y_ Z_ J_ K_ Q_ L_ F_;
{ G19 } G03 Y_ Z_ J_ K_ Q_ L_ F_; 3
G02 : Clockwise cutting direction
G03 : Counterclockwise cutting direction
XYZ : End point coordinates
L : Number of rotations (An integer number is used to command When the number is
with decimal point, the number is rounded off.)
Example: Set "L6" for five and 1/4 rotations (5.25 rotations).
Q : Increment or decrement in radius per rotation
Setting a positive value increases the radius for each rotation. Setting a negagive
value decreases the radius for each rotation.
IJK : Vector (distance and direction) from the start point to the center (the same as
circular interpolation)
F : Cutting speed

* Either L (number of rotations) or Q (increment/decrement in radius) can be omitted. If "L" and


"Q" are used together, "Q" is used.

Y
Start point (0, 100.)
100 End point (X, Y) (0, -50.)
Distance to center (I, J) (0,-100.)
Radius increment/decrement Q -20.0
Count L3

-50
20 Absolute command:
(1) G90 G02 X0.Y-50.I0J-100.Q-20.;
20 (2) G90 G02 X0.Y-50.I0J-100.L3;
Incremental command:
(1) G91 G02 X0Y-150.I0J-100.Q-20.;
(2) G91 G02 X0Y-150.I0J-100.L3.;
Either (1) or (2) will do.

(Note 1) Tool dia offset can be performed only in the offset mode. The alarm
<<Cutter Compensation Error>> occurs in the startup and cancel mode.
(Note 2) The setting for [Tool dia offset] is applied relative to the start point and end
point specified in the program during tool dia offset. The alarm <<Cutter
Compensation Error>> occurs if the tool path after compensation
intersects or touches the center of the spiral.

2019/09/02 3 - 19 eCOM3NCPR3
Chapter 3 Preparation Function

(Note 3) The alarm <<Cutter compensation error>> is triggered when the


compensated tool path crosses or touches the center of the spiral.
(Note 4) The alarm Arc Radius Error Limit Exceeded occurs when the spiral end
point calculated from per-rotation radius increment/decrement does not
agree with the programed spiral end point and the difference is greater
than the specified <arc radius error limit> of User parameter (Switch 1).
(Note 5) The alarm <<Specified G Code Cannot Be Used>> occurs when corner CR
is specified in the immediately preceding block.
(Note 6) Automatic corner override will not be implemented in the immediately
preceding and succeeding blocks.
(Note 7) Corner CR is not used for spiral interpolation. The alarm Specified
Numerical Data Cannot Be Used occurs.
(Note 8) The alarm <<Arc Command Error>> occurs when the radius becomes 0 or
less (including negative values) as a result of designation of per-rotation
3 radius increment/decrement and rotation counts.
(Note 9) If the rotation count exceeds 9999 when the amount of increase or
decrease in the radius per rotation and the number of rotations are
specified, then the alarm <<Arc command error>> is triggered.
(Note 10) The alarm <<Arc Command Error>> occurs when a radius is specified by R
parameters.
(Note 11) The alarm <<Arc Command Error>> occurs when radius
increment/decrement is zero.
(Note 12) Do not use a Q0 command when start point radius is the same as end
point radius (use an L command). The alarm <<Arc Command Error>>
occurs.
(Note 13) Even cutter compensation for the outside of a circule cannot be performed
if start and end points are set on the center of a circle. The alarm <<Cutter
Compensation Error>> occurs.
(Note 14) Direction of travel on the start point when this is at the center (on the end
point when this is at the center) is the same as the direction of travel on
the end point (on the start point).

(Start point = center) (End point = center)

Start point
End
End Start point point
point (center) (center)

Same travel direction

(Note 15) Not commanded when mirror image is effective. The alarm <<Mirror Image
Mode>> Is ON occurs.
(Note 16) Spiral interpolation cannot be commanded when scaling is effective. The
alarm <<Scaling>> occurs.
(Note 17) When spiral interpolation and cutter compensation are followed by a
cutter compensation release command in the succeeding block, the end
point will be where a vertical vector is set up at the end point of the spiral
interpolation.
(Note 18) In-position check is performed in the blocks before and after spiral
interpolation.
(Note 19) Spiral interpolation command is not possible while in the inverse time feed
(G93) modal. If a command is issued, the alarm <<Command not possible
during inverse time feed>> is triggered.

2019/09/02 3 - 20 eCOM3NCPR3
Chapter 3 Preparation Function

3.3.2.7 Conical interpolation


The travel command of another axis in addition to the spiral interpolation command is added and an
increment and decrement is specified for that axis per spiral rotation to perform conical
interpolation.

Command format XY plane:


{G17} G02 X_ Y_ Z_ I_ J_ K_ Q_ L_ (A_ B_ C_) F_;
{G17} G03 X_ Y_ Z_ I_ J_ K_ Q_ L_ (A_ B_ C_) F_;

ZX plane:
{G18} G02 Z_ X_ Y_ K_ I_ J_ Q_ L_ (A_ B_ C_) F_;
{G18} G03 Z_ X_ Y_ K_ I_ J_ Q_ L_ (A_ B_ C_) F_;

YZ plane:
{G19} G02 Y_ Z_ X_ J_ K_ I_ Q_ L_ (A_ B_ C_) F_; 3
{G19} G03 Y_ Z_ X_ J_ K_ I_ Q_ L_ (A_ B_ C_) F_;

Up to one axis (linear axis or additional axis) can be controlled when commanded for the surface
other than selected plane.

G02 : Clockwise cutting direction


G03 : Counterclockwise cutting direction
XYZ : Coordinates of end point
L : Number of rotations (An integer number is used to command When the number is
with decimal point, the number is rounded off.)
Example: Set "L6" for five and 1/4 rotations (5.25 rotations).
Q : Increment or decrement in radius per rotation.
Setting a positive value increases the radius for each rotation.
Setting a negagive value decreases the radius for each rotation.
IJK : Two axes are vectors from start point to center. The remaining axis specifies
per-rotation spiral increment/decrement for conical interpolation. *
Vector from start point to Increment and decrement in height
Plane to be set
center per spiral rotation
G17 XY I, J K
G18 ZX K, I J
G19 YZ J, K I
F : Cutting speed (Selected plane axis)

* I, J, K, L, and Q (Incremental height, rotation count, and incremental radius):


Specify one, and you may omit the other two.
If L and Q are contradictory to eath other, Q has priority.
If there is a discrepancy between "L" and the increment/decrement in height, the latter is used.
If there is a discrepancy between "Q" and the increment/decrement in height, the former is used.
Priority Higher ← "Q" > Increment/decrement in height > "L" → Lower

2019/09/02 3 - 21 eCOM3NCPR3
Chapter 3 Preparation Function

+Z
25.0 25.0

(0, -37.5, 12.5)

5.0
5.0
+Y
100.0
3

+X -100

Example of program: The orders of the numerical values in the brackets ( ) are X, Y, and Z.
Start point (0., 100., 0.)
End point (0., -37.5, 12.5)
Distance to the center (0., -100.)
Increment/decrement in radius -25.
Increment/decrement in height 5.
No. of rotations 3

Absolute command
K5
G90 G02 X0.Y-37.5 Z12.5 I0.J-100. Q-25 F300.;
L3

Incremental command

K5
G91 G02 X0.Y-137.5 Z12.5 I0.J-100. Q-25 F300.;
L3

(Note 1) Tool dia offset can be performed only in the offset mode. The alarm
<<Cutter Compensation Error>> occurs in the startup and cancel mode.
(Note 2) During execution of the cutter compensation, tool diameter offset
compensation is performed, on the selected plane, for the start and end
points specified by the program. The alarm <<Cutter Compensation
Error>> occurs when the tool path after compensation intersects or
touches the center of the cone.
(Note 3) The alarm <<Cutter compensation error>> is triggered when the
compensated tool path crosses or touches the center of the cone.
(Note 4) The alarm Arc Radius Error Limit Exceeded occurs when the end point of
the cone calculated from per-rotation radius increment/decrement does
not agree with the programed end point of the cone and the difference is
greater than the specified <arc radius error limit> of User parameter
(Switch 1).
(Note 5) The alarm <<Specified G Code Cannot Be Used>> occurs when corner CR
is specified in the immediately preceding block.
(Note 6) Automatic corner override will not be implemented in the immediately
preceding and succeeding blocks.
(Note 7) Corner CR is not used for conical interpolation. The alarm Specified
Numerical Data Cannot Be Used occurs.

2019/09/02 3 - 22 eCOM3NCPR3
Chapter 3 Preparation Function

(Note 8) The alarm <<Cutter Compensation Error>> occurs when you change the
direction of cutter compensation (G41, G42) in the immediately preceding
and succeeding blocks of conical interpolation.
(Note 9) If the rotation count exceeds 9999 when the amount of increase or
decrease in the radius per rotation and the number of rotations are
specified, then the alarm <<Arc command error>> is triggered.
(Note 10) The alarm <<Arc Command Error>> occurs when a radius is specified by R
parameters.
(Note 11) The alarm <<Arc Command Error>> occurs when radius
increment/decrement is zero.
(Note 12) Do not use a Q0 command when start point radius is the same as end
point radius (use an L command). The alarm <<Arc Command Error>>
occurs.
(Note 13) Cutter compensation for the outside of a circule cannot be performed if
start and end points are set on the center of a circle. The alarm <<Cutter
Compensation Error>> occurs.
3
(Note 14) Direction of travel on the start point when this is at the center (on the end
point when this is at the center) is the same as the direction of travel on
the end point (on the start point).

(Start point = center) (End point = center)

Start point
End
End Start point point
point (center) (center)

Same travel direction

(Note 15) Conical interpolation cannot be commanded when mirror image is


effective. The alarm <<Mirror Image Mode>> Is ON occurs.
(Note 16) Conical interpolation cannot be commanded when scaling is effective. The
alarm <<Scaling>> occurs.
(Note 17) When conical interpolation and cutter compensation are followed by a
cutter compensation release command in the succeeding block, the end
point will be where a vertical vector is set up at the end point of the conical
interpolation.
(Note 18) In-position check is performed in the blocks before and after conical
interpolation.
(Note 19) Conical interpolation command is not possible while in the inverse time
feed (G93) modal. If a command is issued, the alarm <<Command not
possible during inverse time feed>> is triggered.

2019/09/02 3 - 23 eCOM3NCPR3
Chapter 3 Preparation Function

3.3.2.8 Cutter Compensation for Spiral and Conical


Interpolation
Virtual circles, with their centers set on the center of spiral interpolation, are created at the start and
end points of the program. Cutter compensation is performed relative to the virtual circles and spiral
interpolation is executed for the result of the compensation.

(1) (2)

Program path
A virtual circle is set at the start point
(3)
Intersection (start point)
(4)

Intersection
(start point)

Set dia. compensation for the virtual Another virtual circle is set at the end point
circle
Intersection
Virtual circle
(5) (start point) (6) for dia.
Intersection (end point) End point compensation

Start point

Virtual circle for dia.


compensation

Dia. compensation
by program path

Dia. compensation
by virtual circle

Set dia. compensation for the virtual Diameter-compensated spiral


circle interpolation using intersections as start
and end points

2019/09/02 3 - 24 eCOM3NCPR3
Chapter 3 Preparation Function

3.3.2.9 Involute interpolation


The involute interpolation is carried out at the command feedrate and travels along an involute curve
from the current position to the end point.

Command format For X-Y plane:


{G17} G02.2 X_ Y_ Z_ I_ J_ R_ F_;
{G17} G03.2 X_ Y_ Z_ I_ J_ R_ F_;

For Z-X plane:


{G18} G02.2 Z_ X_ Y_ K_ I_ R_ F_;
{G18} G03.2 Z_ X_ Y_ K_ I_ R_ F_;

For Y-Z plane:


{G19} G02.2 Y_ Z_ X_ J_ K_ R_ F_;
{G19} G03.2 Y_ Z_ X_ J_ K_ R_ F_; 3
A description of the commands is shown below.
G02.2 Clockwise (CW)
Rotation direction
G03.2 Counterclockwise (CCW)
G90 mode X, Y, Z End position in workpiece coordinate system
Distance in X-axis direction between the start and
X
end points
End point Distance in Y-axis direction between the start and
G91 mode Y
end points
Distance in Z-axis direction between the start and
Z
end points
Distance in X-axis direction from the start point to
I
the center point of the base circle
Distance from start point to Distance in Y-axis direction from the start point to
J
center point of base circle the center point of the base circle
Distance in Z-axis direction from the start point to
K
the center point of the base circle
Base circle radius R Radius of base circle
Feedrate F Speed along tangent line of involute curve

2019/09/02 3 - 25 eCOM3NCPR3
Chapter 3 Preparation Function

Ex: Involute interpolation command (G02.2) for G17 (X-Y) plane


Y
F

I
Start point End point

(X,Y)
J

R
3

Base circle

X
(Note 1) The involute interpolation option is required to enable and use this
function.
(Note 2) This function can only be used in NC language mode.

Refer to “Chapter 12 Options (23) Involute interpolation function” in the Operation Manual for
further details.

3.3.3 Circle Cutting (G12, G13)


The tool starts at the center of a circle, cuts the inside, and returns to the center.

Command format G12 I_ D_ F_;


G13 I_ D_ F_;

G12 : Clockwise cutting direction


G13 : Counterclockwise cutting direction
I : Radius of a circle. Signs + and - are ignored; always considered +.
D : Specify compensation amount.
Compensation amount is commanded by tool number.
For a positive value, the inside of the radius specified by I parameter is cut along the
circle. For a negative one, the outside of the radius specified by I parameter is cut.
F : Cutting speed

Operation (assuming an XY plane has been selected)


The tool starts from the center of the circle in the X-axis direction along a half-circle arc. Rotating
direction is as determined by G12 or G13.
From (1), the tool moves along the entire circle in the direction specified by G12 or G13.
From the end point of (2), the tool moves to the center of the circle following the half-circle arc.
Rotating direction is as determined by G12 or G13.

2019/09/02 3 - 26 eCOM3NCPR3
Chapter 3 Preparation Function

Y
(1)
Radius
Compensation

Tool path

(3)
(2) 3
G12; positive compensation

Tool path
Y
(2)
Compensation
Radius

(3)

(1)

G13; negative compensation

(Note 1) The alarm <<Arc Command Error>> occurs when the D command is
omitted.
(Note 2) The alarm <<Arc Command Error>> occurs if the radius (I command) is
zero or a negative value after subracting compensation amount.
(Note 3) The alarm <<Cutter Compensation Error>> occurs when you specify cutter
compensation control command (G40, G41, G42) (startup and cancel
modes) and circle cutting command (G12, G13) simultaneously.
(Note 4) Corner CR may not be set in the circle cutting command and immediately
preceding block command.The alarms <<Specified G Code Cannot Be
Used>> or Specified Numerical Data Cannot Be Used occur, respectively.
(Note 5) The alarm <<Cutter Compensation Too Large>> occurs when the radius
after compensation is smaller than tool diameter.
(Note 6) Circle cutting is performed on the currently selected plane (G17, G18,
G19).
(Note 7) Start and end points are identical in circle cutting.
(Note 8) When circle cutting (G12, G13) is executed during cutter compensation
(G41, G42), the latter is effective for the path compensated by D command.
(Note 9) After the feature coordinate setting, a circular cutting command cannot be
issued before the feature coordinate index.
(Note 10) Circular cutting command is not possible while in the inverse time feed
(G93) modal. If a command is issued, the alarm <<Command not possible
during inverse time feed>> is triggered.

2019/09/02 3 - 27 eCOM3NCPR3
Chapter 3 Preparation Function

3.4 Dwell (G04)


When a block is finished, the next block starts after a specified time period on completing the
in-position check.

Command format G04 P_;

or G04 X_;

P, X : Dwell time (sec.)

(Note) When a decimal point command is absent in dwell time designation,


seconds or milliseconds apply if <program unit> of <user parameters> is
<Base> or <Minimum> respectively.
3

2019/09/02 3 - 28 eCOM3NCPR3
Chapter 3 Preparation Function

3.5 Exact Stop Check (G09, G61, G64)


Each axis is accelerated / decelerated respectively. If, therefore, there is a large change in axis speed
(cutting feed rate) between two neighboring blocks, the tool will run along an inside path relative to
the program path. Exact stop check function is used to avoid this problem.

: Program path

: Tool path

1. Exact stop check (G09)

Command format G09;

In-position check is performed at the end of each block before the tool proceeds to the next block.

(Note 1) G09 is effective only in the commanded block.


(Note 2) Exact stop check is always performed in the positioning mode (G00)
irrespective of presence or absence of the G09 command.

2. Exact stop check (G61)

Command format G61;

The exact stop check is carried out at the end of each block after this command is issued and until the
cutting mode (G64) command is issued.

3. Cutting mode (G64)

Command format G64;

From this command until G61 is specified, the tool starts, at each joint of blocks, traveling according
to the instructions in the succeeding block as soon as possible, to avoid deceleration to the extent
possible.

(Note 1) Exact stop check is performed also in the cutting mode if a block includes
a positioning mode (G00) or exact stop check (G09), or in the cutting feed
rate blocks that are not continuous.
(Note 2) The finishing operation in the thread cutting cycle is always performed in
the cutting mode regardless of this command.
(Note 3)
Current block
Positioning Cutting feed No traveling
Succeeding block
Positioning × × ×
Cutting feed × ○ ×
No traveling × × ×
○ Cutting mode
× Exact stop check mode

Exact stop check is always performed when the current block clamps at additional axis travel and
when the succeeding block unclamps at additional axis travel.

2019/09/02 3 - 29 eCOM3NCPR3
Chapter 3 Preparation Function

3.6 Programmable Data Input (G10)


3.6.1 Entering Workpiece Coordinate Zero
Command format G10 L2 Pn X_ Y_ Z_ A_ B_ C_;

n=0 : [External]
n=1 : G54
n=2 : G55
n=3 : G56
n=4 : G57
n=5 : G58
n=6 : G59

3 The entered value becomes the new compensation amount in the G90 (absolute command) mode
while it is added to the currently set compensation amount to specify the new one in the G91
(incremental command) mode.

(Note 1) When the additional axis is commanded and the optional additional axis is
not installed, an alarm will occur.
(Note 2) The workpiece coordinate zero cannot be changed while in feature
coordinate manufacturing mode (G68.2 modal in progress). The alarm
<<Feature coordinate manufacturing mode engaged>> is triggered.

3.6.2 Entering Tool Length / Cutter Compensation Data


Command format

Tool length compensation data G10 L10 P_ R_;

Cutter compensation data G10 L12 P_ R_;

P : Compensation number (1 to 99)


R : Compensation amount

The entered value becomes the new compensation amount in the G90 (absolute command) mode
while it is added to the currently set compensation amount to specify the new one in the G91
(incremental command) mode.

(Note) The alarm <<Comm. issued to area other than (tool) data area.>> is
triggered when a value is input that is outside of the range set in the <Tool
data range> under the <Tool data> parameter.

2019/09/02 3 - 30 eCOM3NCPR3
Chapter 3 Preparation Function

3.6.3 Tool Wear Compensation


When a tool length/cutter compensation is commanded by the program, the wear compensation data
relevant to the specified tool compensation command is automatically retrieved and considered in
the cutting operation.

Command format

Tool length wear compensation G10 L11 P_ R_;

Cutter wear offset G10 L13 P_ R_;

P : Compensation number (1 to 99)


R : Compensation amount

The commanded value is used as the new compensation amount in the absolute (G90) mode while it 3
is added to the current set compensation amount in the incremental (G91) mode.

Set range: ±99.999mm ±9.9999inch (for Type 1 least input increment)

(Note) The alarm <<Comm. issued to area other than (tool) data area.>> is
triggered when a value is input that is outside of the range set in the <Tool
data range> under the <Tool data> parameter.

3.6.4 Tool Offset Data Input


* Available when equipped with a lathe function

Tool length compensation data G10 L90 P_X_Y_Z_R_T_;

P : Tool number (1 – 99)


X : Tool position offset (X)
Y : Tool position offset (Y)
Z : Tool length offset (Z)
R : Tool diameter / nose R compensation
T : Virtual teeth number (0 – 9)

The compensation specified on X / Y / Z / R becomes the new compensation for the tool number
specified by P when G90 (absolute command) mode is enabled. The new compensation is the sum of
compensation specified on X / Y / Z / R plus the current compensation setting for the tool number
specified by P when G91 (incremental command) mode is enabled. T (Virtual teeth number) is not
based on G90 / G91.

(Note) The alarm <<Comm. issued to area other than (tool) data area.>> is
triggered when a value is input that is outside of the range set in the <Tool
data range> under the <Tool data> parameter.

2019/09/02 3 - 31 eCOM3NCPR3
Chapter 3 Preparation Function

3.6.5 Tool Offset Wear Data Input


* Available when equipped with a lathe function

Command format G10 L91 P_ X_ Y_ Z_ R_;

P : Tool number (1 – 99)


X : Tool position wear offset data (X)
Y : Tool position wear offset data (Y)
Z : T length wear offset (Z)
R : Tool diameter / nose R wear offset

The compensation specified on X / Y / Z / R becomes the new compensation for the tool number
specified by P when G90 (absolute command) mode is enabled. The new compensation is the sum of
compensation specified on X / Y / Z / R plus the current compensation setting for the tool number
3 specified by P when G91 (incremental command) mode is enabled.

(Note) The alarm <<Comm. issued to area other than (tool) data area. >> is
triggered when a value is input that is outside of the range set in the <Tool
data range> under the <Tool data> parameter.

3.6.6 Data Input of Extended Workpiece Coordinate


Command format G10 L20 Pn X_ Y_ Z_ A_ B_ C_;

Pn : Code specified in extended workpiece coordinate system


n : 1 throug 48
X, Y, Z : Workpiece origin offset

(Note) The workpiece coordinate zero cannot be changed while in feature


coordinate manufacturing mode (G68.2 modal in progress). The alarm
<<Feature coordinate manufacturing mode engaged>> is triggered.

The entered values become the new offset values in the absolute mode (G90) while they are added to
the current offset value to make new ones in the incremental mode (G91).

3.6.7 Workpiece Coordinate System Using the Results of


Measurements
Command format G10 L99 Pn X_ Y_ Z_ Q_;

n=1 : G54
n=2 : G55
n=3 : G56
n=4 : G57
n=5 : G58
n=6 : G59
Q : Storage number (1 to 4) for results of measurement

A new coordinate system is set using the result of automatic measurement (G121 to 129).

Ex) Automatic measurement is performed on G54 coordinate system, yielding the data (120, 80).
We now set a new coordinate system moving this position to (50, 50).

G54 G121 X100. Y100. I20. J20. Z-10. R10. ; (angle measurement)
G10 L99 X50. Y50.;

2019/09/02 3 - 32 eCOM3NCPR3
Chapter 3 Preparation Function

Y Y

Result of measurement
80 50

G54
X
50
Origin of new
coordinate
system 3
X
Origin of old coordinate system 120

(Note) The workpiece coordinate zero cannot be changed while in feature


coordinate manufacturing mode (G68.2 modal in progress). The alarm
<<Feature coordinate manufacturing mode engaged>> is triggered.

3.6.8 Data Input of Extended Workpiece Coordinate Zero


Based on Measurement Results
Command format G10 L98 Pn X_ Y_ Z_ Q_;

n : Extended workpiece coordinate system (1 to 48)


Q : Storage number (1 to 4) for results of measurement

(Note) The workpiece coordinate zero cannot be changed while in feature


coordinate manufacturing mode (G68.2 modal in progress). The alarm
<<Feature coordinate manufacturing mode engaged>> is triggered.

3.6.9 Data Input for Reference Rotary Fixture Offset


Command format G10 L21 Pn X_ Y_ Z_ A_ B_ C_ Qm;

n : Reference rotary fixture offset number (1 to 8)


X, Y and Z : Reference offset
A, B and C : Reference angle
Q : Axis for calculation
m = 0 : A-axis
m = 1 : B-axis
m = 2 : C-axis
m = 3 : AB-axis
m = 4 : AC-axis
m = 5 : BC-axis

When G90 (absolute command) mode is enabled, the command values for X, Y, Z, A, B and C are
set by the reference fixture offset that is specified in P. When G91 (incremental command) mode is
enabled, the sum of the values specified for X, Y, Z, A, B and C is set by the current values set in the
reference fixture offset specified in P. Q (Axis for calculation) is not based on G90 / G91.

2019/09/02 3 - 33 eCOM3NCPR3
Chapter 3 Preparation Function

3.6.10 Tool Information Input


Command format G10 L97 P_ Q_ R_ W_ V_ F_ S_ U_ J_;

P : Tool number (1 to 99)


Q : Life type
1. Not counted
2 Time (minutes)
3 Drilling (holes)
4 Program (cycles)
R : Tool life
W : Life warning
V : Initial life / end life (switched by the setting of <Tool Life Counting Method> of <User
Parameters>)
3 F : F command value (metric: 0.01 to 999999.99; inch: 0.001 to 99999.999 *)
S : S command value (1 to 99999)
U : Maximum speed (-1, 0, 1 to 99999)
J : Extended information
0 Tool cleaning enabled / CTS enabled
1 Tool cleaning disabled / CTS enabled
2 Tool cleaning enabled / CTS disabled
3 Tool cleaning disabled / CTS disabled

Not rotatable is determined if you set the maximum speed to zero. Unset is indicated if you select -1.
Feed rate commanded by F is set as feed per minute even in the G95 (feed per revolution) mode.
* For Type 1 least input increment.

2019/09/02 3 - 34 eCOM3NCPR3
Chapter 3 Preparation Function

3.7 Coordinate System (G17 to 19, G52 to 59, G54.1,


G92)
3.7.1 Plane Selection (G17, G18, G19)
Plane selection specifies the plane where the following operations are performed: circular
interpolation, cutter compensation, nose R compensation, rotational transformation, corner CR,
circular cutting, spiral interpolation, conical interpolation and involute interpolation.

XY plane selection

Command format G17

ZX plane selection

Command format G18


3
YZ plane selection

Command format G19

Tool length compensation always applies to Z axis irrespective of plane selection.

G17 only is valid for canned cycle, automatic workpiece measurement, coordinate calculation and
feature coordinate setting, and an alarm is triggered for G18 and G19.

Corner CR is only executed when the current and the succeeding block share the same plane. An
alarm occurs if different planes are selected in the blocks.

An alarm is triggered when a plane is selected that is different from the current modal during
diameter compensation and nose R compensation.

3.7.2 Machine Coordinate System Selection (G53)


The below-mentioned command is used to specify coordinate values in a machine coordinate
system.

Command format G53;

Coordinate values commanded in the same block as G53 are recognized in the machine coordinate
system.

(Note) A G53 command is ignored when specified in the incremental mode (G91).

3.7.3 Workpiece Coordinate System Selection (G54 to


G59)
Set 6 sets of workpiece-specific coordinate systems in the data, and you can call the required
workpiece coordinate system using the G54 to G59 commands.

Command format G54





G59

G54 : Workpiece Coordinate System (*1)


G55 : Workpiece Coordinate System (*2)
G56 : Workpiece Coordinate System (*3)
G57 : Workpiece Coordinate System (*4)
G58 : Workpiece Coordinate System (*5)
G59 : Workpiece Coordinate System (*6)

2019/09/02 3 - 35 eCOM3NCPR3
Chapter 3 Preparation Function

Data setting
1. Reference and setting can be performed on the <Workpiece coord zero> screen of the data bank.
2. Setting can be performed from the program using the G10 command.
Refer to "3.6.1 Entering Workpiece coordinate zero“ for the description of command format.

3.7.4 Extended Workpiece Coordinate System Selection


(G54.1)
Command format G54.1 Pn;

Pn : Code specified in extended workpiece coordinate system


n : 1 to 48

The above command allows you to select 48 sets of workpiece coordinate systems.
3 The same function is available using G54 in place of G54.1.
When there is no P code on the same block after G54.1, the extended workpiece coordinate system 1
is selected.

Data setting
1. Reference and setting can be performed on the <Workpiece coord zero> screen of the data bank.
2. Setting can be performed from the program using the G10 command.
Refer to “3.6.6 Data Input of Extended Workpiece Coordinate Zero” for further details.

3.7.5 Workpiece Coordinate System Setting (G92)


Change of workpiece zero position can be commanded as follows:

Command format G92 X_ Y_ Z_ A_ B_ C_;

This command shifts the zero position in the working coordinate system so that the current tool
position becomes to the commanded coordinate values.

G92 X80 Y60: Current tool position (150, 100) is changed to absolute coordinate position (80, 60)
by this command.

100 60 Tool position

40 New workpiece 80
Origin shift coordinate zero

Old workpiece
coordinate zero 70 150

2019/09/02 3 - 36 eCOM3NCPR3
Chapter 3 Preparation Function

(Note 1) The commanded coordinate values are always absolute regardless of G90
and G91.
(Note 2) The working coordinate values of the not commanded axes do not change.
(Note 3) The current working zero position shifts when G92 is executed, and other
working zero positions also shift the same amount accordingly.

New G54 workpiece New G55 workpiece


coordinate zero coordinate zero 3

Old G54 workpiece Old G55 workpiece


coordinate zero coordinate zero

In the above figures, G92 is commanded in the coordinate system of G54.


When the working zero position of G54 shifts, the other working zero
positions of G55 through G59 also shift the same amount as G54.

(Note 4) When a command is issued during the cutter compensation and nose R
compensation operations, it travels in a travel direction to a location
where it is able to stand vertically for the offset vector of the plane axis
that was previously selected (for X- and Y-axes when using the G17
modal). The workpiece coordinates, which are used in the G92 command
that is issued, are created for the current position in the program path.
Y
G00X50.Y50.G41D1;
G01Y100.F1000;
G92X0.Y0.;
X50.;
.
100 .

50 This will be (0, 0)

Program path
Tool path


50 100
(0, 0) workpiece coordinate zero

2019/09/02 3 - 37 eCOM3NCPR3
Chapter 3 Preparation Function

(Note 5) When G92 is commanded during tool length compensation, a new


workpiece coordinate system will be created where the programmed
target value of Z axis coincides with the coordinates commanded by G92.

Spindle end face

Tool tip
3
Programmed target value; this will be
the value commanded by G92

(Note 6) When the G92 command is issued during the tool position compensation
operation, the workpiece coordinates are created and used for the tool
teeth in the G92 command that is issued.

G92 X80.456 Z100.123

100.123

80.456

X
Zero point

(Note 7) When the additional axis is commanded and the optional additional axis is
not installed, an alarm will occur.

2019/09/02 3 - 38 eCOM3NCPR3
Chapter 3 Preparation Function

3.7.6 Local Coordinate System Function (G52)


Command format G52 X_ Y_ Z_ A_ B_ C_;

X, Y, Z, A, B, C: Amount of shift from workpiece coordinate zero point


Operation will be the same regardless of G90 or G91.
Amount of shift is applied only to the specified axis.

1. Executing this command creates a local coordinate system in all coordinate systems from G54
to G59.
2. The workpiece coordinate system does not vary even when this command is executed.
3. The local coordinate system of the specified axis is canceled when G92 command is executed.
4. An error will occur when this command is executed during coordinate rotation, scaling or miller
imaging
5. When a command is issued during the cutter compensation and nose R compensation operations, 3
it travels to a position where it is able to stand for the vertical vector at the end point for the
plane axis that was last selected (for X- and Y-axes when using the G17 modal).
6. The local coordinate system is canceled when any of the following operations are performed:
• When “0” is specified for the command value on the axis in the G52 command
• G92 command
• M02 (M30) command
• Operation resetting

3.7.7 Rotary Fixture Offset Function (G54.2)


3.7.7.1 Overview
This function is available on machines with an index table.
* The option for rotary fixture offset function is required.

By setting the rotation center for the index table in the workpiece coordinate system (G54 to G59,
G54.1, G92, G52 and external workpiece coordinate system shift) as well as setting the X, Y and Z
vector from the rotation center to the workpiece zero point, when the table rotates, this function
automatically calculates if the workpiece zero point has moved to another point in the machine
coordinates. And, it sets a new workpiece coordinate system based on that position.

(Example when using it on the index table (A-axis) for an X-axis turn)

Z (A=0°)
Z (A=-45°)
A-axis rotation center
Workpiece zero point
Machine zero point

Z
Y (A=0°)
Y (A=-45°)

X, Y and Z vector from rotation


center to workpiece zero point
45° (Reference offset)

2019/09/02 3 - 39 eCOM3NCPR3
Chapter 3 Preparation Function

3.7.7.2 Command Format


Rotary fixture offset command

Command format G54.2 Pn

n: Reference rotary fixture offset No. (1 to 8)

Cancel command for rotary fixture offset

Command format G54.2 P0

G54.2 is a modal G code. Specify from 1 to 8 for the G54.2 P address in order to enable the rotary
fixture offset function. Specify 0 for the P address to cancel or disable the function.
3
(Note 1) When there is no option for the rotary fixture offset function and the G54.2
command is issued, an alarm is triggered. Also, if the P address is not
specified for the G54.2 command, then an alarm is triggered.
(Note 2) An alarm is triggered when the G54.2 command is issued in the following
situations.
• When the G68/G168 modal is operating (alarm: <<During rotational
transformation>>)
• When the G51 modal is operating (alarm: <<Scaling>>)
• When the G51.1 modal is operating (alarm: <<Miror image mode>>)
(Note 3) The alarm <<Rotary fixture offset in progress>> is triggered when the
following commands are issued while the rotary fixture offset function is
enabled.
• G68/G168
• Additional axis command during thread cutting interpolation for
helical screw
(Note 4) When the rotary fixture offset function is enabled, the coordinate system
is not reset by the rotary fixture offset, even if the rotation axis
coordinates change due to a command or edit operation. When a G54.2
command or a rotation command is issued from the next block, the
coordinate system is reset by the rotary fixture offset.
• Workpiece coordinate system setting (G54 to G59, G54.1, G92, G52
and external workpiece cooridnate system shift)
• G10
• G53
• G28/G30
• Motion from the G29 reference position to the middle position
• Reference angle for reference rotary fixture offset
(Note 5) When simultaneous travel commands are issued for the X-, Y- and Z-axes
and for the additional axis while the rotary fixture offset function is
enabled, the X-, Y- and Z-axes are offset based on the angle that is
specified for the additional axis.
(Note 6) The additional axis angle, which corresponds to the turning spindle when
the turning spindle is selected, does not take into account the rotary
fixture offset calculation. (When the G54.2 command or another travel
command on the additional axis is issued, the current rotary fixture offset
is the same as when positioning the additional axis, which corresponds to
the turning spindle, to the reference angle.)

Program example (NC language)


N1 G90 G54 G00 X0 Y0 Z200. A0. C0.
N2 G54.2 P1
N3 G00 A-45.
N4 G01 X2. F1000
N5 G00 A-60. C270.
N6 G54.2 P0

2019/09/02 3 - 40 eCOM3NCPR3
Chapter 3 Preparation Function

3.7.8 Feature Coordinate Setting Function


3.7.8.1 Overview
When machining on a tilt plane, set a new coordinate system on this plane to issue position
commands in order to make the program simpler.
This new coordinate system is called the feature coordinate system and is set in the workpiece
coordinate system.

When the feature coordinate system is set, this is called feature coordinate manufacturing mode.
The commands are controlled as commands in the feature coordinate system until the feature
coordinate manufacturing mode is cancelled.

Feature coordinate index refers to when the additional axis is moved so that the Z-axis + direction in
the feature coordinate system is in line with the tool axis direction

Relationship between machine coordinate system, workpiece coordinate system and feature 3
coordinate system

Feature coordinate
system

Workpiece
coordinate system

Machine Machine coordinates: Xm-Ym-Zm


coordinate system Workpiece coordinates: Xw-Yw-Zw
Feature coordinates: Xf-Yf-Zf

2019/09/02 3 - 41 eCOM3NCPR3
Chapter 3 Preparation Function

Rotation axis

Tilt axis
3

Rotate the rotation axis and tilt axis so that the Z-axis +
direction in the feature coordinate system is in line with the
tool axis direction

Rotation axis
Machining plane and tool
axis are perpendicular

XY in the feature
coordinate system after
indexing is rotated to
60° from the XY in the
workpiece coordinate
Rotates 45° around system
the rotation axis

Tilt axis

Rotates 54.7356°
around the tilt axis

Usage conditions
The feature coordinate setting function is an option that is required to enable and use this function.
This function can only be used in NC language mode.

3.7.8.2 Command format


When setting the feature coordinate system, the feature coordinate manufacturing mode is enabled.
The command coordinates are processed as coordinates in the feature coordinate system on the
block until the feature coordinate manufacturing mode is cancelled.

2019/09/02 3 - 42 eCOM3NCPR3
Chapter 3 Preparation Function

1. Feature coordinate setting command (G68.n)


The feature coordinate system is set.

Do not rotate the additional axis after setting the feature coordinate system. The alarm
<<Feature coordinate manufacturing mode engaged>> is triggered.

(1) Feature coordinate setting using Euler angles (G68.2)

Command format G68.2 XxYyZzIαJβKγ;

x, y, z: Feature coordinate zero point


α, β, γ: Euler angles
Specify within the range: -360.000 to 360.000.

When one of the following is omitted: X, Y, Z, I, J or K, the command is processed as a 0


value.
3
The alarm <<Feature coordinate command error>> is triggered when I, J and K are all
omitted.

The Euler angles refer to a set of angles (α, β and γ)


that rotates around each axis, in order to acquire the
feature coordinate system (Xf, Yf and Zf) from (Xw, Yw
and Zw) in the workpiece coordinate system.

1. Rotates (Xw, Yw and Zw) for the angle α around the


Zw-axis forming (X’,Y’ and Zw).

2. Rotates (X’, Y’ and Zw) for the angle β around the


X’-axis forming (X’,Y” and Z”).

3. Rotates (X’, Y” and Z”) for the angle γ around the


Z”-axis forming (Xf,Yf and Zf).

2019/09/02 3 - 43 eCOM3NCPR3
Chapter 3 Preparation Function

(2) Multiple absolute commands (G68.2)


By executing another feature coordinate setting command (G68.2) while in feature
coordinate manufacturing mode (and not cancelling feature coordinate manufacturing
mode), a new feature coordinate system can be set for the workpiece coordinate system.

(3) Special notes


(ⅰ) The original workpiece coordinate system cannot be changed while in feature
coordinate manufacturing mode. The alarm <<Feature coordinate manufacturing
mode engaged>> is triggered.
(ⅱ) When <Tilt axis*> or <Rotation axis*> is set in the user parameter (feature
coordinate setting) for an axis where the machine parameter (system 2) <Optional
*-axis> is set to <Not equipped>, if a feature coordinate setting command is issued,
the alarm <<Parameter set. error in feature coordinate set. function>> is triggered.
(ⅲ) If a feature coordinate setting command is issued when there is a shift in the local
3 coordinate system (G52), the alarm <<Feature coordinate command error>> is
triggered.
(ⅳ) The feature coordinate setting command can only be executed in memory operation
mode. <<Specified G code cannot be used>> is triggered when an attempt to issue a
command is made in MDI mode.
MDI intervention is not possible while in feature coordinate manufacturing mode.
The alarm <<Feature coordinate manufacturing mode engaged>> is triggered when
an attempt is made to change the mode.
(ⅴ) A feature coordinate setting command cannot be issued in an interrupt program. The
alarm <<Feature coordinate command error>> is triggered.
Interrupt type macro cannot be executed while in feature coordinate manufacturing
mode. The alarm <<Feature coordinate manufacturing mode engaged>> is triggered.
(ⅵ) A command or operation that requires additional axis travel cannot be executed
while in feature coordinate manufacturing mode. The alarm <<Feature coordinate
manufacturing mode engaged>> is triggered.
(ⅶ) A feature coordinate setting command can only be executed when XY plane is
selected (G17 modal). When a command is issued in another plane besides the XY
plane (G18 and G19), the alarm <<Selected plane error>> is triggered.
While in feature coordinate manufacturing mode, the alarm <<Feature coordinate
manufacturing mode engaged>> is triggered when an attempt is made to issue a
plane selection command to change to another plane besides the XY plane (G18 and
G19 modal).

2. Feature coordinate manufacturing mode cancel command (G69)


Feature coordinate manufacturing mode is cancelled.

Command format G69;

The axis does not travel with this command, it only cancels the feature coordinate
manufacturing mode.
When a modal is enabled for tool length offset, tool position compensation, cutter compensation
and canned cycle after the feature coordinate setting, cancel it before this command. The alarm
<<Feature coordinate command error>> is triggered if the feature coordinate manufacturing
mode is cancelled before cancelling the above modals.

The feature coordinate manufacturing mode is cancelled by resetting operation with M02/M30.

3. Feature coordinate index command (G53.1)


The additional axis rotates to index the tilt plane so that the Z-axis + direction in the feature
coordinate system, set by the feature coordinate setting command, is in line with the tool axis
direction.

Command format G53.1;

Use this command individually.


When another GM code command is issued on the same block, the alarm <<Invalid
command>> is triggered.

2019/09/02 3 - 44 eCOM3NCPR3
Chapter 3 Preparation Function

However, this excludes when issuing a simultaneous command with G100/M6, which will be
described later.

The additional axis may rotate too much.


Issue a command beforehand to ensure the tool is in a safe position so that the tool and the
workpiece do not collide.

Issue a feature coordinate index command while in feature coordinate manufacturing mode.
The alarm <<Feature coordinate command error>> is triggered when an attempt is made to
issue a feature coordinate index command in a mode other than feature coordinate
manufacturing mode.

The additional axis travel is for a positioning operation that does not rely on the modal.

(1) Simultaneous command with the canned cycle (G100/M6) for tool change
The feature coordinate index command (G53.1) can be issued only on the same block as
3
the canned cycle (G100/M6) for tool change.

Issue a command with the coordinate values in the feature coordinate system for the X, Y
and Z coordinates in G100/M6.
Do not issue a travel command on the additional axis. The alarm <<Feature coordinate
manufacturing mode engaged>> is triggered.

(2) How the travel angle on the additional axis is established


There are normally 2 sets of angles within the 0° to 360° range for the combination of the
tilt axis and rotation axis angles when moving the additional axis during the feature
coordinate index. When there are two or more sets of angle combinations, which also
include angles of integral multiples of 360°, the angle to move the axis is determined by
the following methods.

(i) Travel amount of tilt axis is a small angle.


(ⅱ) Travel amount of rotation axis is a small angle when the travel amount in the
positive and negative directions is the same for (i).
(ⅲ) Angle of the tilt axis’ travel destination is an angle close to a multiple of 360° when
the set of angles is not decided by (i) or (ii).
(ⅳ) Angle of the rotation axis’ travel destination is an angle close to a multiple of 360°
when the set of angles is not decided by (i), (ii) or (iii).
(ⅴ) Angle where the tilt axis travels in a positive direction when the set of angles is not
decided by (i), (ii), (iii) or (iv).

A short cut is taken when traveling to the established angle. A positive direction is taken
when traveling if the travel amount in the positive and negative directions is the same.

When there is an axis that is set as a tilt axis or rotation axis and the user parameter (switch
2) <*-axis stroke control> is set to <1: Yes>, select an angle within the stroke range. In
addition, select an angle where the axis can travel within the stroke range. The alarm
<<Feature coordinate command error>> is triggered when an angle cannot be found for
the axis to travel. The angle is established using the method above when there are still two
or more sets of angles.

Ex: Angle calculated from command is (tilt axis, rotation axis) = (54.7356, 45)(-54.7356,
135)

Case 1
Tilt axis with stroke between -95 and +5, rotation axis without stroke
Current position (tilt axis, rotation axis) = (30, 0)

Select “-54.7356” where the tilt axis is within the stroke range.
Set of angles (-54.7356, 135) is used because there is no stroke for the rotation axis.

2019/09/02 3 - 45 eCOM3NCPR3
Chapter 3 Preparation Function

Case 2
Tilt axis with stroke between -60 and +60, rotation axis with stroke between 0 and 180
Current position (tilt axis, rotation axis) = (30, 0)

Both tilt axis and rotation axis are within the stroke range.
The set of angles (54.7356, 45) is used because there is little travel from the current
position of the tilt axis.

Case 3
Tilt axis with stroke between -800 and +800, rotation axis without stroke
Current position (tilt axis, rotation axis) = (350, 0)

Both tilt axis and rotation axis are within the stroke range.
The travel amount of the tilt axis is 350 - 54.7356 = 295.2644 and 350 - (-54.7356) =
3 404.7356, and “54.7356” has less travel. However, “350” is the same position as “-10.”
The actual travel amount is (-10) - 54.7356 = -64.7256 and (-10) - (-54.7356) = 44.7356.
“-54.7356” has less travel so the set of angles (-54.7356, 135) is used.

Case 4
Tilt axis with stroke between -60 and +210, rotation axis without stroke
Current position (tilt axis, rotation axis) = (205, 0)

Both tilt axis and rotation axis are within the stroke range.
The shorter travel from the current position on the tilt axis is “305.2644”, the same
position as “-54.7356”. However, the travel goes outside of the stroke range, and
therefore, the set of angles (54.7356, 45) is used.

Case 5
Tilt axis with stroke between -30 and +120, rotation axis with stroke between -30 and
+120
Current position (tilt axis, rotation axis) = (30, 0)

Select “-54.7356” where the tilt axis is within the stroke range.
The alarm <<Feature coordinate command error>> is triggered because the “135” that
makes the pair is outside of the rotation axis stroke range and there is no other set of
angles that can be used.

2019/09/02 3 - 46 eCOM3NCPR3
Chapter 3 Preparation Function

3.7.8.3 Restrictions
1. Simultaneous use with other functions
• A setting command for the feature coordinate system is not possible when the cutter
compensation is ON. The alarm <<Feature coordinate command error>> is triggered.
• Rotational transformation, rotary fixture offset, scaling and mirror image commands are not
possible while in feature coordinate manufacturing mode. The alarm <<Feature coordinate
manufacturing mode engaged>> is triggered.
• After the feature coordinate setting, the following commands cannot be used before the
feature coordinate index. The alarm <<Feature coordinate manufacturing mode engaged>>
is triggered.

- Cutter compensation
- Canned cycle
- Corner R
- Circular interpolation, helical thread cutting interpolation 3
- Circular cutting
- Involute interpolation

Refer to “3.16 G Code Priority” for further details.

2. When lathe spindle is selected


The feature coordinate setting command cannot be issued when the lathe spindle is (M142
modal in progress) selected.
The alarm <<A command unable to select the lathe spindle>> is triggered.
In addition, if the detection signal is ON when travel starts, it does not operate.
After changing from the lathe spindle (M142) to the spindle (M141), the feature coordinate
setting command cannot be issued even when the following commands are issued to the
additional axis that is assigned as the lathe spindle. The alarm << Feature coordinate command
error >> is triggered.
- Axis travel command for G90 modal
- Reference position return command (G28, G30) when there is no travel to the middle position
The alarm <<Feature coordinate manufacturing mode engaged>> is triggered when the lathe
spindle (M142) is selected after the feature coordinate setting.

3. Special notes
This function is a coordinate conversion function and does not offer compensation for indexing
accuracy that is specific to each machine.

2019/09/02 3 - 47 eCOM3NCPR3
Chapter 3 Preparation Function

3.8 Soft Limit


Tool operation range is set by software.
Tool operation range is specified by one of the three methods below.

1. Set strokes by machine parameters.


2. Set stroke limit by user parameters.
3. Set programmable stroke limit by G22 code

3.8.1 Stroke
The maximum stroke of the machine has been set at the factory using <Stroke 1X to Z axis (+/-)> of
<Machine Parameters>. Do not change it.
+Z
+Z
3
Y axis stroke Z軸原点of Z axis
Position
Y軸ストローク origin dimension
寸法位置

Z軸ストローク
Z axis stroke 動作可能領域
Operation range

-X
-X Machine origin
機械原点
(0,0,0)
(0, 0, 0)

X軸ストローク
X axis stroke

-Y
-Y

(Note) Z axis origin dimension is set by <Distance to Z-axis zero> of <Machine


Parameters>.

3.8.2 Stroke Limit


<Stroke limit 1X to Z axis (+/-)> of <User Parameters> is used to set operation range for X, Y, and Z
axis, respectively.

2019/09/02 3 - 48 eCOM3NCPR3
Chapter 3 Preparation Function

3.8.3 Programmable Stroke Limit (G22)


Tool operation range is commanded by program.

Command format G22 X_ Y_ Z_ I_ J_ K_;

X : Programmable stroke limit for X axis in + direction


Y : Programmable stroke limit for Y axis in + direction
Z : Programmable stroke limit for Z axis in + direction
I : Programmable stroke limit for X axis in - direction
J : Programmable stroke limit for Y axis in - direction
K : Programmable stroke limit for Z axis in - direction

These are commanded by coordinate values of the machine coordinate system.


Absolute values are used irrespective of G90 and G91.
3
(X, Y, Z)
+Z

Tool operation range


-X

Movable area
-Y
(I, J, K)

(Note 1) Selection criterion for using stroke or programmable stroke as soft limit
on the program:
G22 - - - - Check using programmable stroke limit as soft limit
G23 - - - - Check using stroke as soft limit

(Note 2) Stroke limit of User Parameters is effective immediately after starting up


the machine. Then, change of User Parameters and commanding by G22,
whichever takes place later, is effective.
Stroke limit of User Parameters is recognized as command value for those
axes that are not specified by G22. When you change the stroke limit of
User Parameters, however, the User Parameters’ value applies to all axes
including those that are not changed.

(Note 3) Stroke by machine parametes is always effective.

2019/09/02 3 - 49 eCOM3NCPR3
Chapter 3 Preparation Function

3.9 Reference Position (G28 to G30)


3.9.1 Return to the Reference Point (G28)
Command format G28 X_ Y_ Z_ A_ B_ C_;

The axis returns to the reference point via an intermediate point.


X_Y_Z_A_B_C is a travel command to intermediate points, given in absolute (G90) or incremental
(G91) values.
Coordinates of the intermiciate point for the axis commaned in this block are momorized.
The axis goes to the intermediate point by rapid feed, and then moves to the reference point also by
rapid feed.

3 (Note 1) Intermediate point coordinates are memorized for only the axis for which
travel is specified in the G28 block.
For the axes not specified in the G28 block, G28 intermediate point
coordinates defined previously will be used as they are.
(Note 2) Reference points are set by <Reference Points X to Z / Axes 4 to 8> of
<User Parameters>.
(Note 3) Travel to intermediate and reference point is a positioning operation. No
interpolation is performed.
(Note 4) The tool stops at the intermediate point in a single block operation.
(Note 5) Coordinate values of intermediate points are memorized in absolute
values of workpiece coordinate system. When workpiece coordinate
system is changed after commanding a G28, the intermediate point also
moves to the new workpiece coordinate system.
(Note 6) An alarm occurs when an additional axis is commanded in the absence of
the optional additional axis.
(Note 7) When a command is issued during the tool length offset, the tool length
offset stays enabled while traveling to the middle point. When travelling to
the reference position, the tool length offset is cancelled temporarily. The
same also applies during tool position compensation.

3.9.2 Return from the Reference Point (G29)


Command format G29 X_ Y_ Z_ A_ B_ C_;

Axes move to the specified position via intermedaite point. In the case of incremental commands,
motion from the intermediate point is given in an incremental value. The specified axis goes to the
intermediate point by rapid feed and then to the final position.

(Note 1) Travel to intermediate and reference point is a positioning operation. No


interpolation is performed.
(Note 2) Axes pass the intermediate point commanded by G28 or G30 whichever is
the later.
(Note 3) The tool stops at the intermediate point in a single block operation.
(Note 4) For the axes which intermediate point is not memorized by G28 or G30, the
current position is used as the intermediate point.
(Note 5) An alarm occurs when an additional axis is commanded in the absence of
the optional additional axis.

2019/09/02 3 - 50 eCOM3NCPR3
Chapter 3 Preparation Function

3.9.3 Return to the 2nd to 6th Reference Point (G30)

Command format G30 P_ X_ Y_ Z_ A_ B_ C_;

P2 : Return to the 2nd reference point


P3 : Return to the 3rd reference point
P4 : Return to the 4th reference point
P5 : Return to the 5th reference point
P6 : Return to the 6th reference point

G30 is the same as G28 except that the axes return to the 2nd through 6th reference points.
You can use G29 for G30 in the same way as you use it for G28.
3
(Note 1) The 2nd through 6th rreference points are set by <2nd through 6th
Reference Points X through Z / Axes 4 through 8> of <User Parameters>.
(Note 2) Omit P_, and return to the 2nd reference point is selected.
(Note 3) An alarm occurs when an additional axis is commanded in the absence of
the optional additional axis.

2019/09/02 3 - 51 eCOM3NCPR3
Chapter 3 Preparation Function

3.10 Skip Function (G31, G131/G132)


3.10.1 Before using the skip function
Set the following item in the “User parameter (switch 1)”.
Item name Setting range Description
Probe 0: Method 1 Set the accuracy of the detection signal that is obtained from the
detection 1: Method 2 touch probe. Even if the <1: Method 2> increases the travel
signal method speed of the probe more than <0: Method 1>, there is less
variation in the measurement values. As a result, the speed can
be set higher than <Automatic centering speed 2> and
<Measurement speed 2>. However, <1: Method 2> cannot be set
due to the machine structure, and an alarm is triggered.

3.10.2 Skip Function (G31, G131/G132)


3 The tool moves linearly (linear interpolation) at the specified feed rate from the current position to
the target position or until the detection signal turns ON.

Command format G31 X_ Y_ Z_ F_;


G131 X_ Y_ Z_ F_;
G132 X_ Y_ Z_ F_;

Up to three linear axes (X,Y,Z) can be controlled simultaneously.


The feedrate is set by address F. Once the feed rate is commanded, it is effective until another value
is specified.

For G131, the <<SENSOR SIGNAL OFF>> alarm occurs when the tool has moved to the target
position without the detection signal turning ON. For G31, G132, an alarm does not occur.

When using G31, after the detection signal turns ON, it decelerates and then stops. When using
G131/G132, after the detection signal turns ON, it decelerates and stops. Then, it returns back to the
same coordinate where the detection signal turned ON.

As the coordinate value when detective signal turns ON is stored in system variables (#5061 ~
#5068, #5071 ~ #5074) of the macro, it can be used in the macro.
In feature coordinate manufacturing mode, the coordinates in the feature coordinate system are
stored in the system variables: #5161 to #5168 and #5171 to #5174.

(Note 1) The alarm <<Compensating diameter>> is triggered when cutter


compensation mode is enabled.
(Note 2) The tool does not move during a dry run state.
(Note 3) The tool moves to the target position during a machine lock state.
(Note 4) When the detection signal is already ON, the operation is not performed.
(Note 5) The appropriate feedrate varies depending on the probe being used.
Therefore, contact the probe manufacturer when deciding on the rate.
(Note 6) The “Coordinate when the detection signal turns ON” is acquired by this
function, and the true value varies depending on factors such as the delay
that is unique to the probe. Therefore, contact the probe manufacturer and
adjust it accordingly.
(Note 7) Make sure that no chips or shavings are stuck to the end of the
measurement probe or on the measurement surface. In addition, make
sure that there is no disturbance (caused by vibrations from outside of the
machine) that adversely affects the machine. We cannot guarantee the
measurement accuracy when there are chips or other factors that can
cause inaccuracy.
(Note 8) While in the inverse time feed (G93) modal, the alarm <<Command not
possible during inverse time feed>> is triggered.

2019/09/02 3 - 52 eCOM3NCPR3
Chapter 3 Preparation Function

3.10.3 Continuous Skip Function (G31)


The tool moves linearly (linear interpolation) at the specified feedrate from the current position to
the target position. If the detection signal turns ON in the meantime, the coordinate value when the
detective signal turns ON is stored in the system variables (#5061~#5068, #5071~#5074) of macro.
In feature coordinate manufacturing mode, the coordinates in the feature coordinate system are
stored in the system variables: #5161 to #5168 and #5171 to #5174.

Command format G31 P90 X_ F_;


G31 P90 Y_ F_;
G31 P90 Z_ F_;

(Note 1) The alarm <<Compensating diameter>> is triggered when cutter


compensation mode is enabled. 3
(Note 2) The tool does not move during a dry run state.
(Note 3) The tool moves to the target position during a machine lock state.
(Note 4) The appropriate feedrate varies depending on the probe being used.
Therefore, contact the probe manufacturer when deciding on the rate.
(Note 5) The “Coordinate when the detection signal turns ON” is acquired by this
function, and the true value varies depending on factors such as the delay
that is unique to the probe. Therefore, contact the probe manufacturer and
adjust it accordingly.
(Note 6) Make sure that no chips or shavings are stuck to the end of the
measurement probe or on the measurement surface. In addition, make
sure that there is no disturbance (caused by vibrations from outside of the
machine) that adversely affects the machine. We cannot guarantee the
measurement accuracy when there are chips or other factors that can
cause inaccuracy.
(Note 7) While in the inverse time feed (G93) modal, the alarm <<Command not
possible during inverse time feed>> is triggered.

2019/09/02 3 - 53 eCOM3NCPR3
Chapter 3 Preparation Function

3.11 Scaling (G50/G51)


The programmed shape can be enlarged or reduced by the desired scaling factor. Scaling is possible
using the same ratio for all axes or a different ratio for each axis.

Scaling using the same ratio for all axes:

Command format G51 X_ Y_ Z_ P_;

X, Y, Z : Scaling center coordinate axes (workpiece coordinates)


P : Scaling factor

Y
P4
3 P4’ P3’
P3 Same factor scaling
P0: Scaling center
P1P2P3P4 → P1’P2’P3’P4’

P0

P1’ P2’

P1 P2
X

Scaling using a different ratio for each axis

Command format G51 X_ Y_ Z_ I_ J_ K_;

X, Y, Z : Scaling center coordinate axes (workpiece coordinates)


I, J, K : Scaling factors for X, Y, Z axes

Y axis

Individual scaling of axes


Machining
a/b: Scaling factor for X axis
program
c/d: Scaling factor for Y axis
shape
O: Scaling center
d

Shape after
c scaling
O
X axis

Scaling cancel:

Command format G50;

The following user parameters are used in scaling:


1. Scaling factor (same or individual scaling of axes) is specified by <Scaling>.
2. Set value of <Scaling Factor> is used when the scaling factor command (P or IJK) is omitted.
3. Scaling factor is set in the unit of 0.001 or 0.00001 according to the Unit of Scaling Factor.
The range of scaling factor command (P or IJK) or scaling factor parameters is ±1 to ±999999.
Accordingly, the valid scaling range is ±0.001 to ±999.999 or ±0.00001 to ±9.99999.

2019/09/02 3 - 54 eCOM3NCPR3
Chapter 3 Preparation Function

Precautions for use of scaling function:


(Note 1) Do not use other GM codes in a bloc. The alarm <<Invalid Command>> will
occur.
(Note 2) When scaling center coordinates (XYZ) is omitted, tool position at G51
command is used as the center coordinates.
(Note 3) Scaling ON (G51) and Scaling OFF (G50) do not entail axis motion.
(Note 4) Setting a different scaling ratio for each axis in circular interpolation mode
does not result in elliptical interpolation.
(Note 5) When a different scaling ratio is set for each axis and radius R of the arc is
specified in circular interpolation, the diameter will be related to the axis of
the greater scaling factor on the plane where the arc lies.
Ex) Arc using command "R": The left and right command formats are
equivalent.
G90 G00 X0.Y100.; G90 G00 X0.Y100.;
G51 X0.Y0.Z0.I2000J1000;
G02 X100.Y0.R100.F500;
=
G02 X200.Y0.R200.F500;
3
(Note 6) When a different scaling ratio is set for each axis and the center (I, J) of the
arc is specified in circular interpolation mode, the distance from the start
point to the center (I, J) is not subject to scaling.
Ex) Arc using commands "I" "J": The left and right command formats are
equivalent.
G90 G00 X0.Y100.; G90 G00 X0.Y100.;
G51 X0.Y0.I2000J1000; =
G02 100.Y0.I0.J-100.F500; G02 X200.Y0.I0.J-100.F500;
(Note 7) When scaling is invalid
The scaling command does not affect the following items:
1. Cutter compensation during the scaling setting operation, tool length
offset, nose R compensation and tool offset for the tool position
compensation
2. Additional axis
3. Travel amounts in manual intervention
4. The following motion in canned cycle:
• infeed amount "Q" and relief amount "d" of deep hole cycle (G83,
G73, G173, G183)
• XY-axes shift "Q" of fine balling (G76) and back balling (G87).
The alarm <<Scaling>> occurs when a canned cycle is executed
with Z axis specified for scaling.
(Note 8) Traveling axes when performing scaling or programmable mirror image:
Irrelevant axes may move during scaling and programmable mirror
imaging depending on which axes and/or coordinates are commanded. If
this occurs, operation may stop due to lock signal check of non-specified
axes or Z axis may move due to automatic triggering of dry run offset. An
alarm can also occur due to restriction of commandable axis.
(Note 9) Cases when an alarm will occur:
1. The alarm <<Scaling>> occurs when the following instructions are
given during scaling setting:
• Reference-related commands (G28 to G30) are specified
• When a coordinate change command (G10L2/20/98/99, G22 to G23,
G52 to G59, G92 and external workpiece coordinate system shift) is
specified
• Single direction positioning (G60) is specified
• Auto workpiece measurement commands (G120 to G129) are
specified
• When a tool change, XZ or YZ arc (G102/103, 202/203), circular
cutting spiral interpolation, conical interpolation or involute
interpolation (G02.2/G03.2) command is carried out
• Corner C, R is specified
• Circle cutting (G12, 13) is specified
• A canned cycle is specified during setting of Z axis scaling
• When a thread cutting (G33, G392 and G376) command is issued
• When a feature coordinate setting command (G68.2) is issued

2019/09/02 3 - 55 eCOM3NCPR3
Chapter 3 Preparation Function

2. The alarm <<Scaling Address Error>> occurs when scaling is


commanded to the axis which has been set to <0: Scaling Invalid> in
<X/Y/Z axes Scaling> of User parameter (Switch 1).
3. The alarm <<Feed Rate Error>> occurs when a dry run is specified
immediately before activation of circular interpolation command where
X-Y axes travel amount becomes zero in the G17 modal mode due to
scaling.
4. The alarm <<Specified G Code Cannot Be Used>> occurs when scaling
is specified in MDI operation.
5. The alarm <<Feature coordinate manufacturing mode engaged>> is
triggered when a scaling command is issued while in feature
coordinate manufacturing mode (G68.2 modal in progress).
(Note 10) Scaling is cancelled when M02 or M30 is used or operation is reset.
(Note 11) Scaling is executed in the order of mirror, scaling, and coordinate rotation.
3 Therefore, specify them in the order to designate them in a program. To
cancel scaling, specify them in the reverse order. If the order is incorrect,
the alarm <<scaling>> or <<During coordinate rotation>> occurs.
(Note 12) When scaling while in the inverse time feed (G93) modal, the feedrate is
calculated based on the travel distance before scaling.

Program example of mirror image using scaling function:


When a negative number is specified for the scaling factor, programmable mirror image is applied.
When a negative value is specified for the scaling factor and there is only one scaling axis, CW and
CCW of circular travel will be reversed.
Program
Y O9000;
G00G90X60.Y60.;
90 (7) (3)
G01X90.F100;
G01Y90.;
(6) (2) G03X60.Y60.R30.;
M99;
(5) (4) (1)
60
(8) Main program
50 N10 G00G90;
(9) (13) N20 M98P9000;
40 N30 G51X50.Y50.I-1000J1000;
(12)
(10) (14) N40 M98P9000;
N50 G51X50.Y50.I-1000J-1000;
(11) (15) N60 M98P9000;
10 N70 G51X50.Y50.I1000J-1000;
N80 M98P9000;
X N90 G50;
10 40 50 60 90

Do not use the first feed rate command for circular interpolation or helical screw cut interpolation
(G02, G03), after commanded by mirror image of scaling, When use it, positioning error occurred
between start point, end point and center point that cause of distortion in the circular arc.

Mirror image is applied to scaling center coordinates and programmed path while the mirror image
(G51.1) is valid.

2019/09/02 3 - 56 eCOM3NCPR3
Chapter 3 Preparation Function

3.12 Programmable Mirror Image (G50.1/51.1)


Mirror image is applied to the program commands for the axes specified in the program.

Mirror image

Command format G51.1 X_ Y_ Z_;

Mirror image cancel

Command format G50.1 X_ Y_ Z_;

Mirror image setting can be applied simultaneously for the 1st to 3rd axes.
Set the mirror image axis in workpiece coordinates.
Set the mirror image axis. Omit this for axes about which a mirror image is not created.
3
Using G50.1 command is valid while setting a mirror image.
Coordinate values are arbitrarily set.

(Note 1) Using G51.1 command is valid while setting a mirror image. It is regarded
as an addition of mirror axes or a change of the mirror axis coordinates.
(Note 2) Mirror cancel command for the axes that are not mirror-designated will not
invoke an alarm.

An example of programmable mirror imaging

Axis of symmetry (X=50)


Y
(2)
100
(1)

60
50
Axis of symmetry
40 (Y=50)
(3) (4)

X
0 40 50 60 100

(1) Original program command


(2) Mirror axis is set for position X50.
(3) Mirror axis is set for position X50. Y50.
(4) Mirror axis is set for position Y50.

2019/09/02 3 - 57 eCOM3NCPR3
Chapter 3 Preparation Function

Precautions for use of programmable mirror image


(Note 1) When programmable mirror image is invalid:
1. The tool length offset and the tool position compensation do not apply
to the mirror setting compensation.
2. The spindle rotation direction does not change during mirror image
setting.
3. The thread cutting direction does not change during mirror image
setting.
4. Manual intervention allows the axis travel while ignoring the mirror
image setting. Note that, however, axis travel by manual intervention
during mirror imaging is applicable to mirror image-processed tool
path.
(Note 2) Traveling axes when performing scaling or programmable mirror image:
Irrelevant axes may move during scaling and programmable mirror
3 imaging depending on which axes and/or coordinates are commanded. If
this occurs, operation may stop due to lock signal check of non-specified
axes or Z axis may move due to automatic triggering of dry run offset. An
alarm can also occur due to restriction of commandable axes depending
on specifications.
(Note 3) Cases when an alarm will occur:
1. The alarm <<Mirror image mode>> occurs when the following
instructions are given during mirror setting:
• Reference-related commands (G28 to G30) are specified
• When a coordinate change command (G10L2/20/98/99, G22 to G23,
G52 to G59, G92 and external workpiece coordinate system shift) is
specified
• Single direction positioning (G60) is specified
• Auto workpiece measurement (G120 to G129, etc.) is specified
• Skip function (G31, G131, G132) is specified.
• When a tool change, XY or YZ arc (G102/103, G202/203), circular
cutting spiral interpolation, conical interpolation, involute
interpolation (G02.2/G03.2), circular cutting or coordinate
calculation command (G36 to G39) is carried out
• A canned cycle is specified during setting of Z axis mirror imaging
• When a thread cutting (G33, G392 and G376) command is issued
• When a feature coordinate setting command (G68.2) is issued
2. The alarm <<Scaling>> or Rotational Transformation Going On occurs
when mirror image commands (G50.1, G51.1) are specified during
scaling or coordinate rotation.
3. The alarm <<Specified G Code Cannot Be Used>> occurs when mirror
imaging is specified in MDI operation.
4. The alarm <<Feature coordinate manufacturing mode engaged>> is
triggered when a mirror command (G50.1, G51.1) is issued while in
feature coordinate manufacturing mode (G68.2 modal in progress).
(Note 4) Mirror image is cancelled when M02 or M30 is used or operation is reset.
(Note 5) Do not use a circular interpolation, an involute interpolation (G02.2/G03.2),
or a helical thread cutting interpolation (G02, G03) command for the first
travel command after a mirror image command. Positioning error will
occur among start point, end point, and center, resulting in distortion of
the arc.

2019/09/02 3 - 58 eCOM3NCPR3
Chapter 3 Preparation Function

Transformation of Programmable Mirror Image:


Coordinates are calculated according to the following sequence: mirror, scaling, and then rotational
transformation. Accordingly, set these in this order in a program. Set these in the reverse order to
cancel previous settings. The alarm <<Scaling>> or Rotational Transformation Going On occurs if
this order is not observed.
When mirror image is set for only one axis on the selected plane, change the following commands:
Circular interpolation : Rotation direction
Tool dia. Offset : Compensation direction
Nose R compensation : Compensation direction
Coordinate rotation function : Rotation direction
Circle cutting : Rotation direction
While the mirror image function is enabled, the stroke limit is checked using the coordinates after
the mirror image is created.
The axis does not travel while setting or canceling a mirror image.
3

2019/09/02 3 - 59 eCOM3NCPR3
Chapter 3 Preparation Function

3.13 Rotational Transformation Function


(G68/69, 168)
3.13.1 Coordinate Rotation (G68/69)
The shape specified in the program is rotated.

Coordinate rotation function

G17
Command format G18 G68 α_β_R_;
G19

Coordinate rotation function cancel


3 Command format G69;

α, β : Rotation center coordinates


Recognize coordinates consistently that commanded absolute value.
When omit it, position G69 to G68 is a center.
R : Rotation angle (based on CCW))
Selectable between -360.000 and 360.0000.
Command "R" cannot be omitted. The alarm <<Invalid data>> occurs.

Y
After rotation

Angle of rotation

Center of rotation Before rotation


X

Plane section command can be omitted. The plane currently selected is valid when it is omitted.
Relationship between selected plane and αβ.
Selected plane α β
G17 X Y
G18 Z X
G19 Y Z

The rotation angle in incremental programming mode is determined in reference to the angle after
the previous rotational transformation, and in reference to the α axis when it is the first rotational
transformation.

Precautions for using coordinate rotation:


(Note 1) When the center coordinates are omitted for rotational transformation, the
coordinates of the spindle’s current position are regarded as the rotation
center coordinates.
(Note 2) The rotation angle of the rotational transformation is not subject to
scaling.
(Note 3) When the rotational transformation command is used while the mirror
image and scaling functions are valid, calculation is performed according
to the following sequence:
1. Change of rotational transformation center coordinates due to mirror
image function
2. Change of rotation angle direction for rotational transformation when
there is only one mirror axis
3. Rewrite of center coordinates of coordinate rotation by scaling

2019/09/02 3 - 60 eCOM3NCPR3
Chapter 3 Preparation Function

(Note 4) Cases when an alarm will occur


1. The alarm <<During Rotational Transformation>> occurs when the
following is performed during coordinate rotation:
• Reference point return-related commands (G28 to G30) are
specified
• Local coordinate setting (G52) or workpiece coordinate system
setting (G92) is specified
• Auto workpiece measurement commands (G131, G132, G120 to
G129) are specified
• Plane selection commands (G17, G18, G19) are specified
• Compensation commands for linear axes (X, Y, Z axes) and rotation
axes (A, B, C axes) are specified simultaneously
• When a thread cutting (G33, G392 and G376) command is issued
• When a feature coordinate setting command (G68.2) is issued
2. The alarm <<Selected Plane Error>> occurs when the selected plane
and the center axis of coordinate rotation are contradictory to each
3
other
3. The alarm <<Specified G Code Cannot Be Used>> occurs when
coordinate rotation is commanded in MDI operation
4. The alarm <<Feature coordinate manufacturing mode engaged>> is
triggered when a rotational transformation command is issued while in
feature coordinate manufacturing mode (G68.2 modal in progress).
(Note 5) Rotational transformation is cancelled when M02/M03 is used or operation
is reset.
(Note 6) Coordinates are calculated according to the following sequence: mirror,
scaling, and then rotational transformation. Set these in this order to write
a program. To cancel the previous setting, set these in reverse order. The
alarm <<Scaling>> or Rotational Transformation Going On occurs if this
order is not observed.

3.13.2 Coordinate Rotation Using Measured Results


(G168)
Command format G168 X_ Y_ Q_;

X, Y : Rotation center coordinate value


Q : Selects the desired measured result by setting "1" to "4".
When the selection is omitted, the setting is considered to be "1".

Recognize coordinates consistently that commanded absolute value.


When this setting is omitted, the position in which the block has shifted from G69 to G168 (or G68)
is considered the center.

The coordinate is rotated using the angle obtained from the measurement.
Other features are the same as those for the coordinate rotation function.
The shape specified in the program is rotated.

The rotation <angle> of the rotational transformation is not subject to scaling.

Rotational transformation is cancelled when M02 or M30 is used or operation is reset.

When the center coordinates are omitted for rotational transformation, the coordinates of the
spindle’s current position are regarded as the rotation center coordinates.

Rotational transformation may be commanded during a rotational transformation.

Coordinates are calculated according to the following sequence: mirror, scaling, and then rotational
transformation. Accordingly, set these in this order in a program. Set these in the reverse order to
cancel previous settings. An alarm will occur when the specified sequence is not followed.

2019/09/02 3 - 61 eCOM3NCPR3
Chapter 3 Preparation Function

3.14 Absolute Command and Incremental


Command (G90/91)
The axis movement amount can be specified by either the absolute command or the incremental
command.

1. Absolute command (G90)


G90 code specifies the end point of a block using coordinate values of the workpiece coordinate
system.

2. Incremental command (G91)


The axis movement amount can be specified by either the absolute command or the incremental
command.

3 • Absolute command
G90 X90 Y70;

• Incremental command
G91 X60 Y40;

End point
70

40

Start 60
point

X
( 0. 0) 30 90

3. Additional axis command


(1) Absolute command (Example: B axis)
• <Bth-axis stroke control> of <user parameter> is set to <1: Yes>, the B axis rotates to
the commanded angle.
• <Bth-axis stroke control> of <user parameter> is set to <0: No>, the B axis rotates in
the direction closer to the commanded angle.
When the turning angle is the same in either positive or negative direction (e.g., 180°),
the axis rotates toward positive.
• <Bth-axis stroke control> of <user parameter> is set to <0: No>, even a larger angle
than 360 degrees is commanded, this is handled within 360 degrees.

2019/09/02 3 - 62 eCOM3NCPR3
Chapter 3 Preparation Function

When B STROKE is set to 0: NO

B axis machine coordinates


270° 0° 90° 180° 270° 0° 90° 180° 270° 0° 90° 180°

B(-) B(+)

B axis absolute coordinates


180° 270° 0° 90° 180° 270° 0° 90° 180° 270° 0° 90°

B(-) B(+)
Ex.3 Ex.1

Ex.2

Ex. 1: Enter B 0.000 to rotate B axis 90 deg in negative direction


3
Ex. 2: Enter B 180.000 to rotate B axis 180 deg in positive direction.
Ex. 3: Enter B 0.000 to rotate B axis 90 deg in negative direction.

B axis machine origin

B axis machining origin


(set to 90 deg in this example)
B axis current position (angle) before travel

(2) Incremental command (Ex. B axis)


Regardless of the setting of <Bth-axis stroke control (1: Yes or 0: No)> of user parameter,
the axis rotates for the commanded angle.
However, <Bth-axis stroke control> of user parameter is set to <1: Yes>, STROKE OVER
or LIMIT OVER alarm may occur due to stroke and stroke limit control.

2019/09/02 3 - 63 eCOM3NCPR3
Chapter 3 Preparation Function

3.15 Change of Tap Twisting Direction (G133/134)


G133 I_
Command format Z_ S_;
G134 J_

Commanding G133 and G134 rotates the spindle clockwise and counterclockwise, respectively.

Z : Z axis target position


As specified by G90/G91.
I : Thread pitch
J : Number of threads
S : Spindle speed
3
The Z axis is moved synchronously with the spindle.

These are one shot G codes. Use G133/G134 codes each time even for continuous operation.

(Note 1) When the screw pitch is less than the <Minimum tapping pitch> in the
<Machine parameter>, the alarm <<Pitch data error>> is triggered.
(Note 2) A command to change the tap twist direction is not possible while in the
inverse time feed (G93) modal.
If a command is issued, the alarm <<Command not possible during
inverse time feed>> is triggered.

3.16 G code Priority


1 Executed correctly
2 Error
3 The last G command is effective
4 One-shot is executed and the modal is updated
5 G00 group is only modal updated
6 G00 group is executed and canned cycle is cancelled
7 G100 is executed and canned cycle is cancelled
8 An error occurs when the XY plane (G17) is not selected
9 An error occurs during coordinate rotation (G68, G168 modal)
10 An error occurs when Z-axis is mirror mod
11 An error occurs when the coordinate system used is changed
12 An error occurs during tool diameter offset (G41, G42 modal)
13 An error occurs during tool diameter offset (G41, G42 modal) and the selected plane is different
14 An error occurs other than during tool diameter offset (G41, G42 modal)
15 An error is triggered when switching between cutter compensation and nose R compensation,
except when the tool change command is issued on the same block.
16 An error is triggered when switching between cutter compensation and tool position
compensation, except when the tool change command is issued on the same block.
17 An error is triggered if the travel of X, Y or Z axis when tool length/tool position offset is
changed is set to “1: Type2”.
18 An error is triggered during tool position compensation (G143 and G144 modal).
19 Error when not using feed rate per rotation (G95)
20 Error when a G100 simultaneous command is not possible (due to priority position of G100)

2019/09/02 3 - 64 eCOM3NCPR3
Chapter 3 Preparation Function

■ When a command is given to the same block (modal - modal)


G2 G102 G41
Back G321
G0 G2 .2 G103 G33 G18 G42 G43 G143 G73 G94 G98
G17 G22 G23 G40 G49 G50 G51 G50.1 G51.1 G54 G54.1P G54.2 G61 G66 G67 G68 G168 G69 G68.2 G80 G90 G93 G96 G97 G322
Front G1 G3 G3.2 G202 G392 G19 G141 G44 G144 G83 G95 G99
G323
G203 G142
G0,G1 3 3 3 3 3 1 1 5 1 1 1 1 1 1 2 2 5 5 1 1 1 1 2 2 5 5 1 5 5 1 1 1 1 1 1 1 1
G2,G3 3 3 3 3 3 1 1 5 1 12 14 2 2 2 2 2 5 5 1 1 1 1 2 2 5 5 1 5 5 1 1 1 1 1 1 1 1
G2.2,G3.2 3 3 3 3 3 1 1 5 1 12 14 2 2 2 2 2 5 2 1 1 1 1 2 2 2 2 1 2 5 1 1 2 1 1 1 1 1
G102,G103
3 3 3 3 3 1 2 5 1 12 2 2 2 2 2 2 5 2 1 1 1 1 2 2 2 2 1 2 5 1 1 1 1 1 1 1 1
G202,G203
G33,G392 3 3 3 3 3 1 1 2 1 2 2 2 2 2 2 2 2 2 1 1 2 1 2 2 2 2 1 2 2 1 1 2 19 1 1 1 1
G17 1 1 1 1 1 3 3 2 1 13 2 1 1 1 2 2 2 2 1 1 1 1 2 2 9 9 1 1 1 1 1 1 1 1 1 1 1
G18,G19 1 1 1 2 1 3 3 2 1 13 2 1 1 1 2 2 2 2 1 1 1 1 2 2 9 2 1 1 2 1 1 1 1 1 1 1 1
G22 5 5 5 5 2 2 2 3 3 2 2 2 2 2 2 2 2 2 1 1 1 1 2 2 2 2 1 2 2 1 1 1 1 1 1 1 1
G23 1 1 1 1 1 1 1 3 3 2 2 2 2 2 2 2 2 2 1 1 1 1 2 2 2 2 1 2 2 1 1 1 1 1 1 1 1
G40 1 12 12 12 2 13 13 2 2 3 3 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 1 2 2 1 1 1 1 1 1 1 1
G41,G42
1 14 14 2 2 2 2 2 2 3 3 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1
G141,G142
G43,G44 1 2 2 2 2 1 1 2 2 1 1 3 3 3 2 2 2 2 1 1 1 1 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1
G143,G144 1 2 2 2 2 1 1 2 2 1 1 3 3 3 2 2 2 2 1 1 1 1 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1
G49 1 2 2 2 2 1 1 2 2 1 1 3 3 3 2 2 2 2 1 1 1 1 2 2 2 2 1 2 18 1 1 1 1 1 1 1 1
G50 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G51 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G50.1 5 5 5 5 2 2 2 2 2 2 2 2 2 2 2 2 3 3 2 2 2 1 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
G51.1 5 5 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 2 2 2 1 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1
G54 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 3 3 2 1 2 2 1 1 1 1 1 1 1 1 1 2 1 1 1
G54.1P 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 3 3 2 1 2 2 1 1 1 2 2 1 1 1 1 2 1 1 1
G54.2P 1 2 2 2 2 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 1 2 2 2 2 1 2 2 1 1 1 1 2 1 1 1
G61 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 3 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1
G66 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G67 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2
G68 5 5 2 2 2 9 9 2 2 2 2 2 2 2 2 2 2 2 1 1 2 1 2 2 3 3 3 2 2 1 1 1 1 1 1 1 1
G168 5 5 2 2 2 9 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 1 2 2 3 3 3 2 2 1 1 1 1 1 1 1 1
G69 1 1 1 1 1 1 1 1 1 1 2 2 2 1 2 2 2 2 1 1 1 1 2 2 3 3 3 3 1 1 1 1 1 1 1 1 1
G68.2 5 5 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 1 2 2 1 2 2 2 2 3 3 2 1 1 1 1 2 1 1 2
G73,G83 6 6 6 6 2 1 2 2 2 2 2 1 2 18 2 2 2 2 1 2 2 1 2 2 2 2 1 2 3 3 1 2 1 2 2 1 1
G80 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 1 1 1 1 2 2 1 1 1 1 3 3 1 1 1 1 1 1 1
G90 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 2 2 1 1 1 1 1 1 3 1 1 1 1 1 1
G94,G95 1 1 2 1 19 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 3 3 1 1 1 1
G93 1 1 1 1 2 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 2 2 1 1 1 1 2 1 1 3 3 2 1 1 1
G96 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 2 2 2 1 2 2 1 1 1 2 2 1 1 2 1 3 3 1 1
G97 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 2 2 1 1 1 1 2 1 1 1 1 3 3 1 1
G98,G99 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 3 1
G321,G322,
G323
1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 2 2 1 1 1 2 1 1 1 1 1 1 1 1 3

2019/09/02 3 - 65 eCOM3NCPR3
Chapter 3 Preparation Function

■ When a command is given to the same block (modal - one-shot)


Back
G4 G9 G10 G12 G28 G30 G31 G36 G52 G53 G53.1 G60 G65 G92 G100 G120 G121 G131 G133 G173 G210 G376
Front
G0,G1 4 1 4 4 4 4 4 4 4 1 20 4 2 4 4 4 4 4 4 5 2 5
G2,G3 4 1 4 4 4 4 4 2 4 1 2 4 2 4 4 4 2 4 4 5 2 5
G2.2,G3.2 4 1 4 2 4 4 4 2 4 1 2 4 2 4 4 4 2 4 4 5 2 5
G102,G103,
4 1 4 4 4 4 4 2 4 1 2 4 2 4 4 4 2 4 4 5 2 5
G202,G203
G33,G392 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G17 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 1 2 1 1 2 1
G18,G19 2 1 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 2 2 1
G22 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G23 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G40 2 1 2 2 2 2 2 2 2 1 20 2 2 2 1 2 2 2 2 2 2 2
G41,G42
2 1 2 2 2 2 2 2 2 1 2 2 2 2 8 2 2 2 2 2 2 2
G141,G142
G43,G44 2 1 2 2 1 1 1 1 2 17 20 1 2 2 1 1 1 1 2 1 2 2
G143,G144 2 1 2 2 1 1 1 2 2 17 20 1 2 2 1 1 2 1 2 2 2 2
G49 2 1 2 2 1 1 1 1 2 1 20 1 2 2 1 1 18 1 2 18 2 2
G50 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G51 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G50.1 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G51.1 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G54 1 1 1 1 1 1 1 2 1 4 2 1 2 1 1 1 1 1 1 1 2 1
G54.1P 2 1 2 1 2 2 2 2 1 4 2 1 2 1 1 1 1 1 1 2 2 2
G54.2P 2 1 2 2 2 2 2 2 2 2 2 1 2 2 1 2 2 2 2 2 2 2
G61 1 1 1 1 1 1 1 1 1 1 20 1 2 1 1 1 1 1 1 1 2 1
G66 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G67 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G68 2 1 2 1 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G168 2 1 2 1 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G69 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1
G68.2 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G73 2 1 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 3 2 2
G80 1 1 1 1 4 4 4 4 4 1 20 4 2 4 4 4 4 4 4 3 2 1
G90 1 1 1 1 1 1 1 1 1 1 20 1 2 1 1 1 1 1 1 1 2 1
G94,G95 1 1 1 1 1 1 1 1 1 1 20 1 2 1 1 1 1 1 1 1 2 19
G93 1 1 1 2 1 1 2 2 1 1 20 1 1 2 2 1 1 1 1 1 1 2
G96 2 1 2 2 1 2 2 2 1 1 20 1 2 1 1 1 2 2 2 2 2 2
G97 1 1 2 2 1 1 1 2 1 1 20 1 2 2 1 1 2 1 2 2 2 2
G98,G99 1 1 1 1 1 1 1 1 1 1 20 1 2 1 1 1 1 1 1 1 2 1
G321,G322,G323 1 1 1 1 1 1 1 1 1 1 20 1 2 1 1 1 1 1 1 1 2 1

2019/09/02 3 - 66 eCOM3NCPR3
Chapter 3 Preparation Function

■ When a command is given to the same block (one-shot - modal)


Back G2. G102 G41
G321
G0 G2 2 G103 G33 G18 G42 G43 G143 G94 G98
G17 G22 G23 G40 G49 G50 G51 G50.1 G51.1 G54 G54.1 G54.2 G61 G66 G67 G68 G168 G69 G68.2 G73 G80 G90 G93 G96 G97 G322
G1 G3 G3.2 G202 G392 G19 G141 G44 G144 G95 G99
Front G323
G203 G142
G4 4 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 1 2 2 2 2 1 2 2 1 1 1 1 2 1 1 1
G9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1
G10 4 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 1 2 2 2 2 1 2 2 1 1 1 1 2 2 1 1
G12 4 4 2 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 1 2 2 1 1 1 2 2 1 1 2 1 2 2 1 1
G28 4 4 4 4 2 2 2 2 2 2 2 1 1 1 2 2 2 2 1 2 2 1 2 2 2 2 1 2 2 4 1 1 1 1 1 1 1
G30 4 4 4 4 2 2 2 2 2 2 2 1 1 1 2 2 2 2 1 2 2 1 2 2 2 2 1 2 2 4 1 1 1 2 1 1 1
G31 4 4 4 4 2 2 2 2 2 2 2 1 1 1 2 2 2 2 1 2 2 1 2 2 2 2 1 2 2 4 1 2 1 2 1 1 1
G36 4 2 2 2 2 1 2 2 2 2 2 1 2 1 2 2 2 2 1 2 2 1 2 2 2 2 1 2 2 4 1 2 1 2 2 1 1
G52 4 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 1 2 2 2 2 1 2 2 4 1 1 1 1 1 1 1
G53 1 1 1 1 1 1 1 1 1 1 1 17 17 1 2 2 2 2 4 4 2 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1
G53.1 20 2 2 2 2 2 2 2 2 20 2 20 20 20 2 2 2 2 2 2 2 20 2 2 2 2 2 2 2 20 20 20 20 2 20 20 20
G60 4 4 4 4 2 1 1 2 2 2 2 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 1 2 1 4 1 1 1 1 1 1 1
G65 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G92 4 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 1 2 2 2 2 1 2 2 4 1 1 1 2 2 1 1
G100 4 4 4 4 2 2 2 2 2 1 8 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 1 2 2 4 1 1 1 1 1 1 1
G120 4 4 4 4 2 2 2 2 2 2 2 1 1 1 2 2 2 2 1 1 2 1 2 2 2 2 1 2 2 4 1 1 1 1 1 1 1
G121 4 2 2 2 2 1 2 2 2 2 2 1 2 18 2 2 2 2 1 1 2 1 2 2 2 2 1 2 2 4 1 2 1 2 2 1 1
G131 4 4 4 4 2 2 2 2 2 2 2 1 1 1 2 2 2 2 1 1 2 1 2 2 2 2 1 2 2 4 1 2 1 2 1 1 1
G133 4 4 4 4 2 1 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 1 2 2 2 2 1 2 2 4 1 2 1 2 2 1 1
G173 6 6 6 6 2 1 2 2 2 2 2 1 2 18 2 2 2 2 1 2 2 1 2 2 2 2 1 2 3 3 1 2 1 2 2 1 1
G210 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
G376 6 6 6 6 2 1 1 2 2 2 2 2 2 2 2 2 2 2 1 2 2 1 2 2 2 2 1 2 2 1 1 2 19 2 2 1 1

2019/09/02 3 - 67 eCOM3NCPR3
Chapter 3 Preparation Function

■ When a command is given to the same block (one-shot - one-shot)


G4 G9 G10 G12 G28 G30 G31 G36 G52 G53 G53.1 G60 G65 G92 G100 G120 G121 G131 G133 G173 G210 G376
G4 3 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G9 1 3 1 1 1 1 1 1 1 1 20 1 2 1 1 1 1 1 1 1 2 1
G10 2 1 3 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G12 2 1 2 3 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G28 2 1 2 2 3 3 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G30 2 1 2 2 3 3 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2
G31 2 1 2 2 2 2 3 2 2 1 2 2 2 2 2 2 2 3 2 2 2 2
G36 2 1 2 2 2 2 2 3 2 1 2 1 2 2 2 2 2 2 2 2 2 2
G52 2 1 2 2 2 2 2 2 3 1 2 2 2 2 2 2 2 2 2 2 2 2
G53 1 1 1 1 1 1 1 1 1 3 2 1 2 1 1 1 1 1 1 1 2 1
G53.1 2 20 2 2 2 2 2 2 2 2 3 2 2 2 1 2 2 2 2 2 2 2
G60 2 1 2 2 2 2 2 1 2 1 2 3 2 2 2 2 2 2 2 1 2 2
G65 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2
G92 2 1 2 2 2 2 2 2 2 1 2 2 2 3 2 2 2 2 2 2 2 2
G100 2 1 2 2 2 2 2 2 2 1 1 2 2 2 3 2 2 2 2 2 2 2
G120 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 3 2 2 2 2 2 2
G121 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 3 2 2 2 2 2
G131 2 1 2 2 2 2 3 2 2 1 2 2 2 2 2 2 2 3 2 2 2 2
G133 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 3 2 2 2
G173 2 1 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 3 2 2
G210 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2
G376 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 3

2019/09/02 3 - 68 eCOM3NCPR3
Chapter 3 Preparation Function

■ When a command is given during modal call


Modal G41
G68.2 G68.2 G321
G0 G2 G2.2 G33 G18 G42 G43 G143 G54.2P G54.2P G68 G73 G74 G94 G98
Comman G1 G3 G3.2 G392
G17
G19
G22 G23 G40
G141 G44 G144
G49 G50 G51 G50.1 G51.1 G54 G54.1
0 1
G61 G66 G67
G168
G69 Before After
G83 G84
G80 G90 G93
G95
G96 G97
G99
G322
d G53 G53.1 G323
G142
G0
G1 3 3 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 6 1 1 1 1 1 1 1 1
G2
G3 3 3 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 6 6 1 1 1 1 1 1 1 1
G2.2
G3.2 3 3 3 3 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 2 1 6 6 1 1 2 1 1 1 1 1
G102
G103
G202 3 3 3 3 1 2 1 1 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 2 2 6 6 1 1 1 1 1 1 1 1
G203
G33
G392 3 3 3 3 1 1 1 1 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 2 2 6 6 1 1 2 19 1 1 1 1
G17 1 1 1 1 3 3 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1
G18
G19 1 1 1 1 3 3 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 2 2 2 1 1 1 1 1 1 1 1
G22 1 1 1 1 1 1 3 3 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G23 1 1 1 1 1 1 3 3 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G40 1 1 1 2 1 1 1 1 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G41
G42
G141 1 1 1 2 1 1 1 1 3 15 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1
G142
G43
G44 1 1 2 2 1 1 1 1 1 1 16 16 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G143
G144 1 1 2 2 1 1 1 1 1 1 16 16 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1
G49 1 1 1 2 1 1 1 1 1 1 3 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G50 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 1 1 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1
G51 1 1 2 2 1 1 1 1 1 1 1 1 1 3 3 1 1 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1
G50.1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 3 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1
G51.1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 2 3 3 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1
G54 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 3 3 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1
G54.1P 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 3 3 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1
G54.2P0 1 1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 3 3 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1
G54.2P1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 3 3 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1
G61 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G66 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G67 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G68 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 3 3 2 2 1 1 1 1 1 1 1 1 1 1
G168 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 3 3 2 2 1 1 1 1 1 1 1 1 1 1
G69 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 1 1 1 1 1 1 1 1 1 1 1 1
G68.2 1 1 1 2 1 2 1 1 1 2 1 2 1 1 2 1 2 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1
G73
G83 1 1 1 2 1 2 1 1 1 2 1 2 1 1 1 1 10 1 1 1 1 1 1 1 1 1 2 1 3 3 3 1 2 1 1 1 1 1
G74
G84 1 1 1 2 1 2 1 1 1 2 1 2 1 1 1 1 10 1 1 1 1 1 1 1 1 1 2 1 3 3 3 1 2 1 2 1 1 1
G80 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 3 1 1 1 1 1 1 1
G90 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1
G93 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 3 3 2 1 1 1
G94
G95 1 1 1 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 1 1 1 1
G96 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 2 1 1 2 1 3 3 1 1
G97 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 1 1

2019/09/02 3 - 69 eCOM3NCPR3
Chapter 3 Preparation Function

Modal G41
G68.2 G68.2 G321
G0 G2 G2.2 G33 G18 G42 G43 G143 G54.2P G54.2P G68 G73 G74 G94 G98
Comman G1 G3 G3.2 G392
G17
G19
G22 G23 G40
G141 G44 G144
G49 G50 G51 G50.1 G51.1 G54 G54.1
0 1
G61 G66 G67
G168
G69 Before After
G83 G84
G80 G90 G93
G95
G96 G97
G99
G322
d G53 G53.1 G323
G142
G98 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1
G321,
G322, 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3
G323
G4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 1
G28 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1
G30 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1
G31 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 1 1 2 2 1 1 2 1 1 1 1 1
G36 1 2 2 2 1 2 1 1 1 2 1 2 1 1 2 1 2 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 2 1 1 1 1 1
G52 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1
G53 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G53.1 1 1 1 2 1 2 1 1 1 2 1 2 1 1 2 1 2 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1
G60 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G65 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G92 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1
G100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 7 7 1 1 1 1 1 1 1 1
G120 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1
G121 1 2 1 2 1 2 1 1 1 2 1 2 1 1 2 1 2 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 2 1 1 1 1 1
G131 1 1 2 1 1 1 1 1 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 1 1 2 2 1 1 2 1 1 1 1 1
G133 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1 1 10 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 2 1 2 1 1 1
G173 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1 1 10 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 1
G210 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
G376 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 2 2 1 1 1 1 2 19 1 1 1 1

2019/09/02 3 - 70 eCOM3NCPR3
Chapter 3 Preparation Function

3.17 Programmable Data Input (High Accuracy)


(G210)
3.17.1 High Accuracy Mode A Parameter Changes
Command format G210 L31 Pn I_ J_ K_ W_ Q_ X_ R_ B_;

n=1 : High accuracy mode A (Level 1) (M260)


n=2 : High accuracy mode A (Level 2) (M261)
n=3 : High accuracy mode A (Level 3) (M262)
n=4 : High accuracy mode A (Level 4) (M263)
n=5 : High accuracy mode A (Level 5) (M264)
n=6 : High accuracy mode A (Level 6) (M265)
n=7 : High accuracy mode A (Level 7) (M266)
3
n=8 : High accuracy mode A (Level 8) (M267)

I : Corner deceleration override (%)


J : Arc deceleration override (%)
K : Curve approximation deceleration override (%)
W : Smooth path offset level
Q : Smooth override (%)
X : Cutting feed time constant selection
R : Minute block deletion distance (mm) (inch)
B : Accuracy level (mm) (inch)

(Note 1) Refer to “Chapter 13 (1) High accuracy mode A III” for further details on
high accuracy mode A.
(Note 2) The set parameters can be cancelled using M30, reset or turning OFF the
power.
(Note 3) An alarm is triggered when L or P is omitted, or when only the L and P
commands are issued.
(Note 4) When another address is omitted, the current value for the omitted
parameter does not change.
(Note 5) The range that can be set for the numerical values of IJKWQXRB is the
same as the corresponding user parameter.
Refer to the “Chapter 2.5 User Parameter” in the Operation Manual (Data)
for further details.

2019/09/02 3 - 71 eCOM3NCPR3
Chapter 3 Preparation Function

3.17.2 High Accuracy Mode B Parameter Changes


Command format G210 L32 Pn I_ J_ K_ W_ Q_ R_ Y_;

n=1 : High accuracy mode B (Level 1) (M280)


n=2 : High accuracy mode B (Level 2) (M281)
n=3 : High accuracy mode B (Level 3) (M282)
n=4 : High accuracy mode B (Level 4) (M283)
n=5 : High accuracy mode B (Level 5) (M284)
n=6 : High accuracy mode B (Level 6) (M285)
n=7 : High accuracy mode B (Level 7) (M286)
n=8 : High accuracy mode B (Level 8) (M287)

3 I : Corner deceleration override (%)


J : Arc deceleration override (%)
K : Curve approximation deceleration override (%)
W : Smooth path offset level
Q : Smooth override (%)
R : Minute block deletion distance (mm) (inch)
Y : Smooth override type

(Note 1) The set parameters can be cancelled using M30, reset or turning OFF the
power.
(Note 2) An alarm is triggered when L or P is omitted, or when only the L and P
commands are issued.
(Note 3) When another address is omitted, the current value for the omitted
parameter does not change.
(Note 4) The range that can be set for the numerical values of JKWQRY is the same
as the corresponding user parameter.
Refer to the “Chapter 2.5 User Parameter” in the “Operation Manual
(Data)” for further details.

2019/09/02 3 - 72 eCOM3NCPR3
Chapter 3 Preparation Function

3.18 Thread Cutting


The thread cutting function is available when equipped with the lathe function.
A thread cutting command can be issued when using the feed rate per rotation (G95) modal. If
issuing a command using the feed rate per minute (G94) modal, the alarm <<Thread cutting
command not possible in feed rate per minute>> is triggered. In addition, if a command is issued
while in the inverse time feed (G93) modal, the alarm <<Command not possible during inverse time
feed>> is triggered.

3.18.1 Single Start Lead Thread Cutting (G33)


Cutting the lead for the thread on a single start screw and taper screw is possible.

Lead
Lead
3
Z

Lead Lead

Straight screw Taper screw

Command format When cutting a straight screw


X_
G33 Y_ F_ Q_
Z_

When cutting a taper screw


X_Y_
G33 X_Z_ F_ Q_
Y_Z_

X, Y, Z : Screw end point (mm) (inch)


F : Screw lead (mm) (inch)
The command range depends on the user parameter (switch 1) <Machine unit
system>.
Metric: 0.0001 to 999.9999 (mm)
Inch: 0.00001 to 99.99999 (inch)
Q : Start angle for thread cutting (0.000° to 360.000°)
If this is omitted, the default is 0 degrees.

The value for the command at address F is also reflected in the F code modal.
When cutting a taper screw, address F issues a command for the lead on the long axis direction.

When specifying the start angle on the spindle for thread cutting or when machining multiple start
screws, address Q issues a command per block.

2019/09/02 3 - 73 eCOM3NCPR3
Chapter 3 Preparation Function

Z-axis Start point

Taper screw section


a

End point

Y-axis

When a < 45º → The lead is direction of the Z-axis.


3 When a > 45º → The lead is direction of the Y-axis.
When a = 45º → The lead can either be the direction of the Y- or Z-axis.

(Note 1) During a single block operation, it stops after the first block is executed
that is not a thread cutting block (after thread cutting).
(Note 2) When a command is issued while the lathe spindle is not rotating, a
<<Feedrate error>> is triggered.
(Note 3) During thread cutting, the SPINDLE OVERRIDE and FEEDRATE
OVERRIDE are disabled, and the setting is fixed at 100%.
(Note 4) During thread cutting as well, the constant peripheral speed control is
enabled. However, the correct thread lead may not be maintained if the
spindle speed is changed. When cutting a taper screw, do not use the
constant peripheral speed control.
(Note 5) When one of the following operations is performed or when a stop level 3
or 4 alarm is triggered during thread cutting, it stops after the first block is
executed that is not a thread cutting block (after thread cutting).
· [FEED HOLD] switch is pressed.
· [RST] key is pressed.
· [M.LCK] key is pressed.
· [SINGL] key is pressed.
· Mode is changed.
· [Mode of Safe Operation] switch setting is changed.
· [Service Mode] switch setting is changed.

2019/09/02 3 - 74 eCOM3NCPR3
Chapter 3 Preparation Function

3.18.2 Thread Cutting Cycle (G392)


The thread cutting cycle is a canned cycle that performs thread cutting for straight and taper screws.

3.18.2.1 Thread Cutting Cycle for Straight Screws

Command format X_ Y_
G392 X_ Z_ F_ Q_
Y_ Z_

X, Y, Z : Screw end point (mm) (inch)


F : Screw lead (mm) (inch)
Q : Start angle for thread cutting (0.000° to 360.000°)
3
Z-axis (1)
B A
User parameter
<Cutting angle in thread cutting cycle>

(2) (4)

C (3) D C T

User parameter
<Cutting amount in thread cutting cycle>

Y-axis

The thread cutting cycle for straight screws performs 4 operations.


(1) It travels using rapid feed from start point A to start point B for thread cutting.
The travel direction is set by the command axis address and lathe machining infeed direction.
Refer to “3.19 Lathe machining infeed direction” for further details.
(2) It travels using the cutting feed from start point B for thread cutting until the end point for thread
cutting. While the M323 modal is in progress, it starts the finishing operation on the screw
according to the value set in the user parameter (switch 1) <Finishing amount in thread cutting
cycle>, the amount from point S to point C. The finishing angle is the value that is set in the user
parameter (switch 1) <Finishing angle in thread cutting cycle>.
The speed for the infeed direction during finishing is calculated as shown below. When the
speed of the infeed direction exceeds the machine parameter (system 1) <Max. cutting feedrate>,
the speed of the infeed is controlled or limited by the maximum cutting feedrate. However, the
finishing angle is the same angle as specified in the parameter.
V = F × S × tan(a)
V: Infeed direction speed (mm/min)
F: Screw lead (mm)
S: Spindle speed (min-1)
a: User parameter (switch 1) <Cutting angle in thread cutting cycle>
(3) It travels using rapid feed from point C (M323 modal in progress at point T) until point D.
(4) It travels using rapid feed from point D until start point A.

(Note 1) During a single block operation, operations (1), (2), (3) and (4) are
performed all at once.
(Note 2) When the travel distance between C and D is 0, the alarm <<No relief
amount>> is triggered before starting operation (1).

2019/09/02 3 - 75 eCOM3NCPR3
Chapter 3 Preparation Function

(Note 3) When one of the conditions below applies, distance between C and D is 0,
the alarm <<Cutting amount error in thread cutting cycle>> is triggered
before starting operation (1).
• When the travel distance between S and C is greater than the travel
distance between B and C.
• When the travel distance between C and T is greater than the travel
distance between C and D.
(Note 4) When a thread cutting cycle command on a straight screw is issued while
the lathe spindle is not rotating, a <<Feedrate error>> is triggered before
starting operation (2).
(Note 5) During operation (2), the SPINDLE OVERRIDE and FEEDRATE OVERRIDE
are disabled, and the setting is fixed at 100%.
(Note 6) When one of the following operations is performed or when a stop level 3
or 4 alarm is triggered during operation (2), it stops after operation (3).
3 • [FEED HOLD] switch is pressed.
• [RST] key is pressed.
• [M.LCK] key is pressed.
• Mode is changed.
(Note 7) When a stop level 3 alarm is triggered during any of the following
operations: (1), (2), (3) or (4), the machine stops after operation (4).
(Note 8) RAPID TRAVERSE OVERRIDE is always valid. When a thread cutting cycle
command is issued for a straight screw in M322 modal (finishing OFF) and
operation has been stopped using a RAPID TRAVERSE OVERRIDE after
operation (2), the shape of the thread runout changes. In addition, be
careful because the tool may become damaged.

3.18.2.2 Thread Cutting Cycle for Taper Screws

Command format X_ Y_
G392 X_ Z_ R_ F_ Q_
Y_ Z_

X, Y, Z : Screw end point (mm) (inch)


R : Taper amount (mm) (inch)
F : Screw lead (mm) (inch)
Q : Start angle for thread cutting (0.000° to 360.000°)

Z-axis A
B (1)

User parameter
<Cutting angle in thread cutting cycle>

(2) (4)
S

C (3) D C T

User parameter
<Cutting amount in thread cutting cycle>

Y-axis

2019/09/02 3 - 76 eCOM3NCPR3
Chapter 3 Preparation Function

The thread cutting cycle for taper screws performs 4 operations.


(1) It travels using rapid feed from start point A to start point B for thread cutting.
The travel direction is set by the command axis address and lathe machining infeed direction.
Refer to “3.19 Lathe machining infeed direction” for further details.
(2) It travels using the cutting feed from start point B for thread cutting until the end point of the
thread. At this time, thread cutting is performed where the lead for the cutting direction (Z-axis
in the figure above) is the command value issued at F. The finishing is the same as the thread
cutting cycle for straight screws. However, the finishing angle is the angle for the cutting
direction (See figure above).
When the travel distance for the cutting direction is 0, the alarm <<Thread cutting command
error>> is triggered before starting operation (1).
When the distance between C and D is greater than the distance between T and D, the alarm
<<Cutting angle error in thread cutting cycle>> is triggered, and it stops before starting
operation (1).
Operations (3) to (4) are the same as the thread cutting cycle for straight screws.
3
The diagram below shows an example of machining the outer and inner diameters when thread
cutting on a taper screw with an infeed on the Y-axis.
The taper amount command is issued in increments in the infeed direction starting from the screw
end point, regardless of the absolute mode (G90) and incremental mode (G91).

Taper amount (R) sign Outer diameter machining Inner diameter machining
1 2
(1)
(1)

(4) (2)
+ (4) (2)
(3)
Z (3)
Z
Y
R Y
R

3 4

(1) (1)

(2) (4) (2) (4)


-
(3) (3)
Z Z
Y R Y R

2019/09/02 3 - 77 eCOM3NCPR3
Chapter 3 Preparation Function

When a taper command is issued in which the taper amount exceeds start point A from end point C
on the screw, as shown in the diagram, the alarm <<Taper amount too large>> is triggered and it
stops before starting operation (1).

(3)
D C

(4) (2)

Z
3 Y
B A
(1)

The special notes above for the thread cutting cycle of straight screws is the same for the thread
cutting cycle of taper screws.

3.18.3 Thread Cutting in Complex Thread Cutting Cycle


(G376)
The complex thread cutting cycle is a cycle that performs thread cutting slowly in steps, breaking up
the threads into multiple cuts.

Command format X_ Y_
G376 X_ Z_ R_ P_ Q_ F_ D_ E_ I_ J_ K_ L_
Y_ Z_

X, Y, Z : Screw end point (mm) (inch)


R : Taper amount (mm) (inch)
P : Height of screw thread (mm) (inch)
Specifies the distance from the end point of the infeed direction for the screw,
regardless of the absolute mode (G90) and incremental mode (G91).
When there is an omission, the alarm <<Thread cutting cycle address error>> is
triggered.
Q : Initial infeed amount (mm) (inch)
Specifies the distance from the height of the screw thread, regardless of the
absolute mode (G90) and incremental mode (G91).
When there is an omission, the alarm <<Thread cutting cycle address error>> is
triggered.
F : Screw lead (mm) (inch)
D : Angle of screw thread (0.000° to 120.000°)
E : Finishing amount (0.0 to 99.9)
The finishing amount is the product when the thread lead F (mm) (inch) is
multiplied by the command value.
I : Finishing count (1 to 99.9)
J : Minimum infeed amount (mm) (inch)
The sign is ignored even when a negative value command is issued.
K : Finishing allowance (mm) (inch)
Specifies the distance from the end point of the infeed direction for the screw,
regardless of the absolute mode (G90) and incremental mode (G91). In addition,
the sign is ignored even when a negative value command is issued.
L : Start angle for thread cutting (0.000° to 360.000°)

2019/09/02 3 - 78 eCOM3NCPR3
Chapter 3 Preparation Function

A user parameter with the same definition exists for D, E, I, J and K.


When a command is omitted, the operation is carried out according to the value set in the user
parameter.
D: User parameter (switch 1) <Thread angle in complex thread cutting cycle>
E: User parameter (switch 1) <Cutting amount in thread cutting cycle>
I: User parameter (switch 1) <Cutting count in complex thread cutting cycle>
J: User parameter (switch 1) <Minimum infeed amount in complex thread cutting cycle>
K: User parameter (switch 1) <Finishing allowance in complex thread cutting cycle>

3.18.3.1 Infeed
When a command for the complex thread cutting cycle is issued, the infeed is carried out for a “fixed
cutting amount and single edge cutting” until the finishing operation. The infeed amount Qn for nth
cut is as follows:

Qn = n × Q Q: Initial infeed amount (mm)(inch) 3


If the infeed amount after the previous cut is less than the minimum infeed amount, the infeed
amount becomes the sum of the previous infeed amount plus the minimum infeed amount.
In addition, if the infeed overlaps the finishing section (gray area below), then the infeed amount
becomes the difference when finishing allowance is subtracted from the thread height.

P (Thread height)

Qn = n × Q

Q
1st cut
2nd cut
nth cut

K (Finishing allowance)

2019/09/02 3 - 79 eCOM3NCPR3
Chapter 3 Preparation Function

3.18.3.2 Detailed Description of Operation


In a complex thread cutting cycle, the rough cutting operation all the way to the finishing operation
are carried out all at once as follows.

P (Thread height)
K (Finishing allowance) Q (Initial infeed amount)

Z-axis B0 A
(1)
B
B1
Bn
Be

3
(2) (4)

E (Finishing amount)

C Ce Cn C1 D
R (Taper amount)
(3)

Y-axis

2019/09/02 3 - 80 eCOM3NCPR3
Chapter 3 Preparation Function

Rough cutting
(1) It travels using rapid feed from start point A to start point Bn for thread cutting on the nth cut.
The infeed amount is calculated based on the formula noted in “3.18.3.1 Infeed” and it travels in
the cutting direction only for the distance that is calculated from the following formula.

dn = (Qn + K) × tan(θ ⁄ 2)

dn : Distance that is traveled in the cutting direction from the start point for thread cutting on
the nth cut (mm)(inch)
Qn : Infeed amount for nth cut (mm) (inch)
K : Finishing allowance (mm) (inch)
θ : Thread angle (°)

P (Thread height) 3
Qn
B0
K (Finishing
allowance) dn

Bn

(2) It travels using the cutting feed from start point Bn for thread cutting on the nth cut until the end
point Cn for thread cutting on the nth cut. The thread finishing is the same as the thread cutting
cycle (G392).
(3) It travels using the rapid feed from end point Cn for thread cutting on the nth cut until point D.
(4) It travels using rapid feed from point D until start point A.

2019/09/02 3 - 81 eCOM3NCPR3
Chapter 3 Preparation Function

Finishing
(1) It travels from start point A to start point Be for finishing. It travels in the cutting direction only
for the distance de that is calculated from the following formula.

de = P × tan(θ ⁄ 2)

de : Distance that is traveled in the cutting direction from the start point for finishing (mm)
(inch)
P : Height of screw thread (mm)(inch)
θ : Thread angle (°)

When de is greater than the travel distance in the cutting direction between B and C, the alarm
<<Cutting amount error in thread cutting cycle>> is triggered, and it stops before starting the
complex thread cutting cycle operation.
3
P (Thread height)

B0

de

Be θ

(2) It travels using the cutting feed from start point Be for finishing until the end point Ce of the
thread. The thread finishing is the same as the thread cutting cycle (G392).
(3) It travels using the rapid feed from end point Ce of the thread until point D.
(4) It travels using rapid feed from point D until start point A.

(1) through (4) is repeated according to the number in the finishing count.

The special notes for the operations are the same as the thread cutting cycle (G392).

2019/09/02 3 - 82 eCOM3NCPR3
Chapter 3 Preparation Function

3.18.4 Thread Runout


A thread runout for the lead can be made on the cutting start and cutting end sections because the
motor accelerates and decelerates when the thread cutting starts and ends. This is called a thread
runout.
For example, when thread cutting from point A to point B as shown in the diagram below, it
accelerates at point A (cutting start) and decelerates at point B (cutting end) in order to make a thread
runout for length L.
To make a thread runout Lc, the thread cutting length for (2L + Lc) is required. Be aware of this when
making a program.

L
Cutting start L 3

Lc

Complete thread Lc
L

Cutting end L

Calculating the thread runout


The thread runout is calculated using the following formula.

L = K × ( N / 60 ) × P

L : Thread runout (mm)


K : Constant (Refer to table below)
N : Spindle speed (min-1)
P : Lead (mm)

Model K
M140X1 0.047
M140X2 0.047
M200X3 0.047
M300X3 0.047

2019/09/02 3 - 83 eCOM3NCPR3
Chapter 3 Preparation Function

3.18.5 Program Example


This is an example of a program when thread cutting with a SPEEDIO M140X1.

3.18.5.1 Machining and Thread Cutting Straight Screws


Screw type Right screw
Screw diameter 50 mm
Lead 2 mm
Spindle speed 1000 min-1

Thread runout 0.047 × (1000 / 60) × 2 = 1.566 (mm)


Thread runout L is set to a size that is greater than the calculation above. The diagram below shows
an example when the thread runout is 2 mm.

3
Z-axis
(4)
Z=45.0
(1) (3)
(2)
Z=25.0

50mm
Y-axis

80mm
L L

Y=-200.0 Y=-116.0

When made using G33 When made using G392 When made using G376
M303 S1000 M303 S1000 M303 S1000
G00 Y-200. Z45. G00 Y-200. Z45. G00 Y-200. Z45.
Z25. (1) G392 G322 Y-116. Z25. F2. M323 G376 G322 Y-116. Z23.5 P2. Q0.5 F2. M323
G33 Y-116. F2. (2)
G00 Z45. (3)
Y-200. (4)
Z24.5 Z24.5
G33 Y-116.
G00 Z45.
Y-200.
Z24. Z24.
G33 Y-116.
G00 Z45.
Y-200.
Z23.5 Z23.5
G33 Y-116.
G00 Z45.
Y-200.

2019/09/02 3 - 84 eCOM3NCPR3
Chapter 3 Preparation Function

3.18.5.2 Machining and Thread Cutting Taper Screws


Screw type Right screw
Screw diameter 60 mm
Lead 2 mm
Spindle speed 500 min-1

Thread runout 0.047 × (500 / 60) × 2 = 0.783(mm)


Thread runout L is set to a size that is greater than the calculation above. The diagram below shows
an example when the thread runout is 1 mm.

60mm
(1) Z-axis
Z=80.0
L 3

50mm (2) (4)

Z=28.0 L
(3)

Y-axis

Y=-150.0 Y=-135.0 Y=-120.0

When made using G33 When made using G392 When made using G376
M303 S500 M303 S500 M303 S500
G00 Y-120. Z80. G00 Y-120. Z80. G00 Y-120. Z80.
Y-150. (1) G392 G322 Y-135. Z28. R-15. F2. M323 G376 G322 Y-136.5 Z28. R-15. P2. Q0.5 F2. M323
G33 Y-135. Z28. F2. (2)
G00 Y-120. (3)
Z80. (4)
Y-150.5 Y-135.5
G33 Y-135.5 Z28. F2.
G00 Y-120.
Z80.
Y-151. Y-136.
G33 Y-136. Z28. F2.
G00 Y-120.
Z80.
Y-151.5 Y-136.5
G33 Y-136.5 Z28. F2.
G00 Y-120.
Z80.

2019/09/02 3 - 85 eCOM3NCPR3
Chapter 3 Preparation Function

3.19 Lathe Machining Infeed Direction


It specifies the infeed direction during lathe machining.

Infeed direction on X-axis

Command format G321

Infeed direction on Y-axis

Command format G322

Infeed direction on Z-axis


3
Command format G323

In the canned cycle for lathe machining, first, it travels using rapid feed from the start point to the
start point for cutting.
At this time, the travel direction is set by the command axis address and the G code modal (Refer to
table below). If that setting is invalid, the alarm <<Invalid command>> is triggered at the time of the
command.

Command axis address G code modal for infeed direction Travel direction
G321 X-axis
X_ Y_ G322 Y-axis
G323 <<Invalid command>>
G321 X-axis
X_ Z_ G322 <<Invalid command>>
G323 Z-axis
G321 <<Invalid command>>
Y_ Z_ G322 Y-axis
G323 Z-axis

The modal can be specified during power startup in the user parameter (switch 1) <Lathe machining
infeed direction when power is turned ON>.

2019/09/02 3 - 86 eCOM3NCPR3
Chapter 3 Preparation Function

Program example
When a thread cutting cycle is performed with the Z-axis as the infeed direction

Z-axis

Z=45.0

Z=25.0

Y-axis
3
50mm

Y=-200.0 Y=-130.0

Program Description
M303 S1000 Lathe spindle rotates clockwise at 1000 min-1
G00 Y-200. Z45. Positioning to start point for thread cutting cycle
G323 Specifies Z-axis as infeed direction
G392 Y-130. Z25. F2. M323 Infeeds on Z-axis and cuts thread on Y-axis

2019/09/02 3 - 87 eCOM3NCPR3
Chapter 3 Preparation Function

(This page was intentionally left blank.)

2019/09/02 3 - 88 eCOM3NCPR3
Chapter 4 Preparation Functions (Compensation Functions)

CHAPTER 4

PREPARATION FUNCTIONS 4
(COMPENSATION FUNCTIONS)

4.1 Cutter Compensation (G40, G41 and G42)


4.2 Tool Length Offset (G43, G44 and G49)
4.3 Nose R Compensation (G141 and G142 - Option)
4.4 Tool Position Compensation (G143, G144 and G49 -
Option)

2019/09/02 4-1 eCOM3NCPR4


Chapter 4 Preparation Functions (Compensation Functions)

4.1 Cutter Compensation (G40, G41 and G42)


4.1.1 Cutter Compensation Function
The shape of the workpiece is programmed ahead of time and then the cutter compensation
function is used when actually machining the workpiece. This function takes into account the
radius of the tool used and creates a tool center path that is offset according to the shape of the
workpiece.

Command format G41 Dn;


G42

G code and D code used for cutter compensation


G40: Cutter compensation cancels (This mode is used when the power is turned ON.)
G41: Left side compensation (Offsets to left side for direction of tool travel)
G42: Right side compensation (Offsets to right side for direction of tool travel)

If either the command G41 or G42 is issued, the cutter compensation mode is enabled. This mode
4 is cancelled by G40.
Before
After compensation After compensation
compensation

Workpiece Workpiece

Tool Tool
G41 G42

Dn: Tool No. (n = 0 to 99), or Group No. (n = 901 to 930)


The amount that is offset for D0 is always 0.
The offset can be set on the tool list screen, or by inputting (G10) the tool data.

(Note 1) When a command is issued with zero travel, or when there are no travel
commands on the X- and Y-axes for more than 3 blocks, the infeed will be
too much or too little.
(Note 2) When the cutter compensation range is set for the tool specified in D
code, the range is checked. The alarm <<Comm. issued to area other than
(tool) data area>> is triggered when the command area is outside of the
range.
(Note 3) If a cutter compensation command (G41 and G42) is issued during G141
and G142 modals, an alarm is triggered. Note, if a tool change command
(G100 and M06) is issued on the same block, no alarm is triggered.
(Note 4) When a cutter compensation command (G141 and G142) is issued while
the feature coordinate is being set (after G68.2 command and before
G53.1 command), the alarm <<Feature coordinate manufacturing mode
engaged>> is triggered. A command is possible while the feature
coordinate is being indexed (after G53.1 command).

4.1.1.1 Cutter Wear Offset


When G41 or G42 command is issued in the program, the cutter wear offset is added to the cutter
compensation on the tool number for the command. The cutter wear offset can be set on the tool
list screen.

Cutter offset = Cutter compensation + Cutter wear offset

(Note) When the cutter wear offset range is set for the tool specified in D code,
the range is checked. The alarm <<Comm. issued to area other than (tool)
data area>> is triggered when the command area is outside of the range.

2019/09/02 4-2 eCOM3NCPR4


Chapter 4 Preparation Functions (Compensation Functions)

4.1.2 Cancel Mode


This mode refers to when the cutter compensation is disabled such as when the power is turned
ON or when the [RST] key is pressed.
Normally, the tool path that is programmed matches the center path of the actual tool.

<Term / symbol explanation>: The terms and symbols that will appear hereafter in the program
explanation are described below.

1. Description of inner side and outer side


The terms outer side and inner side refer to the intersecting angle for the travel command.
Inner side means that the angle measures more than 180° on the workpiece side. Outer side
means the angle measures between 0 and 180°.

Block 1

θ
G42
Workpiece side 4

Block 2

180° ≤ θ
Inner side

G41

θ
Block 1
Workpiece side

0º ≤ θ <180º Block 2
Outer side

θ T
G42
D
D CP
L

2. Explanation of symbols in diagram


: Program path
: Tool center path
: Auxiliary line
L : Straight line
C : Arc
D : Cutter compensation
θ : Angle on workpiece side
T : Arc tangent line
CP : Intersection
S : Single block stop point

2019/09/02 4-3 eCOM3NCPR4


Chapter 4 Preparation Functions (Compensation Functions)

4.1.3 Startup
Offset mode is enabled for the control when a command that meets all the conditions below is
executed for cancel mode. Startup refers to the travel operation in this situation.

1. G41 or G42 command is issued.

2. G0 or G1 travel command is issued, and the travel amount ≠ 0.

(Note 1) The alarm <<Cutter compensation error>> is triggered when an arc


command or an involute interpolation is issued.
(Note 2) Execute one of the following travel commands (G0, G1, G2 , G3,G02.2 or
G03.2) first before issuing a G41 or G42 command.
(Note 3) There are two setting types for the startup and cancel operations: <Type
1 (shortcut)> and <Type 2 (detour)>. Use the user parameter <Start
up/cancel> to set one of the types.

4.1.3.1 Inner Side Cutting (180° ≤ θ)


4 Straight line to straight line

D
G42
S L
L

Straight line to arc

D
G42

S C

2019/09/02 4-4 eCOM3NCPR4


Chapter 4 Preparation Functions (Compensation Functions)

4.1.3.2 Outer Side (Obtuse Angle Cutting) (90° ≤ θ < 180°)


1. Type 1: Straight line to straight line

S L

L D

θ
G41

Type 1: Straight line to arc

S
C 4
D

L θ

G41

2. Type 2: Straight line to straight line

S
CP L
L
D
D
L
θ
G41

Type 2: Straight line to arc

S
L CP
L
D
L
G41 C
θ

2019/09/02 4-5 eCOM3NCPR4


Chapter 4 Preparation Functions (Compensation Functions)

4.1.3.3 Outer Side (Acute Angle Cutting) (θ < 90°)


1. Type 1: Straight line to straight line

G41

L D

L S

Type 1: Straight line to arc

G41
4
θ

L D

S
C

2. Type 2: Straight line to straight line

L
D
L D
L
G41 θ D D
S

Type 2: Straight line to arc

L
D L
L D
D D S
G41 θ
L

T C

(Note) When θ ≤ 1°, the setting <0: Type 1 (shortcut)> is used or enabled, even if
<1: Type 2 (detour)> is specified for the user parameter <Start up/cancel>.

2019/09/02 4-6 eCOM3NCPR4


Chapter 4 Preparation Functions (Compensation Functions)

4.1.4 Offset Mode


The travel commands in offset mode include: positioning, linear interpolation, circular
interpolation, helical interpolation and involute interpolation.

4.1.4.1 Inner Side Cutting (180° ≤ θ)


Straight line to straight line

D
S

D CP L
G42

4
Arc to straight line

CP
D D
S

G42 C L

Straight line to arc

C
D

L S
CP
D

G41
θ

Arc to arc

C
C
D
S D
G41 T CP T

2019/09/02 4-7 eCOM3NCPR4


Chapter 4 Preparation Functions (Compensation Functions)

(Note 1) When turning on the inner side of a narrow angle (α < 1°), and the offset
vector is abnormally large.

Straight line to straight line

S L

α
D
L Offset vector
D
G41
L

Straight line to arc

L L

D L
α
T
G41
D

(Note 2) When turning on the inner side of an angle that is almost parallel (180° ≤ θ
< 181°).
Straight line to straight line

θ
G42

L S
L

The processing is the same for: arc → straight line, straight line → arc and arc → arc.

2019/09/02 4-8 eCOM3NCPR4


Chapter 4 Preparation Functions (Compensation Functions)

4.1.4.2 Outer Side (Obtuse Angle Cutting) (90° ≤ θ < 180°)


Straight line to straight line

CP L

S
D

L D θ

G41

Straight line to arc


T

4
T
θ
G42
D
D
CP L
L S

Arc to straight line

G42
T

C
θ

D
D
L
S
CP L

Arc to arc

G42
T

T
θ
C
D T

L D

S L T
CP
C

2019/09/02 4-9 eCOM3NCPR4


Chapter 4 Preparation Functions (Compensation Functions)

(Note) When turning on the outer side of an angle that is almost parallel (179° ≤
θ < 180°).
Straight line to straight line

L S
L
D

G41
θ

The processing is the same for: arc → straight line, straight line → arc and arc → arc.

4 4.1.4.3 Outer Side (Acute Angle Cutting) (θ < 90°)


Straight line to straight line
L
L
S
D
D D L
D

G41

Arc to straight line

G42

C
L
D D

L D D

L S

2019/09/02 4 - 10 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

Straight line to arc

G42

T
L θ

D D
D D L

L S

4
Arc to arc

G42
T T
θ T
T

C C

D
D

L D D L
L S

4.1.4.4 Exceptional Cases


When the intersection is not determined on the inner side cutting.

Alarm and stoppage


L
D1 D2
D1
D2 D1
D2

G41 C

When the compensation is a small amount as shown in the diagram above, even if an intersection
exists, increasing the compensation may cause the intersection to disappear. In this situation, the
alarm <<Cutter compensation too large>> is triggered at the previous block and operation stops.

2019/09/02 4 - 11 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.5 Offset Cancel


Cancel mode is enabled for the control when a command that meets all the conditions below is
executed for offset mode. Offset cancel refers to the travel operation in this situation.

1. G40 command is issued.

Command format G40;

2. A travel command is issued excluding an arc, involute interpolation and thread cutting
command.

(Note 1) When an arc, involute interpolation or thread cutting command is issued,


an alarm is triggered.
(Note 2) There are two setting types for the startup and cancel operations: <Type
1 (shortcut)> and <Type 2 (detour)>. Use the user parameter <Start
up/cancel> to set one of the types.

4 4.1.5.1 Inner Side Cutting (180° ≤ θ)


Straight line to straight line

θ
G42

G40

L L

Arc to straight line

T
G40
D

S L

G42 C

2019/09/02 4 - 12 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.5.2 Outer Side (Obtuse Angle Cutting) (90° ≤ θ < 180°)


1. Type 1: Straight line to straight line

L S

D
L

G41

θ G40

Type 1: Arc to straight line

G41
C
S 4
D
L

θ
G40

2. Type 2: Straight line to straight line

S
L CP
L L
D
D

G41

θ L

G40

Type 2: Arc to straight line

S
CP L
C

D D
L
G41

θ G40

(Note) When 179° ≤ θ ≤ 180°, the setting <0: Type 1 (shortcut)> is used or
enabled, even if <1: Type 2 (detour)> is specified for the user parameter
<Start up/cancel>.

2019/09/02 4 - 13 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.5.3 Outer Side (Acute Angle Cutting) (θ < 90°)


1. Type 1: Straight line to straight line

L S

D
G41
L θ

G40

Type 1: Arc to straight line

C S

4 D

G41

G40

2. Type 2: Straight line to straight line

D
G41 L

G40 D
S
L
L

Type 2: Arc to straight line


L
L S
D
D L
C D
D

G41
L

G40

2019/09/02 4 - 14 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.6 G40 Individual Command


When G40 is issued as an individual command, the machine travels to a position for the cutter
compensation that is offset perpendicularly from the command value for the previous block.

Straight line to straight line

G41 X_Y_D_;
G40;

L S

G41 G40

4
Arc to straight line

G41 X_Y_D_;
G40;

C
D
T
G40

G41

(Note) The remaining offset is cancelled together with the next travel command.

G42 X_Y_D_;
G40 ;
G01 X_Y_F_;

G42 G40

G01

2019/09/02 4 - 15 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.7 Compensation Direction Change in Offset Mode


The compensation direction can be changed even while offset mode is enabled, by issuing a G41
or G42 command, or reversing the positive/negative sign for the compensation.
However, when compensation is set to 0, the compensation is processed as a positive amount.
Note, the block following the startup block cannot be changed.
In addition, the compensation direction also cannot be changed even when changed using the
mirror (single axis specification) or D address value, etc.

Offset sign
+ -
G code
G41 Left side offset Right side offset
G42 Right side offset Left side offset

Execution conditions
Straight line Straight line Arc to straight
Offset mode Command Arc to arc
to straight line to arc line
G41 G41 Executes (The stop point is offset by the cutter compensation
G42 G42 perpendicular to the end point of the previous block.)
4 G41 G42
Executes Executes
G42 G41

There is no distinction between the inner side and outer side cutting when changing the
compensation direction, but it varies depending on whether the intersection exists or not. In the
following explanation, the compensation is positive.

2019/09/02 4 - 16 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.8 Offset Direction Change in Offset Mode


4.1.8.1 When There is an Intersection
Straight line to straight line

G42

D
L G41 S

D L

Straight line to arc

L S 4
D

G41

G42
D

Arc to straight line


G42

C
D

G41

Arc to arc

G42
C S

D D
G41 C

2019/09/02 4 - 17 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.8.2 When There is No Intersection


Straight line to straight line

L S
L
G41 G42 G42

G41
G41
L D
S L
L S

Straight line to arc

G42
4
S
C
G42 D
L
L
D

S
T

Arc to straight line


G42

G42 C S L
C D

D D
L

L G41
S

Center

2019/09/02 4 - 18 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

Arc to arc
G42

G42 C S
C D C
D
L D

L
S
G41

Center

4
Center

4.1.8.3 When an Arc Laps Around in a Circle


If the direction of the compensation is changed and the arc laps around in a circle, a short arc is
executed as shown below. In this situation, use commands to divide the arc up.

D
G42

L C D L
D

G41 G41

2019/09/02 4 - 19 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.8.4 Arc angle check when offset direction changes


When a G42 command is issued for a G41 modal (same for G41 command for a G42 modal) and
the offset direction changes on the next block for an arc command (due to a change in cutter
compensation during operation), this function stops operation before the arc operation if the arc
angle for the program path is significantly different from the offset arc angle for the tool center
path.

C
N1
D2
N2
N3
D1
D1
S
L S C

4
θα

θβ
G42 D1



N1 G42 G1 X_
N2 G2 X_Y_I_J_
N3 G41 D2 G2 X_Y_I_J_

This function checks the difference between the arc angle (θα) at the start and end points in the N2
program path and the arc angle (θβ) at the start and end points in tool center path after being offset.
If θβ is greater than θα by 180° or more, then an alarm is triggered and operation stops before
executing N2.

(Note 1) This function carries out the check at the end point after 3 blocks of
travel. If one of the situations below applies while the offset mode is
enabled, this check function may not work properly because the tool
center path start and end points change after being offset.
• When there is a command that sets a perpendicular vector
• When there are zero travel commands for more than 3 blocks

2019/09/02 4 - 20 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.9 G Code Command for Cutter Compensation in


Offset Mode
Straight line to straight line

G42
G42

L
L S

Straight line to arc

G42
4
G42

C
D

L S

Arc to straight line

T
G42
G42

C S L

Arc to arc
G42

C
G42 D

2019/09/02 4 - 21 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.10 Special Notes for Cutter Compensation


1. Tool diameter offset commands
The offset amount is specified in the number for the D command. The command is issued for
the same block when issuing a G41 or G42 command, but if that command is omitted, then the
number is used for the D command that is issued previously.

2. Tool diameter offset change


When the offset is changed while in offset mode, the new offset applies after the end point of
that block.

N1 G41 X_Y_D1;

N6 Xa1 Yb1;
N7 Xa2 D2; …… Offset changed
N8 Xa3 Yb3;

D2
(a1, b1)

D N7
(a2, b1)
N6 D2
N8
G41
(a3, b3)

3. Current position display


The current position display shows the tool center position.

4. When cutting the inner side of an arc with a radius that is smaller than the tool radius.

Alarm and stoppage triggered

S
D
D≥R

D R

G41

In this situation, the alarm <<Cutter compensation too large>> and stoppage are triggered
because the infeed is not possible. It stops at the end point of the previous block.

2019/09/02 4 - 22 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

5. Infeed insufficient
This occurs when machining a step that is smaller than the tool diameter.

D D
G41 d

Infeed insufficient

6. Corner travel
When cutting the outer side, it can turn on a corner with many angles. The travel mode and
feedrate when turning the corner up to point a in the diagram below are based on the
command that is issued for the current block.
S
4

G41

In addition, as shown in the diagram below, the travel operation is ignored when the corner
travel distance is extremely small, and when ΔVX ≤ ΔV and ΔVY≤ ΔV. The value for ΔV is
set in the user parameter <Corner travel limit>.
ΔVx

D
ΔVy
D

D
G41
D
θ

G41

2019/09/02 4 - 23 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

As a result, extremely small travel operations for a corner can be kept to a minimum.

However, this processing is not carried out when the next block is a circle.

P2 P3

P1

P0

G41

Breakdown of travel in the above diagram:

P0-P1-P2 Travel in a straight line

P2-P3 Travel in a straight line

Thereafter, it travels in a circular arc with P3 as the target position.

In this situation, if extremely small travel operations are processed, the travel from P2 to P3 is
ignored.

P0-P1-P2 Travel in a straight line

P2-P3 Travel in an arc (extremely small)

Traveling in a circular arc is ignored and travel from P2 to P3 becomes a small arc pattern.
Therefore, this processing is not carried out.

2019/09/02 4 - 24 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

7. Blocks without travel operations


While in cutter compensation mode, if a command is issued for which the 2 axes on the
selected planes do not travel for more than 3 blocks, the infeed will be too much or too little,
as shown in the diagram below. Therefore, please avoid issuing those types of commands.

N4 X_Y_;
N5 Z_;
N6 F_;
N7 Z_;
N8 X_;

N8
N5-N7

N4
4
G41

(Note 1) The same infeed problem arises as noted above for a block with zero
travel.

N4 G91 X_Y_;
N5 X0;
N6 X_;

N6
N5

N4

G42

(Note 2) If there is no travel command for 2 axes on the selected planes during
startup, the startup operation is performed when a travel command is
executed thereafter even on a single axis for either the X- or Y-axis
(when travel amount ≠ 0).

2019/09/02 4 - 25 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

8. Tool movement when the offset for cutter compensation is 0


(1) Startup
The offset mode is enabled when the G41 and G42 commands are issued while in cancel
mode, but the startup operation is not performed because offset = 0.

The operation thereafter is the same as described in the section 2. “Tool diameter offset
change” when changed to an offset number where offset ≠ 0.

N1 G41 X_Y_D1; (D1=0)


N2 X_;
N3 Y_D2; (D2≠0)
N4 X_Y_;

N2
D2
N3
N1
G41
4 N4

(2) Offset mode enabled


Cancel mode is not enabled even if changed to an offset number where the offset amount
= 0 while in offset mode.
The operation is the same as described in section 2. “Tool diameter offset change”.

The operation thereafter is the same as described in the section “2. Tool diameter offset
change” when changed to an offset number where offset ≠ 0.

N1 X_Y_;
N2 X_D1; (D1=0)
N3 X_Y_;
N4 X_Y_D2; (D2≠0)
N5 X_;

G42 N2 N5
N1 N3
N4

9. Commands issued during cutter compensation that cause exception processing or that trigger
alarms
(1) Command that sets a perpendicular vector
G10 : Programmable data input
G52 : Local coordinate system setting
G92 : Coordinate system setting
G210 : Programmable data input (high accuracy)
#3000 : Alarm display
#3006 : Message display & stoppage

If the command noted above is issued, the machine travels to a position that is offset by
the cutter compensation using the value from the last X- and Y-axes travel command.

2019/09/02 4 - 26 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

(2) Command that forces the cutter compensation to cancel


M06 : Tool change
G100 : Nonstop ATC

If the command noted above is issued, G40 (cutter compensation cancel) is automatically
triggered. Therefore, the machine travels to a position that is offset by the cutter
compensation using value from the last X- and Y- axes travel command.

(3) Command that triggers the alarm <<Compensating diameter>>


G17~G19 : Plane selection
G28 : Reference position return
G29 : Return from reference position
G30 : No. 2 to 6 reference position return
G33, G376, G392 : Thread cutting
G36~G39 : Coordinate calculation
G60 : Single direction positioning
G66 : Macro program modal call
G68.2 : Feature coordinate setting
G73~G89, G173~G189 : Canned cycle
G120 : Positioning to measurement position
4
G121~G129 : Automatic measurement
G31, G131, G132 : Skip feed
G133, G134 : Change tap twist direction
M410, M411 : Pallet index
G2, G3 : Arc with 0 start point or 0 end point radius

10. Input command from MDI operation


The alarm <<Specified G code cannot be used>> is triggered when there is an input related to
cutter compensation (G40, G41 or G42) in MDI operation mode.

11. Manual operation intervention


The correct offset path is enabled on block 2 when the tool is moved using manual operation
while in offset mode and memory operation is started again.

P2 P3

P1 P4

P2'

* When operation stops at the end point (P2) of a block and the tool is then moved manually,
the tool travels from P2’ to P3, and the correct path is enabled from P3.

12. Command after cancelling cutter compensation


If a G17 to G19 (plane selection) command is issued when the G40 command is issued
individually and there is a remaining offset amount, the alarm <<Cutter compensation error>>
is triggered. When a travel command is issued for the same block as G40 or after the G40
command, issue a command after cancelling the offset amount.

2019/09/02 4 - 27 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.11 Override Function Related to Cutter Compensation


4.1.11.1 Automatic Corner Override
When both the block before and after the corner of the inner side meet the following conditions
while in offset mode, the override function is automatically enabled in order to reduce the load on
the tool.

1. G01, G02 or G03 travel operation. (Excluding spiral/conical interpolation)


2. Offset ≠ 0 when offset mode is enabled.
3. The corner’s inner side angle is less than the user parameter <Automatic corner override
(angle)>.
4. The block does not include the following commands: G41, G42 and G40.
5. The compensation direction does not change.

The following items are configured in the user parameter settings.


(1) Automatic corner override (length 1) : Corner end point deceleration distance Le
(2) Automatic corner override (length 2) : Corner start point deceleration distance Ls
(3) Automatic corner override (ratio) : Deceleration ratio (%) Y
: Corner inner side determining angle θ
4 (4) Automatic corner override (angle)

Ls

Le b
a

The override applies to the section from point a to point b.

Actual feedrate = Command speed × (Deceleration ratio/100)

2019/09/02 4 - 28 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.11.2 Inner Arc Override


When performing arc cutting that is offset on the inner side during offset mode, the actual feedrate
is the product of Rc/Rp for the feedrate command that is issued.
Actual feedrate = Command speed × Rc/Rp
Rp: Program radius
Rc: Tool center path radius

Rp Rc

(Note 1) When Rc/Rp is less than the <Inner arc override limit> that is set in the
user parameter, that parameter value is multiplied as an alternative to
Rc/Rp.
Actual feedrate = Command speed × (Inner arc override limit / 100)

(Note 2) Refer to “Chapter 12 (23) Involute interpolation function” in the Operation


Manual for details about override for an involute interpolation command.

2019/09/02 4 - 29 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.12 Arc Angle Check During Inner Side Cutting


During inner side cutting, if the arc angle in the program path for the arc command and the arc
angle in tool center path after being offset are significantly different, this function stops the
operation before the arc motion.

D1 D1

G41 D1

N1
• N3
N1 G1 X_ Y_
N2 G2 X_ Y_ R_
D1
N3 G1 X_ Y_
4 N2

θα

θβ

This function checks the arc angle (θα) at the start and end points in the N2 program path and the
arc angle (θβ) at the start and end points in tool center path after being offset. If the angle is greater
than 180°, then an alarm is triggered and operation stops before executing N2.

(Note 1) When an alarm is triggered, the infeed may already be too great (The
infeed is too great for the workpiece on the N3 side after N1 is executed
in the above example).
(Note 2) This function carries out the check at the end point after 3 blocks of
travel. If one of the situations below applies while the offset mode is
enabled, this check function may not work properly because the tool
center path start and end points change after being offset.
• When there is a cutter compensation G code command or a command
that sets a perpendicular vector
• Zero travel commands for more than 3 blocks

2019/09/02 4 - 30 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.1.13 Interference Check for Cutter Compensation /


Nose R Compensation
When a tool cuts into the workpiece too much, that is called interference. The function that detects
that interference beforehand and prevents it from cutting into too much is called the interference
check.
This function cannot always detect the interference, and it also may detect interference when the
tool has not actually cut in too much.

4.1.13.1 Interference detection method


This detection method uses two types of check: a direction check and an arc angle check.
The user parameter (switch 1) <Cutter compensation interference check> is used to set which
method is used for the detection.

1. Direction check

The cutter compensation function checks between the offset vectors that occur at the end point of
the block for the program path.
The check range is set in the user parameter (switch 1) <Number of blocks to check cutter 4
compensation interference>.
It assumes there is interference when the difference between the angle for the end points on the
program path block and the angle for the offset vectors is greater than 90° and less than 270°.

When there is a block without travelling included, the interference check range becomes smaller.

Example when interference is detected

S
G41 S

D L

S
L D

There is a difference of 180°

2019/09/02 4 - 31 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

Example when interference is detected but there is actually no interference


(Tool does not cut in too much even when it follows the offset path)
Difference is
between 90° and
270°
G41

Example when interference is not detected but there is actually interference


(Interference is not detected in the middle of the offset path)

Difference is not
between 90° and 270°

Cuts in too
much

2019/09/02 4 - 32 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

2. Arc angle check

When there is an arc, this check detects interference if the difference is more than 180° between
the arc’s center angle on the program path and the arc’s center angle in the offset path.

Example when interference is detected (start and end points are the same in the arc block)

S S
G41

D
S

L
4
D D

Difference is more than 180°


between the arc’s center angle on
the program path and the arc’s
center angle in the offset path

4.1.13.2 Operation when interference is detected


When interference is detected, the alarm <<Cutter compensation interference check error>> is
triggered and machine operation is stopped.

4.1.13.3 Restrictions and special notes


(1) When the user parameter (switch 1) <Number of blocks to check cutter compensation
interference> is set to a value that is larger than the machine parameter (system 1) <Maximum
blocks to check cutter compensation interference>, the alarm <<User param. setting error
(switch 1)>> is triggered.
(2) Interference is not detected when it falls outside of the range set in the user parameter (switch
1) <Number of blocks to check cutter compensation interference>.
(3) The interference check range covers from where the cutter compensation offset mode is
enabled until where that mode is cancelled. When the cutter compensation is temporarily
cancelled, the interference check range ends. The interference check range starts again when
the check is restored.
(4) Detection is not possible when the tool cuts in too much in the middle of the travel path,
because the interference check uses the offset vectors that form at the end point of the block.
(5) When there are multiple travel commands that form from 1 block in the NC program, each
command is counted as 1 block in the interference check range.
(6) Cutting in too much can be prevented for all the commands that fall in the range set by the
number of blocks in the user parameter (switch 1) <Number of blocks to check cutter
compensation interference>.

2019/09/02 4 - 33 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.2 Tool Length Offset (G43, G44 and G49)


4.2.1 Tool Length Offset Function
This function offsets the tool position so that the end of the tool moves into the position that is
programmed. Even in an absolute command or an incremental command, the coordinates that are
offset only for the offset amount specified in H code become the actual end point for the
coordinates of the Z-axis travel command end point that is programmed.

1. Tool length offset (+)

Command format G43 Hn;

Hn : Tool number (n = 0 to 99), or group number (n = 901 to 930)

(Note) The amount that is offset for H0 is always 0.


The offset can be set on the tool list setting screen.
The tool length offset is performed for Z-axis.

4 2. Tool length offset (-)

Command format G44 Hn;

Hn : Tool number (n = 0 to 99), or group number (n = 901 to 930)

3. Tool length offset cancel

Command format G49;

(Note 1) When the tool length offset is cancelled, it is cancelled by the G49
command or by issuing 0 for the tool number.
(Note 2) The tool length offset is cancelled by the M06 (tool change) or by the
G100 (nonstop ATC) command.
(Note 3) Refer to “4.2.3 Z-axis travel with tool length offset command” for travel
when there is no Z-axis command for G43H_, G44H_, or tool length offset
G49 and H0 command blocks.
(Note 4) When a Z-axis command is issued during the tool length offset for
reference position return (G28) or No. 2 to 6 reference position return
(G30), the tool length offset stays enabled while traveling to the middle
point. And, the tool length offset is cancelled temporarily while travelling
to the reference position.
Refer to “4.2.3 Z-axis travel with tool length offset command” for travel
when the tool length offset operation that was cancelled resumes. When
the tool length offset resumes, if the incremental mode is enabled, it is
the equivalent of traveling from the absolute coordinates right before.
(Note 5) If the G53Z _; or the G120Z_: command is issued with the tool length
offset enabled, the tool length offset is temporarily cancelled and the
travel operation is carried out accordingly.
(Note 6) When the tool length offset range is set for the tool specified in H code,
the range is checked. The alarm <<Comm. issued to area other than (tool)
data area>> is triggered when the command area is outside of the range.
(Note 7) If a tool length offset command (G43 and G44) is issued during G143 and
G144 modals, an alarm is triggered. Note, if a tool change command
(G100 and M06) is issued on the same block, no alarm is triggered.

2019/09/02 4 - 34 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.2.2 Tool Length Wear Offset


When a G43 or G44 command is issued in the program, the tool length wear offset is added to the
tool length on the tool number for the command.

Tool length offset = Tool length offset + Tool length compensation

The tool length wear offset can be set on the tool list screen.

(Note) When the tool length wear offset range is set for the tool specified in H
code, the range is checked. The alarm <<Comm. issued to area other than
(tool) data area>> is triggered when the command area is outside of the
range.

4.2.3 Z-axis Travel with Tool Length Offset Command


1. Z-axis travel with tool length offset command
When there is a Z-axis travel command for the command block G43 / G44 / G49, such as G43
H_Z_, G44 H_Z_ and G49Z_, the Z-axis in that block travels to the canceled (G49) position
that takes into account the compensation (G43/G44) specified in H code.
When there is no Z-axis travel command for G43 / G44 / G49 / H0 command block, such as
4
G43H_, G44H_ or tool length offset G49 and H0, the operation follows the user parameter
noted below.
User parameter <Travel of X, Y
or Z axis when tool length/tool Type 1 Type 2
position offset is changed>
User parameter <Error check
when traveling during tool Check No check -
length/tool position offset cancel>
G43/G44 command block without Compensation specified in H code and Z-axis travel Axis does not travel
Z-axis command (Travels to offset
Ex.1) G43H1; position specified in H
Ex.2) G43; code for the next Z-axis
Ex.3) H1; (Tool length offset travel command)
enabled)
G49/H0 command block without When the current Current tool length Axis does not travel
Z-axis command (Tool length compensation is another offset and Z-axis travel (Travels to position
offset enabled) value other than 0, the (Note 2) where the current tool
Ex.1) G49; alarm <<Tool length offset length offset is
Ex.2) H0; cancel error>> is triggered cancelled for the next
(Note 2, 3 and 4). Z-axis travel command)

Z-axis motion example


(Workpiece coordinate zero → X: -200.000, Y: -200.000, Z: 50.000, H1 offset: 120.000)
User parameter <Travel of X, Y
or Z axis when tool length/tool Type 1 Type 2
position offset is changed>
User parameter <Error check
when traveling during tool Check No check -
length/tool position offset cancel>
Machine coordinate Machine coordinate Machine coordinate
G90G0Z100.; 150.000 150.000 150.000
G43H1; 270.000 270.000 150.000
G0Z80.; 250.000 250.000 250.000
G49; The alarm <<Tool length
offset cancel error>> is 130.000 250.000
triggered.

2019/09/02 4 - 35 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

(Note 1) When a circular interpolation command, an involute interpolation


command or a thread cutting command is issued during travel, an alarm
is triggered.
(Note 2) When the tool length offset is temporarily canceled as per G28 or G53,
cancel travel for the compensation does not occur even for a G49/H0
command block without a Z-axis command. As a result, the alarm <<Tool
length offset cancel error>> is not triggered even when the parameter
<Travel of X, Y or Z axis when tool length/tool position offset is changed>
is set to <0: Type 1> and the parameter <<Error check when traveling
during tool length/tool position offset cancel>> is set to <0: No check>.
G90
G43 H1 Z100.
G91 G28 Z0
G49 ← No Z-axis travel
(Note 3) An alarm is not triggered during scaling, mirror imaging and rotational
transformation because the axis travel command is on the same block as
G49 and H0 and an axis other than the axis that was specified may
operate.
4 (Note 4) When the parameter <X-, Y- and Z-axes travel during current rotary fixture
offset change> is set to <Type 2>, the alarm is not triggered if the Z-axis
operates following a change in the workpiece coordinates.
(Note 5) When the parameter <Travel of X, Y or Z axis when tool length/tool
position offset is changed> is set to <1: Type 2> and the G43 or G44
command is issued on the same block as G53, an alarm is triggered.
(Note 6) When <Travel of X, Y or Z axis when tool length/tool position offset is
changed> is set to <0: Type 1> and the X-, Y- and Z-axes travel in another
modal besides G0, the alarm <<Feedrate not specified>> is triggered if
there is no F command during G93 (inverse time feed).

2. Tool length offset resumed


The tool length offset can be temporarily canceled due to one of the following Z-axis
commands: reference position return (G28/G30), machine coordinate selection (G53),
positioning to the measurement position (G120) or external indexing on the pallet
(M410/M411). The compensation or offset is resumed during the next Z-axis travel command,
H command or G43/G44 command.

Ex:
G28 X-50. Y-50. Z400.; ← Tool length offset temporarily canceled
···;
During this time, operation is performed while tool
G0 X-100. Y-100.; ←
length offset stays cancelled
···;
G0 Z300.; ← Tool length offset resumed

2019/09/02 4 - 36 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3 Nose R Compensation (G141 and G142 -


Option)
* Available when equipped with a lathe function

The nose R compensation function is used on a lathe tool that has rounded teeth (nose R). It
automatically compensates for the difference between the tool teeth that is offset by the tool
position compensation operation and the actual nose R (cutting point).

Machining shape without nose


R compensation

Tool teeth
4

Insufficient infeed

Tool teeth path after tool position


compensation

Tool teeth

Machining shape with nose R


compensation
(Travels with nose R touching workpiece)

2019/09/02 4 - 37 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.1 Command Format

Command format G141 Dn;


G142

G code and D code used for nose R compensation


• G40: Nose R compensation cancels (This mode is used when the power is turned ON.)
• G141: Left side compensation (Offsets to left side for direction of tool travel)
• G142: Right side compensation (Offsets to right side for direction of tool travel)

Dn : Tool number (n = 0 to 99), or group number (n = 901 to 930)


The nose R compensation for D0 is always 0.
The nose R compensation can be set on the tool list screen, or by inputting (G10)
the tool data.

If either the command G141 or G142 is issued, the nose R compensation mode is enabled. This
mode is cancelled by G40.
4
The nose R compensation target axis depends on the plane selection command (G17 to G19).
G18 modal

G142 Workpiece G141

+X

+Z

G19 modal

G142 Workpiece G141

+Z

+Y

2019/09/02 4 - 38 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

When the coordinates are configured looking from the front of the machine (X and Z plane)
G18 modal

G141 Workpiece G142

+Z

+X

(Note 1) During nose R compensation, when a command is issued with zero travel, 4
or when there are no travel commands for more than 3 blocks, the infeed
will be too much or too little.
(Note 2) When the cutter/nose R compensation range is set for the tool specified
in D code, the range is checked. The alarm <<Comm. issued to area other
than (tool) data area>> is triggered when the command area is outside of
the range.
(Note 3) If a nose R compensation command (G141 and G142) is issued during
G41 and G42 modals, an alarm is triggered. Note, if a tool change
command (G100 and M06) is issued on the same block, no alarm is
triggered.
(Note 4) When a nose R compensation command (G141 and G142) is issued while
the feature coordinate is being set (after G68.2 command and before
G53.1 command), the alarm <<Feature coordinate manufacturing mode
engaged>> is triggered.
A command is possible while the feature coordinate is being indexed
(after G53.1 command).

4.3.1.1 Nose R Wear Offset


When a G141 or G142 command is issued in the program, the nose R wear offset is added to the
nose R compensation on the tool number for the command. The nose R wear offset can be set on
the tool list screen.

Nose R offset = Nose R compensation + Nose R wear offset

(Note) When the cutter/nose R wear range is set for the tool specified in D code,
the range is checked. The alarm <<Comm. issued to area other than (tool)
data area>> is triggered when the command area is outside of the range.

2019/09/02 4 - 39 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.2 Virtual Teeth


The virtual teeth are the tool teeth after the tool position compensation operation. Set the virtual
teeth direction (0 to 9) on the tool list screen when looking at it from the nose R center, in order to
compensate for the nose R part.

X 6 Z 6
2 1 2 1

0, 9 0, 9
7 5 7 5

3 4 3 4
8 8
Z Y

4
When the coordinates are configured looking from the front of the machine

5
4 1

0, 9
8 6

3 2
7
X

4.3.3 Cancel Mode


This mode refers to when the nose R compensation is disabled such as when the power is turned
ON or when the [RST] key is pressed.
Normally, the tool path that is programmed matches the path of the virtual teeth.

2019/09/02 4 - 40 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.4 Startup
Offset mode is enabled for the control when a command that meets all the conditions below is
executed for cancel mode. Startup refers to the travel operation in this situation.

a) G141 or G142 command is issued.

b) G0 or G1 travel command is issued, and the travel amount ≠ 0.

In the startup operation, the travel operation occurs so that the nose R center comes to a position
that is perpendicular to the start point of the next block.

G40 4

G142 (Startup)
Y

(Note 1) The alarm <<Cutter compensation error>> is triggered when an arc


command is issued.
(Note 2) There are two setting types for the startup and cancel operations: <Type
1 (shortcut)> and <Type 2 (detour)>. Use the user parameter <Start
up/cancel> to set one of the types.

2019/09/02 4 - 41 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

The following explanation applies to the Y- and Z-planes. When considering the X- and Z-planes
if looking from the front of the machine, the compensation direction is reversed (G141 → G142,
G142 → G141).

<Term / symbol explanation>: The terms and symbols that will appear hereafter in the
explanations are described below.

1. Description of inner side and outer side


The terms outer side and inner side refer to the intersecting angle for the travel command.
Inner side means that the angle measures more than 180° on the workpiece side. Outer side
means the angle measures between 0 and 180°.

Block 1

θ
G142
Workpiece side
4
Block 2
180° ≤ θ
Inner side

G14

θ
Block 1
Workpiece side

0° ≤ θ < 180° Block 2


Outer side

θ T
G142
D C
D CP
L

2. Explanation of symbols in diagram

: Program path
: Nose R center path
: Auxiliary line
L : Straight line
C : Arc
D : Nose R radius
θ : Angle on workpiece side
T : Arc tangent line
CP : Intersection
S : Single block stop point

2019/09/02 4 - 42 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.4.1 Inner Side Cutting (180° ≤ θ)


Straight line to straight line

D
G142
S L
L

Straight line to arc

T 4
D
G142

S C

2019/09/02 4 - 43 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.4.2 Outer Side (Obtuse Angle Cutting) (90° ≤ θ < 180°)


1. Type 1: Straight line to straight line

S L

L D

G141 θ

Type 1: Straight line to arc

S
4 C
D

L θ

G141

2. Type 2: Straight line to straight line

S
CP L
L

D D

L
θ
G141

Type 2: Straight line to arc

S
L CP
L
D
L
G14 C
θ

2019/09/02 4 - 44 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.4.3 Outer Side (Acute Angle Cutting) (θ < 90°)


1. Type 1: Straight line to straight line

G141

L D

L S

Type 1: Straight line to arc

G141
4
θ

L D

S
C

2. Type 2: Straight line to straight line

L
D
L D
L
G141 θ D D
S

Type 2: Straight line to arc

L DD L

D D S
G141 θ
L

T C

(Note) When θ ≤ 1°, the setting <0: Type 1 (shortcut)> is used or enabled, even if
<1: Type 2 (detour)> is specified for the user parameter <Start up/cancel>.

2019/09/02 4 - 45 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.5 Offset Mode


The travel commands in offset mode include: positioning, linear interpolation and circular
interpolation.

4.3.5.1 Inner Side Cutting (180° ≤ θ)


Straight line to straight line

D
S

D CP L
G142

4
Arc to straight line

CP
D D
S

G142 C L

Straight line to arc

C
D

L S
CP
D

G141
θ

Arc to arc

C
C
D
S D
G141 T CP T

2019/09/02 4 - 46 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

(Note 1) When turning on the inner side of a narrow angle (α < 1°), and the offset
vector is abnormally large.
Straight line to straight line

S L

α
D
L Offset vector

D
G141
L

Straight line to arc

4
L L

D L
α
T
G141
D

(Note 2) When turning on the inner side of an angle that is almost parallel (180° ≤ θ
< 181°).
Straight line to straight line

θ
G142

L S
L

The processing is the same for: arc → straight line, straight line → arc and arc → arc.

2019/09/02 4 - 47 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.5.2 Outer Side (Obtuse Angle Cutting) (90° ≤ θ < 180°)


Straight line to straight line

CP L

S
D

L D θ

G141

Straight line to arc


T

4 T
θ
G142
D
D
CP L
L S

Arc to straight line


G142
T

C
θ

D
D
L
S
CP L

Arc to arc

G142
T

T
θ
C
D T
D
L
S L T
CP
C

2019/09/02 4 - 48 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

(Note 1) When turning on the outer side of an angle that is almost parallel (179° ≤
θ < 180°).
Straight line to straight line

L S
L

G141
θ

The processing is the same for: arc → straight line, straight line → arc and arc → arc.

4.3.5.3 Outer Side (Acute Angle Cutting) (θ < 90°)


Straight line to straight line 4
L
L
S
D
D D L
D

G141

Arc to straight line

G142

C
L
D D

L D D

S
L

2019/09/02 4 - 49 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

Straight line to arc


G142

T
L θ

D D
D D L

L S

4 Arc to arc

G142

T T
θ T
T

C C

D
D

L D D L

L S

4.3.5.4 Exceptional Cases


When the intersection is not determined on the inner side cutting.
Alarm and stoppage
L

D1 D2
D1
D2 D1
D2

G141 C

When the compensation is a small amount as shown in the diagram above, even if an intersection
exists, increasing the compensation may cause the intersection to disappear. In this situation, the
alarm <<Cutter compensation too large>> is triggered at the previous block and operation stops.

2019/09/02 4 - 50 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.6 Offset Cancel


Cancel mode is enabled for the control when a command that meets all the conditions below is
executed for offset mode. Offset cancel refers to the travel operation in this situation.

a) G40 command is issued.

Command format G40;

b) Travel command, excluding arcs and thread cutting, is issued.

In the offset cancel operation, the travel operation occurs so that the nose R center comes to a
position that is perpendicular to the end point of the block that comes before the offset cancel
block.

End point 4
G40

(G142)

(Note 1) When an arc and thread cutting command are issued, an error is
triggered.
(Note 2) There are two setting types for the startup and cancel operations: <Type
1 (shortcut)> and <Type 2 (detour)>. Use the user parameter <Start
up/cancel> to set one of the types.

4.3.6.1 Inner Side Cutting (180° ≤ θ)


Straight line to straight line

θ
G142

G40

L L

Arc to straight line


θ

T
G40
D

S L

G142 C

2019/09/02 4 - 51 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.6.2 Outer Side (Obtuse Angle Cutting) (90° ≤ θ < 180°)


1. Type 1: Straight line to straight line

L S

D
L

G141

θ G40

Type 1: Arc to straight line

G141
C
4 S

D
L

θ
G40

2. Type 2: Straight line to straight line

S
L CP
L L
D
D

G141

θ L

G40

Type 2: Arc to straight line

S
CP L
C

D D
L
G141

θ G40

(Note) When 179° ≤ θ ≤ 180°, the setting <0: Type 1 (shortcut)> is used or
enabled, even if <1: Type 2 (detour)> is specified for the user parameter
<Start up/cancel>.

2019/09/02 4 - 52 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.6.3 Outer Side (Acute Angle Cutting) (θ < 90°)


1. Type 1: Straight line to straight line

L S

D
G141
L θ

G40

Type 1: Arc to straight line

C S

D 4
G141

G40

2. Type 2: Straight line to straight line

D
G141 L

G40 D
S
L L

Type 2: Arc to straight line


L
L S
D
D L
C D
D

G141
L

G40

2019/09/02 4 - 53 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.7 G40 Individual Command


When G40 is issued as an individual command, the nose R center comes to a position that is
perpendicular to the command value for the previous block.

Straight line

G141 Y_Z_D_;
G40;

L S

G141 G40

4
Arc

G141 Y_Z_D_;
G40;
S

C
D
T
G40

G141

(Note) The remaining offset is cancelled together with the next travel command.

G142 Y_Z_D_;
G40;
G01 Y_Z_F_;

G142 G40

G01

2019/09/02 4 - 54 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.8 Compensation Direction Change in Offset Mode


The compensation direction can be changed even while offset mode is enabled, by issuing a G141
or G142 command, or reversing the positive/negative sign for the compensation.
Note, the block following the startup block cannot be changed.
In addition, the compensation direction also cannot be changed even when changed using the
mirror (single axis specification) or D address value, etc.

Compensation sign
+ -
G code
G141 Left side offset Right side offset

G142 Right side offset Left side offset

Execution conditions
Straight line
Straight line Arc to
Offset mode Command to straight
line
to arc straight line
Arc to arc 4
G141 G141 Executes (The location that is offset by the nose R radius at a
position perpendicular to the end point of the previous block
G142 G142
becomes the stop point.)
G141 G142
Executes Executes
G142 G141

There is no distinction between the inner side and outer side cutting when changing the
compensation direction, but it varies depending on whether the intersection exists or not. In the
following explanation, the compensation is positive.

4.3.9 Offset Direction Change in Offset Mode


4.3.9.1 When There is an Intersection
Straight line to straight line

G142

D
L G141 S

D L

Straight line to arc

L S

G141

G142
D

2019/09/02 4 - 55 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

Arc to straight line

G142

C
D

G141

Arc to arc
4
G142
C S

D D
G141 C

4.3.9.2 When There is No Intersection


Straight line to straight line

L S
L
G141 G142 G142

G141
G141
L D
S L
L S

Straight line to arc

G142

S
C
G142 D
L
L G141
D

S
T

2019/09/02 4 - 56 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

Arc to straight line

G142

G142 C S L
C D

D D
L

L G141
S

Center

4
Arc to arc

G142

G142 C S
C D C
D
L D

L
S
G141

Center

Center

2019/09/02 4 - 57 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.10 G Code Command for Nose R Compensation in


Offset Mode
Straight line to straight line

G142
G142

L
L S

Straight line to arc

4 G142

G142

C
D

L S

Arc to straight line

T
G142
G142

C S L

Arc to arc
G142

C
G142 D

2019/09/02 4 - 58 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.11 Special Notes for Nose R Compensation


1. Nose R compensation command
The nose R compensation command is specified by the number in the D command. The
command is issued for the same block as the G141 or G142 command, but if that command is
omitted, then the number for the D command that is issued previously is used.

2. Nose R compensation change


When the nose R compensation is changed while in offset mode, that compensation change
applies from the compensation for the end point of that block.

N1 G141 Y_Z_D1;

N6 Ya1 Zb1;
N7 Ya2 D2; …… Compensation changed
N8 Ya3 Zb3;

4
D2
(a1, b1)

D1 N7
(a2, b1)
N6
D2
N8
G141
(a3, b3)

3. Current position display


The current position display shows the virtual teeth position.

4. When cutting the inner side of an arc with a radius that is smaller than the nose R radius.

Alarm and stoppage triggered

S
D
D ≥ R

D R

G141

In this situation, the alarm <<Cutter compensation too large>> and stoppage are triggered
because the infeed is not possible. It stops at the end point of the previous block.

2019/09/02 4 - 59 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

5. Infeed insufficient
This occurs when machining a step that is smaller than nose R.

D
D D
G141 d
Infeed insufficient

6. Corner travel
When cutting the outer side, it can turn on a corner with many angles. The travel mode and
feedrate when turning the corner up to point a in the diagram below are based on the
command that is issued for the current block.
4 S

G141

In addition, as shown in the diagram below, the travel operation is ignored when the corner
travel distance is extremely small, and when △VX ≤ △V and △VY≤ △V.
The value for △V is set in the user parameter <Corner travel limit>.
ΔVx

D
ΔVy
D

D
G141
D
θ

G141

As a result, extremely small travel operations for a corner can be kept to a minimum.

2019/09/02 4 - 60 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

7. Blocks without travel operations


While in offset mode, if a command is issued for which the 2 axes on the selected planes do
not travel for more than 3 blocks, the infeed will be too much or too little, as shown in the
diagram below. Therefore, please avoid issuing those types of commands.

N4 Y_Z_;
N5 X_;
N6 F_;
N7 X_;
N8 Y_;

N5-N7 N8

N4

G141
4

(Note 1) The same infeed problem arises as noted above for a block with zero
travel.

N4 G91 Y_Z_;
N5 Y0;
N6 Y_;

N6
N5

N4

G142

(Note 2) If there is no travel command for 2 axes on the selected planes during
startup, the startup operation is performed when a travel command is
executed thereafter even on a single axis for either the Y- or Z-axis (when
travel amount ≠ 0).

2019/09/02 4 - 61 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

8. Tool movement when the nose R compensation is 0


(1) Startup
The offset mode is enabled when the G141 and G142 commands are issued while in
cancel mode, but the startup operation is not performed because offset = 0.

The operation thereafter is the same as described in the section “2. Nose R compensation
change” when changed to an offset number where offset ≠ 0.

N1 G141 Y_Z_D1; (D1=0)


N2 Y_;
N3 Z_D2; (D2≠0)
N4 Y_Z_;

N2
D2
4 N1
N3

G141
N4

(2) Offset mode enabled


Cancel mode is not enabled even if changed to a D number where the nose R
compensation = 0 while in offset mode.
The operation is the same as described in section “2. Nose R compensation change”.

The operation thereafter is the same as described in the section “2. Nose R compensation
change” when changed to a D number where nose R compensation ≠ 0.

N1 Y_Z_;
N2 Y_D1; (D1=0)
N3 Y_Z_;
N4 Y_Z_D2; (D2≠0)
N5 Y_;

G142 N2 N5

N1 N3
N4

2019/09/02 4 - 62 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

9. Commands issued during nose R compensation that cause exception processing or that trigger
alarms
(1) Command that sets a perpendicular vector
G10 : Programmable data input
G52 : Local coordinate system setting
G92 : Coordinate system setting
G210 : Programmable data input (high accuracy)
#3000 : Alarm display
#3006 : Message display & stoppage

If the command noted above is issued, the machine travels to a position that is offset by
the nose R compensation using the value from the last Y- and Z-axes travel command.

(2) Command that forces the nose R compensation to cancel


M06 : Tool change
G100 : Nonstop ATC

If the command noted above is issued, G40 (nose R compensation cancel) is automatically
triggered. Therefore, the machine travels to a position that is offset by the nose R
compensation using the value from the last Y- and Z-axes travel command.
4
(3) Command that triggers the alarm <<Compensating diameter>>
G17~G19 : Plane selection
G28 : Reference position return
G29 : Return from reference position
G30 : No. 2 to 6 reference position return
G33,G376,G392 : Thread cutting
G36~G39 : Coordinate calculation
G60 : Single direction positioning
G66 : Macro program modal call
G68.2 : Feature coordinate setting
G73~G89,G173~G189 : Canned cycle
G120 : Positioning to measurement position
G121~G129 : Automatic measurement
G31,G131,G132 : Skip feed
G133,G134 : Change tap twist direction
M410,M411 : Pallet index
G2,G3 : Arc with 0 start point or 0 end point radius

10. Input command from MDI operation


The alarm <<Specified G code cannot be used>> is triggered when there is an input related to
nose R compensation (G40, G141 or G142) in MDI operation mode.

11. Manual operation intervention


The correct offset path is enabled on block 2 when the tool is moved using manual operation
while in offset mode and memory operation is started again.

P2 P3

P1 P4

P2'

* When operation stops at the end point (P2) of a block and the tool is then moved manually,
the tool travels from P2’ to P3, and the correct path is enabled from P3.

2019/09/02 4 - 63 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

12. Command after cancelling nose R compensation


If a G17 to G19 (plane selection) command is issued when the G40 command is issued
individually and there is a remaining offset amount, the alarm <<Cutter compensation error>>
is triggered. When a travel command is issued for the same block as G40 or after the G40
command, issue a command after cancelling the offset amount.

4.3.12 Override Function Related to Nose R


Compensation
4.3.12.1 Automatic Corner Override
When both the block before and after the corner of the inner side meet the following conditions
while in offset mode, the override function is automatically enabled in order to reduce the load on
the tool.

1. G01, G02 or G03 travel operation. (Excluding spiral/conical interpolation)


2. Offset ≠ 0 when offset mode is enabled.
3. The corner’s inner side angle is less than the user parameter <Automatic corner override
(angle)>.
4 4. The block does not include the following commands: G141, G142 and G40.
5. The compensation direction does not change.

The following items are configured in the user parameter settings.


(1) Automatic corner override (length 1) : Corner end point deceleration distance Le
(2) Automatic corner override (length 2) : Corner start point deceleration distance Ls
(3) Automatic corner override (ratio) : Deceleration ratio (%) Y
(4) Automatic corner override (angle) : Corner inner side determining angle θ

Ls

Le b
a

The override applies to the section from point a to point b

Actual feedrate = Command speed × (Deceleration ratio/100)

2019/09/02 4 - 64 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.12.2 Inner Arc Override


When performing arc cutting that is offset on the inner side during offset mode, the actual feedrate
is the product of Rc/Rp for the feedrate command that is issued.

Actual feedrate = Command speed × Rc/Rp

Rp: Program radius


Rc: Tool center path radius

Rp Rc
4

(Note) When Rc/Rp is less than the <Inner arc override limit> that is set in the
user parameter, that parameter value is multiplied as an alternative to
Rc/Rp.
Actual feedrate = Command speed × (Inner arc override limit / 100)

2019/09/02 4 - 65 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.3.13 Arc Angle Check During Inner Side Cutting


During inner side cutting, if the arc angle in the program path for the arc command and the arc
angle in tool center path after being offset are significantly different, this function stops the
operation before the arc motion.

D1 D1

G141 D1

• N1 N3
N1 G1 X_ Y_
N2 G2 X_ Y_ R_
N3 G1 X_ Y_ D1
N2
4
θα

θβ

This function checks the arc angle (θα) at the start and end points in the N2 program path and the
arc angle (θβ) at the start and end points in tool center path after being offset. If the angle is greater
than 180°, then an alarm is triggered and operation stops before executing N2.

(Note 1) When an alarm is triggered, the infeed may already be too great (The
infeed is too great for the workpiece on the N3 side after N1 is executed
in the above example).
(Note 2) This function carries out the check at the end point after 3 blocks of
travel. If one of the situations below applies while the offset mode is
enabled, this check function may not work properly because the tool
center path start and end points change after being offset.
• When there is a nose R compensation G code command or a
command that sets a perpendicular vector
• Zero travel commands for more than 3 blocks

2019/09/02 4 - 66 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

4.4 Tool Position Compensation (G143, G144 and


G49 - Option)
4.4.1 Tool Position Compensation Function
* Available when equipped with a lathe function

This function offsets the tool position so that the teeth move to the position that is programmed.
Even in an absolute command or an incremental command, the coordinates that are offset only for
the tool number compensation specified in H code become the actual end point for the coordinates
of the travel command end point that is programmed.

The compensation can be set on the tool list setting screen.


X-axis compensation: Tool position offset (X) + Tool position wear offset (X)
Y-axis compensation: Tool position offset (Y) + Tool position wear offset (Y)
Z-axis compensation: Tool length offset (Z) + Tool length wear offset (Z)

Offset is performed for X-, Y- and Z-axes. Set 0 for the axis where the compensation does not
apply. 4
1. Tool position compensation (+)

Command format G143 Hn;

Hn : Tool number (n = 0 to 99), or group number (n = 901 to 930)

2. Tool position compensation (-)

Command format G144 Hn;

Hn : Tool number (n = 0 to 99), or group number (n = 901 to 930)

3. Tool position compensation cancel

Command format G49;

(Note 1) When the tool position compensation is cancelled, it is cancelled by the


G49 command or by issuing 0 for the tool number.
(Note 2) The tool position compensation is cancelled by the M06 (tool change) or
by the G100 (nonstop ATC) command.
(Note 3) Refer to the next section “Axis travel with tool position compensation
command” for axis operation when there are no travel commands for
G143H_, G144H_, or for G49 during tool position compensation and H0
command blocks.
(Note 4) When an X-, Y and Z-axes command is issued during tool position
compensation for reference position return (G28) or No. 2 to 6 reference
position return (G30), the tool position compensation stays enabled while
traveling to the middle point. And, the tool position compensation is
cancelled temporarily while travelling to the reference position. Refer to
the next section “Resume tool position compensation” for travel when
the tool position compensation that was cancelled resumes. When the
tool position compensation resumes, if the incremental mode is enabled,
it is the equivalent of traveling from the absolute coordinates right before.
(Note 5) If the G53X_Y_Z_ command is issued during the tool position
compensation, the tool position compensation is temporarily cancelled
during travel.
(Note 6) A range check is performed when the range for the tool that is specified
in H code is set for the following items: the tool length offset, the tool
length wear offset, the tool position offset and the tool position wear
offset. The alarm <<Comm. issued to area other than (tool) data area>> is
triggered when the command area is outside of the range.

2019/09/02 4 - 67 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

(Note 7) If a tool length offset command (G143 and G144) is issued during G43
and G44 modals, an alarm is triggered. Note, if a tool change command
(G100 and M06) is issued on the same block, no alarm is triggered.

4.4.2 Axis Travel with Tool Position Compensation


1. X-, Y- and Z-axis travel for tool position compensation command
When there are X-, Y- and Z-axes travel commands for the command block G143 / G144 /
G49, such as G143 H_X_Y_Z_, G144 H_X_Y_Z_ and G49 X_Y_Z_, the X-, Y-, and Z- axes
in that block travel to the position that takes into account the compensation specified in H
code.
When there are no X-, Y- and Z-axis travel commands for G143 / G144 / G49 / H0 command
blocks, such as G143H_, G144H_ or tool position compensation G49 and H0, the operation
follows the user parameter noted below.
User parameter <Travel of X, Y
or Z axis when tool length/tool Type 1 Type 2
position offset is changed>
User parameter <Error check
when traveling during tool Check No check -
4 length/tool position offset cancel>
G143/G144 command block Compensation specified in H code and X-, Y- and Axis does not travel
without X-, Y- and Z-axes Z-axes travel (Travels to compensated
command position specified in H
Ex.1) G143H1; code for the next X-, Y-
Ex:2) G143; and Z-axes travel
Ex.3) H1; (Tool position command)
compensation enabled)
G49/H0 command block without When the current Current tool position Axis does not travel
X-, Y- and Z-axes command compensation for X-, Y- compensation and X-, (Travels to position
(Tool position compensation and Z-axes is another Y- and Z-axes travel where the current tool
enabled) value other than 0, the (Note 2) position compensation is
Ex.1) G49; alarm <<Tool position cancelled for the next X-,
Ex.2) H0; offset cancel error>> is Y- and Z-axis travel
triggered. command)
(Note 2, 3 and 4)

X-, Y- and Z-axes motion example


(Workpiece coordinate zero → X: -100.000, Y: -200.000, Z: 50.000, H1 offset → X: 5.000, Y:
0.000 and Z: 120.000)
<Travel of X, Y or Z axis when tool length/tool position offset is changed> : <Type 1>
<Error check when traveling during tool length/tool position offset cancel> : <Yes>
X Y Z
Machine coordinate Machine coordinate Machine coordinate
G90G0X0.Y0.Z100.; -100.000 -200.000 150.000
G143H1; -95.000 -200.000 270.000
G0X10.Y20.Z80.; -85.000 -180.000 250.000
G49; The alarm <<Tool position offset cancel error>> is triggered.

<Travel of X, Y or Z axis when tool length/tool position offset is changed> : <Type 1>
<Error check when traveling during tool length/tool position offset cancel> : <No>
X Y Z
Machine coordinate Machine coordinate Machine coordinate
G90G0X0.Y0.Z100.; -100.000 -200.000 150.000
G143H1; -95.000 -200.000 270.000
G0X10.Y20.Z80.; -85.000 -180.000 250.000
G49; -90.000 -180.000 130.000

<Travel of X, Y or Z axis when tool length/tool position offset is changed> : <Type 2>*
X Y Z
Machine coordinate Machine coordinate Machine coordinate
G90G0X0.Y0.Z100.; -100.000 -200.000 150.000
G143H1; -100.000 -200.000 150.000
G0X10.Y20.Z80.; -85.000 -180.000 250.000
G49; -85.000 -180.000 250.000

2019/09/02 4 - 68 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

* The operation is the same regardless if the parameter <Error check when traveling during
tool length/tool position offset cancel> is set to <Yes> or <No>.

(Note 1) When a circular interpolation command or an involute interpolation


command is issued during travel, an alarm is triggered.
(Note 2) When the tool position compensation is temporarily canceled as per G28
or G53, cancel travel for the compensation does not occur even for a
G49/H0 command block without a X-, Y- or Z-axis command. As a result,
the alarm <<Tool position offset cancel error>> is not triggered even
when the parameter <Travel of X, Y or Z axis when tool length/tool
position offset is changed> is set to <0: Type 1> and the parameter
<<Error check when traveling during tool length/tool position offset
cancel>> is set to <0: No>.
G90
G143 H1 X0. Y0. Z100.
G91 G28 X0 Y0 Z0
G49 ←No X-, Y- and Z-axes travel
(Note 3) An alarm is not triggered during scaling, mirror imaging and rotational
transformation because the axis travel command is on the same block as
G49 and H0 and an axis other than the axis that was specified may
4
operate.
(Note 4) When the parameter <X-, Y- and Z-axes travel during current rotary fixture
offset change> is set to <Type 2>, the alarm is not triggered if the X-, Y-
and Z-axes operate following a change in the workpiece coordinates.
(Note 5) When the parameter <Travel of X, Y or Z axis when tool length/tool
position offset is changed> is set to <1: Type 2> and the G143 or G144
command is issued on the same block as G53, an alarm is triggered.

2. Tool position compensation resumed


The tool position compensation can be temporarily canceled due to one of the following X-,
Y- and Z-axes commands: reference position return (G28/G30), machine coordinate selection
(G53), positioning to the measurement position (G120) or external indexing on the pallet
(M410/M411). The compensation or offset is resumed during the next X-, Y- or Z-axis travel
command, H command or G143/G144 command.

Ex:
G28 X-50. Y-50. Z400.; ← Temporarily cancels the tool position compensation
···;
G0 X-100. Y-100.; ← X- and Y-axes tool position compensation resumes
···;
G0 Z300.; ← Z-axis tool position compensation resumes

2019/09/02 4 - 69 eCOM3NCPR4
Chapter 4 Preparation Functions (Compensation Functions)

(This page was intentionally left blank.)

2019/09/02 4 - 70 eCOM3NCPR4
Chapter 5 Preparation Function (Canned Cycle)

CHAPTER 5

PREPARATION FUNCTION
(CANNED CYCLE)
5

5.1 Outline
5.2 List of Canned Cycle Function
5.3 Basic Operation of Canned Cycle
5.4 General Rules of Canned Cycle
5.5 Details of Canned Cycle
5.6 One-shot Canned Cycle
5.7 Canned Cycle for Tool Change (Non-stop ATC)
(G100)
5.8 Coordinate Calculation Function

2019/09/02 5-1 eCOM3NCPR5


Chapter 5 Preparation Function (Canned Cycle)

5.1 Outline
A sequence of machine operations mostly in the tool axis direction is included in a single block
and initiated by a single G code.

5.2 List of Canned Cycle function


Functions of canned cycle
Spindle
Operations at hole
G code Application Boring Retract rotation at
position
return point
G73 High speed peck drilling Intermittent Dwell Rapid traverse
feed
G74 Reverse tapping Cutting feed Dwell→Spindle Cutting feed Stop
CW
G76 Fine balling Cutting feed Dwell→ Rapid traverse normal
Orientation rotation
G77 Tapping Intermittent Spindle CCW Cutting feed Stop
(Synchro mode) feed
G78 Reverse tapping Intermittent Spindle CW Cutting feed Stop
(Synchro mode) feed
G80 Cancel - - - -

G81 Drilling Cutting feed Dwell Rapid traverse


5
G82 Drilling Cutting feed Dwell Rapid traverse

G83 Peck drilling Intermittent Dwell Rapid traverse


feed
G84 Tapping Cutting feed Dwell→Spindle Cutting feed Stop
CCW
G85 Boring Cutting feed Dwell Cutting feed

G86 Boring Cutting feed Dwell→Spindle Rapid traverse normal


stop rotation
G87 Back balling Cutting feed Dwell→ Rapid traverse normal
Orientation rotation
G89 Boring Cutting feed Dwell Cutting feed

G177 End milling/tapping Cutting feed Spindle CCW Cutting feed Stop

G178 End milling/tapping Cutting feed Spindle CW Cutting feed Stop

G181 Double drilling Cutting feed Dwell Rapid traverse

G182 Double drilling Cutting feed Dwell Rapid traverse

G185 Double boring Cutting feed Dwell Cutting feed


Rapid traverse
G186 Double boring Cutting feed Dwell→Spindle Rapid traverse normal
stop rotation
G189 Double boring Cutting feed Dwell Cutting feed
Rapid traverse
G277 Deep hole tapping cycle Intermittent Spindle CCW Cutting feed Stop
(synchro mode) feed
G278 Deep hole reverse tapping Intermittent Spindle CW Cutting feed Stop
cycle (synchro mode) feed

2019/09/02 5-2 eCOM3NCPR5


Chapter 5 Preparation Function (Canned Cycle)

5.3 Basic Operation of Canned Cycle


A canned cycle generally consists of six motions:

Motion 1 ……… Move the tool to hole machining position (X-Y axes) by rapid feed
Motion 2 ……… Move the tool to R point by rapid feed
Motion 3 ……… Hole machining (cutting feed)
Motion 4 ……… Operation at the bottom of a hole
Motion 5 ……… Retreat the tool to R point by rapid feed / cutting feed
Motion 6 ……… Return the tool to initial point by rapid feed

Motion 1
Initial point

Motion 2 Motion 6

R point 5

Motion 3 Motion 5

Z point
Motion 4

In a single block operation, the control stops at the end of motions 1, 2, and 6, respectively.

(Note) Temporary stop availability in tapping cycles (G74, G77, G78, G84, G177,
G178, G277, and G278)

1. Temporary stop is available for motions 1, 2, and 6.


2. Temporary stop is not available for motions 3 to 5. When temporary stop-involving operations
are performed (pressing the stop switch, selecting the manual mode, etc.), the control stops at
the end of motion 5. This also applies when you press the reset key in motion 3, 4, or 5.

2019/09/02 5-3 eCOM3NCPR5


Chapter 5 Preparation Function (Canned Cycle)

5.4 General Rules of Canned Cycle


5.4.1 Canned Cycle Operation Commands
(I) Data format G90 Absolute
G91 Incremental

(II)Return level G98 Return to initial point level


G99 Return to R point level

G73, G74
G76 ~ G78
G81 ~ G87
G89 Please refer to “5.2 List of canned cycle
(III) Hole machining mode G177, G178 function”
G181, G182
G185, G186
G189
5 G277, G278

5.4.2 Data in Absolute and Incremental Mode


Absolute Incremental

Initial point

Z=0
R
R

R point R point
Z

Z point Z point

2019/09/02 5-4 eCOM3NCPR5


Chapter 5 Preparation Function (Canned Cycle)

5.4.3 Types of Return Points (G98, G99)


Two available tool return levels on completing a canned cycle operation are Initial Point (G98)
and R Point (G99) level.

Return to initial point level (G98) Return to R point level (G99)

Initial point

R point
R point

Z point Z point

5
(Note 1) G98 and G99 are modal commands. G98 is always effective when the
machine is powered on.

(Note 2) When a canned cycle command and a tool length offset command exist in
the same block, the tool length offset command is executed after the tool
reaches the R point. Accordingly, the initial point is saved without tool
length offset.

(Note 3) Initial point is the Z axis position in the machine coordinates when the
control is switched from the canned cycle cancel mode to the canned
cycle mode.

5.4.4 Canned Cycle Operating Conditions


Canned cycle operations are performed under the following conditions:

1. The control is in one of the hole machining blocks (G73, G74, G76 to G78, G81 to G87, G89,
G177, G178, G181 to G182, G185, G186, G189, G277, and G278) and at least one of X, Y, Z,
R, A, B, and C is included in the block.

2. Any block, including at least one of X, Y, Z, R, A, B, and C, that occurs following a hole
machining block, up until the canned cycle command is canceled in a later block.

(Note 1) In a canned cycle operation, if any of X, Y, Z, R, A, B, or C is non-existent


and other hole machining data is commanded, nothing is performed
except that the relevant hole machining data is saved.
(Note 2) The canned cycle command cannot be issued when using the turning
spindle in the following situations. After switching modals, issue the
command.
• M142 modal in progress
• G143/G144 modal in progress
(Note 3) A canned cycle command cannot be issued while the feature coordinate
is being set (after G68.2 command and before G53.1 command). A
command is possible while the feature coordinate is being indexed (after
G53.1 command).

2019/09/02 5-5 eCOM3NCPR5


Chapter 5 Preparation Function (Canned Cycle)

5.4.5 Canned Cycle Machining Data


Command
format Gxx X_ Y_ A_ B_ C_ Z_ R_ Q_ P_ F_ S_ K_;

Hole machining mode Hole position data Hole machining data Repetition count

G codes : G73, G74, G76 to G78, G81 to G87, G89, G177, G178, G181 to G182,
G185, G186, G189, G277, and G278

All canned cycle G codes are modal.

X,Y,A,B,C : Drilling position


Rapid feed is used to go to the drilling position.
An alarm occurs when an additional axis is commanded when it is not
installed.

Z : Hole bottom position


If you are in the incremental mode, Z refers to the distance from R point to
the bottom of a hole.

5 R : R point position
If you are in the incremental mode, R refers to the distance from the point
before the control enters the canned cycle mode to R point.

Q : Cutting depth, shift value, and distance to feed rate switching point.
(I) G73, G83 – Cutting depth for each stroke
(II) G77, G78, G277, G278 – Cutting depth for each stroke
(III) G76, G87 – Shift value
(IV) G177, G178 – Distance to feed rate switching point
(V) G86, G186 – Orientation angle

P : Dwell time (unit of time is the same as G04 designation)


F : Cutting feed rate
S : Spindle speed
K : Canned cycle repetition count

(Note) Canned cycle is canceled (G80) if you command the following codes
during a canned cycle operation:
• Tool change canned cycle (G100/M06)
• Changing from spindle to turning spindle (M141 to M142)
• G00 group
(G00/G01/G02/G03/G02.2/G03.2/G102/G103/G202/G203/G33/G392)
commands

2019/09/02 5-6 eCOM3NCPR5


Chapter 5 Preparation Function (Canned Cycle)

5.4.6 Canned Cycle Repetition Count


You can specify the repetition count for canned cycle operation using address K when the same
cycle is to be repeated such as drilling multiple holes at regular intervals.

The range of K is 0 to 9999.


K is effective only for the block in which it is specified.
K is assumed to be 1 if a value is not specified.
When K0 is commanded, drilling will not occur; commanded hole machining data is saved; and X
/ Y axes will travel if the relevant commands exist.

X_Y_ designates the first drilling position in incremental values (G91).


If the position is given in absolute values (G90), drilling is repeated in the same position.

Ex)

○ Final drilling


5

○ First drilling

G81X_Y_Z_R_K5F_; (G91 mode)

2019/09/02 5-7 eCOM3NCPR5


Chapter 5 Preparation Function (Canned Cycle)

5.5 Details of Canned Cycle


5.5.1 High Speed Peck Drilling Cycle (G73)
Command format G73 X_ Y_ Z_ R_ P_ Q_ F_;

Return
R point

d
Rapid feed

5 Cutting feed

Q
d

Z point

Dwell (P sec)

• Retract value d is set on the <G73 relief amount> of User parameter (Switch 1).
• If a negative value is entered for the cutting amount Q, the algebraic symbol (-) is ignored.

2019/09/02 5-8 eCOM3NCPR5


Chapter 5 Preparation Function (Canned Cycle)

5.5.2 Reverse Tapping Cycle (G74)

Command format G74 X_ Y_ Z_ R_ P_ F_ S_;

Return point

Rapid feed

Cutting feed
R point Spindle stop
Spindle CW

Spindle CCW
5

Z point

Spindle stops at Z point; dwells for P sec; and rotates clockwise.

• The tool stops on finally reaching the R point when a temporary stop is commanded at any
moment en route from R to Z point and further back to the R point.
• For feed per minute (G94), thread pitch = cutting feed rate ÷ spindle speed.
• For feed per revolution (G95), thread pitch = cutting feed rate.
• The alarm <<Spindle Speed Error>> occurs if S exceeds the <Max. tapping speed> of
Machine parameter (System 1)
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.
• When the screw pitch is less than the <Minimum tapping pitch> in the Machine parameter
(System 1), the alarm <<Pitch data error>> is triggered.
• During the tapping operation, the operation is carried out with the FEEDRATE OVERRIDE
and the SPINDLE OVERRIDE at 100%.

2019/09/02 5-9 eCOM3NCPR5


Chapter 5 Preparation Function (Canned Cycle)

5.5.3 Fine Boring Cycle (G76)

Command format G76 X_ Y_ Z_ R_ Q_ V_ P_ F_ S_;

Return point

R point

Rapid feed
5 Cutting feed
Z point
Shift (rapid feed)
Q
Spindle CW

• Dwell (P sec)
• Spindle stops in V-specified rotational position

• The sign is ignored even when a negative value command is issued for the amount of shift for
Q.
• Shift direction, one from among +X, -X, +Y, and -Y, is selected and set beforehand using
<G76,G87 shift direction> of User parameter (Switch 1).
• Shift direction is selectable from only 4 directions of +X, -X, +Y, and -Y. Install the tool such
that the bit faces one of these directions when the spindle stops at the specified rotational
position.
• 0° is considered commanded when you omit V.

2019/09/02 5 - 10 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.4 Tapping Cycle (Synchro Mode) (G77)


I_
Command format G77 X_ Y_ Z_ R_ Q_ S_;
J_

Return point

R point
Spindle stop

d Rapid feed 5
Cutting feed

Spindle CW
Q

d Spindle CCW

Z point

• Retract value d is set on the <G77,G78 relief amount> of User parameter (Switch 1).
• If a negative value is entered for the cutting amount Q, the algebraic symbol (-) is ignored.
• The tool stops on finally reaching the R point when a temporary stop is commanded at any
moment en route from R to Z point and further back to the R point.
• Screw pitch or number of threads must be designated.
Enter the value after I and J, respectively.
• When I and J exist in the same block, the former is used.
• The alarm <<Spindle Speed Error>> occurs if S exceeds the <Max. tapping speed> of
Machine parameter (System 1).
• The tool returns with the <Max. tapping speed> of Machine parameter (System 1) when
<Tapping cycle return rotational frequency> of User parameter (Switch 1) is selected to
<1:Max. speed.>
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.
• When the screw pitch is less than the <Minimum tapping pitch> in the Machine parameter
(System 1), the alarm <<Pitch data error>> is triggered.

2019/09/02 5 - 11 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

• During the tapping operation, the operation is carried out with the FEEDRATE OVERRIDE
and the SPINDLE OVERRIDE at 100%.

High speed tap return


Spindle speed at return of tapping cycle (synchro mode) (G77) is varied.

I_
Command format G77 X_ Y_ Z_ R_ Q_ S_ L_;
J_

• Address L commands the spindle speed at return.


• Spindle speed at infeed and return is identical when address L is omitted.
• Once commanded, address L behaves in a modal manner throughout the canned cycle mode.
• The alarm <<Spindle Speed Error>> occurs if address L command value exceeds the <Max.
tapping speed> of Machine parameter (System 1).
• The tool moves according to the address S value when address L value is smaller than it.
• Address L is prioritized even if <Tapping cycle return rotational frequency> of User parameter
(Switch 1) is set to <1: Max. speed>.

5 5.5.5 Reverse Tapping Cycle (Synchro Mode) (G78)

I_
Command format G78 X_ Y_ Z_ R_ Q_ S_;
J_

Return point

R point
Spindle stop

Rapid feed
d
Cutting feed

Spindle CW
Q
Spindle CCW
d

Z point

2019/09/02 5 - 12 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

• Retract value d is set on the <G77,G78 relief amount> of User parameter (Switch 1).
• If a negative value is entered for the cutting amount Q, the algebraic symbol (-) is ignored.
• The tool stops on finally reaching the R point when a temporary stop is commanded at any
moment en route from R to Z point and further back to the R point.
• Screw pitch or number of threads must be designated.
Enter the value after I and J, respectively.
• When I and J exist in the same block, the former is used.
• The alarm <<Spindle Speed Error>> occurs if S exceeds the <Max. tapping speed> of
Machine parameter (System 1).
• The tool returns with the <Max. tapping speed> of Machine parameter (System 1) when
<Tapping cycle return rotational frequency> of User parameter (Switch 1) is selected to
<1:Max. speed.>
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.
• When the screw pitch is less than the <Minimum tapping pitch> in the Machine parameter
(System 1), the alarm <<Pitch data error>> is triggered. 5
• During the tapping operation, the operation is carried out with the FEEDRATE OVERRIDE
and the SPINDLE OVERRIDE at 100%.

High speed tap return


Spindle speed at return of reverse tapping cycle (synchro mode) (G78) is varied.

I_
Command format G78 X_ Y_ Z_ R_ Q_ S_ L_;
J_

• Address L commands the spindle speed at return.


• Spindle speed is the same at infeed and return if you omit address L.
• Once commanded, address L behaves in a modal manner throughout the canned cycle mode.
• The alarm <<Spindle Speed Error>> occurs if address L command value exceeds the <Max.
tapping speed> of Machine parameter (System 1).
• The tool moves according to the address S value when address L value is smaller than it.
• Address L is prioritized even if <Tapping cycle return rotational frequency> of User parameter
(Switch 1) is set to <1: Max. Speed>.

2019/09/02 5 - 13 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.6 Drilling Cycle (G81, G82)

G81
Command format X_ Y_ Z_ R_ P_ F_;
G82

Return point

R point

5
Rapid feed

Z point Cutting feed


Dwell (P sec)

High speed cycle

Feed rate at start and end of cutting in drilling cycle (G81 or G82) is varied.

G81
Command format X_ Y_ Z_ R_ P_ W_ V_ F_ E_ L_;
G82

W : Feed rate switching point


Distance from R point irrespective of absolute (G90) or incremental (G91) mode.
V : Feed rate switching point
Distance from Z point irrespective of absolute (G90) or incremental (G91) mode.
E : Feed rate for range W from R point
L : Feed rate for range V from Z point

2019/09/02 5 - 14 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

Return point

R point
Feed rate E W

Feed rate F

Rapid feed
Feed rate L V
Z point Cutting feed
Dwell (P sec)
5
5.5.7 Peck Drilling Cycle (G83)

Command format G83 X_ Y_ Z_ R_ P_ Q_ F_;

Return point

R point

d Rapid feed

Cutting feed

Z point
Dwell (P sec)

• Cutting start point d is set on the <G83 cutting start position> of User parameter (Switch 1).
• If a negative value is entered for the cutting amount Q, the algebraic symbol (-) is ignored.

2019/09/02 5 - 15 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.8 Tapping Cycle (G84)

Command format G84 X_ Y_ Z_ R_ P_ F_ S_;

Return point

R point Spindle stop

Rapid feed

Cutting feed
5
Spindle CW
Z point
Spindle CCW

The spindle stops at Z point, dwells for P sec, and then rotates reversely.

• The tool stops on finally reaching the R point when a temporary stop is commanded at any
moment en route from R to Z point and further back to the R point.
• For feed per minute (G94), thread pitch = cutting feed rate ÷ spindle speed.
• For feed per revolution (G95), thread pitch = cutting feed rate.
• The alarm <<Spindle Speed Error>> occurs if S exceeds the <Max. tapping speed> of
Machine parameter (System 1).
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.
• When the screw pitch is less than the <Minimum tapping pitch> in the Machine parameter
(System 1), the alarm <<Pitch data error>> is triggered.
• During the tapping operation, the operation is carried out with the FEEDRATE OVERRIDE
and the SPINDLE OVERRIDE at 100%.

2019/09/02 5 - 16 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.9 Boring Cycle (G85, G89)

G85
Command format X_ Y_ Z_ R_ P_ F_;
G89

Return point

R point

Rapid feed
5
Cutting feed

Z point

High speed cycle


Feed rate at return of boring cycle (G85 or G89) is varied.

G85
Command format X_ Y_ Z_ R_ P_ F_ E_;
G89

F : Feed rate from R to Z point


E : Feed rate from Z to R point

Return point

R point

Rapid feed
Z point Cutting feed
Dwell (P sec)

2019/09/02 5 - 17 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.10 Boring Cycle (G86)

Command format G86 X_ Y_ Z_ R_ P_ Q_ F_ S_;

Return point

R point

Rapid feed

Cutting feed

Z point
5 Dwell (P sec) Spindle stop
Spindle CW

(When Q is omitted)

High speed cycle


Feed rate at start and end of cutting in boring cycle (G86) is varied.

Command format G86 X_ Y_ Z_ R_ P_ W_ V_ Q_ F_ E_ L_ S_;

W : Feed rate switching point


Distance from R point irrespective of absolute (G90) or incremental (G91) mode.
E : Feed rate for range W from R point
V : Feed rate switching point
Distance from Z point irrespective of absolute (G90) or incremental (G91) mode.
L : Feed rate for range V from Z point
Q : To stop the spindle at a specified rotatonal position at Z point, specify the desired
angle. If the entry is omitted, the spindle just stops.

2019/09/02 5 - 18 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

Spindle turns CW
on reaching R
point

Return

R point
Feed rate E W

Feed rate F

Rapid feed
Feed rate L V
Z point Cutting feed
Spindle stop
Dwell (P sec)
(When Q is omitted) Spindle CW
5

5.5.11 Back Boring Cycle (G87)


Command format G87 X_ Y_ Z_ R_ Q_ P_ V_ F_ S_;

Single block stop point

Spindle stops at
V-specified rotational
position
Z point

Dwell (P sec)
Rapid feed

Cutting feed
R point
Shift (rapid feed)

Single block stop point Spindle CW

Spindle CCW

• The sign is ignored even when a negative value command is issued for the amount of shift for
Q.
• Shift direction, one from among +X, -X, +Y, and –Y, is selected and set beforehand using
<G76,G87 shift direction> of User parameter (Switch 1).

2019/09/02 5 - 19 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

• Shift direction is selectable from only 4 directions of +X, -X, +Y, and –Y. Install the tool such
that the bit faces one of these directions when the spindle stops at the specified rotational
position.
• G99 (Return to R point level) does not exist.
• 0° is considered commanded when you omit V.

5.5.12 End Milling/Tapping Cycle (G177)

I_
Command format G177 X_ Y_ Z_ R_ S_ L_ Q_ E_;
J_

I : Screw pitch in the tapping section


J : Number of threads in the tapping section
S : Spindle speed
The spindle starts rotation simultaneously with the X/Y axes traveling
L : Spindle return speed from Z to R point
S-specified speed applies in the absence of the command
Q : Feed rate switching point
Distance from R point irrespective of absolute (G90) or incremental (G91) mode.
5 Tapping starts from this position
E : Feed rate in section Q

Return point

R point
Feed rate E Q
Spindle speed S
Rapid feed
Pitch (I) or number
of threads (J)
Cutting feed
Z point
Spindle CW

Spindle CCW

• The alarm <<Spindle Speed Error>> occurs if S exceeds the <Max. tapping speed> of
Machine parameter (System 1).
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.
• When the screw pitch is less than the <Minimum tapping pitch> in the Machine parameter
(System 1), the alarm <<Pitch data error>> is triggered.

2019/09/02 5 - 20 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.13 End Milling/Tapping Cycle (G178)

I_
Command format G178 X_ Y_ Z_ R_ S_ L_ Q_ E_;
J_

I : Screw pitch in the tapping section


J : Number of threads in the tapping section
S : Spindle speed
The spindle starts rotation simultaneously with the X/Y axes traveling
L : Spindle return speed from Z to R point
S-specified speed applies in the absence of the command
Q : Feed rate switching point
Distance from R point irrespective of absolute (G90) or incremental (G91) mode
Tapping starts from this position
E : Feed rate in section Q

Return point

R point
Feed rate E Q
Spindle speed S
Rapid feed
Pitch (I) or number
of threads (J)
Cutting feed
Z point
Spindle CW

Spindle CCW

• The alarm <<Spindle Speed Error>> occurs if S exceeds the <Max. tapping speed> of
Machine parameter (System 1).
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.
• When the screw pitch is less than the <Minimum tapping pitch> in the Machine parameter
(System 1), the alarm <<Pitch data error>> is triggered.

2019/09/02 5 - 21 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.14 Double Drilling Cycle (G181, G182)

G181
Command format X_ Y_ Z_ R_ I_ J_ P_ W_ V_ F_ E_ L_;
G182

I : Rapid feed start point (depends on G90/G91)


Distance from R point in the incremental mode
J : Cutting feed start point (depends on G90/G91)
Distance from I point in the incremental mode
W : Feed rate switching point
Incremental mode irrespective of G90 or G91
V : Feed rate switching point
Incremental mode irrespective of G90 or G91
E : Feed rate for range W
L : Feed rate for range V

5
Return point

R point
Feed rate E W
Feed rate F

Feed rate L V
I point
Rapid feed
J point
Feed rate E W
Rapid feed
Feed rate F

Feed rate L V Cutting feed


Z point
Dwell (P sec)

2019/09/02 5 - 22 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.15 Double Boring Cycle (G185, G189)

G185
Command format X_ Y_ Z_ R_ I_ J_ P_ F_ E_;
G189

I : Rapid feed start point (depends on G90/G91)


Distance from R point in the incremental mode
J : Cutting feed start point (depends on G90/G91)
Distance from I point in the incremental mode
F : Cutting feed rate from R to Z point
E : Cutting feed rate from Z to R point

R point
5
Feed rate F Feed rate E

I point

Rapid feed

J point
Rapid feed
Feed rate F Feed rate E
Cutting feed
Z point
Dwell (P sec)

2019/09/02 5 - 23 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.16 Double Boring Cycle (G186)


Commad format G186 X_ Y_Z_ R_ I_ J_ P_ W_ V_ Q_ F_ E_ L_ S_;

I : Rapid feed start point (depends on G90/G91)


Distance from R point in the incremental mode
J : Cutting feed start point (depends on G90/G91)
Distance from I point in the incremental mode
W : Feed rate switching point
Incremental mode irrespective of G90 or G91
V : Feed rate switching point
Incremental mode irrespective of G90 or G91
Q : To stop the spindle at a specified rotatonal position at Z point, specify the desired
angle. If the entry is omitted, the spindle just stops.
E : Feed rate for range W
L : Feed rate for range V

Spindle turns CW on reaching R point

5 Return point
Spindle turns CW on reaching
Return point

R point
Feed rate E W

Feed rate F

Feed rate L V
I point

J point
Feed rate E W
Rapid feed
Feed rate F
Cutting feed
Feed rate L V
Z point
Dwell (P sec) Spindle stop Spindle CW
(When Q is omitted)

2019/09/02 5 - 24 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.17 Deep Hole Tapping Cycle (Synchro Mode) (G277)

I_
Commad format G277 X_ Y_ Z_ R_ Q_ S_;
J_

Return point

R point Spindle stop

Q
Rapid feed
5
Cutting feed

Spindle CW
Q
Spindle CCW

Z point

• If a negative value is entered for the cutting amount Q, the algebraic symbol (-) is ignored.
• When a temporary stop is commanded during cutting, the control stops on returning from the
hole bottom position Z to the R point.
• Screw pitch or number of threads must be designated.
Enter the value after I and J, respectively.
• When I and J exist in the same block, the former is used.
• An alarm occurs if S exceeds the <Max. tapping speed> of Machine parameter (System 1).
• When <Tapping cycle return rotational frequency> of User parameter (Switch 1) is set to <1:
Max. speed>, the tool returns with <Max. tapping speed>of Machine parameter (System 1).
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.
• When the screw pitch is less than the <Minimum tapping pitch> in the Machine parameter
(System 1), the alarm <<Pitch data error>> is triggered.
• During the tapping operation, the operation is carried out with the FEEDRATE OVERRIDE
and the SPINDLE OVERRIDE at 100%.

2019/09/02 5 - 25 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.18 Reverse Deep Hole Tapping Cycle (Synchro Mode)


(G278)
I_
Commad format G278 X_ Y_ Z_ R_ Q_ S_;
J_

Return point

R point Spindle stop

Q
Rapid feed
5 Cutting feed

Spindle CW
Q
Spindle CCW

Z point

• If a negative value is entered for the cutting amount Q, the algebraic symbol (-) is ignored.
• When a temporary stop is commanded during cutting, the control stops on returning from the
hole bottom position Z to the R point.
• Screw pitch or number of threads must be designated.
Enter the value after I and J, respectively.
• When I and J exist in the same block, the former is used.
• An alarm occurs if S exceeds the <Max. tapping speed> of Machine parameter (System 1)
• When <Tapping cycle return rotational frequency> of User parameter (Switch 1) is set to <1:
Max. speed>, the tool returns with <Max. tapping speed> of Machine parameter (System 1).
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.
• When the screw pitch is less than the <Minimum tapping pitch> in the Machine parameter
(System 1), the alarm <<Pitch data error>> is triggered.
• During the tapping operation, the operation is carried out with the FEEDRATE OVERRIDE
and the SPINDLE OVERRIDE at 100%.

2019/09/02 5 - 26 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

High speed tap return


Spindle speed at return of synchro tap (G277, G278) is varied.

G277 I_
Commad format X_ Y_ Z_ R_ Q_ S_ L_;
G278 J_

• Address L commands spindle speed at returnm.


• Spindle speed at infeed and return is identical when address L is omitted.
• Once commanded, address L behaves in a modal manner throughout the canned cycle mode.
• An alarm occurs if address L command value exceeds the maximum tap speed.
• The tool moves according to the address S value when address L value is smaller than it.
• Address L is prioritized even if <Tapping cycle return rotational frequency> of User parameter
(Switch 1) is set to <1: Max. Speed>.

5.5.19 Reducing Step of Canned Cycle


Cutting depth is gradually reduced in canned cycles of G73, G77, G78, G83, G173, and G183.

1. High speed peck drilling cycle (G73) (reducing step)

Command format G73 X_ Y_ Z_ R_ P_ W_ V_ F_; 5


W : 1st cutting feed
V : Minimum cutting feed

Return point

R point Spindle stop

2nd cutting depth


d

Rapid feed
3rd cutting depth
d Cutting feed
•••

V
Z point
Dwell (P sec)

• Retract value d is set on the <G73 relief amount> of User parameter (Switch 1).
• If a negative value is entered for the cutting amount V and W, the algebraic symbol (-) is
ignored.

2019/09/02 5 - 27 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

2. Peck drilling cycle (G83) (reducing step)

Command format G83 X_ Y_ Z_ R_ P_ W_ V_ F_;

W : 1st cutting feed


V : Minimum cutting feed

Return point

R point

5 d

2nd cutting depth


d

3rd cutting depth


d
•••

Z point
Dwell (P sec)
Rapid feed

Cutting feed

• Cutting start point d is set on the <G83 cutting start position> of User parameter (Switch 1).
• If a negative value is entered for the cutting amount V and W, the algebraic symbol (-) is
ignored.

2019/09/02 5 - 28 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

3. Tapping cycle (synchro mode) (G77) (reducing step)

I_
Command format G77 X_ Y_ Z_ R_ W_ V_ S_;
J_

W : 1st cutting feed


V : Minimum cutting feed

Return point

R point Spindle stop

W
d 5
2nd cutting depth
d
Rapid feed

3rd cutting depth Cutting feed


d Spindle CW

Spindle CCW
•••

V
Z point

• Retract value d is set on the <G77,G78 relief amount> of User parameter (Switch 1).
• If a negative value is entered for the cutting amount V and W, the algebraic symbol (-) is
ignored.
• The tool stops on finally reaching the R point when a temporary stop is commanded at any
moment en route from R to Z point and further back to the return point.
• Screw pitch or number of threads must be designated.
Enter the value after I and J, respectively.
• When I and J exist in the same block, the former is used.
• The alarm <<Spindle Speed Error>> occurs if S exceeds the <Max. tapping speed> of
Machine parameter (System 1).
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.

2019/09/02 5 - 29 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

4. Reverse tapping cycle (synchro mode) (G78) (reducing step)

I_
Command format G78 X_ Y_ Z_ R_ W_ V_ S_;
J_

W : 1st cutting feed


V : Minimum cutting feed

Return point

R point Spindle stop

5 W

2nd cutting depth


d
Rapid feed

3rd cutting depth Cutting feed


d Spindle CW

Spindle CCW
•••

Z point

• Retract value d is set on the <G77,G78 relief amount> of User parameter (Switch 1).
• If a negative value is entered for the cutting amount V and W, the algebraic symbol (-) is
ignored.
• The tool stops on finally reaching the R point when a temporary stop is commanded at any
moment en route from R to Z point and further back to the R point.
• Screw pitch or number of threads must be designated.
Enter the value after I and J, respectively.
• When I and J exist in the same block, the former is used.
• The alarm <<Spindle Speed Error>> occurs if S exceeds the <Max. tapping speed> of
Machine parameter (System 1).
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.

2019/09/02 5 - 30 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5. Deep hole tapping cycle (synchro mode) (G277) (reducing step)

I_
Command format G277 X_ Y_ Z_ R_ W_ V_ S_;
J_

W : 1st cutting feed


V : Minimum cutting depth

Return point

R point Spindle stop

W
5
Rapid feed

Cutting feed

Spindle CW
2nd cutting depth
Spindle CCW

3rd cutting depth


•••

Z point

• If a negative value is entered for the cutting amount V and W, the algebraic symbol (-) is
ignored.
• When a temporary stop is commanded during cutting, the control stops on returning from the
hole bottom position Z to the R point.
• Screw pitch or number of threads must be designated.
Enter the value after I and J, respectively.
• When I and J exist in the same block, the former is used.
• An alarm occurs if S exceeds the <Max. tapping speed> of Machine parameter (System 1).
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.

2019/09/02 5 - 31 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

6. Reverse deep hole tapping cycle (synchro mode) (G278) (reducing


step)

I_
Command format G278 X_ Y_ Z_ R_ W_ V_ S_;
J_

W : 1st cutting feed


V : Minimum cutting feed

Return
point

R point Spindle stop


5
W

Rapid feed

Cutting feed

Spindle CW
2nd cutting depth
Spindle CCW

3rd cutting depth


•••

V
Z point

• If a negative value is entered for the cutting amount V and W, the algebraic symbol (-) is
ignored.
• When a temporary stop is commanded during cutting, the control stops on returning from the
hole bottom position Z to the R point.
• Screw pitch or number of threads must be designated.
Enter the value after I and J, respectively.
• When I and J exist in the same block, the former is used.
• An alarm occurs if S exceeds the <Max. tapping speed> of Machine parameter (System 1).
• When the synchronized error for the Z-axis and spindle exceeds the Machine parameter
(System 1) <<Synchronized tapping error limit>> during tapping, the alarm <<The tapping
synchronous error is too big.>> is triggered.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <0: Level 4> and this alarm is triggered, the tapping operation in progress at
this time continues until the block stop, and then it stops after the tapping operation is
complete.
When the User parameter (Switch 1) <The tapping synchronous error is too big - alarm stop
level> is set to <1: Level 5> and this alarm is triggered, it immediately stops.

2019/09/02 5 - 32 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

7. 2nd and after cutting depth in G73, G83, G173, and G183
2nd and after cuttring depth in canned cycle G73, G83, G173, and G183 is shown below.
Cutting depth = Factor * 1st cutting depth (W)

Count 2 3 4 5 6 7 8 9
Factor 0.825 0.675 0.525 0.425 0.35 0.3 0.225 0.175

10 11 12 13 14
0.15 0.1 0.1 0.075 0.075

• Use the factor for the 14th count to obtain the 15th and after cutting depth.
• When the cutting depth gets smaller than V, the tool will cut by the V dimension.

8. 2nd and after cutting depth in G77, G78, G273, and G283
2nd and after cuttring depth in canned cycle G77 and G78 is shown below.
Cutting depth = Factor * 1st cutting depth (W)

Count 2 3 4 5 6 7 8 9
Factor 0.85 0.65 0.55 0.4 0.35 0.3 0.2 0.2

10 11 12 13 14 5
0.15 0.1 0.1 0.05 0.05

• Use the factor for the 14th count to obtain the 15th and after cutting depth.
• When the cutting depth gets smaller than V, the tool will cut by the V dimension.

(Note) Reducing and constant steps are switched using W and Q commands.
• When W and Q commands exist in the same block, the W command is
used.
• When W and Q are not commanded, or zero is specified, the whole
depth is cut by a single pass.
• When V is not commanded, or zero is specified, the following applies
(for type 1 minimum setting unit):
V = 0.001 (metric system)
V = 0.0001 (inch system)

2019/09/02 5 - 33 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.5.20 Canned Cycle Cancel (G80)


Canned cycles (G73, G74, G76 to G78, G81 to G87, G89, G177, G178, G181 to G182, G185,
G186, G189, G277, and G278) are canceled and ordinary machining resumes. The hole machining
data is canceled except for point R and point Z.

Command format G80;

(Note 1) Cancelling the canned cycle is possible by G80 or any of the following
commands below.
- Canned cycle (G100/M06) for tool change
- Change from spindle to lathe spindle (M141 → M142)
- G00 group
(G00/G01/G02/G03/G02.2/G03.2/G102/G103/G202/G203/G33/G392)
commands
(Note 2) Axis travel is performed after canceling canned cycles if axis travel is
commanded in the same G80 block.

5.5.21 General Precautions for Canned Cycle


1. For a canned cycle without spindle rotation control (G73, G81 to G83, G85, G89, G181 to
5 G182, G185, and G189), the spindle must be rotated beforehand by M code.
2. When M code is commaned in the same block together with canned cycle command, the M
code is executed simultaneously with or after the first X/Y axis positioning. When the count
(K) is specified, the M code is executed in the initial instance, and will not be executed
thereafter.
3. When M00 or M01 is commanded in the same block as canned cycle command, spindle and
coolant will stop after X/Y axes positioning, and no automatic recover is available. Command,
when necessary, in manual or MDI operation.
4. The following occurs when G00 to G03,G02.2 , and G03.2 are commanded in the same block
together with canned cycle:
• G00 G81 X_ Y_ Z_ R_ P_ F_;
G00 turns modal and G81 canned cycle is executed.
• G81 G00 X_ Y_ Z_ R_ P_ F_;
X Y, and Z axes travel according to G00 and the canned cycle is not executed.
5. You may not command M200, M201, or M120 in the same block together with canned cycle.
The alarm <<Invalid Command>> occurs.

2019/09/02 5 - 34 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.6 One-shot Canned Cycle


5.6.1 High Speed Peck Drilling Cycle (G173)

Command format G173 X_ Y_ Z_ R_ Q_ F_;

This is the cycle where return operation is removed from G73.

R point

Q
5
d Rapid feed
Cutting feed

Q
d

Z point

• Address K is ignored.

2019/09/02 5 - 35 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.6.1.1 High Speed Peck Drilling Cycle (G173) (Reducing


Step)
Reducing step is available which reduces the cutting depth gradually.
For the 2nd and after cutting depth, refer to 5.5.19 Reducing step of canned cycle.

Command format G173 X_ Y_ Z_ R_ W_ V_ F_;

W : 1st cutting feed


V : Minimum cutting feed

R point
5
W

2nd cutting depth


d

3rd cutting depth


d

Rapid feed
•••

Cutting feed
V

Z point

• Retract value d is set on the <G73 relief amount> of User parameter (Switch 1).
• If a negative value is entered for the cutting amount V and W, the algebraic symbol (-) is
ignored.

2019/09/02 5 - 36 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.6.2 Peck Drilling Cycle (G183)

Command format G183 X_ Y_ Z_ R_ Q_ F_;

This is cycle where return operation is removed from G83.

R point

d
5
Q

Rapid feed
Cutting feed

Z point

• Address K is ignored.

2019/09/02 5 - 37 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.6.2.1 Peck Drilling Cycle (G183) (Reducing Step)


Reducing step is available which reduces the cutting feed depth gradually.
For the 2nd and after cutting depth, refer to 5.5.19 Reducing step of canned cycle.

Command format G183 X_ Y_ Z_ R_ W_ V_ F_;

W : 1st cutting feed


V : Minimum cutting feed

5
W

2nd cutting depth

3rd cutting depth


d
•••

Z
Rapid feed
Cutting feed

• Cutting start point is set on the <G83 cutting start position> of User parameter (Switch 1).
• If a negative value is entered for the cutting amount V and W, the algebraic symbol (-) is
ignored.

2019/09/02 5 - 38 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.7 Canned Cycle for Tool Change (Non-stop ATC)


(G100)
5.7.1 S300X1/S500X1/S700X1/S1000X1/R450X1/R650X1/
S300X2/S500X2/S700X2/F600X1/R450X2/R650X2
Command format G100 T_ X_ Y_ Z_ R_ A_ B_ C_ L_;

(3)
Home of ATC

(2) (4)

[Distance to Z-axis zero] point

(1) (5) 5
Single block stop point

T : Tool number (1-99), or pot number (101-149), or group number


(901-930)
X、Y、A、B、C : Target value when X, Y, A, B and C axes are moved at the same
time as tool replacement operations.
Movement is rapid feed.
Z : For the target value for operation in (5), movement is rapid feed.
R : R commands are ignored.
L : Then L gives the command for tool number, magazine number and
group number.
The number specified by L is the T modal after G100.

Operation
(1) When moving to the distance to Z-axis zero point, spindle orientation is carried out at the
same time.
(Unclamping of added axes is also carried out at the same time.)
(2) Moves to ATC zero return.
When X, Y, A, B and C axes are specified, they are moved to at the same time.
(3) The magazine turns, and the tool specified by T is assigned.
(4) Moves to Z-axis zero point position.
(5) When a Z-axis command is made, the spindle moves to the instructed position.
If a main spindle command (M03 group) is made, the main spindle moves at the same time.

When <2: Equipped (lathe spindle)> is selected for the machine parameter <Optional 5th- to
8th-axis>, the lathe spindle follows the operation described later from section “5.7.2.1 Operation
when spindle is selected (M141 modal)” to section “5.7.2.3 Tool change operation when lathe
spindle is selected”.

2019/09/02 5 - 39 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

(Note 1) During cycle operation, (1) and (2), and also (4) and (5) are linked together
in their movement during machining mode.
(Note 2) The machine stops after operation (4) when the [RST] key or the [FEED
HOLD] switch is pressed between (2) and (4). However, the X-, Y-, A-, B-
and C-axis travel stops immediately at (2).
(Note 3) Switching the mode is not possible between (1) and (4).
(Note 4) It is possible to omit all addresses except the G100 address, but a T code
command has to be issued once before the G100 command is issued.
(Note 5) The cutter compensation and the nose R compensation is cancelled
when the G100 command is issued. In addition, the tool length / tool
position offset (Z-axis) is cancelled starting from (1).
(Note 6) When cutter compensation / nose R compensation commands on the
G100 block and travel commands on the selected plane axis are issued,
the cutter compensation / nose R compensation startup operation is
performed in the travel for the selected plane axis in (2). Regardless of
the <Start up/cancel> setting in the User parameter (Switch 1) the
operation is performed following the Type 1 setting.
(Note 7) The X- and Y- axes compensation is enabled from operation (2) and the
Z-axis compensation is enabled from (5) when the tool length / tool
position offset command is issued on the G100 block.
(Note 8) Only the M code commands listed in the “Simultaneous command M
code” (described later) are valid for the G100 block. The alarm
5 <<Specified M code cannot be used.>> is triggered when an unlisted or
invalid M code command is issued.
(Note 9) The alarm <<There is no *-axis option>> is triggered if an A-axis, B-axis or
C-axis command is issued when there is no A-axis, B-axis or C-axis
option.
(Note 10) The <ATC simultaneous operation start position> in the <User
parameter> is not used.
(Note 11) The <ATC reference tool length> in the <User parameter> is not used.
Even if the G100 command is issued when the tool length / tool position
offset is cancelled (G49), (1) travels the distance to Z-axis zero position.
If there is no tool length / tool position offset command on the G100 block,
(5) travels to the Z command position.
(Note 12) When a feature coordinate index (G53.1) command is issued on the G100
block, travel (A-axis, B-axis or C-axis rotation) is performed for the
feature coordinate index in (2).
The alarm <<Feature coordinate manufacturing mode engaged>> is
triggered when an A-axis, B-axis or C-axis command is issued. Issue a
command with the coordinate values in the feature coordinate system for
the X-axis, Y-axis or Z-axis.
When a command is issued on the same block as G100 and G53.1 in G01
modal, the A-axis, B-axis or C-axis travels at rapid feed.
(Note 13) When a G100 command is issued, the machining load monitor (M340) is
disabled in the machining load monitor function.

2019/09/02 5 - 40 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.7.2 M140X1/M140X2/M200X3/M300X3
Command format G100 T_ X_ Y_ Z_ R_ A_ B_ C_ L_;

(3)
Home of ATC

(2) (4)

[Distance to Z-axis zero] point

(1) (5)
Single block stop point

T : Tool number (1 – 99), or pot number (101 – 149), or group number (901
5
– 930)
X, Y, A, B and C: Target values for tool change operation and travel along X-, Y-, A-, B-
and C-axes
Travel is rapid feed
Z : Target values for operation (5) and travel is rapid feed.
R : R command is ignored.
L : Specifies the tool number, magazine number and group number after L.
The number specified in L becomes the T modal after G100.

5.7.2.1 Operation When Spindle is Selected (M141 Modal)


1. Travels the distance to Z-axis zero point and performs the spindle orientation at the same time.
(Performs the C-axis unclamp operation at the same time as well.)
2. Travels to the ATC zero point.
Travels along the corresponding axes at the same time when X-, Y-, A-, B- and C-axes are
specified.
3. The magazine turns and indexes the tool specified in T.
4. Travels the distance to Z-axis zero position.
5. Travels to the position that is specified when the Z-axis command is issued.
Performs the operation at the same time when the spindle command (M03 group) is issued.

5.7.2.2 Operation When Turning Spindle is Selected (M142


Modal)
1. Travels the distance to Z-axis zero point and performs the spindle orientation at the same time.
Performs the turning spindle operation at the same time when the turning spindle command
(M303 – M305) is issued.
2. Travels to the ATC zero point.
Travels along the corresponding axes at the same time when X-, Y-, A- and C-axes are
specified.
3. The magazine turns and indexes the tool specified in T.
4. Travels the distance to Z-axis zero position.
5. Travels to the position that is specified when the Z-axis command is issued.

2019/09/02 5 - 41 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.7.2.3 Tool change operation when lathe spindle is


selected
When a tool change command is issued while the lathe spindle (M142 modal) is selected, the
rotating lathe spindle continues to rotate without stopping. In addition, when a lathe spindle
command (M303-M305) is issued on the same block, the lathe spindle rotation command is
executed at the same time as the rise operation to the R-point on the Z-axis or “Distance to Z-axis
zero”. The axis operation apart from the lathe spindle follows the operation noted in the “5.7
Canned Cycle for Tool Change (Nonstop ATC) (G100)” in the NC Programming Manual.

(Note 1) Pressing the [RST] key, after the tool change starts and before the X- and
Y-axes start to travel, immediately stops the rotating lathe spindle.
However, when the [RST] key is pressed after the X- and Y-axes start to
travel, the rotating lathe spindle stops after the tool change is completed
up until the single block stop.
(Note 2) The lathe spindle rotation does not stop even when the [FEED HOLD]
switch is pressed during a tool change.

5.7.2.4 Notes
(Note 1) Travels in cutting mode when cycle operation is enabled and (1) and (2),
and (4) and (5) are linked in the cutting mode.
(Note 2) The machine stops after operation (4) when the [RST] key or the [FEED
5 HOLD] switch is pressed between (2) and (4). However, the X-, Y-, A- and
B-axis travel stops immediately at (2). When the C-axis is travelling to the
command position, it also stops immediately in the same way as the X-,
Y-, A- and B-axes.
(Note 3) When the C-axis is operating as the lathe spindle, if the [RST] key
is pressed between (2) and (4), it stops after operation (4) (Stops after the
positioning operation is finished when transitioning from the lathe
spindle rotation operation to the positioning operation for the command
position).
The C-axis does not stop even when the [FEED HOLD] switch is pressed.
(Note 4) The mode cannot be changed between (1) and (4).
(Note 5) It is possible to omit all addresses except the G100 address, but a T code
command has to be issued once before the G100 command is issued.
(Note 6) The tool diameter / nose R compensation is cancelled when the G100
command is issued. In addition, the tool length / tool position offset
(Z-axis) is cancelled starting from (1).
(Note 7) When cutter / nose R compensation travel commands are issued on the
G100 block, the cutter / nose R compensation startup operation is
performed using travel in (2). Regardless of the <Start up/cancel> setting
in the User parameter (Switch 1) the operation is performed following the
Type 1 setting.
(Note 8) The X- and Y- axes compensation is enabled from operation (2) and the
Z-axis compensation is enabled from (5) when the tool length / tool
position offset command is issued on the G100 block.
(Note 9) Only the M code commands listed in the “Simultaneous command M
code” (described later) are valid for the G100 block. The alarm
<<Specified M code cannot be used.>> is triggered when an unlisted or
invalid M code command is issued.
(Note 10) The alarm <<There is no *-axis option>> is triggered if an A-axis, B-axis or
C-axis command is issued when there is no A-axis, B-axis or C-axis
option.
(Note 11) The <ATC simultaneous operation start position> in the <User
parameter> is not used.
(Note 12) The <ATC reference tool length> in the <User parameter> is not used.
Even if the G100 command is issued when the tool length / tool position
offset is cancelled (G49), (1) travels the distance to Z-axis zero position.

2019/09/02 5 - 42 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

(Note 13) When a feature coordinate index (G53.1) command is issued on the G100
block, travel (A-axis, B-axis or C-axis rotation) is performed for the
feature coordinate index in (2).
The alarm <<Feature coordinate manufacturing mode engaged>> is
triggered when an A-axis, B-axis or C-axis command is issued. Issue a
command with the coordinate values in the feature coordinate system for
the X-axis, Y-axis or Z-axis.
When a command is issued on the same block as G100 and G53.1 in G01
modal, the A-axis, B-axis or C-axis travels at rapid feed.
(Note 14) When a G100 command is issued, the machining load monitor (M340) is
disabled in the machining load monitor function.

5.7.3 R650X2 40MG


Command format G100 T_ X_ Y_ Z_ R_ A_ B_ C_ L_;

Z-axis direction (4)


ATC zero point

(2) (5) 5

R-point

(1) (7)
Single block stop point

X- and Y-axis direction


X-/Y-axis ATC position
(2) (3)

(4)
(6) (5)

X-/Y-axes zero point

T : Tool number (1 – 99), or pot number (101 – 149), or group number (901 – 930).
A, B and C : Target values when moving X-, Y-, A-, B- and C-axes at the same time as the tool
change operation, and travel is rapid feed.
X and Y : Target values for operation (6) and travel is rapid feed.
Z : Target values for operation (7) and travel is rapid feed.
R : Return height position before tool change (operates with tool length offset).
When there is no R command, the user parameter (switch 1) <ATC simultaneous
operation start position> is used as the R command value for operation.
L : Specifies the tool number, pot number and group number after L.
Pot with the corresponding tool is indexed after the tool change in operation (4).
(Next tool preparation operation)

2019/09/02 5 - 43 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

Operation
(1) When traveling to the R-point on the Z-axis, the spindle orientation and the pot shutter open
operations are carried out at the same time. When there is a T command, the magazine turns.
Thereafter, the pot falls.
(2) When the Z-axis travels to the ATC zero point and the X- and Y-axes travel to the zero point,
travel to the command values on the A-, B- and C-axes also occurs at the same time.
(3) X- and Y-axes travel to the ATC position.
(4) The arm turns to carry out a tool change operation. When there is an L command, the
magazine turns after the tool change. For the tool change, the operation varies depending on
the settings in the ATC tool screen. For details about the tool change operation, refer to the
tool change operation items.
(5) The Z-axis travels to the R-point and the X- and Y-axes travel to the zero point. The
operations are carried out at the same time when the spindle command (M03 group) is issued.
(6) The X- and Y-axes travel to the command value.
(7) The Z-axis travels to the command value.

5.7.3.1 Notes
(Note 1) During cycle operation, travel connecting (1) and (2) as well as (5) and (7)
on the Z-axis occurs in cutting mode.
(Note 2) When the [RST] key or the [FEED HOLD] switch is pressed during
operation (2), it stops after the Z-axis completes travel to the ATC zero
point. However, the X-, Y-, A-, B- and C-axes travel stops immediately.
5 (Note 3) When the [RST] key or the [FEED HOLD] switch is pressed between
operations (3) and (5), it stops after operation (5). However, the A-, B- and
C-axes travel stops immediately.
(Note 4) Between operations (1) and (6), it does not stop at the single block.
(Note 5) Operation (4) moves onto the next operation without checking the pot
rising, the pot shutter closing or checking the preparations for the next
tool.
(Note 6) The mode cannot be changed between operations (1) and (6).
(Note 7) It is possible to omit all addresses except the G100 address, but a T code
command has to be issued once before the G100 command is issued.
(Note 8) The cutter compensation is cancelled when the G100 command is issued.
In addition, the tool length offset is canceled from (2).
(Note 9) When a cutter compensation command is issued on the G100 block, the
cutter compensation startup operation is performed in (6). Regardless of
the user parameter (switch 1) <Start up/cancel> value, the startup
operation follows the Type 1 (shortcut) setting.
(Note 10) The X- and Y- axes compensation is enabled from operation (6) and the
Z-axis compensation is enabled from operation (5) when the tool length
offset command is issued on the G100 block.
(Note 11) When the G100 command is issued while the tool length offset is
cancelled (G49), the user parameter setting <ATC reference tool length>
compensates for the tool length in operation (1).
(Note 12) When there is no tool length/tool position offset command in the G100
block, the user parameter (switch 1) setting <ATC reference tool length>
compensates for the tool length or position in operation (5).
(Note 13) Only the M code commands listed in the “5.7.4 Simultaneous command M
codes” (described later) are valid for the G100 block. The alarm <<Invalid
command M code>> is triggered when an unlisted or invalid M code
command is issued.
(Note 14) The alarm <<There is no *-axis option>> is triggered if an A-axis, B-axis or
C-axis command is issued when there is no A-axis, B-axis or C-axis
option.
(Note 15) When the Z-axis travel falls for operation (1), the Z-axis does not travel in
operation (1).
(Note 16) When the Z-axis travel rises for operation (7), the Z-axis travels to the
command position for operation (5), and does not travel for operation (7).
(Note 17) It is only possible to intervene manually during a single stop operation at
R-point after operation (5). Manual intervention is not possible during any
other operation.

2019/09/02 5 - 44 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

(Note 18) When a feature coordinate index (G53.1) command is issued on the G100
block, travel (A-axis, B-axis or C-axis rotation) is performed for the
feature coordinate index in (2). The alarm <<Feature coordinate
manufacturing mode engaged>> is triggered when an A-axis, B-axis or
C-axis command is issued. Issue a command with the coordinate values
in the feature coordinate system for the X-axis, Y-axis or Z-axis. When a
command is issued on the same block as G100 and G53.1 in G01 modal,
the A-axis, B-axis or C-axis travels at rapid feed.
(Note 19) After the feature coordinate setting, an R command cannot be issued
before the feature coordinate index. Otherwise, the alarm <<Feature
coordinate command error>> is triggered.
(Note 20) When the user parameter (quick table) <Pallet 1 loading> or <Pallet 2
loading> is set to <1:At 1st tool change>, if the R-point position for the
first tool change command (G100/M06) is issued at a position lower than
the machine parameter (system 1) <R-point lower limit for pallet loading
during tool change>, the alarm <<Pallet turn restricted range error>> is
triggered.
(Note 21) When a G100 command is issued, the machining load monitor (M340) is
disabled in the machining load monitor function.

5.7.3.2 When changing from standard tool to standard


tool or from large tool to large tool 5
1. Magazine turn
2. Pot shutter open
3. Pot fall
4. Arm turn
5. Pot rise
6. Pot shutter close
When the operations above are carried out, the change is complete.

When the tool change is between standard tools, the arm turns at a speed that is set by the machine
parameter (system 3) <Rapid feedrate AT-axis 1>.
When the tool change is between large tools, the arm turns at a speed that is set by the machine
parameter (system 3) <Rapid feedrate AT-axis 2>.

5.7.3.3 When changing from standard tool to large tool or


from large tool to standard tool
1. Magazine turn (empty pot is indexed)
2. Pot shutter open
3. Pot fall
4. Arm turn (spindle tool changes to an empty pot)
5. Pot rise
6. Magazine turn (specified pot is indexed)
7. Pot fall
8. Arm turn (specified pot tool changes to spindle)
9. Pot rise
10. Pot shutter close
When the operations above are carried out, the change is complete.

The procedure starts from step 2 when the empty pot is already indexed before the tool change.
For the empty pot index in step 1, an empty pot for a large tool is indexed when the tool change is
for a large tool, and an empty pot for a standard tool is indexed when the tool change is for a
standard tool. In addition, the empty pot is indexed turning in the direction that is closest.

When the tool change is for a large tool, the arm turns for steps 4 and 8 at a speed that is set by the
machine parameter (system 3) <Rapid feedrate AT-axis 2>.When the tool change is for a standard
tool, the arm turns at a speed that is set by the machine parameter (system 3) <Rapid feedrate
AT-axis 1>.

2019/09/02 5 - 45 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

(Note 1) When changing from a large to standard tool and there is no empty pot
for the large tool, the alarm <<No empty pot>> is triggered.
(Note 2) When changing from a standard to large tool and there is no empty pot
for the standard tool, the alarm <<No empty pot>> is triggered.

5.7.3.4 Next tool preparation operation


The next tool preparation is carried out after the arm turns for the tool change and then after the
pot rises. If there is no tool change, then only the next tool preparation operation is carried out.
When the next tool is already indexed, the next tool preparation operation is not carried out.

The next tool preparation varies depending on the type of tool that is set on the ATC tool screen.

If the spindle tool type and the next tool type are the same, the specified tool is indexed. However,
if the types are different, an empty pot that is the same type as the spindle tool type is indexed.

When the spindle tool is a standard tool and the next tool is a large tool, an empty pot for a
standard tool is indexed.
When the spindle tool is a large tool and the next tool is a standard tool, an empty pot for a large
tool is indexed.

(Note 1) When preparing for the next tool and changing from a large to standard
tool, if there is no empty pot for the large tool, the alarm <<No empty
5 pot>> is triggered.
(Note 2) When preparing for the next tool and changing from a standard to large
tool, if there is no empty pot for the standard tool, the alarm <<No empty
pot>> is triggered.

5.7.4 Simultaneously Commandable M Codes


The G100 (Canned cycle for tool change) can be commanded in the same block together with the
M codes listed below.
If other M code is commanded, the <<Specified M code cannot be used>> alarm appears.

Simultaneously commandable M codes


M code Contents
M03 Spindle CW
M04 Spindle CCW
M05 Spindle stop
M06 Tool change
M19 Spindle Orientation
M111 Spindle orientation (180°)
M08 Coolant pump ON
M09 Coolant pump OFF
M141 To select a spindle
M142 To select a turning spindle
M230 Tool life counter set
M231 Tool life counter cancel
M290 Tool replacement Z axis lower speed 100%
M291 to M293 Tool replacement Z axis lower speeds 1 to 3
M294 Tool wash filter check
M303 turning spindle forward rotation
M304 turning spindle backward rotation
M305 turning spindle stop
M400 M400 signal ON (Chip shower ON)
M401 M400 signal OFF (Chip shower OFF)
M402 M402 signal ON
M403 M402 signal OFF
M404 M404 signal ON
M405 M404 signal OFF
M406 M406 signal ON
M407 M406 signal OFF

2019/09/02 5 - 46 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

M code Contents
M408 M408 signal ON
M409 M408 signal OFF
M420 ATC arm turn speed (maximum speed)
M421 ATC arm turn speed (large tool speed)
M432
M422 ATC arm turn speed 1
C-axis unclamp
M430
(Simultaneous command is not possible with QT-axis)
C-axis clamp
M431
(Simultaneous command is not possible with QT-axis)
M435 Magazine rotation top speed
M436 Magazine rotational speed 1
M437 Magazine rotational speed 2
M440 B-axis unclamp
M441 B-axis clamp
M442 A-axis unclamp
M443 A-axis clamp
M444 C-axis unclamp
M445 C-axis clamp
M450 One shot signal output
M451
M455
(Proceeds to the next block after the signal has turned off)
One shot signal output
5
M456 (Proceeds to the next block without waiting for the signal off.)
M460 Waiting for M460 signal ON
M461 Waiting for M460 signal OFF
M462 Waiting for M462 signal ON
M463 Waiting for M462 signal OFF
M464 Waiting for M464 signal ON
M465 Waiting for M464 signal OFF
M466 Waiting for M466 signal ON
M467 Waiting for M466 signal OFF
M468 Waiting for M468 signal ON
M469 Waiting for M468 signal OFF
M474 Coil conveyor automatic mode: Enable
M475 Coil conveyor automatic mode: Disable
M480 M480 signal ON
M481 M480 signal OFF
M482 M482 signal ON
M483 M482 signal OFF
M484 M484 signal ON
M485 M484 signal OFF
M486 M486 signal ON
M487 M486 signal OFF
M490 to M494 Coolant through center ON
M495 Coolant through center OFF
M497 Tool replacement tool washing ON
M498 Tool wash ON
M499 Tool wash OFF
M801 to M899 Signal output * for PLC
M900 to M999 Extend signal output
2-bit BCD signal BCD signal output

The M codes are simultaneously carried out when going up to an R point except the following
cases.

2019/09/02 5 - 47 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

When using a turret type ATC mechanism, the following M code is output at the same time while
traveling from the “Distance to Z-axis zero point” to the “Z-axis command point”. When using an
arm type ATC mechanism, the code is output at the same time while traveling from the ATC zero
point to the R-point, after the tool change.
(1) M03 (Spindle forward rotation)
(2) M04 (Spindle backward rotation)
(3) M05 (Spindle stop)
(4) M19 (Spindle orientation)
(5) M111 (Spindle orientation to 180°)
(6) M08 (Coolant pump ON)
(7) M490 to M494 (Coolant through center ON)

When using an arm type ATC mechanism, the following M code is output at the same time while
traveling from the R-point to the “Z-axis command point”, after the tool change. In addition, when
a command is issued at the same time as a canned cycle (G100) for a tool change while in memory
operation, it is valid after the magazine turn operation in preparation for the next tool. However, if
a command is issued at the same time while in MDI operation, the alarm <<Specified M code
cannot be used>> is triggered.
• M435 to M437 (specify maximum magazine turn)

Output of an M signal to wait for MFIN is always accepted during ATC. However, if no MFIN is
input before the Z-axis finishes moving down to the R point (Z-axis zero point), the MFIN is
5 waited. After the MFIN is input, the Z-axis moves down to the commanded position.

ATC home

If MFIN is not input when the Z axis


is moved to the specified position,
the Z axis stops here and waits for
the MFIN entered.
Then, waiting for MFIN
together with tool
change motion R point
(When using a turret type ATC, this
becomes the Z-axis zero point)
M code is output
when this
motion is done.
Z-axis command value

If the <Multiple M codes in one block> of the <user parameter> is set as <1: Yes>, up to 3 codes
can be commanded in the same block.
However, only one of the 2-bit BCD signals, signal outputs (M801 to M899) to PLC, and
expansion signal outputs (M900 to M999) can be commanded.
In addition, if M codes which work simultaneously are commanded at the same time, they are
output simultaneously. If you want to know the order of output, command them separately in
multiple blocks.

2019/09/02 5 - 48 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.7.5 Automatic Command of Tool Data in Tool Change


You can set the following values <user parameters> registered in the tool data to automatically
output for tool changes.
User parameter Tool data
Automatic command (S) in tool change S command value
Automatic command (F) in tool change F command value

If the <Automatically use (S or F) command when changing tool> is set as <1:Yes> each value set
in the tool data for the tool in the spindle is automatically updated and output in automatic tool
change.
In addition, if a command is already in a same block of a program in NC, it is first commanded
prior others.

(Note 1) The spindle speed can only be automatically set when the constant
peripheral speed control is cancelled (G97). The automatic setting does
not perform when the constant peripheral speed is being controlled
(G96).
(Note 2) Feed rate can be automatically set only when the feed per minute is set
(G94). It is not automatically set when the rotational speed is set (G95).
(Note 3) If spindle rotational speeds and feed rates in the tool data are not set, the
spindle moves in the current S/F mode.
(Note 4) If dialogue tools are changed by a pot number command, the spindle
rotational speed and feed rate are considered as unset and the spindle is
5
moved in the current S/F mode.

2019/09/02 5 - 49 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.8 Coordinate Calculation Function


5.8.1 Outline
Point cloud coordinates (linear, grid, and circular) are calculated in individual blocks.
Point cloud drilling can be performed by a single command when this command is used in
combination with the canned cycle function, etc.

5.8.2 Coordinate calculation


Coordinate calculation
G code Name Function
G36 Bolt hole circle Calculate coordinates of a point cloud on the circumference of a circle
G37 Line (angle) Calculate coordinates of a point cloud on a line by specifying angle
G38 Line (X,Y) Calculate coordinates of a point cloud on a line by specifying
coordinates
G39 Grid Calculate coordinates of a point cloud of a grid form

5.8.3 Coordinates Calculation Parameters

G36
Command format : X_ Y_ I_ J_ K_ P_ Q_;
5 G39

X,Y : Datum point coordinates


I, J, K, P, Q : Coordinates calculation parameters

1. Datum point coordinates value (X, Y)


• Workpiece coordinate system is used for specifying the datum point.
• Current position is used as the datum point when X/Y values are omitted.

2. Coordinate calculation parameters (I, J, K, P, Q)


• Specify the parameters together with G36 to G39 codes in the same block.
• The parameters are effective only in the current block. They are erased automatically on
completing calculation.
• Relationship between the functions and parameters are given in the list below.
Parameter
G code
I J K P Q
Bolt Hole Circle G36 ● ● ● ●
Line (angle) G37
● ● ○
Line (X, Y) G38
Grid G39 ● ● ● ● ●
● : May not be omitted. An alarm occurs when they are missing.
○ : May be omitted (assumed to be 1).
Space : Data may be entered but is not used.

(Note) Coordinate calculation function command is not possible while in the


inverse time feed (G93) modal. If a command is issued, the alarm
<<Command not possible during inverse time feed>> is triggered.

2019/09/02 5 - 50 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.8.4 Description of Coordinate Calculation Function


5.8.4.1 Bolt Hole Circle (G36)
The commanded coordinate value is the center of the arc and the partitioned coordinate values are
found for the discretionary points on the circumference as a starting point, etc.

Command format G36 X_ Y_ I_ J_ K_ P_;

X, Y : Coordinate value at arc center


I : Arc radius
J : Angle with X-axis of the starting point
K : Number of drilling holes (999 holes or less)
P : Number of splits (max. 999.999)

Ex) G36 X0 Y0 I50 J30 K5 P6;


Y

5
50

30
X
( 0, 0 )

(Note) Coordinate values are measured counterclockwise from the start point.

5.8.4.2 Line (Angle) (G37)


The commanded coordinate value is assumed as the datum point, and the coordinate value is found
that lines up on the straight line in the angle (θ°) direction for the X axis.

Command format G37 X_ Y_ I_ J_ K_;

X,Y : Datum point coordinates value


I : Interval with the point just prior
J : Angle with the X-axis.
K : Number of drilling holes (999 holes or less)

2019/09/02 5 - 51 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

Ex) G37 X0 Y0 I20 J30 K6;

20
20
20
20
20

30
X
(0, 0)

(Note 1) If omitted, K is considered 1.


5 (Note 2) The coordinates for the reference point are also output.

5.8.4.3 Line (X, Y) (G38)


The commanded coordinate value is assumed to be a datum point, and the coordinate values are
found that have a plus for both the X direction and the Y direction respectively.

Command format G38 X_ Y_ I_ J_ K_;

X, Y : Datum point coordinates value


I : Intervals in the direction of X
J : Intervals in the direction of Y
K : Number of drilling holes (999 holes or less)

Ex) G38 X0 Y0 I20 J15 K4;


Y

45

30

15

X
( 0, 0 ) 20 40 60

(Note 1) If omitted, K is considered 1.


(Note 2) The coordinates for the reference point are also output.

2019/09/02 5 - 52 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.8.4.4 Grid (G39)


The commanded coordinate value is assumed to be a datum point, and the coordinate values are
found for the grid that consists of the points that are lined up at equal intervals parallel, etc. to the
X-axis direction as well as the points that are lined up at equal intervals parallel, etc. to the vertical
axis. In addition, the whole can be inclined by specifying the angle to the X-axis.

Command format G39 X_ Y_ I_ J_ K_ P_ Q_;

X,Y : Datum point coordinates value


I : Interval in the direction of X axis
J : Interval in the direction of Y axis
K : Number in the X axis direction (max. 999)
P : Number in the Y axis direction (max. 999)
Q : Angle with the X axis.

Ex) G39 X0 Y0 I20 J25 K4 P3 Q30;


Y

5
25

30

(0, 0) X

20

(Note 1) The coordinates for the reference point are also output.
(Note 2) The direction of the X-axis is obtained from the reference point.

2019/09/02 5 - 53 eCOM3NCPR5
Chapter 5 Preparation Function (Canned Cycle)

5.8.5 Examples of Application

X
0 50

5
Drilling 6 holes along the circumference of a circle of 50 radius.

:
N100 G81R2.Z-10.F1000K0;
N105 G36X0.Y0.I50.J0.K6P6.;
:

N100 memorizes canned cycle data, and N105 calculates coordinates to drill holes at the specified
position.

2019/09/02 5 - 54 eCOM3NCPR5
Chapter 6 Macro

CHAPTER 6

MACRO

6.1 What is Macro?


6.2 Variables Function 6
6.3 Calculation Function
6.4 Control Function
6.5 Call Function
6.6 External Output Function
6.7 Interrupt Macro (Option)

2019/09/02 6-1 eCOM3NCPR6


Chapter 6 Macro

6.1 What is Macro?


Macro allows you to create unique canned cycles and highly versatile programs by incorporating
identical motions repeatedly and using variables, calculations, and conditional branching.

Four major macro function groups are:

• Variables function
• Calculation function
• Control function
• Call function

Examples of combination of the functions are shown below (Examples 1 and 2).
How to create a macro program is described on the following pages.

Ex. 1) Check for tool damage once every 10 machining rounds

N01 G90G0G54.....;
N02 ;


•Machining program

N50 #100=#100+1; (count up)
N51 IF[#100LT10] GOTO 55; (go to N55 if the content of #100 is less that 10))
N53 M200; (detects tool break)
6 N54 #100=0; (clear counter)
N55 M30;

Ex. 2) Arc machining by specifying the center, radius, and angle.

X: center X Y: center Y R: redius Z: Cutting position Z


W: Stop before workpc. U: Cutting start angle V: Cutting end angle F: Feed rate

• Main program

N01 G90G54G0Z30.;
N02 G65P0042X-100.Y-100.R50.Z-3.W2.U0.V30.F1000;

• Macro program O0042

N01 G90G0X[#24+COS[#21]*#18]Y[#25+SIN[#21]*#18];
N02 Z#23;
N03 G1Z#26F#9;
N03 G3X[#24+COS[#22]*#18]Y[#25+SIN[#22]*#18] R#18;
N04 G0Z#23;
N05 M99;

2019/09/02 6-2 eCOM3NCPR6


Chapter 6 Macro

N01

50
N03
30°

(-100, -100) (-50, -100)


50

2019/09/02 6-3 eCOM3NCPR6


Chapter 6 Macro

6.2 Variables Function


6.2.1 Outline
Numbers are directly specified, such as G90 and X200, to command an operation in ordinary
programs. Using macro variables, you can use the values stored in them as the command for G, X,
etc.
The value of variables can be changed by program or MDI operation.

6.2.2 Expression of Variables


Each variable number is prefixed with the symbol "#."
Ex. 1) #100
Ex. 2) You can use values stored in a variable and also equations using brackets ([ ]).
#100 = #[100+10]
The content of variable #110 is substitued in #100.
Ex. 3) For #1 = 9, #9 = 20, and #20 = 30,
assume #5 = #[#[#1]].
Then, this has the same meaning as #5 = 30.
Variables can be used in place of specifying values.
Ex. 4) #3 = #2 + 10;
G01X#3Y10;
The value of variable 2 plus 10 is specified as the X coordinate value.
(if #2 is 40, then X50 is meant.)
If a variable is used as data for an address such as in Example 4, the figure is rounded
off to agreed with the number of significant digits of the data.
Ex.) Assume a command G00X#1; for equipment of significant digits 1/1000. When
6 #1 is 12.345678, the command will be G00X12.346.
An alarm occurs when the maximum command value of the relevant address is
exceeeded.
Ex. 5) Address N cannot take a variable.
You cannot command N#20.
Ex. 6) G00X[#1+#2]; When an equation is used to specify the data for an address, the
equation must be put in brackets.

6.2.3 Undefined Variables


<empty> is used to indicate the status of an undefined variable.
#0 is always an empty variable. You can read the value but cannot substitute it.

Ex. 1) When #1 is empty:


G01X#1Y100. → G01Y100.
G01X[#1+10.]Y100 → G01X10.Y100.
Ex. 2) Calculation
#0 + #0 → 0
#0 * 5 → 0
Ex. 3) Conditional equation
For #1=<empty> For #1=0
#1 EQ #0 →satisfied #1 EQ #0 → dissatisfied
#1 NE 0 → satisfied #1 NE 0 → dissatisfied
#1 GE #0 → satisfied #1 GE #0 → satisfied
#1 GT 0 → dissatisfied #1 GT 0 → dissatisfied
<empty> is considered not equal to zero in EQ and NE.

2019/09/02 6-4 eCOM3NCPR6


Chapter 6 Macro

6.2.4 Types of Variables


Two types of variables are:
1. Local variables (#1~#33), and
2. Common variables (#100 to #199 and #500 to #999)

Local variables are unique to respective macro program call level. When a macro program is
called, the local variables of the calling program are saved, and the area for new local variables is
prepared for the called macro program.
Local variables and levels are described in 6.5 Call Function.
Common variables can be called and written from any program and level.
Detailed specifications are given in the table below.

Types of variables
Variable No. Variable type Function
#0 Always empty Always empty; cannot enter a value.
#1 to #33 Local variables Used uniquely on respective levels of a macro program.
Initialized to the empty status when power is turned off.
The range of variables that can be input into local variables
is:
-1.0×1099 to -1.0×10-99, 0, 1.0×10-99 to 1.0×1099
(Note) All digits are not necessarily displayed on
the screen but actual variables can be
represented in the above range.
#100 to #199 Common Used in all different macro programs commonly. Initialized
variables to the empty status when power is turned off.
The range of variables that can be input into these common
variables is:
6
-1.0×1099 to -1.0×10-99, 0, 1.0×10-99 to 1.0×1099
(Note) All digits are not necessarily displayed on
the screen but actual variables can be
represented in the above range.
Initialization is also carried out if
<Conversation/NC language change> is
changed in the <user parameter>.
#500 to #999 Used in all different macro programs commonly.
The data is retained when power is turned off.
The range and number of significant digits of variables that
can be input into these common variables is:
(When the minimum set unit is type 1)
Metric: -999999.999 to 999999.999
(6 digits for integer and 3 for fractional portion)
Inch: -99999.9999 to 99999.9999
(5 digits for integer and 4 for fractional portion).
(When the minimum set unit is type 2)
Metric: -999999.9999 to 999999.9999
(6 digits for integer and 4 for fractional portion)
Inch: -99999.99999 to 99999.99999
(5 digits for integer and 5 for fractional portion).
When substituting a variable with a large number of
significant digits at the fractional portion, the fractional
portion is rounded to the above number of digits.

(Note) When an attempt was made to assign a value that exceeds the variable
range, the alarm <<Macro command error>> is triggered.

2019/09/02 6-5 eCOM3NCPR6


Chapter 6 Macro

6.2.5 Display and Setting of Variables


Variables are displayed and manually set on the Data Bank screen.

To display macro variables, press [3][ENT] on the Data Bank Menu screen. Alternatively, select
Menu No. 3 with the cursor and press the [ENT]key.

The values of common variables (#100 to #199 and #500 to #999) and local variables can be
referenced and/or changed.

• Display of values
The values of common variables from #100 to #199 and all local variables are displayed only
when these variables are within the range given below.

(When the minimum set unit is type 1)


Metric: -999999.999 to 999999.999 (6 digits for integer and 3 for fractional portion)
Inch: -99999.9999 to 99999.9999 (5 digits for integer and 4 for fractional portion).
(When the minimum set unit is type 2)
Metric: -999999.9999 to 999999.9999 (6 digits for integer and 4 for fractional portion)
Inch: -99999.99999 to 99999.99999 (5 digits for integer and 5 for fractional portion).

The display turns < *********** > if these ranges are exceeded.

All digits are not necessarily displayed even though the value is within the above range.
The rounded figures are shown on the display. The value appearing on the screen may therefore
differ from the actual variable.
6
6.2.6 System Variables
6.2.6.1 Interface I/O Signals
Signal input #1000 to #1031 R
Signal input #1200 to #1231 R
Signal input #1232 to #1263 R
Signal input #1264 to #1295 R
Signal output #1100 to #1131 R/W
Signal output #1300 to #1331 R/W
Signal output #1332 to #1363 R/W
Signal output #1364 to #1395 R/W
Signal batch read #1032 R
(#1000 to #1031) (32-bit)
Signal batch read #1033 R
(#1200 to #1231) (32-bit)
Signal batch read #1034 R
(#1232 to #1263) (32-bit)
Signal batch read #1035 R
(#1264 to #1295) (32-bit)
Signal batch write #1132 R/W
(#1100 to #1131) (32-bit)
Signal batch write #1133 R/W
(#1300 to #1331) (32-bit)
Signal batch write #1134 R/W
(#1332 to #1363) (32-bit)
Signal batch write #1135 R/W
(#1364 to #1395) (32-bit)

[Typical application]
Signals are output from a program to port 10 of standard terminal block.
Assign #1100 to port 10 of the standard terminal block with <External Output Signal> of
<External I/O Signal>.

2019/09/02 6-6 eCOM3NCPR6


Chapter 6 Macro

• Write a command as follows on the program to output signals to port 10 of the standard
terminal block.


#1100=1;

6.2.6.2 Workpiece Coordinate Zero Point


Workpiece coordinate zero point is read and written.
Workpiece coordinates (external) #5201 to #5206 R/W
(G54) #5221 to #5226 R/W
(G55) #5241 to #5246 R/W
• • •
• • •
(G59) #5321 to #5326 R/W
(G54.1P1) #7001 to #7006 R/W
(G54.1P2) #7021 to #7026 R/W
• • •
• • •
(G54.1P48) #7941 to #7946 R/W

6.2.6.3 Tool Data


Tool compensation/life data are read and written.
Tool length offset #11001~#11099 R/W
6
T length wear offset #10001~#10099 R/W
Cutter compensation #13001~#13099 R/W
Tool diameter wear offset #12001~#12099 R/W
Tool position offset (X) #25001~#25099 R/W, Available when equipped with a
lathe function
Tool position wear offset data #20001~#20099 R/W, Available when equipped with a
(X) lathe function
Tool length offset (Z) #26001~#26099 R/W, Available when equipped with a
lathe function
T length wear offset (Z) #21001~#21099 R/W, Available when equipped with a
lathe function
Tool diameter / nose R #27001~#27099 R/W, Available when equipped with a
compensation lathe function
Tool diameter / nose R wear #22001~#22099 R/W, Available when equipped with a
offset lathe function
Tool position offset (Y) #29001~#29099 R/W, Available when equipped with a
lathe function
Tool position wear offset data #24001~#24099 R/W, Available when equipped with a
(Y) lathe function
Virtual teeth direction #23001~#23099 R/W, Available when equipped with a
lathe function
Tool life unit #5501~#5599 R/W
1: Is not counted
2: Time (minutes)
3: Drilling (holes)
4: Program (times)
Initial tool life / End of tool life #5601~#5699 R/W
Life warning #5701~#5799 R/W
Tool life #5801~#5899 R/W

(Note) Some variables are not supported depending on models.

2019/09/02 6-7 eCOM3NCPR6


Chapter 6 Macro

6.2.6.4 Alarm Display


#3000=n(ALARM MESSAGE)
Alarm number 9000+n(n:0~200) is generated and the alarm message in the parentheses is
displayed (up to 20 characters from top; release level 2).
The values in brackets record the alarm history in single-byte alphanumeric characters only.
(Typical applicatioin) When executing a block #3000=6(ABCD);, the alarm <<9006 *ABCD>>
occurs.

(Note 1) When commanded during cutter compensation, the tool moves to where
an offset vector is set vertically perpendicular to the direction of travel of
the previous axis travel.
(Note 2) If characters other than single-byte alphabet and numbers are described,
the operation is not guaranteed.

6.2.6.5 Message Display and Stop


#3006=(MESSAGE)
A message of up to 20 characters in the parentheses is displayed after completing execution of the
preceding block.
Twenty characters from top is displayed when the messsage contains 21 characters or more.
Alarm number is 9300 fixed.
(Stop level 1, Reset level 1)

(Note) When commanded during cutter compensation, the tool moves to where
an offset vector is set vertically perpendicular to the direction of travel of
the previous axis travel.
6
6.2.6.6 Time
Time 1 #3001 R/W Timer in the unit of 10msec.
Clears after 42949672.96 sec (ca. 497 days). Cleared to
zero on turning power on, and counts continuously.
Time 2 #3002 R/W Timer in the unit of 10msec.
Clears after 42949672.96 sec (ca. 497days). Counts the
time when activation LED is lit (STL).
The value is retained when power is turned off.
Date #3011 R Current date
Ex) January 20, 2007
#3011 = 20070120 (Note 1)
Hour #3012 R Current time (24-hour system)
Ex) 4H 17M 5S pm
#3012 = 161705 (Note 2)

(Note 1) The alarm <<Macro Command Error>> occurs when you attempt to
substitute data (#3011) in common variables (#500 to #999).
(Note 2) The alarm <<Macro Command Error>> occurs when you attempt to
substitute hour (#3012) in common variables (#500 to #999) when
<Machine unit system> of <user parameter> is set to <1: Inch>.

6.2.6.7 Operation Control


Operation control #3003 R/W MFIN
0 : Wait
2 : Does not wait
Operation control #3004 R/W Feed
[Override]
0 : Valid
2 : Invalid

2019/09/02 6-8 eCOM3NCPR6


Chapter 6 Macro

#3003
• The default value 0 appears when turning power on.
• Turns 0 on resetting and with M30.
• The control goes to the next block without waiting for MFIN if this is set to <Does Not Wait>.
MFIN OFF is not checked before outputting an M signal.
When <Does Not Wait> is set, output time of M signals is set as < External signal output time
when MFIN is invalid> of <user parameter>.
• When M signal blocks run successively with MFIN set to <Does Not Wait>, the next M signal
is output after time elapse of the above parameter.

#3004
• The default value 0 when turning power on.
• Turns 0 on resetting and with M30.
• When feed rate override is selected to Invalid, override is fixed at 100% irrespective of feed
rate override on the operation panel.
• Spindle override and rapid feed override are also fixed at 100%.

6.2.6.8 Mirror Image


Status of mirror image of axes

Binary numbers are converted into decimal numbers for handling.


Mirror image #3007 R 0 : Invalid
bit0:X axis 1 : Valid
bit1:Y axis
bit2:Z axis
6
6.2.6.9 Modal Info
You can specify and read modal information.

Modal information (current block)


Variable No. Contents
#4001 G00 to G03, G02.2,G03.2,G102, G103, G202, G203, G33, G392
#4002 G17, G18, G19
#4003 G90, G91
#4004 G22, G23
#4005 G93, G94, G95
#4006 Inch→20, Meter→21
#4007 G40, G41, G42, G141, G142
#4008 G43, G44, G143, G144, G49
#4009 G73, G74, G76 to G78, G80 to G87, G89, G173, G177, G178, G181 to 183,
G185, G186, G189, G277, G278
#4010 G98, G99
#4011 G50, G51
#4012 G66, G67
#4013 G96, G97
#4014 G54 to G59, G54.1
#4015 G61, G64
#4016 G68, G69, G168, G68.2
#4022 G50.1, G51.1
#4107 D code
#4109 F code
#4111 H code
#4113 M code
#4114 Sequence No.
#4115 Program number
#4119 S code
#4120 T code
#4130 P code (number in extended workpiece coordinate system currently selected)
(0 when extended workpiece coordinate system is not selected)
#34001 G321 to G323

2019/09/02 6-9 eCOM3NCPR6


Chapter 6 Macro

#4113
• The M code returns the M number commanded immediately before.
The number of the last stated M code in the block is given when two or more M codes are
commanded in a block, in the case when <Multiple M codes in one block > of <user
parameter> is selected to <Yes>.

#4114
• Sequence Number returns the N number commanded immediately before.
(Not the block number currently being executed)
N90 #100 = 0;
N100 #100 = #4114:
When commanded as above, 90 is substituted in #100.

#4115
• Program number returns the subprogram number when it is being executed.

#4120
• Pot number command value (101 to 1nn) is returned when T code is commanded by pot
number. Group number command value (901 to 930) is returned when T code is commanded
by group number.

Modal information (before commanding an interrupt type macro)


Variable No. Contents
#4401 G00 to G03, G02.2,G03.2,G102, G103, G202, G203
#4402 G17, G18, G19
#4403 G90, G91
6 #4404 G22, G23
#4405 G93, G94, G95
#4406 Inch→20, Meter→21
#4407 G40, G41, G42, G141, G142
#4408 G43, G44, G143, G144, G49
#4409 G73, G74, G76 to G78, G80 to G87, G89, G173, G177, G178, G181 to 183,
G185, G186, G189, G277, G278
#4410 G98, G99
#4411 G50, G51
#4412 G66, G67
#4413 G96, G97
#4414 G54 to G59, G54.1
#4415 G61, G64
#4416 G68, G69, G168, G68.2
#4422 G50.1, G51.1
#4507 D code
#4509 F code
#4511 H code
#4513 M code
#4514 Sequence No.
#4515 Program No.
#4519 S code
#4520 T code
#4530 P code (number in extended workpiece coordinate system currently selected)
(0 when extended workpiece coordinate system is not selected)
#34401 G321 to G323

2019/09/02 6 - 10 eCOM3NCPR6
Chapter 6 Macro

6.2.6.10 Current Position


Coordinate Read while
Variable No. Contents Tool offset
system traveling
#5001~#5008 End point Workpiece Not included Yes
coordinates Coordinate
System
#5021~#5028 Current position Machine Included No
#5031~#5034 coordinate
system
selection
#5041~#5048 Current position Workpiece Included No
#5051~#5054 Coordinate
System
#5061~#5068 Skip coordinates Workpiece Included Yes
#5071~#5074 coordinate
system
#5081~#5088 Tool length / Tool No
position offset
#5101~#5108 Servo deviation No
#5111~#5114
#5161 ~ #5168 Skip coordinate Feature Included Possible
#5171 ~ #5174 coordinate
system

#5001 to #5008, #5021 to #5028, #5041 to #5048, #5061 to #5068, #5081 to #5088, #5101 to
#5108, and #5161 to #5168 read the value of X, Y, Z, and additional axes, respectively. 6
#5031 to #5034, #5051 to #5054, #5071 to #5074, #5111 to #5114, and #5171 to #5174 read the
value of PLC1 to 4 axes, respectively.

Read while Traveling is specified No for current position, tool length offset, and servo deviation in
the above table for reasons that the value cannot be warranted because it reflects the result of
look-ahead.

To be specific:

X-10.;
X-10.;
X-10.;
#100 = #5021;


In the above blocks, for example, the macro command looks ahead while the axes are traveling,
and thus the position of axes in transit rather than the travel end position in the preceding block is
read.

6.2.6.11 ATC Tool


Tool number set on the ATC Tool screen is read.
Spindle R
#3701 Pot 1 R
#3702 Pot 2 R
• • R
• • R
#3750 Pot 50 R

0 : Cap designation
1 to 99 : Tool number set in the NC language mode
1001 to 1099 : Tool number set in the interactive mode
Empty : Undefined

2019/09/02 6 - 11 eCOM3NCPR6
Chapter 6 Macro

6.2.6.12 Workpiece Counter


The set values on the workpiece counter screen is read and written.
#3801 Workpiece counter 1 count R/W
#3802 Workpiece counter 1 current R/W
#3803 Workpiece counter 1 completion R/W
#3804 Workpiece counter 1 ending R/W
#3811 Workpiece counter 2 count R/W
#3812 Workpiece counter 2 current R/W
#3813 Workpiece counter 2 completion R/W
#3814 Workpiece counter 2 ending R/W
#3821 Workpiece counter 3 count R/W
#3822 Workpiece counter 3 current R/W
#3823 Workpiece counter 3 completion R/W
#3824 Workpiece counter 3 ending R/W
#3831 Workpiece counter 4 count R/W
#3832 Workpiece counter 4 current R/W
#3833 Workpiece counter 4 completion R/W
#3834 Workpiece counter 4 ending R/W

6.2.6.13 Result of Auto Workpiece Measurement


Results of auto workpiece measurements are read.
#3601 to #3608 Result of measurement 1 latest
X, Y, Z (Note 1), rotation, date, time, G code 1 (Note 2), G code 2 R
(Note 3)
6 #3611 to #3618 Result of measurement 2 latest R
#3821 to #3628 Result of measurement 3 latest R
#3631 to #3638 Result of measurement 4 latest R

(Note 1) Results of measurement of X, Y, and Z axes use the machine coordinate


system.
(Note 2) G code 1 takes the following values:
1 :G121; 2 :G122; 3 :G123; 4 :G124; 5 :G125; 6 :G126; 7 :G127; 9 :G129
Result of measurement in the case of G128 only is zero.
(Note 3) G code 2 takes the following value:
8 : G128
Result of measurement in the case of not including G128 is zero.

6.2.6.14 Rotary Fixture Offset


The reference rotary fixture offset and the current rotary fixture offset are read and written.
#35501 to #35503 Current rotary fixture offset R
#35520 Axis for calculation for reference rotary fixture offset 1 R/W
#35521 to #35523 Reference offset for reference rotary fixture offset 1 R/W
#35524 to #35526 Reference angle for reference rotary fixture offset 1 R/W
#35540 Axis for calculation for reference rotary fixture offset 2 R/W
#35541 to #35543 Reference offset for reference rotary fixture offset 2 R/W
#35544 to #35546 Reference angle for reference rotary fixture offset 2 R/W
• • •
• • •
#35660 Axis for calculation for reference rotary fixture offset 8 R/W
#35661 to #35663 Reference offset for reference rotary fixture offset 8 R/W
#35664 to #35666 Reference angle for reference rotary fixture offset 8 R/W

2019/09/02 6 - 12 eCOM3NCPR6
Chapter 6 Macro

6.2.6.15 Machining load monitor


The set value that is used in the machining load monitor function and the machining load value are
read and monitored.
#36000 Current machining load R
#36001 Parameter number being used R
#36002 Machining load monitor method for parameter number being used R
#36003 Time constant for parameter number being used R
#36004 Stop level when maximum is reached for parameter number being R
used
#36005 Stop level when minimum is reached for parameter number being R
used
#36006 Maximum machining load for parameter number being used R
#36007 Minimum machining load for parameter number being used R
#36008~#36009 (Reserved)
#36010 Most recent machining load for parameter No.1 (peak value) R
#36011 Most recent machining load for parameter No.1 (average value) R
#36012~#36019 (Reserved)
• • •
• • •
#36990 Most recent machining load for parameter No.99 (peak value) R
#36991 Most recent machining load for parameter No.99 (average value) R
#36992~#36999 (Reserved)

2019/09/02 6 - 13 eCOM3NCPR6
Chapter 6 Macro

6.3 Calculation Function


6.3.1 Types of Calculation
The calculations mentioned below are implemented with variables and values.
Definition of variable #i = #j Definition and replacement
#i = #j + #k Addition
#i = #j - #k Subtraction
Addition-type calculation
#i = #j OR #k Logical sum
#i = #j XOR #k Exclusive OR
#i = #j * #k Multiplication
Multiplication-type
#i = #j / #k Division
calculation
#i = #j AND #k Logical multiplication
#i = SIN [#k] Sine
#i = COS [#k] Cosine
#i = TAN [#k] Tangent
#i = ATAN [#k] Arctangent
#i = SQRT [#k] Square root
#i = ABS [#k] Absolute value
Function
#i = BIN [#k] BCD to BIN conversion
#i = BCD [#k] BIN to BCD conversion
#i = ROUND [#k] Rounding
#i = FIX [#k] Truncate decimal places
#i = FUP [#k] Round up to the next whole
number

6 (Note) i, j, and k in the #i, #j, and #k are numerical values.


They indicate macro variables such as #10.
#j and #k on the right side of an equation may be a constant.

6.3.2 Precedence of Calculation


Precidence of calculation is:
1. Function
2. Multiplication-type calculation
3. Addition-type calculation.

To specify precedence of calculation different from the above general rule, you may use square
brackets ([ ]).
Up to five sets of square brackes, including those of the function, can be used.

2019/09/02 6 - 14 eCOM3NCPR6
Chapter 6 Macro

6.3.3 Precautions for Calculation


(Note 1) Equations
Equations on the right side are constants, variables, or functions, or
allow associativity by operators.
Constants without a decimal point are regarded as having a decimal point
at the end of the figure.
Example: For #1 = 12;, #1 is 12.000.

(Note 2) Angle calculation


The unit of functions SIN, COS, TAN, and ATAN is degrees.
Example: 90 degrees and 30 minutes is commanded as 90.5 degrees.

(Note 3) Logical operation


Operations mentioned below are performed for the bits of the integer
portion of a logical sum, logical multiplication, and exclusive OR. The
fractional portion is 0.
Target of
AND result OR result XOR result
operation
0 and 0 0 0 0
0 and 1 0 1 1
1 and 0 0 1 1
1 and 1 1 1 0

(Note 4) BCD-BIN conversion


BIN means binary number. BCD means binary-coded decimal.
Each digit of a decimal number is expressed by a binary number of 4 bits.
6
Example: 12 = 0001(4 bits)0010(4 bits)
00010010 (a binary number) is equal to 18. When we
BIN-to-BCD convert 12, we obtain 18.
BCD-to-BIN conversion is the reversal of the above operation.
Fractional portion of the source figure is always treated as 0.

(Note 5) Range of a constant


The range of a constant used in equations is:
-9999999999 to -0.000000001,
0, and
+0.000000001 to +9999999999
Maximum number of digits available for a constant is 10 digits by decimal
number.

(Note 6) Accuracy of operation


Certain numerical errors occur and increase with each operation of
macro statements. However, the data is retained internally using the
floating decimal point system to ensure about 15 signigicant digits (by
decimal number) for a value to warrant accuracy.

2019/09/02 6 - 15 eCOM3NCPR6
Chapter 6 Macro

6.4 Control Function


The flow of a program is changed under certain conditions using the control function. Three types
of control functions are:.

1. GOTO instrruction (unconditional branching)


2. IF instruction (conditional branching)
3. WHILE instruction (repetition)

Use and control availability of these functions are described below.

6.4.1 GOTO Instruction (Unconditional Branching)


The program branches to sequence No. n (n: 1 to 99999) unconditionally.

Command format GOTO n;

n : Sequence No.

The alarm <<No applicable sequence>> occurs when the specified sequence number n is not in the
range between 1 and 99999, or there is no such sequence number.
Sequence number may be specified by an equation.

Ex) N1 GOTO 3;
N2 GOTO #10;
N3 ;
6 N2 (sequence No. 2) is skipped unconditionally.
If N2 is executed, the control skips to the sequence number of the value of #10.

GOTO instruction is effective within the program to which it belongs. It acts on the first sequence
number that it encounters in the program in the direction toward the end of the program. On
reaching the end of the program, the search starts from the beginning of the program.

(Note) If a command is issued in extended memory operation and tape operation,


only searching within a range for approximately 60 KB is possible.

6.4.2 IF Instruction (Conditional Branching)


A conditional equation is specified after IF.

Command format IF [Conditional equation] GOTO n;

n : 1~99999

The control branches to the sequence number n when the conditional equation is satisfied. If not,
the succeeding block is executed.
Types of conditional equations are described below.

Types of conditional equations


#i EQ #j #i is equal to #j
#i NE #j #i is not equal to #j
#i GT #j #i is greater than #j
#i LT #j #i is less than #j
#i GE #j #i is equal to or greater than #j
#i LE #j #i is less than #j

(Note 1) Conditional equation is placed within the brackets [ , ].


(Note 2) The range of values used in a conditional equation is given below.
Metric: -9223372036854775.808 to 9223372036854775.807
Inch: -922337203685477.5808 to 922337203685477.5807
The alarm <<Macro Command Error>> occurs when specifying a value
exceeding the above range.

2019/09/02 6 - 16 eCOM3NCPR6
Chapter 6 Macro

Ex)
:
:
(1) IF[#100 EQ 50] GOTO 123;
:
:
(2) IF[#101 GT 102] GOTO 123;
:
:
(3) GOTO 124;
:
:
(4) N123;
:
:
(5) N124;
:
:

In the above example,


At (1),if the variable of #100 is 50, the control skips to (4) or seq. No. 123.
If the variable of #100 is not 50, the control goes to the next block (2).
At (2),if #101 is greater than 102 (#101>102), the control goes to (4) or seq. No. 123.
If #101 is equal to or less than 102 (#101≦102), the control goes to the next block (3).
At (3), the control skips to (5) unconditionally according to the GOTO instruction.
6
(Note) If a command is issued in extended memory operation and tape operation,
only searching within a range for approximately 60 KB is possible.

6.4.3 WHILE Instruction (Repetition)


Command format WHILE [Conditional equation] DOm~ENDm;

m = 1~4

A conditional equation is inserted after WHILE.


Programs between DO and END are executed as long as the conditional equation is met.
The control goes to the block next to END when the conditional equation is no longer satisfied.
When WHILE[Conditional equation] is omited, programs between Dom and ENDm is repeated
infinitely.
Conditional equation is included in the brakets [ , ].

Ex) WHILE instruction


WHILE [Conditional equation] DO m; (m=1~4)

Condition met Processing


Condition not met

END m;

(Note 1) The range of values used in a conditional equation is given below.


Metric: -9223372036854775.808 to 9223372036854775.807
Inch: -922337203685477.5808 to 922337203685477.5807
The alarm <<Macro Command Error>> occurs when specifying a value
exceeding the above range.
(Note 2) If a command is issued in extended memory operation and tape operation,
the <<Macro command error>> is triggered.

2019/09/02 6 - 17 eCOM3NCPR6
Chapter 6 Macro

6.4.4 Precautions for control function


(Note 1) DOm and ENDm must have a one-to-one relationship in WHILE
instructions.
The alarm <<Macro Command Error>> occurs.

:
WHILE [#100 LT 10] DO 1;
:
:
WHILE [#101 EQ 50] DO 1;
:
:
END 1;
:

The identifier m(m=1 to 4) may be used as many times as you want provided that the one-to-one
relationship is maintained.

:
WHILE [#100 LT 10] DO 1;
:
:
END 1;
6 :
:
WHILE [#101 EQ 50] DO 1;
:
:
END 1;
:

(Note 2) You may not cross DOm and ENDm in WHILE instructions.
The alarm <<Macro Command Error>> occurs.

:
WHILE [#100 LT 10] DO 1;
:
:
WHILE [#101 EQ 50] DO 2;
:
:
END 1;
:
:
END 2;
:

2019/09/02 6 - 18 eCOM3NCPR6
Chapter 6 Macro

(Note 3) Multiplicity of DOs in WHILE instructions is up to 4-fold.


If this is exceeded, the alarm <<Macro Command Error>> occurs.

:
WHILE [#100 LT 10] DO 1;
:
:
WHILE [#101 LT 20] DO 2;
:
:
WHILE [#102 LT 30] DO 3;
:
:
WHILE [#103 LT 40] DO 4;
:
4-fold Double
: Single
Triple
END 4;
:
:
END 3;
:
:
END 2;
: 6
:
END 1;
:
:

(Note 4) IF and WHILE instructions


An IF-GOTO instruction cannot branch into WHILE-END. The alarm
<<Macro Command Error>> occurs.

IF[#100 LT 10] GOTO 123;


:
:
WHILE [#101 EQ 0] DO 1;
:
:
N123;
:
:
END 1;

2019/09/02 6 - 19 eCOM3NCPR6
Chapter 6 Macro

(Note 5) IF and WHILE instructions


It is possible to branch off the WHILE-END to other part using IF-GOTO
present in WHILE-END.

WHILE [#101 EQ 0] DO 1;
:
:
IF[#101 LT 10] GOTO 123;
:
:
END 1;
:
:
N123;

2019/09/02 6 - 20 eCOM3NCPR6
Chapter 6 Macro

6.5 Call Function


This function uses G65 or G66 and G code or M code that is registered in the data bank <G/M
code macro> to call and execute a separate program. More specifically it could be called a macro
calling function or a macro program, which is a program that is called.

This function is used to help create a unique canned cycle for when the user wishes to repeat the
same operation.

Macro program calling (G65, G66 and G code or M code that is registered in the data bank <G/M
code macro>) can be executed in memory operation mode call, but it cannot be executed from
MDI operation.
The macro program that is called returns to the calling source when M99 is executed.
When the macro program executes M02 or M30 (program end), the program ends without
returning to the calling source. (Memory operation ends.)

Difference between M99 and M02

G65
G65
M99 M02
Returns Ends
6
A macro program can call other macros with G65/G66. This parental relationship is available for
up to 4 generations (4-fold multiplicity of macro program; this is referred to as multi-layered call).

When calling a macro program, the source program may deliver arbitrary numerical values to the
called program as argument.

Macro program call commands (G65 and G66) are similar to call subprogram (M98). The
difference is described in detail later.
These call functions are described below.

6.5.1 Simple Call Function


Command format G65 P_ L_ (argument);

P : Macro program number to be called


L : Number of repeats of call (up to 9999)
A single call is determined if it is omitted
Commands cannot be given during extension memory operation/tape
operation.
(Argument) : Data to be sent to the macro; may be omitted.

Ex. 1)
G65 P200;
This calls program No. 200 once.

Ex. 2)
G65 P200L2;
is the same as:
G65 P200;
G65 P200;
Program No. 200 is called twice in either case.

2019/09/02 6 - 21 eCOM3NCPR6
Chapter 6 Macro

6.5.2 Modal Call Function


Once call is registered, the designated macro program is called automatically each time an axis
travel command is executed.

Modal call is registered by G66 command. Registration is canceled by G67 command. Once modal
call is registered, the designated macro program is executed after axes travel each time an axis
travel is commanded.

Command format G66 P_ L_ (argument);

P : Macro program number to be called


L : Number of repeats of call (up to 9999)
A single call is determined if it is omitted (see description of G65)
Commands cannot be given during extension memory operation/tape
operation..
(Argument) : Data to be sent to the macro; may be omitted.

Cancel is commanded as follows:

Command format G67;

Ex. 1)
G66 P10; (1) Register No. 10 ready for call
G01 X-10.0Y-10.0; (2) Call No. 10 after execution
G01 X-1.0Y-1.0; (3) Call No. 10 after execution
6 G67; (4) Cancel registration
G01 X-10.0Y-10.0; (5) Do not call
G01 X-1.0Y-1.0; (6) Do not call
Program No. 10 is called once after executing (2). It is also called once after executing (3). The
program is not called after execution of (5) and (6).

(Note 1) G67 must be commanded outside the called program.


G66 mode can also be canceled by M30.
(Note 2) G66 may not be commanded during the G66 mode.
(Note 3) G66 command registers a macro program, ready for being called. It does
not actually call and execute a macro.
(Note 4) Macro variables may be used for specifying a macro program. It is
necessary, in this case, to register all programs possibly called by macro
variables by inserting M98P? (? = program number) after M30 (M02), such
as M98P1 (calling program No. 1). This also applies when using G66 (G67)
in place of M98.
Ex) Assume #100 can take values of 1, 5, and 100
G66 P#100; ← a macro variable is used in macro program call
G0 X10.Y10.;
G100 T1R150.Z100.;
G67;
M30;
M98P1; All possible M98P** commands are inserted
M98P5; after M30 command.
M98P100;

(Note 5) More than 2 G/M code macro commands cannot be used on the same
block. Otherwise, the alarm <<Invalid command>> is triggered.

2019/09/02 6 - 22 eCOM3NCPR6
Chapter 6 Macro

6.5.3 G Code Macro Call


A macro program can be called using a registered G code simply by registering the G code number
and the corresponding program number, used for macro calling, ahead of time in the parameters.

(O0001) (O0002)
G0X#24Y#25;
G28Z#26;
G0Z[#26+10.0];
G200X-100.Y-100.Z300.S3000; G1Z#26M3S#19F1000;

M30; M99;

Command format GxxxL_ (argument);

xxx : G code number registered in the data bank as a <G/M code macro>
However, 0, 65, 66 and 67 cannot be used.
L : Number of repeated calls (9999 times or less)
If omitted, it is processed as 1 time (Refer to G65 description).
Commands cannot be given during extended memory operation/tape
operation.
(Argument) : Data transferred to the macro. Omission is possible.
6
In order to use G code macro calling, preset the following parameters noted in <G/M code macro>
in the data bank.

<G/M code macro (Common parameter)>


• <G code macro program folder>
• <Macro program call control type>

<G/M code macro (G code macro)>


• <G code number>
• <Program No.>
• <Call method>

When an M98, G65 or G66 command is issued inside the macro program that is called using a G
code, the program is called from a folder that is set in <G code macro program folder>. In addition,
a macro call using G code cannot be used inside a program that is called. The system G code
operation is carried out.

(Note 1) The program restrictions or the conditions that trigger an alarm, and the
modal display or the conditions that cancel a modal are processed in the
same way as a simple call (G65P****) or a modal call (G66P****) depending
on the <Call method>.
(Note 2) If the G code number used in a macro call overlaps with a G code number
that is used in the system, the macro call operation takes precedence.
(Note 3) A macro call using G code cannot be used inside a macro program that is
called using G code. The system G code operation is carried out.
(Note 4) When a macro call using M code is carried out inside a macro program
that is called using G code, the system M code operatin is carried out
when the <Macro program call control type> is set to type 1. The macro
program is called when it is set to type 2.
(Note 5) More than 2 G/M code macro commands cannot be used on the same
block. Otherwise, the alarm <<Invalid command>> is triggered.
(Note 6) After a G code based macro is called when the <Call type> is set to <1:
Type 2>, the G code based macro call cannot be used until the modal call
is canceled (G67 command is executed).

2019/09/02 6 - 23 eCOM3NCPR6
Chapter 6 Macro

(Note 7) When there is a G66 command inside the macro program that is called
using a G code, if a travel axis command is issued after the macro
program call is registered, the program is called from a folder that is set
in <G code macro program folder>.
(Note 8) In the following situations, operation is carried out according to the G
code in the system even if executed in MDI operation mode.
• When <System G/M code calling during MDI operation> is set to <1:
Call>
• When executing after switching to MDI operation mode while a macro
program called by G code is running
• When executing after switching to MDI operation mode while a macro
program called by M code is running (when <Macro program call
control type> is set to <0: Type 1>)

6.5.4 M Code Macro Call


A macro program can be called using a registered M code simply by registering the M code
number and the corresponding program number, used for macro calling, ahead of time in the
parameters.

(O0001) (O0002)
G0X#24Y#25;
G28Z#26;
G0Z[#26+10.0];
G1Z#26M3S#19F1000;
M200 X-100. Y-100.Z300.S3000;
6
M99;
M30;

Command format Mxxx L_ (argument);

xxx : M code (discussed later) registered in the parameter


However, 0, 1, 2, 30, 96 to 99 and 203 cannot be used.
L : Number of repeated calls (9999 times or less)
If omitted, it is processed as 1 time (Refer to G65 description).
Commands cannot be given during extended memory operation/tape
operation.
(Argument) : Data transferred to the macro. Omission is possible.

In order to use M code macro calling, preset the following parameters noted in <G/M code macro>
in the data bank.

<G/M code macro (Common parameter)>


• <M code macro program folder>
• <Macro program call control type>

<G/M code macro (M code macro)>


• <M code number>
• <Program No.>

When an M98, G65 or G66 command is issued inside the macro program that is called using an M
code, the program is called from a folder that is set in <M code macro program folder>. In addition,
a macro call using M code cannot be used inside a program that is called. The system M code
operation is carried out.

(Note 1) The program restrictions or an alarm, and the modal display or the
conditions that cancel a modal are processed the same way as a simple
call (G65P****).

2019/09/02 6 - 24 eCOM3NCPR6
Chapter 6 Macro

(Note 2) If the M code number used in a macro call overlaps with an M code
number that is used in the system, the macro call operation takes
precedence.
(Note 3) A macro call using M code cannot be used inside a macro program that is
called using M code. The system M code operation is carried out.
(Note 4) When a macro call using G code is carried out inside a macro program
that is called using M code, the system G code operatin is carried out
when the <Macro program call control type> is set to type 1. The macro
program is called when it is set to type 2.
(Note 5) More than 2 G/M code macro commands cannot be used on the same
block. Otherwise, the alarm <<Invalid command>> is triggered.
(Note 6) When there is a G66 command inside the macro program that is called
using an M code, if a travel axis command is issued after the macro
program call is registered, the program is called from a folder that is set
in <M code macro program folder>.
(Note 7) In the following situations, operation is carried out according to the M
code in the system even if executed in MDI operation mode.
• When <System G/M code calling during MDI operation> is set to <1:
Call>
• When executing after switching to MDI operation mode while a macro
program called by M code is running
• When executing after switching to MDI operation mode while a macro
program called by G code is running (when <Macro program call
control type> is set to <0: Type 1>)

6.5.5 Macro Call Arguments 6


Arguments must be specified if it is necessary to send local variables to macro programs.

Method 1:
Arguments are specified with all addresses except G, L, N, O, and P.
Address for specifying arguments Variables in macro
A #1
B #2
C #3
D #7
E #8
F #9
G -
H #11
I #4
J #5
K #6
L -
M #13
N -
O -
P -
Q #17
R #18
S #19
T #20
U #21
V #22
W #23
X #24
Y #25
Z #26

(Note) When an M code based macro is called, the address M cannot be


specified for an argument. Otherwise, the alarm <<Invalid data>> is
triggered.

2019/09/02 6 - 25 eCOM3NCPR6
Chapter 6 Macro

Method 2
Number of repeats of I, J, and K and A, B, and C can be specified.
Address for specifying arguments Specified number of repeats Variables in macro
A 1 #1
B 1 #2
C 1 #3
I 1 #4
J 1 #5
K 1 #6
I 2 #7
J 2 #8
K 2 #9
I 3 #10
J 3 #11
K 3 #12
I 4 #13
J 4 #14
K 4 #15
I 5 #16
J 5 #17
K 5 #18
I 6 #19
J 6 #20
K 6 #21
I 7 #22
6 J 7 #23
K 7 #24
I 8 #25
J 8 #26
K 8 #27
I 9 #28
J 9 #29
K 9 #30
I 10 #31
J 10 #32
K 10 #33

(Note 1) Addresses that do not need designation need not be specified.


(Note 2) The value of local variables corresponding to non-specified address is
empty.
(Note 3) Methods 1 and 2 are switched by the address in use. When both are used,
the last specified value is effective.
(Note 4) Arguments must be commanded after G65 and G66.
Ex) G65 D1.0 E2.0 I3.0 J4.0 K5.0 I6.0 J7.0 K8.0 F9.0
(1) #7 ← 1.0
(2) #8 ← 2.0
(3) #4 ← 3.0
(4) #5 ← 4.0
(5) #6 ← 5.0
(6) #7 ← 6.0 (value specified by D is invalid)
(7) #8 ← 7.0 (value specified by E is invalid)
(8) #9 ← 8.0
(9) #9 ← 9.0 (value specified by K for the second time is invalid)

2019/09/02 6 - 26 eCOM3NCPR6
Chapter 6 Macro

6.5.6 Difference Between G65 and M98


1. G65 can specify arguments but M98 cannot.
2. G65 can have local variables for respective levels of its multiplicity but M98 cannot.
3. Multiplicity of call of G65 is up to 8-fold including call by M98, and up to 4-fold by itself.

6.5.7 Multiple Call


Up to 4-level deep macro call is possible. Local variables (#1 to #33) are prepared for each level.
When a macro is called by G65, etc., the current local variables are saved and those for the level of
the called macro program are newly set for use. The saved local variables return when M99 is
executed.
Common variables are read and written across all levels.

Level 0 Level 1 Level 2 Level 3 Level 4

Main program Program 8010 Program 8020 Program 8030 Program 8040

G65P8010 G65P8020 G65P8030 G65P8040


I3.J4.; I5.J6.; I7.J8.; I9.J10.;

6
M30; M99; M99; M99; M99;

Local variables Local variables Local variables Local variables Local variables
for level 0 for level 1 for level 2 for level 3 for level 4

#1 #1 #1 #1 #1
• • • • •
• • • • •
#4 #4 3.0 #4 5.0 #4 7.0 #4 9.0
#5 #5 4.0 #5 6.0 #5 8.0 #5 10.0
• • • • •
• • • • •
#9 #9 #9 #9 #9
#11 #11 #11 #11 #11
#13 #13 #13 #13 #13
#17 #17 #17 #17 #17
• • • • •
• • • • •
#33 #33 #33 #33 #33

Common variables: Read and written from all levels


#100~#199
#500~#999

2019/09/02 6 - 27 eCOM3NCPR6
Chapter 6 Macro

6.6 External Output Function


When executing an external output command shown below during memory operation, the macro
variable values or characters can be output to external devices through RS-232C or can be output
as a file to a memory card/FTP server.

1. POPEN … Instruction that executes a preparatory processing of data output


2. BPRNT … Instruction that executes an output of characters and a binary output of
macrovariable values
3. DPRNT ... Instruction that executes an output of characters and a character string output
of macro variable values
4. PCLOS … Instruction that executes a terminating processing of data output

Figure 1 NC program that contains the external output command

G90;
:
POPEN;
BPRNT[#100[3]];
DPRNT[#2[63]];
PCLOS;
:
M30;

6 6.6.1 POPEN
This command links with an external connection. Specify this command prior to respective
commands of BPRNT, DPRNT, and PCLOS.

Command format POPEN;

When connecting to a <General COMM device>


The control code of “DC2” is output if the <Communication mode> of the <Communication
parameter> is <1: Code 1> or <2: Code 2>.Nothing is output if <0: Line> is set.

When connecting to a <Memory card>


It opens the memory card file.

When connected to an <FTP server>


This connects to the FTP server.

(Note 1) If POPEN is specified when the POPEN state has already been
established, it is ignored.
(Note 2) When connecting to a <Memory card>, be sure to keep the memory card
inserted without removing it until the PCLOS command or the program is
finished.

2019/09/02 6 - 28 eCOM3NCPR6
Chapter 6 Macro

6.6.2 BPRNT
This command executes an output of characters and a binary output of macro variable values.

Command format BPRNT[ xx #xx [x] … ];

(Note 1) The alarm << POPEN is unable. >> occurs if BPRNT is commanded
without first commanding POPEN.
(Note 2) Add the “end of block” code at the end of output data.

1. Output of characters
The following characters are output as they are.
Alphabets “A” to “Z”
Numbers “0” to “9”
Symbols “(” “)” “=” “/” “.” “+” “,” “-” “?”

A space is not output. Instead, “###” is output with a space code.

(Note 1) When connecting to a <General COMM device>, the output character


code follows the <Communication parameter> <Send data code> setting.
The output character code does not output “?” when using EIA format.
(Note 2) The alarm <<Macro Command Error>> occurs if “#”, “[” and “]” are
output (used other than in the output format of macro variables).
(Note 3) Motion is not guaranteed when using characters that cannot be output.

2. Output of macro variables 6


Specify the number of significant digits after decimal point in square brackets following the
variable command. Macro variable value is treated as 4-byte (32-bit) data, and it is output as
binary data, starting from the high-order byte.

(Note 1) When a macro variable value is a negative value, it is output in the


expression of two’s complement.
(Note 2) If the number of digits after decimal point of the data to be output is
larger than the significant digits, the output data is rounded off.
(Note 3) The alarm << Too many external output command digit.>> occurs when
the macro variable value exceeds the range of -2147483648 to 2147483647
as a result of forms processing.

BPRNT example:

BPRNT[DATA*X*#100[2] Y*#101[2] Z*#102[0]];

Variable values are


#100=123.456
#101=-123.456
#102=0.056
When output character code is set to ISO, and the end code of the block to CR, LF

44 41 D4 41 A0 D8 A0 00 00 30 3A 59 A0 FF FF CF C6 5A A0 00 00 00 00 8D 0A
DATA SP X SP 12346 Y SP -12346 Z SP 0 CR,LF

* SP: space code

2019/09/02 6 - 29 eCOM3NCPR6
Chapter 6 Macro

6.6.3 DPRNT
This command executes an output of characters and a character string output of macro variable
values.

Command
format DPRNT [ xx #xx [x x] … ];

Significant digits after decimal point (0 to 9)

Significant digits before decimal point (0 to 9)


Macro variable
Character

(Note 1) The alarm << POPEN is unable. >> occurs if DPRNT is commanded
without first commanding POPEN.
(Note 2) Add the “end of block” code at the end of output data.

1. Output of characters
Same as the BPRNT command. Refer to 1. Output of Characters, 6.6.2 BPRNT.

2. Output of macro variables


Of a macro variable value, specify necessary number of digits before and after decimal point
respectively in square brackets. By this command, a macro variable value is output with the
6 character codes including decimal point by the amount of number of digits specified, every
digit starting from the high-order digit.

A space code is output for the high-order zero and a positive sign if the <leading zero suppression
(DPRNT)> of the <Communication parameter> is set to <0: Type 1>. Nothing is output if <1:
Type 2>.
When the number of digits after decimal point is other than 0, the decimal point and a value after
decimal point are always output. If the number of digits after decimal point is 0, the decimal point
is not output.

(Note 1) If the number of significant digits specified is 1, the number of significant


digits before decimal point is treated as 0.
(Note 2) A numerical value exceeding the number of significant digits is not
output. If the number of digits after decimal point of the data to be output
is larger than the significant digits, the output data is rounded off.
(Note 3) When the data is 0 as a result of rounding off, a sign depends on a
numeric value before it was rounded off.

2019/09/02 6 - 30 eCOM3NCPR6
Chapter 6 Macro

DPRNT example:

DPRNT[X*#100[44] Y*#101[22] Z*#102[20] *#100[2]];

Variable values are


#100=-123.456
#101=123.456
#102=0.056
When output character code is set to ISO, and the end code of the block to CR, LF

(1) <Leading zero suppression (DPRNT)> of <Communication parameter> is set to <0: Type 1>

D8 A0 2D A0 B1 B2 33 2E B4 35 36 59 A0 A0 B2 33 2E B4 36 5A A0 A0 A0 30 A0 2D 2E B4 8D 0A
30 36
X SP -SP123.4560 Y SP SP23.46 Z SP SPSP0 SP -.46 CR,LF

(2) <Leading zero suppression (DPRNT)> of <Communication parameter> is set to <1: Type 2>

D8 A0 2D B1 B2 33 2E B4 35 36 30 59 A0 B2 33 2E B4 36 5A A0 30 A0 2D 2E B4 36 8D 0A
X SP -123.4560 Y SP 23.46 Z SP 0 SP -.46 CR,LF

* SP: space code

6.6.4 PCLOS
This command cancels the link with the external connection. Specify this command after 6
respective commands of POPEN, BPRNT, and DPRNT.

Command format PCLOS;

When PCLOS is specified, if the data output by the BPRNT or DPRNT command is underway, the
PCLOS processing is executed after the data output is completed.

When connecting to a <General COMM device>


The control code of “DC4” is output if the <Communication mode> of the <Communication
parameter> is <1: Code 1> or <2: Code 2>. Nothing is output if <0: Line> is set.

When connecting to a <Memory card>


It closes the memory card file.

When connected to an <FTP server>


The connection to the FTP server is severed.

(Note) If PCLOS is specified when the PCLOS state has already been
established (including the state in which POPEN is not executed), it is
ignored.

6.6.5 External Output to Memory Card


The external output data is saved in the root folder under the file name: date + sequence number.
Output folder : Root folder
Output file name : yyyymmdd_**.log
yyyy: year mm: month dd: day
**: sequence number (00~99)

The external output file saves the output data from POPEN to PCLOS inside the program, or until
the program finishes.

A new output data file is created when an external output file with the same date does not exist in
the memory card. When an external output file with the same date exists, it is added to the file
with the largest sequence number.
When the file size exceeds 20 MB for POPEN, a file with the next available sequence number is
created and saved.

2019/09/02 6 - 31 eCOM3NCPR6
Chapter 6 Macro

A maximum of 100 external output files with the same date can be saved.
However, if a “yyyymmdd_99.log” file already exists when creating a file, the alarm <<External
output file cannot be created.>> is triggered and the file cannot be saved.
Even if there is an available number in the middle of the sequence, it is skipped over and the next
biggest number is used. As a result, even when the maximum (100) is not exceeded, the same
alarm is triggered and the file cannot be saved.
If there is not enough space available on the memory card and the file cannot be saved, the alarm
<<Memory overflow (Memory card)>> is triggered.

The data that is output to the external output file can be opened using software that supports the
following file formats.
Data output using BPRNT command: Binary format
Data output using DPRNT command: Text format

(Note) The output data is added even if the external output file attributes that
exist in the memory card are changed to reading only.

6.6.6 External Output to FTP Server


The data that is output externally is saved under the file name (character string + date + sequence
number) specified in the communication parameter <External output - FTP output name> and is
saved to the folder specified in the communication parameter <External output - FTP output
destination>.
Output folder: Folder specified in the communication parameter <External output –
FTP output destination>
6 Output folder name: SSSSSyyyymmdd_****.log
SSSSS: Character string specified in the communication parameter
<External output – FTP output name>
yyyy: Year
mm: Month
dd: Day
****: Sequence number (0000 to 9999)

The external output file uses the APPE command to save the output data from POPEN to PCLOS
inside the program, or until the program finishes.
(Note 1) A server that supports the APPE command needs to be specified for the
server used for saving.
(Note 2) This machine cannot be specified as a server for saving.

A new output data file is created when an external output file with the same date does not exist in
the <Output folder>. When an external output file with the same date exists, it is added to the file
with the largest sequence number.
When the file size exceeds 20 MB for POPEN, a file with the next available sequence number is
created and saved.

A maximum of 10000 external output files with the same date can be saved.
However, if an “SSSSSyyyymmdd_9999.log” file already exists when creating a file, the alarm
<<External output file cannot be created.>> is triggered and the file cannot be saved.
Even if there is an available number in the middle of the sequence, it is skipped over and the next
biggest number is used. As a result, even when the maximum (10000) is not exceeded, the same
alarm is triggered and the file cannot be saved.

The data that is output to the external output file can be opened using software that supports the
following file formats.
Data output using BPRNT command: Binary format
Data output using DPRNT command: Text format

When there are a lot of files inside the output folder, it may take some time to process them.
In addition, it may take some time for a reply depending on the server and network configuration.
Therefore, we recommend using a high speed server and network when possible.

2019/09/02 6 - 32 eCOM3NCPR6
Chapter 6 Macro

6.6.7 Precautions for External Output Command


(Note 1) External output commands are used in memory operation (including
extended memory operation) of NC langquage. The alarm <<Macro
Command Error>> occurs when external output commands are issued in
MDI and tape operation.
(Note 2) Data is output also in dry run and machine lock.
(Note 3) The mode cannot be changed when executing an external output
command.
(Note 4) At program restart, external output commands specified before the
restart position are also executed.
(Note 5) Variables that are empty are regarded as 0.
(Note 6) Up to 10 macro variables may be specified in the output data of one
block.
(Note 7) It is not possible to specify macro variables and the number of significant
digits using a macro variable.

BPRNT[#[#100][1]];

DPRNT[#100[#1]];

(Note 8) If the following operations are performed before the PCLOS command is
executed, the communication is blocked without carrying out the PCLOS
processing when connected to a <General COMM device>.When
connected to an <FTP server> and a PCLOS command is processed, the
connection to the FTP server is severed. 6
When connecting to a <General COMM device>
• [RST] key is pressed
• Operation is reset (except operation reset by M30)
When connecting to a <Memory card>
• [RST] key is pressed
• Operation reset
• Running program is stopped due to alarm (stop level 3 or higher)
• Running program is stopped when alarm (stop level 2 or higher) is
triggered
When connected to an <FTP server>
• [RST] key is pressed
• Operation reset
• Running program is stopped due to alarm (stop level 3 or higher)
• Running program is stopped when alarm (stop level 2 or higher) is
triggered

(Note 9) When connected to a <General COMM device>, if the <Communication


parameter> <Check DR signal> is set to <1: Yes>, the DR signal is
checked between the POPEN command until the PCLOS command. The
alarm <<DR signal off>> occurs when DR signals are turned off during
this period.
(Note 10) When connected to a <General COMM device>, a <Memory card> or an
<FTP server> and another setting is configured, the alarm <<Connected
to wrong device>> is triggered when the POPEN command is executed.

2019/09/02 6 - 33 eCOM3NCPR6
Chapter 6 Macro

6.7 Interrupt Macro (Option)


Interrupt macro is a function to suspend the program currently being executed on detecting an
interrupt signal (external input signal: UINT) and execute the commanded program.
A program that is executed by interruption is called interrupt program.

Command format M96 P_;

P : Interrupt program No.

Use the command below to cancel an interruption.

Command format M97;

The following conditions are required to use interrupt macros:


・ The system is in the memory operation mode
・ The system is in automatic operation (external output: STL signals ON)
・ Not executing an interrupt macro
Any interrupt signal that is received under conditions other than the above is ignored.

Subprograms and macros can be called from interrupt programs.

Insert M99 command to return from an interrupt macro to the main program. The sequence
number in the main program to return to can be specifed using P address.
6 In addition to use of M97, the following operations cancel interruption:
・ Operation reset
・ Commanding M02 (M30)
M97 is effectively commanded in an interrupt program or in a program called from an interrupt
program.

Main program Interrupt

(O0001) (O1000)
Interrupt
signal
M96 P1000; → ignored
Interrupt signal

Interrupt signal is Without P command


accepted in this period
M99(P0200);

M97;

With P command
Interrupt signal is not
accepted hereafter

Interrupt
N0200;
signal
→ ignored

M30;

2019/09/02 6 - 34 eCOM3NCPR6
Chapter 6 Macro

(Note 1) The alarm <<Invalid command>> occurs when other G / M code is


commanded in the blocks of M96 / M97.
Axes will not move if you command X, Y, and Z axes.
(Note 2) If P command is absent in an M96 command block, the<<Subprogram
number error>> occurs. If a non-existent program number is designated,
<<No subprogram>> occurs.
(Note 3) When an interrupt signal is detected during execution of a subprogram,
the interrupt program is called.

Interrupt
(O0001) (O2000) signal
(O1000)

M96 P1000;

M98 P2000;

M30; M99; M99;

(Note 4) The alarm <<Interrupted program call error>> occurs at the time of calling
an interrupt program when an interrupt signal is detected during
execution by G65/G66/M98 of subprogram specified as interrupt program.

(O0001) (O1000) Interrupt signal

M96 P1000;
Alarm <<Interrupted program call
error>> occurs
6
M98 P1000;

M30; M99;

(Note 5) The alarm <<Interrupted program call error>> occurs at the time of calling
an interrupt program when an interrupt signal is detected during
execution of a subprogram which parent program is the subprogram
specified in the interrupt program.
Interrupt signal

(O0001) (O1000) (O1001)


Alarm <<Interrupted
M96 P1000; program call error>>
M98 P1001; occurs
M98 P1000;

M30; M99; M99;

(Note 6) The alarm <<Subprogram call error>> occurs when calling the parent
program from an interrupt program which has been called during
execution of a subprogram.

Interrupt
(O0001) (O1001) signal (O1000) Alarm <<Subprogram
call error>> occurs
M96 P1000;
M98 P1001;
M98 P1001;

M30; M99; M99;

2019/09/02 6 - 35 eCOM3NCPR6
Chapter 6 Macro

(Note 7) When the total program size that is loaded (including the interrupt
program size) exceeds the size that is set in the user parameter (switch 1)
<Program load size>, the machine operates in the extended memory
operation mode. In this mode, the operation may stop for a time period
equivalent to the time required for loading if the size of the interrupt
program is large.
(Note 8) You may specify the interrupt program number using macro variables.
Refer to 8.3 Simple Call Function, Chapter 8 Subprogram Function.

6.7.1 Interrupt Type


<Interrupt type macro interrupt system> of <User parameter> is used to set how to interrupt a
block currently being executed on detecting an interruption signal.

1. Type 1: Interrupt by suspending the execution


The currently being executed block is suspended on detecting an interrupt signal, and the
interrupt program starts immediately.

When NC statements are included in the interrupt program or subprogram / macro program
called from the interrupt program, the commands included in the interrupted block are lost,
and the source program re-starts from the block next to the affected block on returning to the
source program.

Interrupt signal ON Suspended due


to interrupt

6
Ordinary program
This portion not executed

Interrupt program
NC statement exists

In the absence of NC statements, the commands in the suspended block continue on returning
to the source program.

Interrupt signal ON Suspended due


to interrupt

Ordinary program
Remainder executed

Interrupt program
No NC statement

Refer to “6.7.6.Macro Statement and NC Statement” for the detailed description of NC


statement.

2. Type 2: Interrupt without suspending the execution


The interrupt program is executed on detecting an interrupt signal without suspending the
currently executed block.

Macro statements up to the first NC statement in the interrupt program or subprogram / macro
program called from the interrupt program are processed in parallel with the currently
executed block.
Timing of start of processing of macro statements may differ depending on the contents of the
currently executed block.

2019/09/02 6 - 36 eCOM3NCPR6
Chapter 6 Macro

• Currently executed block is a single operation command:


Macro statement is executed immediately.
Interrupt sig. ON
N2 Ex.: G1X-100.;

Ordinary program

Interrupt program
Execute macro Execute NC statement
statement only

• Currently executed block is a multiple operation command:


Macro statement is executed simultaneously with the last travel command of the cycle
operation.

Start of last travel command of G28.


Interrupt signal ON (Travel command to reference point)

N2 Ex.:G91 G28 X0.;

Ordinary program

6
Interrupt program Execute macro
statement only Execute NC statement

Multiple operation commands are listed below. All other commands are single operation
commands.
• Reference point return (G28/G29/G30)
• Canned cycle (G73 to G89, G177 to G189)
• Tool replacement canned cycle (G100/M06)
• Coordinate calculation function (G36 to G39)

For both types of interruption, blocks after the first NC statement are executed after completion of
the currently executed block.

Refer to 6.7.6 Macro Statement and NC Statement for the detailed description of NC and macro
statements.

(Note) Operation of “Type 2: Interrupt without suspending the execution”


applies, irrespective of the value of <Interrupt type macro interrupt
system>, when the following operations are currently executed:
• Reference point return (G28/G29/G30)
• Canned cycle (G73 to G89, G177 to G189)
• Tool replacement canned cycle (G100/M06)
• Pallet turn
• Coordinate calculation function (G36 to G39)
• Automatic workpiece measurement (G120 to G129)
• Tap torsion direction change (G133/G134)

2019/09/02 6 - 37 eCOM3NCPR6
Chapter 6 Macro

6.7.2 Call Type


There are two types of calling an interrupt program in interrupt macros. One of them is selected in
the <Interrupt type macro call system> of <User parameter>.

1. Subprogram type interruption


Interrupt programs are called as subprogram. The level of local variables will not change
before and after interruption.

2. Macro type interruption


Interrupt programs are called as macro program. The level of local variables will change
before and after interruption. It is not possible, however, to deliver arguments from the
program currently being executed. All local variables immediately after interruption are
cleared to <empty.>

In either type of call, the call does not increase multiplicity of subprogram / macro call.
Subprogram / macro call conducted in an interrupt program increases respective multiplicity.

6.7.3 Acceptance Type


There are two interrupt signal acceptance types. One of them is set with the <Interrupt type macro
reception system> of <User parameter>.

1. Type 1: Status trigger system


Signals are accepted when interrupt signal is ON.
An interrupt program is executed when the interrupt signal is ON at the time when the
interrupt macro becomes valid with M96.
6 An interrupt program can be repeatedly executed if you keep the interrupt signal ON steadily.

2. Type 2: Edge trigger system


Signals are accepted only at the timing of interrupt signal rising from OFF to ON. Interrupt
program is not executed even when the interrupt signal is ON at the time when an interrupt
macro becomes valid with M96.

Interrupt signal
ON

OFF

Status trigger system

Edge trigger system Execute interrupt macro

2019/09/02 6 - 38 eCOM3NCPR6
Chapter 6 Macro

6.7.4 Interrupt Macro and Modal Information


The modal information, changed in the interrupt program, is differnetly transferred to the source
program depending on how the control leaves the interrupt program.

1. Returning with M99 (sequence number not specified)


Modal information except M code (G/T/H/D/S/F codes) before interruption is valid. Modal
information modified in the interrupt program turns invalid.

M code modal information, modified in the interrupt program, continues to be valid as it is


modified.
Main program Interrupt program

(O0001) (O1000)
M96 P1000; G91
G90 M05;
M03 S1000
Interrupt signal

Without P
command

Modal before
interrupt restores
except M code
modal
M99;
6
2. Returning with M99PXXXX (with a sequence number specified)
Modal information, modified in the interrupt program, is valid as it is modified.
You can reference the modal information used before interruption using system variables
#4401 to #4530.

Main program Interrupt program

(O0001) (O1000)
Interrupt signal M96 P1000;

N0200;
With P
command
Modal as modified in
interrupt program is valid
M99 P0200;

2019/09/02 6 - 39 eCOM3NCPR6
Chapter 6 Macro

6.7.5 Interrupt Macro and Current Position


The values of macro variables indicating the current position at execution of an interrupt program
are shown below.

Interrupt occurs B0

Tool center path B1

A0

Program path

Variable No. Contents Conditions of reference Coordinate values


#5001 to End point From interruption to the first It is undefined. Do not
#5008 coordinates NC statement use it.
After start of NC statement that Coordinates of B1
does not include travel position
commands
After start of NC statement that Coordinates of end
include travel commands point of travel
command
#5021 to Current position Machine coordinates of
6 #5034 (Machine coordinate B1 position
system)
#5041 to Current position Workpiece coordinates
#5054 (Workpiece of B1 position
coordinate system)

Refer to the “6.7.6 Macro Statement and NC Statement” for the detailed description of NC
statement.

6.7.6 Macro Statement and NC Statement


Blocks satisfying the conditions below are macro statement. Those that do not satisfy them are NC
statement.

• Includes calculation command (Refer to “6.3 Calculation function”) (*)


• Includes control command (Refer to “6.4 Control function”) (*)
• Includes external output command (Refer to “6.6 External output function”) (*)
• Includes macro simple call command (G65)
• Includes subprogram call command (M98)
• Includes a return command (M99) from macro program / subprogram

* Only when <User parameter> <Macro command single stop> is selected to <0: No>.

Blocks that do not conduct Single Block Stop in single operation may be said macro statement and
those that do conduct Single Block Stop NC statement.

2019/09/02 6 - 40 eCOM3NCPR6
Chapter 6 Macro

6.7.7 Restrictions
1. The alarm <<Specified G code cannot be used>> occurs when interrupting in the
programmable mirror image (G51.1), rotational transformation (G68), or scaling (G51) mode
and commanding the same programmable mirror image (G51.1), rotational transformation
(G68), or scaling (G51) again in the interrupt program.

2. When <Interrupt macro interrupt type> is set to type 2 and macro program modal call (G66)
and interrupt type macro (M96) are modals, if an interrupt signal is detected during a travel
axis command, the interrupt type macro (M96) is given priority and called. The registered
macro program will not be called in the modal call (G66).

3. Macro modal call (G66) is canceled on calling an interrupt program. G66 must be commanded
in the interrupt program if you wish to perform macro modal call in the interrupt program.

4. The interrupt program is executed after finishing search when an interrupt signal is detected
during search of sequence number of GOTO instruction, END instruction of WHILE – END,
and sequence number of M98Hxxxx and M99Pxxxx.

5. Interrupt signals, which are detected during search of the block specified by program restart
(Sequence Search), are ignored.

6. Interrupt signals, which are detected during search of the block specified by program restart
(Restart) and during return operation, are ignored.

7. When an interrupt signal is detected during a dwell, the interrupt program is executed after the
dwell. 6
8. When an interrupt signal is detected while waiting for ON/OFF of BCD signal output and M
signals of M460, etc., the interrupt program is executed after detecting ON/OFF of the waiting
signal.

9. The alarm << High accuracy A (or B) invalid command >> occurs when commanding M96 in
the high accuracy mode. The alarm << High accuracy A (or B) invalid modal>> occurs when
commanding a high accuracy mode (M260 / M261 / M262 / M265) in the M96 modal.

10. When an NC statement is included in the interrupt program or subprogram / macro program
called from an interrupt program, the M99 command block for returning from the interrupt
program to the original program will perform single block stop in the case of single operation.

11. When the door opens for safety reasons, the interrupt type macro function does not enable.
Refer to “Door Interlock” in the Operation Manual (Operation) for further details on door
open definition.

12. The following operations do not apply: mirror image, scaling, rotational transformation, cutter
compensation and nose R compensation, when performing axis travel for an interrupt program,
and within a sub program / macro program that is called from an interrupt program.

13. It returns to the original path from the second travel operation after the return operation when
an interrupt occurs during a cutter compensation operation and nose R compensation operation
and when there is an NC statement in the interrupt program, and within a sub program / macro
program that is called from an interrupt program.

(Note) During cutter compensation when an interference check is being


carried out for nose R compensation, the interference check starts
again at the place where it returns to the original path.

14. When the item <Interrupt type macro interrupt system> is set to <0: Type 1> (interrupts by
cancelling execution), if travel for tool length offset and for tool position compensation is lost
due to the interruption, compensation will not be executed until the next Z-axis travel
operation, and until the next X-, Y- and Z-axes travel operation.

2019/09/02 6 - 41 eCOM3NCPR6
Chapter 6 Macro

15. Even if the following keys are pressed: [MANU], [MDI] and [EDIT] between the time when
the interrupt signal is detected until the end when the interrupt program is executed with M99,
the alarm <<Interrupt type macro execution is being prepared>> is displayed and the mode
cannot be changed.

16. The alarm <<Interrupt type macro post-process being executed>> occurs and the mode will
not change if you press [MANU], [MDI], or [EDIT] key during the time between completion
of interrupt program and return to the original program.

17. When restoring from the interrupt program during extension memory operation/tape operation,
the sequence number cannot be specified.
If an instruction is given, an <<Invalid command>> alarm will occur.

18. If an interrupt occurs during incremental mode (G91) and an NC sentence exists in the
interrupt program or a sub-program or macro program which is called from the interrupt
program, the first movement command given after the reset will be treated as an incremental
command from the coordinates where the reset occurred.

19. When the command M96 is issued inside the following sub program or macro program, the
alarm <<Interrupt type macro command not possible>> is triggered. If extension or tape
operation is used, the alarm <<Specified M code cannot be used>> is triggered.
• Macro program that is called using G code (or M code).
• Sub program / macro program that is called using the command M98, G65 or G66 from a
macro program that is called using G code (or M code).
6 20. When an interrupt signal (UINT) is detected inside the macro program that is called using G
code (or M code), it interrupts and executed the program that is specified in the M96
command.

21. The alarm <<Feature coordinate manufacturing mode engaged>> is triggered when an M96
command is issued while in feature coordinate manufacturing mode. In addition, the alarm
<<Feature coordinate command error>> is triggered when a feature coordinate setting
command (G68.2) is issued during M96 modal.

6.7.8 Reference Folder When Interrupt Type Macro is


Executed
The folder that is referenced when executing an interrupt type macro is as follows depending on
the operation type.
Operation type Reference folder
Internal memory operation Same folder as the main program
Tape operation Root folder in the NC memory

(Note 1) The folder is the same one that is referenced when executing the M98
command.
(Note 2) The folders above are referenced as well when an interrupt signal (UINT)
is detected inside the macro program that is called using G code (or M
code).

2019/09/02 6 - 42 eCOM3NCPR6
Chapter 7 Automatic Workpiece Measurement

CHAPTER 7

AUTOMATIC WORKPIECE
MEASUREMENT

7.1 List of Automatic Workpiece Measurement


Functions
7.2 Before Automatic Workpiece Measurement 7
7.3 Setting Data for Automatic Workpiece Measurement
7.4 Command Procedure for Automatic Workpiece
Measurement
7.5 Measurement Results Processing
7.6 Lock Key Operations
7.7 Program Restart Operation

2019/09/02 7-1 eCOM3NCPR7


Chapter 7 Automatic Workpiece Measurement

7.1 List of Automatic Workpiece Measurement


Functions
1. G121…X and Y coordinates for corner

+Z

+Y

+X

2. G129…X and Y coordinates for groove

+Z

+Y

+X

7
3. G122…X and Y coordinates for center of parallel groove

+Z

+Y

+X

4. G123…X and Y coordinates for center of parallel boss

+Z

+Y

+X

2019/09/02 7-2 eCOM3NCPR7


Chapter 7 Automatic Workpiece Measurement

5. G124 and G126…X and Y coordinates for center of hole

+Z

+Y

+X

6. G125 and G127…X and Y coordinates for center of circular boss

+Z

+Y

+X

7. G128…Z-axis coordinate on top surface of workpiece

+Z 7
+Y

+X

2019/09/02 7-3 eCOM3NCPR7


Chapter 7 Automatic Workpiece Measurement

7.2 Before Automatic Workpiece Measurement


Set the following item in the user parameter 1 (switch 1).
Item name Setting range Description
Probe detection 0: Method 1 Set the accuracy of the detection signal that is obtained
signal method 1: Method 2 from the touch probe.
Even if the <1: Method 2> increases the travel speed of
the probe more than <0: Method 1>, there is less variation
in the measurement values. As a result, the speed can be
set higher than <Automatic centering speed 2> and
<Measurement speed 2>. However, <1: Method 2> cannot
be set due to the machine structure, and an alarm is
triggered.
In addition, set the necessary parameters in the user parameters (automatic workpiece
measurement).
If the parameters are not correctly set, the probe can become damaged.

(Note) The commands G121 to G129 cannot be issued when using the lathe
spindle in the following situations. After switching modals, issue the
command.
• M142 modal in progress
• G143/G144 modal in progress
The commands G121 to G129 cannot be issued while in feature
coordinate manufacturing mode (G68.2 modal in progress).

2019/09/02 7-4 eCOM3NCPR7


Chapter 7 Automatic Workpiece Measurement

7.3 Setting Data for Automatic Workpiece


Measurement
Description of the user parameters (Automatic workpiece measurement)
Item Description
<Probe compensation 1> Set the difference between the center of the stylus tip ball and the
<Probe compensation 2> center of the spindle when the detection signal turns ON with the
touch probe attached to the spindle. The X value of the difference
corresponds to <Probe compensation 1> and the Y value corresponds
to <Probe compensation 2>. We recommend performing the
automatic setting on the automatic centering - <Probe compensation
(corner)> screen in MDI mode.

Probe compensation
7
Setting range -9.999 to 9.999 mm
-0.9999 to 0.9999 inch
(When using Type 1 for the minimum unit setting)
<Probe compensation 3> Set the difference between the center of the circle, calculated by
<Probe compensation 4> 3-point measurement (G124 and G125), and the center of the actual
circle. The X value of the difference corresponds to <Probe
compensation 3> and the Y value corresponds to <Probe
compensation 4>. We recommend performing the automatic setting
on the automatic centering - <Probe compensation (3-point circle)>
screen in MDI mode.
Setting range -9.999 to 9.999 mm
-0.9999 to 0.9999 inch
(When using Type 1 for the minimum unit setting)

2019/09/02 7-5 eCOM3NCPR7


Chapter 7 Automatic Workpiece Measurement

Item Description
<Measurement motion> <0: Type 1>
<0: Type 1> 1. Detection signal OFF check
<1: Type 2> 2. Travels at measurement speed 1 in specified axis direction
3. Axis travel stops when detection signal turns ON
4. Returns to front traveling the return distance
5. Travels at measurement speed 2 in specified axis direction
6. Axis travel stops when detection signal turns ON
7. Returns to position in Step 4
8. Detection signal OFF check

2
4
5
7 Return distance
after measurement

Stop point before


measurement
7 <1: Type 2>
1. Detection signal OFF check
2. Travels at measurement speed 2 in specified axis direction
3. Axis travel stops when detection signal turns ON
4. Returns to front traveling the return distance
5. Detection signal OFF check

Return distance
after measurement

Stop point before


measurement

2019/09/02 7-6 eCOM3NCPR7


Chapter 7 Automatic Workpiece Measurement

Item Description
<Measurement speed 1> Set the first measurement speed for Type 1 measurement motion.
• Relief amount of probe = L (mm)
• Skip feed time constant 1 = t (msec)
• Measurement speed 1 = F1 (mm/min)
• Control system delay = td (msec) = 4 (msec)
• Delay unique to probe = tp (msec)

L ≧ ((F1 ×td) ÷ (60 × 1000)) +



Overtravel amount due to delay in control system
((F1 × t / 2) ÷ (60 × 1000))

Overtravel amount
((F1 × tp) ÷ (60 × 1000))

Overtravel amount due to delay unique to probe

F1 < (120000L ÷ (8+t+2×tp)) ÷ 1.2



Safety factor

Setting range 1 to 5000 mm/min


0.1 to 196.8 inch/min
(When using Type 1 for the minimum unit setting)
<Measurement speed 2> Set the second measurement speed for Type 1 measurement motion
and the measurement speed for Type 2 measurement motion.
• Tolerance in control system = E (μm)
• Measurement speed 2 = F2 (mm/min)
• Control system delay = td (msec)
(When probe detection signal method = 0: Method 1)
7
td (msec) = 0. 300 (msec)
(When probe detection signal method = 1: Method 2)
td (msec) = 0.085 (msec)
• Margin of error unique to probe = ep (mm)

E ≥ (F2 × td) ÷ (60 × 1000) + ep



F2 ≤ 60000×(E-ep) ÷ td

Setting range 1 to 5000 mm/min


0.1 to 196.8 inch/min
(When using Type 1 for the minimum unit setting)
<Stop point before Set the distance between the end of the probe at the measurement start
measurement> point and the predicted value on the workpiece surface.
The alarm <<Detection signal off>> is triggered if it travels from this
point and skips over the <<Stop point before measurement>> +
<<Measurement travel limit distance>>.
Setting range 0.000 to 99.999 mm
0.0000 to 9.9999 inch
(When using Type 1 for the minimum unit setting)

Stop point before


measurement Measurement travel
limit distance

Tool radius

2019/09/02 7-7 eCOM3NCPR7


Chapter 7 Automatic Workpiece Measurement

Item Description
<Measurement travel Set the overtravel when the measurement skip operation exceeds the
limit distance> predicted value (programmed value).
Setting range 0.000 to 99.999 mm
0.0000 to 9.9999 inch
(When using Type 1 for the minimum unit setting)
<Measurement tolerance The alarm <<Large error in measured value (1)>> is triggered if the
1> difference between the measurement result and the predicted value
(programmed value) exceeds this setting. When 0 is set, the error
checking is not performed.

Setting range 0.000 to 99.999 mm


0.0000 to 9.9999 inch
(When using Type 1 for the minimum unit setting)
<Measurement tolerance The alarm <<Large error in measured value (2)>> is triggered if the
2> difference between the current measurement result and the previous
measurement result exceeds this setting. When the following situation
applies, the error checking is not performed.
• When 0 is set
• When the first automatic workpiece measurement motion occurs
after power is turned ON (1st motion for measurement results 1
through 4)
• When there is no measurement result for previous measurement
• When the G code for this command is different from the previous
command

Setting range 0.000 to 99.999 mm


0.0000 to 9.9999 inch
(When using Type 1 for the minimum unit setting)
7 <Return distance after
measurement>
Set the return distance from the position where the measurement
probe makes contact with the workpiece.
• Return distance = Lb (mm)
• Skip feed time constant 1 = t (msec)
• Measurement speed 2 = F2 (mm/min)

Lb ≧ MAX(1.0, F2 × t / 60000)

Setting range 0.000 to 99.999 mm


0.0000 to 9.9999 inch
(When using Type 1 for the minimum unit setting)

(Note) The set values, such as the measurement speed and return distance after
measurement, vary depending on the probe being used. Therefore,
contact the probe manufacturer when deciding on the set values.

2019/09/02 7-8 eCOM3NCPR7


Chapter 7 Automatic Workpiece Measurement

The travel speed follows G00/G01 modals when the automatic workpiece measurement is being
performed, when traveling to the measurement start point and when returning from the
measurement point.
G00: Rapid feedrate
G01: F command value
G02/G03/G102/G103/G202/G203: The alarm <<Arc mode>> is triggered.
G02.2/G03.2: The alarm <<Invalid command for involute interpolation modal>> is triggered.

Make sure that no swarf or chips are stuck to the end of the measurement probe or on the
measurement surface. In addition, make sure that there is no disturbance (caused by vibrations
from outside of the machine) that adversely affects the machine. We cannot guarantee the
measurement accuracy when there is swarf or other factors that can cause inaccuracy.

The mode cannot be changed during the automatic workpiece measurement. Attempting to change
the mode will trigger the alarm <<During measurement>>.

To avoid damaging the probe as well, press the [SINGL] key for the first measurement in the
automatic workpiece measurement operation, and check each motion using the single operation.

Perform the automatic workpiece measurement while the tool length offset is engaged.
The tool length offset is cancelled even if the coordinate is set in the machining coordinates using
the G53 command.

2019/09/02 7-9 eCOM3NCPR7


Chapter 7 Automatic Workpiece Measurement

7.4 Command Procedure for Automatic Workpiece


Measurement
7.4.1 Corner
Command format
Boss G121 X_ Y_ I_ J_ K_ L_ D_ Z_ R_ Q_;
Groove G129 X_ Y_ I_ J_ K_ L_ D_ Z_ R_ Q_;

(X, Y)
+Z J
L
I
+Y
K

+X

(X, Y)

I
+Z J
K
+Y L

+X

X and Y : Predicted value for corner


I and K : X-axis coordinate position when measuring in Y direction. Offset from (X, Y)
J and L : Y-axis coordinate position when measuring in X direction. Offset from (X, Y)
D : Cutter compensation No.
Z : Z coordinate when measuring
R : When traveling from measurement position to the measurement position, and
return height after travel ends
Q : Register No. stores the measurement result (1 when omitted)

2019/09/02 7 - 10 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

(Note 1) An alarm is triggered when a J command is not issued or when I = 0 or J


= 0.
(Note 2) If a workpiece is tilted and a K or L command is issued, the angle of the
tilted workpiece (angle used in the rotational transformation) is also
calculated.
The alarm <<Auto workpc. meas. address error>> is triggered when both
K and L are specified or when a 0 command is issued.
(Note 3) Before (G121/G129) is carried out, perform <<Probe comp.(corner)>> for
automatic centering and set the compensation for the user parameter
<Probe compensation (G121/G129)>.
(Note 4) The D modal does not change with the D command.

Boss
(Motion)
1. Spindle orientation. Travels to the first measurement start position for the X- and Y-axes.
2. Travels to the measurement height on the Z-axis.
3. First measurement (position J).
4. Measures at position L when there is an L command.
5. Travels to the return height position on the Z-axis.
6. Spindle orientation. Travels to the second measurement start position for the X- and Y-axes.
7. Travels to the measurement height on the Z-axis.
8. Measurement (position I).
9. Measures at position K when there is a K command.
10. Travels to the return height point on the Z-axis.

I and J signs, spindle orientation, and measurement skip travel direction

(1) I > 0 and J > 0

+Y 7
1st
+X
J

2nd
st
1 +X direction, spindle 0°
nd
2 +Y direction, spindle 0°

2019/09/02 7 - 11 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

(2) I > 0 and J < 0

2nd +Y

I
+X

1st

st
1 +X direction, spindle 0°
nd
2 -Y direction, spindle 180°

(3) I < 0 and J > 0

+Y

1st
+X
J

7 I

2 nd

1st -X direction, spindle 180°


2nd +Y direction, spindle 0°

(4) I < 0 and J < 0

2nd +Y

I
J +X

1st

1st -X direction, spindle 180°


2nd -Y direction, spindle 180°

2019/09/02 7 - 12 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

Groove
(Motion)
1. Spindle orientation. Travels to the first measurement start position for the X- and Y-axes.
2. Travels to the measurement height on the Z-axis.
3. First measurement (position J).
4. Measures at position L when there is an L command.
5. Spindle orientation. Travels to the second measurement start position for the X- and Y-axes.
6. Measurement (position I).
7. Measures at position K when there is a K command.
8. Travels to the return height point on the Z-axis.

(1) I > 0 and J > 0

+Y
1st

J +X
2nd
I

1st -X direction, spindle 180°


2nd -Y direction, spindle 180°

(2) I > 0 and J < 0

+Y 7
I
2nd +X
J
1st

1st -X direction, spindle 180°


2nd +Y direction, spindle 0°

(3) I < 0 and J > 0

1st +Y
2nd
J
+X
I

1st +X direction, spindle 0°


2nd -Y direction, spindle 180°

2019/09/02 7 - 13 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

(4) I < 0 and J < 0

+Y

I
J +X

2nd
1st
1st +X direction, spindle 0°
2nd +Y direction, spindle 0°

7.4.2 Parallel
Command format
Groove G122 X_ Y_ I_(J_) D_ Z_ R_ Q_;
Boss G123 X_ Y_ I_(J_) D_ Z_ R_ Q_;

+Z

+Y

7 +X

+Z

+Y

+X

X and Y : Predicted value for groove (boss) center


I and J : Groove width
I : Width in X-axis direction
J : Width in Y-axis direction
Simultaneous commands for I and J cannot be issued
D : Cutter compensation No.
Z : Z coordinate when measuring
R : Z coordinate for return height position
Q : Register No. stores the measurement result (1 when omitted)

2019/09/02 7 - 14 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

Groove
(Motion)
1. Spindle orientation 0°. Travels to the first measurement start position for the X- and Y-axes.
2. Travels to the measurement height on the Z-axis.
3. First measurement.
4. Spindle orientation 180°. Travels to the second measurement start position for the X- and
Y-axes.
5. Second measurement.
6. Travels to the return height position on the Z-axis.

(1) When command is issued

+Y

+X
2nd 1st

(2) When J command is issued

+Y
7
J 1st
+X

2nd

Boss
(Motion)
1. Spindle orientation 180°. Travels to the first measurement start position for the X- and Y-axes.
2. Travels to the measurement height on the Z-axis.
3. First measurement.
4. Travels to the return height point on the Z-axis.
5. Spindle orientation 0°. Travels to the second measurement start position for the X- and
Y-axes.
6. Travels to the measurement height on the Z-axis.
7. Second measurement.
8. Travels to the return height on the Z-axis.

2019/09/02 7 - 15 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

(3) When I command is issued

I
+Y

+X

2nd 1st

(4) When J command is issued

+Y

1st

+X

7
2nd

7.4.3 Circle Center


Command format
3 points are measured to calculate the center of the circle.

Hole G124 X_ Y_ I_ D_ Z_ R_ Q_;


Boss G125 X_ Y_ I_ D_ Z_ R_ Q_;

4 points are measured to calculate the center of the circle.

Hole G126 X_ Y_ I_ D_ Z_ R_ Q_;


Boss G127 X_ Y_ I_ D_ Z_ R_ Q_;

X and Y : Predicted value for hole (boss) center


I : Diameter of circle being measured
D : Cutter compensation No.
Z : Z coordinate when measuring
R : Z coordinate for return height position
Q : Register No. stores the measurement result (1 when omitted)

2019/09/02 7 - 16 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

+Z

+Y

I +X

+Z

I
+Y

+X

Hole and 3-point measurement


(Motion)
1. Spindle orientation 0°. Travels to the first measurement start position for the X- and Y-axes.
2. Travels to the measurement height on the Z-axis.
7
3. First measurement. (Y-axis plus direction)
4. Spindle orientation 0°. Travels to the second measurement start position for the X- and
Y-axes.
5. Second measurement. (Direction that forms the 120° angle with the first)
6. Spindle orientation 0°. Travels to the third measurement start position for the X- and Y-axes.
7. Third measurement. (Direction that forms the 240° angle with the first)
8. Travels to the return height point on the Z-axis.

+Y
1st

+X
3rd

2nd

2019/09/02 7 - 17 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

Boss and 3-point measurement


(Motion)
1. Spindle orientation 180°. Travels to the first measurement start value for the X- and Y-axes.
2. Travels to the measurement height on the Z-axis.
3. First measurement. (Y-axis minus direction)
4. Returns to the return height point on the Z-axis.
5. Spindle orientation 180°. Travels to the second measurement start position for the X- and
Y-axes.
6. Travels to the measurement height on the Z-axis.
7. Second measurement. (Direction that forms the 120° angle with the first)
8. Returns to the return height point on the Z-axis.
9. Spindle orientation 180°. Travels to the third measurement start position for the X- and
Y-axes.
10. Travels to the measurement height on the Z-axis.
11. Third measurement. (Direction that forms the 240° angle with the first)
12. Returns to the return height point on the Z-axis.

1st +Y

+X

7
2nd 3rd

Hole and 4-point measurement


(Motion)
1. Spindle orientation 0°. Travels to the first measurement start position for the X- and Y-axes.
2. Travels to the measurement height on the Z-axis.
3. First measurement. (X-axis plus direction)
4. Spindle orientation 180°. Travels to the second measurement start position for the X- and
Y-axes.
5. Second measurement. (X-axis minus direction)
6. Spindle orientation 0°. Travels to the third measurement start position for the X- and Y-axes.
7. Third measurement. (Y-axis plus direction)
8. Spindle orientation 180°. Travels to the fourth measurement start position for the X- and
Y-axes.
9. Fourth measurement. (Y-axis minus direction)
10. Travels to the return height point on the Z-axis.

2019/09/02 7 - 18 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

+Y

3rd
+X

2nd

1st

4th

Boss and 4-point measurement


(Motion)
1. Spindle orientation 180°. Travels to the first measurement start value for the X- and Y-axes.
2. Travels to the measurement height on the Z-axis.
3. First measurement. (X-axis minus direction)
4. Returns to the return height point on the Z-axis.
5. Spindle orientation 0°. Travels to the second measurement start position for the X- and
Y-axes.
6. Travels to the measurement height on the Z-axis.
7. Second measurement. (X-axis plus direction)
8. Returns to the return height point on the Z-axis.
9. Spindle orientation 180°. Travels to the third measurement start position for the X- and
Y-axes. 7
10. Travels to the measurement height on the Z-axis.
11. Third measurement. (Y-axis minus direction)
12. Returns to the return height point on the Z-axis.
13. Spindle orientation 0°. Travels to the fourth measurement start position for the X- and Y-axes.
14. Travels to the measurement height on the Z-axis.
15. Fourth measurement. (Y-axis plus direction)
16. Returns to the return height point on the Z-axis.

3rd +Y

+X

2nd 1st

4th

2019/09/02 7 - 19 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

7.4.4 Z-axis Height


Command format G128 X_ Y_ Z_ Q_;

X and Y : X and Y coordinates at measurement point


Z : Predicted value for Z-axis height

+Z

+Y

+X

(Motion)
1. Spindle orientation 0°. Travels to the measurement start position for the X- and Y-axes.
2. Travels to the measurement start point on the Z-axis.
7 3. Executes measurement. (Z-axis minus direction)

7.4.5 Positioning to Measurement Position


Command format G120 X_ Y_ Z_ Q_;

X, Y and Z : Incremental amount from measurement position


Q : Selects whether to use the register with the measurement result saved. 1 is
used when it is omitted.

+Z
c
+Y

+X

Measurement point a

G120 Xa Yb Zc

When the above command is issued, it travels to P in the figure.


The alarm <<No measurement data>> is triggered if no measurement data exists.

2019/09/02 7 - 20 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

7.5 Measurement Results Processing


7.5.1 Display Screen for Measurement Results
Press [4] or move the cursor to <4. Measurement results> on the production monitor menu, and
press the [ENT] key to change to the following screen.

When continuing to perform measurements, the measurement results that were previously carried
out are displayed.

2019/09/02 7 - 21 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

7.5.2 Apply Measurement Results to Workpiece


Coordinates
Command format G10 L99 Pn X_ Y_ Z_ Q_;

Pn : n = 1 G54
2 G55
3 G56
4 G57
5 G58
6 G59

G10 L98 Pn X_ Y_ Z_ Q_;

Pn : n = 1 G54.1 P1
2 G54.1 P2
• •
• •
• •
48 G54.1 P48
X, Y and Z : Coordinates for measurement position
Q : Measurement No. being used

Ex: When the measurement value for Measurement No.2 is (X,Y) = (-120,-80) in the machine
coordinates, the following command is issued to change this position to (-40,-40) with G55
using the absolute coordinates.

G10 L99 P2 X-40. Y-40. Q2;


7
-120 +Y Machine coordinates
-X

-40
-40
G55

-40
-80

-Y

The workpiece coordinate data G55 is rewritten as:


X -80.000
Y -40.000

(Note) The measurement value is acquired by this function, and the true value
varies depending on the delay that is unique to the probe. Therefore,
contact the probe manufacturer and adjust it accordingly.

2019/09/02 7 - 22 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

7.6 Lock Key Operations


<Dry run> The axis travels to the start point for each measurement, but the
measurement motion is not carried out. The measurement data is also
not captured.
If an attempt is made to turn the dry run ON or OFF while the
automatic workpiece measurement command is executing, the alarm
<<During measurement>> is triggered and the change is not carried
out.
<Machine lock> Axis travel is not carried out. The coordinates on the position screen do
not change.

7.7 Program Restart Operation


If a command between G121 and G129 exists during program restart, an alarm may be triggered.

2019/09/02 7 - 23 eCOM3NCPR7
Chapter 7 Automatic Workpiece Measurement

(This page was intentionally left blank.)

2019/09/02 7 - 24 eCOM3NCPR7
Chapter 8 Sub Program Function

CHAPTER 8

SUB PROGRAM FUNCTION

8.1 Overview
8.2 Create Sub Program
8.3 Simple Call Function
8.4 Specify Return Number from Sub Program Function
8.5 Call Specifying Sequence No.

2017/08/22 8-1 eCOM3NCPR8


Chapter 8 Sub Program Function

8.1 Overview
While programming, if there is a fixed sequence, or a repeated pattern in the program, a sub
program can be registered beforehand to execute this. These sub programs are called when needed,
which can simplify programming tremendously.

This sub program can be called from memory operation mode. It can also be called in the same
way when using extended memory operation.

When using tape operation (with a memory card or general communications device), a sub
program registered in the internal memory can be called. However, a sub program registered in an
external device (with a memory card or general communications device) cannot be called.
In addition, when using tape operation and calling a sub program registered in the internal memory,
the communication with the external device stops temporarily while the sub program from the
internal memory that was called is executing.

Furthermore, a separate sub program can also be called from a sub program which was called. In
this situation, up to 8 sub programs can be called.

Main program Sub program A Sub program B

Call sub program A Call sub program B

M99; M99;

A sub program can also be called repeatedly with one call command.

2017/08/22 8-2 eCOM3NCPR8


Chapter 8 Sub Program Function

8.2 Create Sub Program


A standard sub program is created using a format like the following.

M99;

(Note 1) Always specify M99 at the last block of the sub program.
(Note 2) The alarm <<Invalid command>> is triggered when another G or M code
command is issued on the M99 command block.

Special use of M99


When the M99 command is issued in the main program, excluding tape operation, it returns to the
beginning of the program and operation starts from the beginning of the program again.
(Excluding the extended memory operation/tape operation)

8
When optional
block skip is OFF

/N0100 M99;

N0200 M30; When optional


block skip is ON

When programming as described above, the program continues to operate and repeat the content
from the beginning of the program until N0100 while the optional block skip is turned OFF. If the
optional block skip is turned ON, the program skips the N0100 block and proceeds to execute
from the next block.

2017/08/22 8-3 eCOM3NCPR8


Chapter 8 Sub Program Function

8.3 Simple Call Function


The sub program executes a call from the main program or from another sub program.
A call can be made from memory operation/extended memory operation as well as from tape
operation (with a memory card or general communications device).

Command format M98 P_H_L_;

P : Sub program No. called (current program when omitted)


H : Sequence No. for sub program called (beginning block when omitted)
L : Number of repeated calls (9999 times or less) (1 when omitted)

(Note 1) Another G or M code command cannot be issued on the M98 command


block.
If a G code command is issued, the alarm <<Invalid command>> is
triggered.
In addition, if an M code command is issued and the user parameter
<Multiple M codes in one block> is set to <0: No>, the alarm <<Same code
cannot be used.>> is triggered. If the user parameter <Multiple M codes in
one block> is set to <1: Yes>, the alarm <<Simultaneous command
unable M code>> is triggered.
(Note 2) Macro variables can be used in a subprogram number and G/M code
macro to call.
However, when the total size of the program that is loaded does not
exceed the program load size, after an M30 (M02) command, all programs
st
that can be called with the macro variables, such as “M98P1” (1 program
call) or “G200” and “M200” (G/M code number registered in the G/M code
macro) must be registered beforehand as “M98P?” (? is the program
number), “G?” or “M?” (? is the G code number registered in the G/M
code macro).
When a program that is not registered is called, the alarm <<No
subprogram (****)>> is triggered.
Example 1:Case where a macro variable is used in a sub program number
8 When the alternative value for #100 is “1”, “5” and “100”:
M98P#100; ← Sub program call command using a macro
variable
G100T1R150.Z100.;
M30;
M98P1; After M30, all alternative “M98P**” commands
M98P5; are entered as shown on the left
M98P100;
Example 2:Case where a macro variable is used in G/M code
When the alternative value for #100 is “400”, “500” and “600”:
G#100; ← G/M code macro call command using a macro
variable
G100T1R150.Z100.;
M30;
G400;
G500; After M30, all alternative G code macros are
G600; entered as shown on the left
When the program load size is the size that is selected in the user
parameter (switch 1) <Program load size>.
(Note 3) When the total program size that is loaded (including sub programs)
exceeds 2 MB, it operates in the extended memory operation mode.
When a macro variable is used in the sub program number that is called,
as described in (Note 2), and when the total program size, including the
sub programs that are noted after M30, exceeds the program load size,
the machine operates in the extended memory operation mode.
When the program load size is the size that is selected in the user
parameter (switch 1) <Program load size>.
(Note 4) When using extended memory operation and tape operation, the sub
program is loaded when it is called. Operation sometimes stops during
that time period. (At this time, the startup LED stays lit up.)

2017/08/22 8-4 eCOM3NCPR8


Chapter 8 Sub Program Function

(Note 5) When using extended memory operation or tape operation, other sub
programs that are not executing can be edited during operation. However,
the edited content does not apply until that sub program is executed the
next time.
In addition, the alarm <<Editing>> is triggered when an attempt is made
to execute that program while it is saved.
Furthermore, the alarm <<Communicating>> is triggered when an attempt
is made to execute that program while data communication is still in
progress.
(Note 6) If M98 is executed while an external device program is being executed
during tape operation, etc., the communication with the external device
up to that point will stop temporarily until M99 is executed and operation
resumes in the external device program, or until the memory operation
ends (M30 execution or [RST]). Note that other communication means
with the external device is not available during this time period.
(Note 7) When using memory operation and extended memory operation, a
program in the same folder as the main program is called. In addition,
when using tape operation, a program in the root directory or root folder
is called.
(Note 8) The axis does not travel even if an X-, Y- or Z-axis command is issued on
the M98 command block.
(Note 9) When a sequence number (H address) and the number of repetitions (L
address) are specified during extension memory operation and tape
operation, the alarm <<Invalid command>> is triggered.

2017/08/22 8-5 eCOM3NCPR8


Chapter 8 Sub Program Function

8.4 Specify Return Number from Sub Program


Function
Command format M99 P_;

P : Sequence No.

1. Command in sub program


After a command is executed, it returns to the sequence number for the command that was
issued in another program. It searches for the sequence number starting from the beginning of
the program and returning to the first block that was found. If there is no sequence number for
the command, the alarm <<No applicable sequence>> is triggered.

(Program execution order)

M98P ;
G01Z_;

N0001;
M99 P0001

(Note 1) The alarm <<Subprogram return error>> is triggered if the number of


repetitions in the M98 command is not 1.
8 (Note 2) The return number cannot be specified during extension memory
operation and tape operation. Otherwise, the alarm <<Invalid command>>
is triggered.

2017/08/22 8-6 eCOM3NCPR8


Chapter 8 Sub Program Function

2. Main program command


After a command is executed, it jumps to the sequence number for the command that was
issued in the main program. It searches for the sequence number starting from the beginning
of the program and jumping to the first block that was found. If there is no sequence number
for the command, the alarm <<No applicable sequence>> is triggered.

(Program execution order)

N0001;

M99 P0001;

(Note) Commands cannot be issued during extension memory operation and


tape operation. Otherwise, the alarm <<Invalid command>> is triggered.

2017/08/22 8-7 eCOM3NCPR8


Chapter 8 Sub Program Function

8.5 Call Specifying Sequence No.


When issuing a command with M98P_H_, it can be called and executed from the sequence
number specified in the sub program.

Special notes are provided below when programming and using an H address.

(Ex: Program execution order)

(O0001) (O0002) (O0003) (O0003) (O0010)

N10 N10

M98P2 M98P3H10 M98H20 M98H20

N30

M30 M99 M99

M99 M99
N20 N20

M98P4 M98P4

M99P30 M99P30

(1st sub (2nd sub (3rd sub ••• (8th sub


program) program) program) program)
8 As noted above, up to 8 sub programs can be called.

(Note 1) When calling with M98H_, the structure becomes 1 layer (1 sub program)
deep even in the same program. (The level does not change in a sub
program call with M98 using local variables for the macro.)
(Note 2) The alarm <<No applicable sequence>> is triggered if there is no
sequence number specified in the H address.
(Note 3) The search for the H address starts from the beginning of the program.
(Note 4) The alarm <<Subprogram number error>> is triggered when no command
has been issued for either the P or H address.
(Note 5) The alarm <<Subprogram call error>> is triggered when the current
program is called by the P address. Specify only using the H address to
call the current program.
(Note 6) The relationship between the main and sub programs for calling the
current program using M98H_ is established with the sequence number.
As a result, the alarm <<Subprogram call error>> is triggered if it jumps
to N10 before M99 is executed when using M98H10.
(Note 7) The macro variable command can be used in the P and H address.
However, the address is ignored when the macro variable field is “blank”.
(Note 8) The sequence number search for the H address is carried out when the
M98 command is issued. Therefore, when the main and sub program are
processed together in one program, the cycle time may be delayed before
they are processed as one.
(Note 9) Calls (M98H_) which specify sequence numbers in the same program
cannot be issued during extension memory operation and tape operation.
Otherwise, the alarm <<Invalid command>> is triggered.

2017/08/22 8-8 eCOM3NCPR8


Chapter 8 Sub Program Function

Example 1:

(O0001)

N10 The alarm <<Subprogram call error>> is triggered


when the “M98H10” block is executed the second
M98H10 time in a program as shown on the left.

M99

M30

Example 2:

(O0001) (O0001) When creating a program as shown on the


left, the operation continues because it will
M98H10 M98H10 not reach M30.
When creating a sub program in one
N10 N10 program, create it after M30 (M02).

M99 M99

M30 M30

Example 3:

(O0001)

N10 The sequence number search for the H address starts from the
beginning of the program. As shown on the left, it jumps close to
M98H10 the block closer to beginning of the program when there are two

M30
blocks for “N10”. 8
(The alarm <<Subprogram call error>> is triggered when the
“M98H10” block is executed the second time.)
N10

M99

Example 4:

(O0001) (O0001) (O0001)

N20 N20 N20 When creating a program as shown


on the left, the alarm
M98H10 M98H10 M98H10 <<Subprogram call error>> is
triggered when the “M98H10”
M30 M30 M30 block is executed the second time.

N10 N10 N10

M98H20 M98H20 M98H20

M99 M99 M99

2017/08/22 8-9 eCOM3NCPR8


Chapter 8 Sub Program Function

Example 5:

(O0001) (O0001)

M98H10 M98H10 When creating a program as shown on the left,


the program ends with M30.
N10 N10

M30 M30

M99 M99

Example 6:

(O0001) (O0001) (O0002)

N20 N20 N20


When creating a program as
M98H10 M98H10 M99P20 shown on the left, the alarm
<<Subprogram call error>> is
M30 M30 triggered when the “M98H10”
block is executed the second
N10 N10 time.

M98P2H20 M98P2H20

M99 M99

Example 7:

(O0001) (O0001) (O0002)


8
N10 N10 N20
When creating a program as shown
M98H20 M98H20 M99P30 on the left and the H20 is executed for
the second time in the “M98P2H20”
M30 M30 block, an error does not trigger
because a different program number
N20 N20 is called. This program ends normally
with M30.
M98P2H20 M98P2H20

M99 M99

N30 N30

M99 M99

2017/08/22 8 - 10 eCOM3NCPR8
Chapter 8 Sub Program Function

Example 8:

(O0001) (O0002) (O0002)


When creating a program as
M98P2H10 N10 N10 shown on the left, “N20” is called
in the “M98H20” block and it is
N20 M98H20 M98H20 called again in the “M99P20”
block, but an error does not
M99 M99 trigger. This program ends
M30
normally with M30.
N20 N20

M99P20 M99P20

Example 9:

(O0001) (O0002)

N20 N10 When creating a program as shown on the left,


the alarm <<Subprogram call error>> is
M98P2H10 M98P1H40 triggered when program 1 is called from
program 2.
M30 M99

N40

M99

Example 10:
(O0001) (O0001) (O0001)
8
M98H10 M98H10 M98H10
M98H30 M98H30 M98H30 When creating a program as shown
on the left, the “M98H10” block is
M30 M30 M30 executed twice. After it is executed
N10 N10 N10 for the first time, it resets with
M99. As a result, an error does not
M99 M99 M99 trigger on the block when it
executes the second time. This
N30 N30 N30 program ends normally with M30.
M98H10 M98H10 M98H10

M99 M99 M99

N10 N10 N10

M99 M99 M99

2017/08/22 8 - 11 eCOM3NCPR8
Chapter 8 Sub Program Function

(This page was intentionally left blank.)

2017/08/22 8 - 12 eCOM3NCPR8
Chapter 9 Feed Function

CHAPTER 9

FEED FUNCTION

9.1 Feed Function


9.2 Automatic F Command at Tool Change

2019/06/16 9-1 eCOM3NCPR9


Chapter 9 Feed Function

9.1 Feed Function


This function issues a command using the numerical values that come after “F” to specify the tool
feedrate.
The feedrate per minute (G94), the feedrate per rotation (G95) and the inverse time feed (G93) are
available when specifying this command.

9.1.1 Feedrate per Minute (G94)


This command uses the numerical values that come after “F” to specify how fast to feed the tool
per minute.
Ex: G94;
G01 Z -100. F1000; (1000.00 mm/min)

9.1.2 Feedrate per Rotation (G95)


This command uses the numerical values that come after “F” to specify how fast to feed the tool
per spindle rotation.
Ex: M03 S2000;
G95;
G01 Z -100. F0.05; (0.0500 mm/rev)

(Note 1) The execution speed (actual travel speed on machine) of the feedrate per
rotation is calculated using the following formula.
-1
Execution speed [mm/min] = Feedrate [mm/rev] × Spindle speed [min ] ×
(Spindle override [%] / 100) × (Cutting override [%] / 100)
(Note 2) If the spindle rotation is zero when the feedrate per rotation command is
executed, the alarm <<Feedrate error>> is triggered.

9.1.3 Inverse Time Feed (G93)


The inverse time is the inverse number of the machining time and is indicated by the number
following “F” in a command.

After the inverse time feed (G93) command is issued, the inverse time feed is enabled before the
command for the feedrate per minute (G94) or the feedrate per rotation (G95) is issued.

Ex:
G93;
9 G01 X -100. F6; (6.00 1/min)
G01 Y -100. F6; (6.00 1/min) Inverse time feed enabled
G01 Z -100. F6; (6.00 1/min)
G94 G01 X -50. F1500; Inverse time feed disabled

Example of inverse time calculation


Ex 1: When ending 1 block, the following command calculation is used.
Inverse time [1/min] = 1 ÷1 block end time [sec] ÷ 60[min]
= 1÷60÷60
=1 (command is issued with F1)
Ex 2: Travel time when issuing a F0.25 command is as follows.
Travel time [min] = 1÷ Inverse time [1/min]
= 1÷0.25
= 4.0 (travel time is 4 minutes)

Metric (mm) Inch (inch)


Linear
interpolation 1 Feedrate (mm/min) 1 Feedrate (inch/min)
F= = F= =
(G1) Time (min) Length of segment Time (min) Length of segment
(mm) (inch)
Circular
interpolation 1 Feedrate (mm/min) 1 Feedrate (inch/min)
(G2/G3/ F= Time (min) = Radius of arc for start F= Time (min) = Radius of arc for start
G102/G103/ point (mm) point (inch)
G202/G203)

2019/06/16 9-2 eCOM3NCPR9


Chapter 9 Feed Function

(Note 1) In the inverse time feed, issue an F command each time on a block for the
cutting feed, in order to issue a machining time command for the
segment.
When there is a block without an F command, the alarm <<Feedrate not
specified>> is triggered.
(Note 2) An inverse time feed (G93) command cannot be issued during the
following modes.
When issuing a command, the alarm <<Specified G code cannot be
used>> is triggered.
• Thread cutting command (G33) in progress and thread cutting cycle
(G392) in progress
• Canned cycle (apart from G80) in progress
• Constant peripheral speed control (G96) in progress

9.1.4 Command Range


Minimum unit setting: Type 1
Feedrate per minute (G94) Feedrate per rotation (G95)
Machine unit setting 0.01 to 999999.99 mm/min 0.0001 to 999.9999 mm/rev
0: Meter 0.01 to 999999.99°/min 0.0001 to 999.9999°/rev
Machine unit setting 0.001 to 99999.999 inch/min 0.00001 to 99.99999 inch/rev
1: Inch 0.001 to 99999.999°/min 0.00001 to 99.99999°/rev

Inverse Time Feed (G93)


Machine unit setting 0.001 ~9999.999 1/min
0: Meter
1: Inch

Minimum unit setting: Type 2


Feedrate per minute (G94) Feedrate per rotation (G95)
Machine unit setting 0.001 to 999999.999 mm/min 0.00001 to 999.99999 mm/rev
0: Meter 0.001 to 999999.999°/min 0.00001 to 999.99999°/rev
Machine unit setting 0.0001 to 99999.9999 inch/min 0.000001 to 99.999999 inch/rev
1: Inch 0.0001 to 99999.9999°/min 0.000001 to 99.999999°/rev

Inverse Time Feed (G93)


Machine unit setting 0.001 ~9999.999 1/min 9
0: Meter
1: Inch

The alarm <<Max. speed exceeded>> or <<Feedrate error>> is triggered for the feedrate per
minute (G94) and the feedrate per rotation (G95) when an attempt is made to move the axis and
the speed exceeds the user parameter (switch 1)setting <Max. actual cutting travel speed>, the
machine parameter (system 1) setting <X-(to Z-)axis max. cutting feedrate> or the machine
parameter (system 2) setting <4th-(to 8th-)axis max. cutting rotation speed>.

When the feedrate calculated from the inverse time is less than the following limit values, the
alarm <<Command data range error>> is triggered.

Minimum limit values for inverse time feed (G93)


Minimum unit setting: Type 1 Minimum unit setting: Type 2
Machine unit setting 0.01 mm/min 0.001 mm/min
0: Meter 0.01 °/min 0.001 °/min
Machine unit setting 0.001 inch/min 0.0001 mm/min
1: Inch 0.001 °/min 0.0001 °/min

The execution speed (actual travel speed on machine) calculated for the feedrate per rotation is
rounded off in the command range for the feedrate per minute. However, when the execution
speed is less than the minimum in the command range, the execution speed is assigned the
minimum value in the command range.

2019/06/16 9-3 eCOM3NCPR9


Chapter 9 Feed Function

Ex: When the minimum unit setting is Type 1 and when the feedrate is 1.2345 mm/rev and the
spindle speed is 4321 min-1:
Execution speed (mm/min) = 1.2345 mm/rev × 4321 min-1 = 5334.2745 mm/min
Any value below 0.01 mm/min is rounded off and the execution speed becomes 5334.27
mm/min.

9.1.5 Switching Between Feedrate per Minute / Feedrate


per Rotation / Inverse Time Feed
(1) When one of the following commands applies, the F code modal turns into a state when the
power is ON (not set).
- When executing a feedrate per rotation command (G95) or an inverse time feed command
(G93) during the feedrate per minute (G94).
- When executing a feedrate per minute command (G94) or an inverse time feed command
(G93) during the feedrate per rotation (G95).
(2) When switching to a feedrate per minute command (G94) or a feedrate per rotation command
(G95) during the inverse feed (G93), an F command is required. If there is no F command, the
alarm <<Feedrate not specified>> is triggered.

9.2 Automatic F Command at Tool Change


When the user parameter <Automatically use F command when changing tool> is set to <1: Yes>,
the F command is automatically issued for the <F command value> in the tool data, which
automatically corresponds to the tool that is loaded onto the spindle at the tool change (M6 or
G100).
Refer to section “5.7 Canned Cycle for Tool Change” for further details.

2019/06/16 9-4 eCOM3NCPR9


Chapter 10 Spindle Related Functions (S Function)

CHAPTER 10

SPINDLE RELATED FUNCTIONS


(S FUNCTION)

10.1 S Function
10.2 M Function (Spindle Control)
10.3 M Function (Lathe Spindle Control)
10.4 M Function (Spindle Selection)

10

2019/09/02 10 - 1 eCOM3NCPR10
Chapter 10 Spindle Related Functions (S Function)

10.1 S Function
10.1.1 Spindle Speed Command
A spindle speed (min-1) command is issued.
This command uses the numerical values (under 5 digits) that come after “S” to specify the speed.

(Note 1) The S command is not erased with NC reset, but it must be set when the
power is turned ON.
(Note 2) The S command must always be issued before the spindle rotation
command (M03/M303, M04/M304).
(Note 3) When the S command is on the same block as axis travel, the S command
becomes valid at the same time as the axis travel start.

10.1.2 Constant Peripheral Speed Control (G96, G97)


(Option)
* Available when equipped with a lathe function

By issuing a peripheral speed command (m/min, or feet/min) to the G96S address, this function
controls the rotation speed of the spindle so that the cutting speed is maintained at a fixed or
constant level that corresponds to the machining diameter.

Constant peripheral speed control command

Command format G96 S__P__;

S : Peripheral speed (m/min, or feet/min)


P : Constant peripheral speed control axis (No omissions. If there is an omission, the
alarm <<There is no P address.>> is triggered.)
P1 : X-axis, P2: Y-axis, P3: Z-axis

Constant peripheral speed control cancel command

Command format G97 S__;

S : Spindle speed (min-1)

The G96 modal S command assumes S = 0 (peripheral speed 0) until the spindle rotation
command (M03/M303) and the spindle reverse rotation command (M04/M304) is issued.
10 When using the constant peripheral speed control, configure the settings so that the workpiece
coordinate zero for the control axis is in the lathe spindle center.

When using the tool length/tool position offset function, the spindle speed is controlled with the
tool length/tool position offset amount added to the current machine coordinates.
The constant peripheral speed control for the rapid feed command (G00) and the tool change
command (G100/M06) calculates the peripheral speed based on the end position of the constant
peripheral speed control axis.

(Note 1) If a constant peripheral speed control command is issued while using the
[SP.CW] key to rotate the spindle, the alarm <<Spindle rotating>> is
triggered. Specify the spindle rotation command on the same block.
(Note 2) Constant peripheral speed control command is not possible while in the
inverse time feed (G93) modal. If a command is issued, the alarm
<<Command not possible during inverse time feed>> is triggered.

2019/09/02 10 - 2 eCOM3NCPR10
Chapter 10 Spindle Related Functions (S Function)

Spindle speed when switching between G96 and G97 modals


G96 G97

Peripheral speed X (m/min,


feet/min) command

G97 command

Save peripheral speed X


(m/min, feet/min)

Yes
Spindle speed
command
No
Spindle speed (min-1)
issued by S
command

S command issues a value that


converts the peripheral speed X to
spindle speed (min-1)

G96 command

Yes
Spindle speed command
10
No
Spindle speed (min-1)
issued by S command

S command is the saved peripheral speed


X*. If the peripheral speed is not saved,
it will not be set.

* The peripheral speed will not be set (while power is turned ON) when the spindle is changed
using the spindle selection command (M141/M142).
Ex:
M142 G96 P1 S200 ; Peripheral speed 200
G97 S1000 ; Peripheral speed 200 is saved
M141 G96 P1 ; Peripheral speed is not set (saved peripheral speed is deleted because
the spindle is changed)

2019/09/02 10 - 3 eCOM3NCPR10
Chapter 10 Spindle Related Functions (S Function)

10.1.3 Spindle Speed Clamp (G92) (Option)


* Available when equipped with a lathe function

The spindle speed is controlled to a value below the command value issued for the S address, or
above the command value issued for the Q address.
The spindle speed clamp is only valid when the constant peripheral speed control (G96) is enabled.

Command format G92 S__Q__;

S : Spindle speed (min-1)


S : Maximum spindle speed (min-1)
Q : Minimum spindle speed (min-1)

Always issue the G92 S command when issuing a constant peripheral speed control command
(G96). If a G96 command is executed without the other command, an alarm is triggered.
When the power is turned ON, the settings are not configured. In addition, when the command
value issued for the Q address is larger than the command value issued for the S address, then the
spindle speed is not controlled using the command value issued for the Q address.

10.1.4 Automatic S Command at Tool Change


When the User parameter (Switch 1) <Automatically use S command when changing tool> is set
to <1: Yes>, the S command is automatically issued for the value set in the tool data, which
corresponds to the tool that is loaded onto the spindle at the tool change.
Refer to “Chapter 5 - 5.7 Canned Cycle for Tool Change (Nonstop ATC) (G100)” for further
details.

10.1.5 Register Maximum Speed


The maximum speed for a tool mounted onto the spindle can be registered in the tool data.

When the User parameter (Switch 1) <Tool data spindle rotation exceeded> is set to <0: Alarm>,
if a spindle speed command is issued that exceeds the maximum speed set for the tool, the alarm
<<Tool data spindle rotational frequency error>> is triggered. When set to <1: Clamp at max.
speed>, the tool is clamped at the maximum spindle speed that is set for the tool.

When not set, the spindle speed is not checked. (However, the alarm <<Spindle speed error>> is
triggered when an attempt is made to rotate at a speed that exceeds the Machine parameter
(System 1) <Max. spindle speed>.)

(Note) When the tool is set in conversation language for the spindle, it is
10 processed as “not set”.

2019/09/02 10 - 4 eCOM3NCPR10
Chapter 10 Spindle Related Functions (S Function)

10.2 M Function (Spindle Control)


10.2.1 Spindle Normal Rotation (M03)
The spindle rotates in a clockwise direction. When there is an axis travel command on the same
block, the axis travel is carried out at the same time.

10.2.2 Spindle Reverse Rotation (M04)


The spindle rotates in a counterclockwise direction. When there is an axis travel command on the
same block, the axis travel is carried out at the same time.

10.2.3 Spindle Stop (M05)


The spindle rotation is stopped. When there is an axis travel command on the same block, the axis
travel is carried out at the same time.

10.2.4 Spindle Orientation (M19)


The spindle is oriented to a 0° position. When there is an axis travel command on the same block,
the axis travel is carried out at the same time.

(Note) On a machine equipped with the lathe function, the spindle may vibrate
slightly when carrying out an orientation operation at the zero degree
position while the spindle is fitted with a cutting tool. There is no impact
on the machining or measurement operations. However, to stop this
slight vibration, perform the orientation operation at another position
besides zero degrees, or execute the spindle rotation command
(M03/M04).

10.2.4.1 Spindle Orientation to a Given Angle


Command format M19 R_;

R : Spindle angle (-360 to 360°)

The spindle is oriented to the angle that is specified by command R.


When the command angle is a positive value, it turns in a clockwise direction. When the command
angle is a negative value, it turns in a counterclockwise direction.
After this operation, the servo stays ON for the spindle.

10.2.5 Spindle Orientation (M111)


The spindle is oriented to a 180° position. When there is an axis travel command on the same
block, the axis travel is carried out at the same time.
10

2019/09/02 10 - 5 eCOM3NCPR10
Chapter 10 Spindle Related Functions (S Function)

10.3 M Function (Lathe Spindle Control)


10.3.1 Lathe Spindle Normal Rotation (M303)
The lathe spindle rotates in a clockwise direction when the lathe spindle is selected (M142 modal).
The alarm <<Selection of a spindle is abnormal.>> is triggered if a command is issued when the
lathe spindle is not selected. When there is an axis travel command on the same block, the axis
travel is carried out at the same time.

10.3.2 Lathe Spindle Reverse Rotation (M304)


The lathe spindle rotates in a counterclockwise direction when the lathe spindle is selected (M142
modal).
The alarm <<Selection of a spindle is abnormal.>> is triggered if a command is issued when the
lathe spindle is not selected. When there is an axis travel command on the same block, the axis
travel is carried out at the same time.

10.3.3 Lathe Spindle Stop (M305)


The lathe spindle rotation is stopped when the lathe spindle is selected (M142 modal).
The alarm <<Selection of a spindle is abnormal.>> is triggered if a command is issued when the
lathe spindle is not selected. When there is an axis travel command on the same block, the axis
travel is carried out at the same time.

(Note) When there is no lathe spindle, the M303, M304 and M305 commands
cannot be issued.

10.4 M Function (Spindle Selection)


10.4.1 Spindle Selection (M141)
The spindle is selected. When the M141 command is issued while the lathe spindle is rotating, the
lathe spindle stops.

10.4.2 Lathe Spindle Selection (M142)


The lathe spindle is selected. When the M142 command is issued while the spindle is rotating, the
spindle stops.

(Note 1) When there is no lathe spindle, the M141 and M142 commands cannot be
issued.
(Note 2) The M141 and M142 modals are linked with the [L. SP] key. When the [L.
SP] key is turned ON in manual mode, it changes to M142 modal. When it
is turned OFF, it changes to M141 modal.
10

2019/09/02 10 - 6 eCOM3NCPR10
Chapter 11 Tool Related Functions (T Function)

CHAPTER 11

TOOL RELATED FUNCTIONS


(T FUNCTION)

11.1 T Function
11.2 M Function (Tool Control)

11

2019/06/16 11 - 1 eCOM3NCPR11
Chapter 11 Tool Related Functions (T Function)

11.1 T Function
On an arm type ATC mechanism, a T command turns the magazine to the corresponding pot.
On a turret type ATC mechanism, the tool (magazine) is set to index when the tool change
command (G100, M6) is issued.

Command format T_ _ _;

11.1.1 When Issuing a Command Using the Tool Number


A tool number command is issued using the number that comes after the “T”. (T1 to T99)
The pot with the corresponding tool is indexed. (Arm type ATC mechanism)
When issuing a command in MDI mode, if the corresponding tool is not mounted, only the modal
is updated.

11.1.2 When Issuing a Command Using the Pot Number


(Magazine Number)
A pot number (magazine number) command is issued using the numerical values (2 digits) that
come after the “T1”.
(T101 to T1nn:nn is the maximum value for pot that is mounted)
The pot with the corresponding tool is indexed. (Arm type ATC mechanism)

11.1.3 When Issuing a Command Using the Group


Number
A tool group number command is issued using the numerical values (2 digits) that come after the
“T9”.
(T901 to T930)
The pot with the corresponding tool is indexed. (Arm type ATC mechanism)
The tools are registered to the magazines, and when a command is issued using the group number,
the tools are used following the order they is registered in the specified group.

The alarm <<Command data range error>> is triggered when a command is issued in MDI
operation mode.

11

2019/06/16 11 - 2 eCOM3NCPR11
Chapter 11 Tool Related Functions (T Function)

11.2 M Function (Tool Control)


11.2.1 Tool Change (M06)
It is the same as G100.
When the user parameter (switch 1) <Multiple M codes in one block> is set to <1: Yes>, up to 3 M
code commands can be issued simultaneously for G100. However, the limit is up to 3 commands
including M06 when issuing an M06 command.
Refer to “Chapter 5 - 5.7 Canned Cycle for Tool Change (Nonstop ATC) (G100)” for details about
M codes that can be issued simultaneously and the operation timing.

11.2.2 Tool Life Counter (M230 to M231)


After issuing an M231 command, the tool life count for the spindle tool is stopped during
operation.
When issuing an M230 command, the count is restarted.

11.2.3 Changing ATC Arm Turn Speed (M420 to M423,


M432)
When using an arm type ATC mechanism, the ATC arm turn speed can be changed after the M
code is executed for the next tool change command. (Note 1)

M420 : Turn the arm at the maximum speed that corresponds to the tool type being
changed.
- Standard tool turn speed when a standard tool is used (Note 2).
- Large tool turn speed when a large tool is used (Note 3).
M421/M432 : Turn the arm at a large tool turning speed regardless of the tool type to be changed.
The modal becomes M421 even when an M432 command is issued. (M432 is for
compatibility for B00 control. In the C00 control, the same operation is possible
with M421, and the operation does not change.)
M422 : For the standard tool turning speed, the arm turns at a speed that is calculated
using the user parameter (switch 1) setting <ATC arm turn speed ratio 1 (M422)>.
(Note 4)
M423 : For the standard tool turning speed, the arm turns at a speed that is calculated
using the user parameter (switch 1) setting <ATC arm turn speed ratio 2 (M423)>.
(Note 4)

(Note 1) This function is disabled on a turret type ATC mechanism. When a


command is issued, it follows user parameter (switch 1) <Unregistered
M-code>.
(Note 2) Set value for machine parameter (system 3) <AT-axis rapid feedrate 1>
(Note 3) Set value for machine parameter (system 3) <AT-axis rapid feedrate 2>
(Note 4) When all of the following conditions are met, the arm operates using a
turning speed for a large tool.
- Tool type being changed is a large tool
- Speed calculated using the ratio exceeds the turning speed for a large 11
tool

Use the following operations to change back to the M420 modal.


- M420 execution
- Program end
- Pressing [RST (Machine lock)] key
- Operation reset
- Tool change (G100/M06)

2019/06/16 11 - 3 eCOM3NCPR11
Chapter 11 Tool Related Functions (T Function)

11.2.4 Shutter and Cover Related M Codes (M434, M438,


M439)
When using an arm type ATC mechanism, the shutter can be operated after the M code is executed.
(Note 1) (Note 2) The code is only valid for 40MG on R650X2.
However, it does not operate when there is no shutter mechanism.
M434: Waits for the shutter to close. (Note 3)
M438: Opens the pot shutter. (Note 2)
M439: Closes the pot shutter. (Note 2)

(Note 1) This function is disabled on a turret type ATC mechanism.


When a command is issued, it follows user parameter (switch 1)
<Unregistered M-code>.
(Note 2) When a command is issued while the door is open, the alarm <<Door
open>> is triggered.
(Note 3) The maximum wait time follows the set value in the machine parameter
(system 3) <Pot shutter timeout period>.

11.2.5 Specify Magazine Turn Speed (M435, M436, M437)


On arm type ATC models, the magazine turns speed can be changed from the program.
M435: Maximum magazine turn speed
M436: Magazine turn speed 1
M437: Magazine turn speed 2

(Note) This function is disabled on a turret type ATC mechanism. When a


command is issued, it follows user parameter (switch 1) <Unregistered
M-code>.

The following operations return the speed to the maximum speed.


• M435 execution
• Program end
• Reset (Machine lock)
• Operation reset
• Tool change(G100/M06)

The turn speed for M436 and M437 is specified in the user parameter <Magazine turn speed ratio
1(M436)> and <Magazine turn speed ratio 2(M437)>.

(Note) When the M435, M436, M437 commands are issued on the same block as
a T command, the alarm <<Invalid command>> is triggered.

11.2.6 Magazine Turns to the Tool Installation Position


(M501 to M599)
11 On the arm type ATC mechanism, the magazine can be turned so that the pot with the tool (tool
number specified by ** for M5**) is in the tool installation position.

(Note 1) This function is disabled on a turret type ATC mechanism. When a


command is issued, it follows user parameter (switch 1) <Unregistered
M-code>.
(Note 2) When an M5xx command is issued on the same block as a T command,
the alarm <<Invalid command>> is triggered.

11.2.7 Machining Load Monitor Function (M340 to M343)


This function measures the machining load, monitors it and assesses whether the machining is
normal. Refer to “Chapter 11 - 11.13 Machining load monitor function” in the Operation Manual
for further details.
M340: Machining load monitor OFF
M341: Machining load monitor ON
M342: Machining load monitor ON (Max. only)
M343: Machining load monitor ON (Min. only)

2019/06/16 11 - 4 eCOM3NCPR11
Chapter 12 M Function

CHAPTER 12

M FUNCTION

12.1 Outline of M Function


12.2 M Code List
12.3 M Function (Program Control)
12.4 M Function (Signal Control)
12.5 M Function (Additional Axis Control)
12.6 M Function (Positioning Check Distance)
12.7 M Function (Time Constant Switch)

12

2019/06/16 12 - 1 eCOM3NCPR12
Chapter 12 M Function

12.1 Outline of M Function


• The M codes are used for commanding ON/OFF of various solenoids of the machine.
• Command by address M and a following within 3-digit number.
• When the M command is in the same block as that of the axis movement, the motion is
divided into following three types.
The M command becomes effective before the axis movement starts.
The M command becomes effective at the same time the axis movement starts.
The M command becomes effective after the axis movement is finished.

(Note) The modal command is effective until it is cancelled by the next M code
or changed. The one-shot command is effective only in the commanded
block.

12

2019/06/16 12 - 2 eCOM3NCPR12
Chapter 12 M Function

12.2 M Code List


The code with * is already set when the power is turned on. (Modal status)

For “Multiple commands” and “Multiple command limits”, refer to “12.2.1 Multiple M Code
Commands in One Block”.
For multiple M code commands for tool changes, refer to “Chapter5 5.7 Canned cycle for tool
change (Non-stop ATC) (G100)”.
Timing of Modal / Multiple
Group M code Contents
axis motions One-shot commands
M00 Program stop After One-shot Impossible
M01 Optional stop After One-shot Impossible
M02 End of Program
- - Impossible
M30 End of Program
M03 Spindle CW
M04 Spindle CCW
M05* Spindle stop Simultaneous Modal Possible
M19 Spindle orientation
M111 Spindle orientation (180°)
M08 Coolant pump ON Before
Modal Possible
M09* Coolant pump OFF After
M06 Tool change Simultaneous One-shot Possible
M96 Interruptive macro program
- Modal Impossible
M97* Cancel interruptive macro program
M98 Sub Program Call -
- Impossible
M99 Return from Subprogram -
M120 TOUCH signal check (Error when Off.)
After One-shot Possible
M121 TOUCH signal check (Error when On.)
M141* Selection of spindle
Simultaneous Modal Possible
M142 Selection of turning spindle
M159 Prohibit reading ahead - One-shot Impossible
Tool breakage detection
M200 Simultaneous One-shot Possible
(with return motion)
M201 Tool breakage detection Simultaneous One-shot Possible
M203 Tool breakage detection - One-shot Impossible
M211 Workpiece counter 1 set
Simultaneous Modal Possible
M221* Workpiece counter 1 cancel
M212 Workpiece counter 2 set
Simultaneous Modal Possible
M222* Workpiece counter 2 cancel
M213 Workpiece counter 3 set
Simultaneous Modal Possible
M223* Workpiece counter 3 cancel
M214 Workpiece counter 4 set
Simultaneous Modal Possible
M224* Workpiece counter 4 cancel
M230* Tool life counter set
Simultaneous Modal Possible
M231 Tool life counter cancel
M238 To start waveform display measurement
- One-shot Impossible
M239 To finish waveform display measurement
M241 to M249 Tap time constant 10 ~ 90%
M250
Tap time constant selection Possible
M251 Simultaneous Modal
(*)
Tap acceleration kept constant selection
M252 to M254
High speed / Medium speed / Low speed 12
M260 to M267 High precision mode A On (levels 1 ~ 8) Simultaneous
M280 to M287 High precision mode B On (levels 1 ~ 8) Before
Modal Possible
M269*
High precision mode OFF Simultaneous
M289
M270* Positioning finish check distance setting off
Before Modal Possible
M271 to M279 Positioning finish check distance setting
M290* Tool replacement Z axis lower speed 100%
Before Modal Possible
M291 to M293 Tool replacement Z axis lower speed 1~3
M294 Check tool wash filter Before One-shot Possible
Diagnosis of tool wash liquid surface sensor
M295 - One-shot Impossible
failure
M298 Machining mode specification -
Modal Impossible
M299 Cancel machining mode specification -

2019/06/16 12 - 3 eCOM3NCPR12
Chapter 12 M Function

Timing of Modal / Multiple


Group M code Contents
axis motions One-shot commands
M303 Forward rotation of turning spindle
M304 Backward rotation of turning spindle Simultaneous Modal Possible
M305* To stop turning spindle
M320 Measurement device sensor ON confirmation
- One-shot Possible
M321 Measurement device sensor OFF confirmation
M322* Finishing OFF
Before Modal Possible
M323 Finishing ON
M340* Machining load monitor OFF
M341 Machining load monitor ON
- Modal ×
M342 Machining load monitor ON(Max. only)
M343 Machining load monitor ON(Min. only)
M350 Thermal displacement compensation (X)
M351 Thermal displacement compensation (Y)
M352 Thermal displacement compensation (Z) - One-shot Impossible
M353 Thermal displacement compensation (XYZ)
M355 Thermal displacement compensation cancel
Thermal distortion compensation (X-axis ball
M360
screw)
Thermal distortion compensation (X-axis
M361
spindle)
Thermal distortion compensation (Y-axis ball
M362
screw)
Thermal distortion compensation (Y-axis
M363
spindle)
Thermal distortion compensation (Z-axis ball
M364
screw)
- One-shot Impossible
Thermal distortion compensation (Z-axis
M365
spindle)
Thermal distortion compensation (X-, Y- and
M366
Z-axes ball screw)
Thermal distortion compensation (X-, Y- and
M367
Z-axes spindle)
Cancel thermal distortion compensation (Ball
M368
screw)
Cancel thermal distortion compensation
M369
(Spindle)
M380 to M387 3D smoothing start
- Modal Impossible
M389 3D smoothing end
M400 M400ON (chip shower ON)
Simultaneous Modal Possible
M401* M400OFF (chip shower OFF)
M402 M402ON
Simultaneous Modal Possible
M403* M402OFF
M404 M404ON
Simultaneous Modal Possible
M405* M404OFF
M406 M406ON
Simultaneous Modal Possible
M407* M406OFF
M408 M408ON
Simultaneous Modal Possible
M409* M408OFF
M410 Index of the pallet 2 to the outside
- One-shot Possible
12 M411
M418
Index of the pallet 1 to the outside
Jig shower ON
Simultaneous Modal Possible
M419* Jig shower OFF
M420* ATC arm turn speed (maximum speed)
M421
ATC arm turn speed (large tool speed)
M432 Before Modal Possible
M422 ATC arm turn speed 1
M423 ATC arm turn speed 2
M430 QT-axis (C-axis) unclamp
- Modal Possible
M431* QT-axis (C-axis) clamp
M434 Waiting for Pot + ATC arm shutter close - One-shot Impossible
M435* Magazine rotation maximum speed
M436 Magazine rotation speed 1 - Modal Possible
M437 Magazine rotation speed 2
M438 Magazine/Pot shutter open
- One-shot Impossible
M439 Magazine/Pot shutter close

2019/06/16 12 - 4 eCOM3NCPR12
Chapter 12 M Function

Timing of Modal / Multiple


Group M code Contents
axis motions One-shot commands
M440 Unclamp B axis
Simultaneous Modal Possible
M441* Clamp B axis
M442 Unclamp A axis
Simultaneous Modal Possible
M443* Clamp A axis
M444 Unclamp C axis
Simultaneous Modal Possible
M445* Clamp C axis
M450 To output one-shot (Proceeds to the next block
M451 after the signal has turn off)
Simultaneous One-shot Possible
M455 To output one-shot (Proceeds to the next block
M456 without waiting until the signal has turn off)
M460 Waiting for M460 signal ON
M461 Waiting for M460 signal OFF
M462 Waiting for M462 signal ON
M463 Waiting for M462 signal OFF
M464 Waiting for M464 signal ON
Simultaneous One-shot Possible
M465 Waiting for M464 signal OFF
M466 Waiting for M466 signal ON
M467 Waiting for M466 signal OFF
M468 Waiting for M468 signal ON
M469 Waiting for M468 signal OFF
M474* Coil conveyor automatic mode: Enable Before Modal Possible
M475 Coil conveyor automatic mode: Disable Before Modal Possible
Tool cleaning blowoff valve ON (MDI
M476 - One-shot Impossible
operation only)
Tool cleaning blowoff valve OFF (MDI
M477 - One-shot Impossible
operation only)
M478 Automatic oiling / greasing cycle ON - One-shot Impossible
M479 Liquid removal cycle ON Simultaneous One-shot Impossible
M480 M480 ON
Simultaneous Modal Possible
M481* M480 OFF
M482 M482 ON
Simultaneous Modal Possible
M483* M482 OFF
M484 M484 ON
Simultaneous Modal Possible
M485* M484 OFF
M486 M486 ON
Simultaneous Modal Possible
M487* M486 OFF
M490 Coolant through center ON
M491 Coolant through center ON
M492 Coolant through center ON Before
Modal Possible
M493 Coolant through center ON
M494 Coolant through center ON
M495* Coolant through center OFF After
M496 Back washing cycle ON Before One-shot Possible
M497 Tool replacement tool washing OFF Before One-shot Possible
M498 Spindle air blow/tool washing ON
Simultaneous One-shot Impossible
M499 Spindle air blow/tool washing OFF
M501 to M599 Magazine rotation for tool setting position - One-shot Impossible
M800 to M899 Signal output for PLC Simultaneous One-shot Possible
M900 to M999 Extend signal output Simultaneous One-shot Possible
2-digit BCD
BCD signal output Simultaneous One-shot Possible 12
signal

(*) The modal during power startup is specified in the user parameter (switch 1) <Tap accel.
setting>.

2019/06/16 12 - 5 eCOM3NCPR12
Chapter 12 M Function

12.2.1 Multiple M Code Commands in One Block


If the <Multiple M codes in one block> in the <User parameter> is set <1: Yes>, maximum tree M
codes with “Possible” in “Multiple commands” of “12.2 M Code List” can be commanded
together in one block.

Also when multiple M code commands are issued on the same block for axis travel, the operation
for each M code is described in “Operation timing for axis travel” found in the “12.2 M Code
List.” If multiple commands that operate with the same timing are issued on one block, they are
output simultaneously.
If you need to be aware of the output order for the M codes, set it up so that commands are issued
and broken up into mutliple blocks.

In addition, simultaneously commandable M codes have limits. For combination of M dodes, refer
to the list below.
If simultaneously uncommandable M codes are commanded in one block, the <<Simultaneous
command unable M code>> alarm appears.

Independent
M06 M430/M411 M430/M431 M45X M46X M8XX M9XX BCD Others
command
Independent Impossible Impossible Impossible Impossible Impossible Impossible Impossible Impossible Impossible Impossible
command
M06 - Impossible Impossible Impossible Possible Possible Possible Possible Possible Possible
M430/M411 - - *5 *5 Possible Possible Possible Possible Possible *1
M430/M431 - - - *5 Possible Possible Possible Possible Possible Possible
M45X - - - - *2 Possible Possible Possible Possible Possible
M46X - - - - - *3 Possible Possible Possible Possible
M8XX - - - - - - Impossible Impossible Impossible Possible
M9XX - - - - - - - Impossible Impossible Possible
BCD - - - - - - - - Impossible Possible
Others - - - - - - - - - *4

1. Independent commands
The M codes listed in the following table must be independently commanded and cannot be
commanded together with other M codes simultaneously.
M00 M01 M02 M30
M96 M97 M98 M99
M203 M238 M239 M350
M351 M352 M353 M355
M360 M361 M362 M363
M364 M365 M366 M367
M368 M369 M434 M438
M439 M448 M449 M478
M479 M498 M499 M159
M5xx M478 M298 M299
M476 M477
12
The following M codes are independently commanded only in MDIoperation.
M200 M201

2. M06
For M06 (tool change) and simultaneously commandable M codes, refer to “Chapter5 5.7
Canned cycle for tool change (Non-stop ATC) (G100)”. (*1)

3. Pallet-related M codes (M410, M411, M430, M431)


The pallet-related M codes (M410, M411, M430, M431) can be commanded in one block.
(*5)

2019/06/16 12 - 6 eCOM3NCPR12
Chapter 12 M Function

4. One-shot output (M45x)


One-shot output M codes (M450, M451, M455, M456) can be simultaneously commanded if
they are different although they are one-shot output M codes. (*2)
Ex)
M450, M451, M455: Commandable because they are all different
M450, M455, M450: Uncommandable because M450 is duplicated

5. To wait forspecific signal ON/OFF(M46x)


The M codes (M460 to M469) that wait for a specific signal to go ON/OFF are simultaneously
commandable if they are commanded for a same signal. (*3)
Ex)
M460, M462, M464: Commandable because they wait for all othersignals
M460, M461, M462; Uncommandable because they are duplicated for M460signal

6. Signal output to PLC (M8xx)


Only one of the M codes (M800 to M899) that command to output a signal to PLC can be
commanded in one block. In addition, they cannot be simultaneously commanded together
with a 2-digit BCDsignal output or an expansion signal output (M900 to M999).

7. Expansion signal output (M9xx)


Only one of the M codes (M900 to M999) that outputs an expansion signal can be commanded
in one block. In addition, they cannot be simultaneously commanded together with a 2-digit
BCDsignal output or a signal output (M800 to M899) to PLC.

8. 2-digit BCDsignal output


Only one of 2-digit BCDsignal outputs can be commanded in one block. In addition, they
cannot be simultaneously commanded together with a signal output (M800 to M899) to PLC
or an expansion signal output (M900 to M999).

9. Others
With respect to the combination of M codes other than the above, the commands other than
the simultaneously commandable M codes like instruction of thesame function ON/OFF,
instruction of spindle motion, specification of time constant, command to coolant through
center and the relatives, etc. can be simultaneously commanded together. (*4)

M codes that can be a pair are as follows:


M03, M04, M05, M19, M111
M303 ,M304, M305
M08, M09
M120, M121
M141, M142
M200, M201
M211, M221
M212, M222
M213, M223
M214, M224
M230, M231
M241 to M249, M250, M251, M252 to M254
M260 to M267, M269
12
M280 to M287, M289
M270, M271 to M279
M290, M291 to M293, M294
M320, M321
M322, M323
M340 to M343
M400, M401
M402, M403
M404, M405
M406, M407
M408, M409
M418, M419

2019/06/16 12 - 7 eCOM3NCPR12
Chapter 12 M Function

M420,M421,M422,M423,M432
M435, M436, M437
M440, M441
M442, M443
M444, M445
M430, M431 (QT not equipped)
M480, M481
M482, M483
M484, M485
M486, M487
M490 to M494, M495, M496

12

2019/06/16 12 - 8 eCOM3NCPR12
Chapter 12 M Function

12.3 M Function (Program Control)


12.3.1 Program Stop (M00)
The spindle stops after the commanded motions in a block are all finished.
The coolant pump is turned OFF at this time.
Next sequence is started by pressing the START switch.

(Note) Issue an M03 or M04 command if spindle rotation is required in the block
after M00. Issue a command such as a coolant command when necessary.
However, when the user parameter (switch 1) is set to the following, the
spindle, lathe spindle and coolant automatically return when executing
the following sequence.
• When <Spindle return method for program stop> is set to <0: Method
1>
• When <Lathe spindle return method for program stop> is set to
<0:Method 1>
• When <Coolant return method for program stop> is set to <0: Method
1>

12.3.2 Optional Stop (M01)


When the [OPT STOP] key is set ON, similar to the M00, the automatic operation is stopped after
a block which contains M01 is executed.

12.3.3 End of Program (M02, M30)


This code shows the end of program. Executing this command takes the control return to the head
of the program. The NC enters the reset status at this time.

(Note) If other G or M code is commanded in the M02 or M30 block, an alarm


appears. The axis movement is not available even by commanding X, Y or
Z address.

12.3.4 Workpiece Counter Specification (M211 to M214)


If a code (M211 to M214) is specified to a workpiececounter (1 to 4) and commanded in memory
operation, the commanded counter is counted up per counted amount when M02 or M30 is
executed.
The counter is cancelled when power is starated, [RST] key is pushed, M02 or M30 is executed,
operation is reset, or workpiece counter cancellation (M221-M224) is executed.

Ex) If M211 and M212 are executed in an operation program when the counted number of the
counter 1 is 1 and the counted number of the counter 2 is 2, the counter 1 counts up per 1 and
the counter 2 counts up per 2 when M02 or M30 is executeded.

(Note) M211 to M214 can be commanded in MDI operation.

12.3.5 Workpiece Counter Cancel (M221 to M224)


To canel a workpiece counter (1-4), command an M code (M221-M224). Then, the commanded
counter cancels counting when the M code (M221-M224) is executed in memory operation or 12
MDIoperation.

12.3.6 To Prohibit Reading Ahead (M159)


To prohibit reading a program ahead, command M159. Then, the next block is not read ahead until
the operation completes.

2019/06/16 12 - 9 eCOM3NCPR12
Chapter 12 M Function

12.4 M Function (Signal Control)


12.4.1 2-digit BCD Signal Output
Specify any of the signal outputs 00 to 99 to output a 2-digit value to an external device by a BCD
code.
However, the code (M00, M01, M02, M03, M04, M05, M06, M08, M09, M19, M29, M30, M96,
M97, M98, M99) are internal use codes, so they are not output outside.

(Note) To customers who use a machine model with CNC-A00/B00


After the control device CNC-C00, M96-M97 became internal use codes. If
they ar used, change the BCDoutput codes.

12.4.2 To Check TOUCH Signal (M120, M121)


When the M120 command is issued, the input signal TOUCH (touch sensor) is checked and if it is
turned ON, the operation ends. If it is OFF, the alarm <<Tool breakage error>> is triggered and
the TOOL (tool error) is output.
When an M121 command is issued, if the same signal is OFF, the operation ends. If it is ON, the
alarm <<Tool breakage error>> is triggered.

12.4.3 M Signal Level Outputs


(M400 to M409, M480 to M487)
External input terminal name ON OFF
M400 M400 M401
M402 M402 M403
M404 M404 M405
M406 M406 M407
M408 M408 M409
M480 M480 M481
M482 M482 M483
M484 M484 M485
M486 M486 M487
• M401commands a chip shower to go OFF after the <Chip shower retention time> of the
<User parameter> elapses.

12.4.4 One-shot Output (M450, M451, M455, M456)


M450 and M451 commands proceed to the next block after output time has passed and the signal
has turned off.
M455 and M456 commands proceed to the next block without waiting until the signal turns off.
Set thesignal output time by the “One-shot signal M450/451/455/456 output time” of the <User
parameter>.

12.4.5 Waiting Until Response is Given (M460 to M469)


M460, M462, M464, M466, or M468 commande waits until M460, M462, M464, M466, or M468
signal turns ON.
M461, M463, M465, M467, or M469 command waits until M460, M462, M464, M466, or M468
signal turns OFF.
12 The maximum waiting time is set by <External signal reading time limit> of <User parameter>.
After this time, the <<Signal output timeout>> alarm appears.

2019/06/16 12 - 10 eCOM3NCPR12
Chapter 12 M Function

12.4.6 Signal Output to PLC (M801 to M899)


Output a BCD code in the lowest two digits to PLC.
Please refer to “PLC System Manual Chapter 6 OM” for details.

12.4.7 Expansion Signal Output (M900 to M999)


Output the M900 signal and a BCD code in the lowest two digits.

12.4.8 Checking Measurement Instrument Detection


Signal (M320, M321)
When the M320 command is issued, the input signal status for TOUCH (touch sensor) is checked
when the preceding skip command (G31, G131/132) is executed. If the signal is not ON, the alarm
<<Detection signal off>> is triggered. The signal turns OFF after a reset, after switching to
machine lock or when the power is turned OFF.

When the M321 command is issued, the input signal TOUCH (touch sensor) is checked and if it is
ON, the alarm <<Detection signal on>> is triggered.

12

2019/06/16 12 - 11 eCOM3NCPR12
Chapter 12 M Function

12.5 M Function (Additional Axis Control)


12.5.1 Pallet-related M Codes (M410, M411, M430, M431)
This function is available for QT mounted machine.
When M410 is commanded, the Z-axis is returned to its origin and then the QT-axis is indexed to
-180° (pallet 2 is positioned outside).
When M411 is commanded, the Z-axis is returned to its origin and then the QT-axis is indexed to
0° (pallet 1 is positioned outside).
When M430 is commanded, the QT axis is unclamped by force.
When M431 is commanded, the QT axis is clamped by force.

12.5.2 C-axis Unclamp/Clamp


(M444/M430 and M445/M431)
When the M444 command is issued, the C-axis is unclamped, and thereafter, the C-axis
unclamp/clamp is not automatically controlled. When there is an axis travel command on the same
block, the axis travel is carried out at the same time. However, when there is a C-axis travel
command on the same block, the alarm <<Invalid command>> is triggered.

Example 1: G00 X-50. M444; ← When it travels along the X-axis, the C-axis unclamp is carried
out at the same time.
Example 2: G00 C90. M444; ← The alarm <<Invalid command>> is triggered.

(Note 1) When there is a command on the same block as the axis travel command,
the axis travel starts before the unclamp is finished.

When the M445 command is issued, the C-axis is clamped, and thereafter, the C-axis
unclamp/clamp is automatically controlled. When there is an axis travel command on the same
block, the axis travel is carried out at the same time. However, when there is a C-axis travel
command on the same block, the alarm <<Invalid command>> is triggered.

Example 1: G00 X-50. M445; ← When it travels along the X-axis, the C-axis clamp is carried
out at the same time.
Example 2: G00 C90. M445; ← The alarm <<Invalid command>> is triggered.

(Note 2) When there is a command on the same block as the axis travel command,
the axis travel starts before the clamp is finished.

When C-axis operation is enabled in the <Machine parameter> setting and when the clamp
mechanism is set to <1: Type 2> or <2: Type 3>, this command is valid.
When configured to another setting, the alarm* <<Specified M code cannot be used>> is
triggered.
When the C-axis changes from a clamp status to an unclamp status using an M444 command, the
C-axis returns to a clamp status if an M02 (M30) command is issued, if the reset key is pressed or
if a stop level 5 alarm is triggered. It does not return to clamp status even when the operation reset
is performed.

However, when the machine is not equipped with QT, the M430 has the same function as M444,
12 and M431 has the same function as M445.

* When the user parameter <Unregistered M-code> is set to <0: Error>.

12.5.3 B-axis Unclamp/Clamp (M440 and M441)


When the M440 command is issued, the B-axis is unclamped, and thereafter, the B-axis
unclamp/clamp is not automatically controlled. When there is an axis travel command on the same
block, the axis travel is carried out at the same time. However, when there is a B-axis travel
command on the same block, the alarm <<Invalid command>> is triggered.

Example 1: G00 Y-50. M440; ← When it travels along the Y-axis, the B-axis unclamp is carried
out at the same time.
Example 2: G00 B90. M440; ← The alarm <<Invalid command>> is triggered.

2019/06/16 12 - 12 eCOM3NCPR12
Chapter 12 M Function

(Note 1) When there is a command on the same block as the axis travel command,
the axis travel starts before the unclamp is finished.

When the M441 command is issued, the B-axis is clamped, and thereafter, the B-axis
unclamp/clamp is automatically controlled. When there is an axis travel command on the same
block, the axis travel is carried out at the same time. However, when there is a B-axis travel
command on the same block, the alarm <<Invalid command>> is triggered.

Example 1: G00 Y-50. M441; ← When it travels along the Y-axis, the B-axis clamp is carried
out at the same time.
Example 2: G00 B90. M441; ← The alarm <<Invalid command>> is triggered.

(Note 2) When there is a command on the same block as the axis travel command,
the axis travel starts before the clamp is finished.

When B-axis operation is enabled in the <Machine parameter> setting and when the clamp
mechanism is set to <1: Type 2> or <2: Type 3>, this command is valid.
When configured to another setting, the alarm* <<Specified M code cannot be used>> is
triggered.
When the B-axis changes from a clamp status to an unclamp status using an M440 command, the
B-axis returns to a clamp status if an M02 (M30) command is issued, if the reset key is pressed or
if a stop level 5 alarm is triggered. It does not return to clamp status even when the operation reset
is performed.

* When the user parameter <Unregistered M-code> is set to <0: Error>.

12.5.4 A-axis Unclamp/Clamp (M442 and M443)


When the M442 command is issued, the A-axis is unclamped, and thereafter, the A-axis
unclamp/clamp is not automatically controlled. When there is an axis travel command on the same
block, the axis travel is carried out at the same time. However, when there is an A-axis travel
command on the same block, the alarm <<Invalid command>> is triggered.

Example 1: G00 Z-50. M442; ← When it travels along the Z-axis, the A-axis unclamp is carried
out at the same time.
Example 2: G00 A90. M442; ← The alarm <<Invalid command>> is triggered.

(Note 1) When there is a command on the same block as the axis travel command,
the axis travel starts before the unclamp is finished.

When the M443 command is issued, the A-axis is clamped, and thereafter, the A-axis
unclamp/clamp is automatically controlled. When there is an axis travel command on the same
block, the axis travel is carried out at the same time. However, when there is an A-axis travel
command on the same block, the alarm <<Invalid command>> is triggered.

Example 1: G00 Z-50. M443; ← When it travels along the Z-axis, the A-axis clamp is carried
out at the same time.
Example 2: G00 A90. M443; ← The alarm <<Invalid command>> is triggered.

(Note 2) When there is a command on the same block as the axis travel command,
12
the axis travel starts before the clamp is finished.

When A-axis operation is enabled in the <Machine parameter> setting and when the clamp
mechanism is set to <1: Type 2> or <2: Type 3>, this command is valid.
When configured to another setting, the alarm* <<Specified M code cannot be used>> is
triggered.
When the A-axis changes from a clamp status to an unclamp status using an M442 command, the
A-axis returns to a clamp status if an M02 (M30) command is issued, if the reset key is pressed or
if a stop level 5 alarm is triggered. It does not return to clamp status even when the operation reset
is performed.

* When the user parameter <Unregistered M-code> is set to <0: Error>.

2019/06/16 12 - 13 eCOM3NCPR12
Chapter 12 M Function

12.6 M Function (Positioning Check Distance)


12.6.1 Positioning Finished Check Distance
(M270 to M279)
M270: Positioning finished check distance, positioning finished angle non-specific.
M271: This makes the value of <M271 positioning end check distance> or <M271 positioning end
check angle> of the <User parameter> an imposition width in positioning.
X, Y, Z axes use the value of “positioning end check distance”. A, B, C axes use the value of
“positioning end check angle”.
M272 to M279: These work as same as M271.
Return to the positioning end check distance, positioning end check angle non-specific to follow
the operation below.
• Execution of M270
• Program ends
• Operation reset

12.7 M Function (Time Constant Switch)


12.7.1 Tap Time Constant Selection
(M241 to M249, M250, M251, M252 to M254)
If M250/M251 is commanded, the Z axis acceleration/deceleration in tapping is carried out in time
constant.
If any of M241 to M249 is commanded, the Z axis acceleration/deceleration in tapping is carried
out in 10 to 90% of time constant.
However, if the <<Tap time constant too short>> alarm appears, operation works in time constant.
When a command between M252 and M254 is issued, the acceleration and deceleration of the
Z-axis during a tapping operation is carried out at a constant acceleration (high, medium and slow
speeds).

(Note 1) Use the low acceleration speed M253 or M254 if the alarm <<Servo error
(overload)>> is triggered during a tapping operation for M252 modal.
In addition, use the low acceleration speed M254 if the alarm <<Servo
error (overload)>> is triggered during a tapping operation for M253 modal.
Issue a dwell or similar command to lower the frequency of the tapping
operation when the alarm or error persists.
(Note 2) The machine is initialized in the modal that is set in the user parameter
(switch 1) <Tap accel. setting> when the power is turned ON, when the
[RST] key is pressed, when the M02 or M30 command is executed and
when the operation is reset.
(Note 3) M253 and M254 cannot be used in some of the models.

12

2019/06/16 12 - 14 eCOM3NCPR12
Chapter 13 High-accuracy Mode

CHAPTER 13 (1)

HIGH-ACCURACY MODE AIII

1 Outline
2 How to Use
3 Restrictions
4 Detailed Explanations and Adjustments of Parameters

13

2019/09/02 13 - 1 - 1 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

1 Outline
1.1 Outline of High-accuracy Mode AIII
The high-accuracy mode AIII is appropriate for contouring or 3-dimentional shape workpiece
machining to atain high-speed, high-accuracy, and high-dignity machining. The high-accuracy
mode AIII has two functions; 1: To improve shape accuracy and 2: To improve face dignity. It
also can change shape accuracy and face dignity in machining by the override values in user
parameters.
The parameter default settings have 6 machining levels available, that is, there is one level that
focuses on shape accuracy or another that focuses on surface quality. The appropriate machining
level can be easily selected depending on the machining needs or requirements. In addition, unique
two levels of parameter setting are available.
The machining level can be changed in an NC program.

1.2 Functions of High-accuracy Mode AIII


The shape accuracy improving function and the face dignity improving function of the
high-accuracy mode AIII are as follows:

1. Improving shape accuracy


The following 4 deceleration functions are available for improving the shape accuracy.
These functions control the margin of error within a certain value regardless of the shape.
(1) Automatic corner deceleration function
(2) Automatic arc deceleration function
(3) Automatic curve approximation deceleration function
(4) Fully automatic deceleration function

(1) Automatic corner decelerating function


This function restricts errors of a command path and tool path at a corner part to improve
shape accuracy of the corner part. Corner deceleration override can adjust the shape error.

Shape error

Commanded path

Tool path

(2) Automatic arc decelerating function


This function restricts the radius from becoming small in arc machining to improve arc
shape accuracy. Arc deceleration override can adjust the radius reduction amount.

Shape error
(Decrement in radius)
Programmed route
13 Tool path

2019/09/02 13 - 1 - 2 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

(3) Automatic curve approximation decelerating function


This function can restrict errors of a curve command path and tool path commanded by a
minute linear block to improve shape accuracy of a curved shape and 3-dimentional shape.
Curve approximate deceleration override can adjust the shape error.

Commanded path Shape error


(Fine linear block)

Tool path

(4) Fully automatic deceleration function


This function limits all errors in the command paths and tool paths in order to improve the
shape accuracy. The user parameter (high accuracy) <Accuracy level> can adjust the
margin of error on the shape.

2. To improve face dignity


The function to improve face dignity is a smooth function.
The command path created for machining a curved shape or 3-dimentional shape by CAM or
the like is commanded linearly, so it becomes polygonal to generate stripes (parallel grooves)
or the like and drops face dignity. The following functions can smoothen the machining face
more than before to improve face dignity:

Commanded path
(Fine linear block)

Tool path

The functions are two as follows:


(1) Smooth path offset function
This function changes a program command path to an approximate curve.
In addition, it switches the function to valid or invalid by a travel distance per block or an
angle difference between blocks.
(2) Smooth override (to adjust cutting time constant)
This function adjusts the smoothness by adjusting the cutting time constant. In addition,
this change of cutting time constant can adjust the top speed of cutting used in the
high-accuracy AIII.

In addition, the “High-accuracy mode AIII” is represented as “High-accuracy mode A” in the


chapters or NC screens after this.

13

2019/09/02 13 - 1 - 3 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

2 How to Use
2.1 To Select a Machining Level
High accuracy mode A is equipped with a function to improve shape accuracy and another to
improve surface quality. There are 6 machining levels available in the default settings, such as one
that focuses on shape accuracy and another that focuses on surface quality. Select one from these
six machining levels depending on the machining content. (Note, in the default settings, the
function that improves the surface quality uses smooth override.)
In addition, there are two more levels other than the above levels that can be defined by users so
that the machining levels can be adjusted to the optimum. For detail, refer to the “4 Detailed
explanations and adjustments of parameter”.

Machining level default setting


Machining Purpose
Contents M code
level (Emphasis)
The shape accuracy is emphasized.
(First recommended for emphasizing shape
accuracy)
1 Shape accuracy M260
The surface quality is equivalent to the level when
high accuracy mode is not used. Machining time
becomes a little longer because it decelerates in
accordance with a shape.
The shape accuracy is more emphasized than the
machining level 1.

Shape accuracy The surface quality is less than when high accuracy
2 M261
(High) mode is not used. Machining time becomes a little
longer because it decelerates in accordance with a
shape. In addition, the top speed of a command is
limited. (F5000 is the default value.)
Both the shape accuracy and face dignity are
emphasized.
Shape accuracy
3 M262
+ face dignity
As the deceleration time become longer, the
machining time may become very long.
The face dignity is emphasized (first recommended
for emphasizing face dignity).
4 Face dignity M263
Use this if smooth face dignity is necessary.
However, shape accuracy becomes bad.
The face dignity is emphasized more than the
machining level 4.
Face dignity
5 M264
(High)
Use this if smoother face dignity is necessary.
However, shape accuracy becomes worse.
High speed is emphasized.

The shape accuracy is a little higher than when high


6 High speed accuracy mode is not used. The face dignity is in M265
13 the same level. If you are not sure of this shape
accuracy emphasis or the face dignity emphasis, it
is recommended to use this machining level.
If it is necessary to set other than the above six, set M266
7/8 User definition a value of the user parameter referring to the to
parameter values of other levels. M267

2019/09/02 13 - 1 - 4 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

Shape
accuracy Level 2: Shape accuracy (high)
Level 1: Shape accuracy
High Level 3: Shape accuracy
M261 + Face accuracy
M262
M260
Level 6: High
Level 4: Face accuracy
speed

M263 Level 5: Face accuracy


M265
(high)

Low M264

Face dignity
Low High
Image of machining levels

Points for selection of machining level


1. Select the shape accuracy emphasis or the face dignity emphasis
Decide which of the shape accuracy or the face dignity is to be emphasized. If the shape
accuracy is emphasized, the tool path is faithfully controlled by the command path. If the face
dignity is emphasized, it is controlled to improve smoothness of the machining face.

• Shape accuracy emphasis


→ Select the machining level 1(shape accuracy, M260).
• Face dignity emphasis
→ Select the machining level 4 (face dignity, M263).
• If you are not sure which should be emphasized
→ Select the machining level 1 (shape accuracy, M260) or machining level 6 (high-speed,
M265).

2. Decide which of the shape accuracy or face dignity is necessary for the machining.
Depending on the stripes (parallel grooves) appering on the machining face, you may know
which of the shape accuracy or the face dignity is necessary to be emphasized.

(1) Stripes (parallel grooves) parallel in the tool ongoing direction appear.

Stripes (parallel grooves) parallel


to the tool path appear.

Tool path

13
Presumed cause
There ia a possibility that the stripes (parallel grooves) may appear due to a shape error.
Especially they tend to appear if the commanded speed is too fast or the curvature is too small.

Recommend machining level


Machining level 1 (shape accuracy, M260)

2019/09/02 13 - 1 - 5 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

(2) Stripes (parallel grooves) perpendicular to the tool path in the ongoing direction appear.

Tool path

Stripes (parallel grooves)


perpendicular to the tool path
appear.

Presumed cause
The minute linear command created by CAM or the like for a curved shape is polygonal, so it
tends to generate stripes (parallel grooves). Especially they tend to appear if the speed is too
slow or the curvature is too large. They may be none by minimizing the tolerance of CAM.

Recommend machining level


Machining level 4 (face dignity, M263)

(3) If you want to emphasize the shape accuracy or the face dignity more
Use the machining level 2 (shape accuracy (High), M261) or the machining level 5 (face
dignity (High), M264). However, the machining level 2 may take more machining time than
the machining level 1. The machining level 5 worsens the shape accuracy more than the
machining level 4.

(4) The machining level 3 (shape accuracy + face dignity, M262) may take very long machining
time.

13

2019/09/02 13 - 1 - 6 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

2.2 How to Use the Program


To use the high-accuracy mode A, use the following M codes:
M260-M267: High accuracy mode A ON
M269: High accuracy mode OFF

Example of Use

(Program Example)
NC program
G00 X0 Y0 Z0;
;
M260; High-accuracy mode A (Level 1) ON
G01 X20. Y30. Z50.;
X40. Y20. Z30.; High-accuracy mode A (Level 1) in operation
;
M269; High-accuracy mode A (Level 1) OFF
;
M261;
High-accuracy mode A (Level 2) ON
G01 X20. Y30. Z50.;
X40. Y20. Z30.;
High-accuracy mode A (Level 2) in operation
;
M269; High-accuracy mode A (Level 2) OFF
;
M262;
High-accuracy mode A (Level 3) ON
G01 X20. Y30. Z50.;
X40. Y20. Z30.; High-accuracy mode A (Level 3) in operation
;
M269;
High-accuracy mode OFF
M30;

2.3 Usable Conditions


In order to use the high-accuracy mode A, it is necessary for the modal status to be as follows:
In addition, the power is supplied under this condition.
M97: To cancel interruptive macro program
M299: Cancel machining mode specification

2.4 Conditions to be Cancelled


The high-accuracy mode A is set off if the following operations are done whilt the high-accuracy
mode A is in action:
• Power is supplied.
• The [RST] key is pressed.
• Memory operation is reset by pressing the [Z.RTN] key or the like in the manual operation
mode.
• End of program (M02, M30) is performed.

13

2019/09/02 13 - 1 - 7 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

3 Restrictions
3.1 Commandable Functions
The functions available using commands while high accuracy mode A is executing are as follows.
1. All M code commands are possible except M96 (interrupt type macro).
2. All the G code commands are available when using the automatic corner deceleration function,
the automatic arc deceleration function or the automatic curve approximation deceleration
function. G code commands except the involute interpolation (G02.2/G03.2) command are
available on the fully automatic deceleration function.

(Note 1) When a function command is accidentally issued even though it is not


available, the alarm <<High accuracy A invalid command>> is triggered.

(Note 2) The high-accuracy mode A is temporarily cancelled by the following


commands (modes). When the commands (modes) finish, the
high-accuracy mode A becomes valid again.
• M code commands
• Blocks which have no movement amounts
• Blocks which have no cutting feed movement
• Every rotary feed
• Fixed cycle
• Thread cutting
• Thread cutting cycle
• Complex thread cutting cycle
• Exact stop mode
• Skip feed (G31, G131 and G132)
• Measurement related G code commands (G120 to G129)
• Inverse time feed

(Note 3) The smooth path offset function in the high-accuracy mode A is


temporarily cancelled by the following commands (modes). When the
commands (modes) finish, the high-accuracy mode A becomes valid
again.
• M code commands
• Blocks which have no movement amounts
• Blocks which have no cutting feed movement
• Every rotary feed
• Fixed cycle
• Thread cutting
• Thread cutting cycle
• Complex thread cutting cycle
• Circular interpolation
• Involute interpolation
• Exact stop mode
• Tool diameter offset mode
• Scaling
• Mirror image
• Coordinate rotational function
• Feature coordinate manufacturing mode
• Inverse time feed

13

2019/09/02 13 - 1 - 8 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

3.2 Additional Axis Movement Commands


If an additional axis movement is commanded while the high-accuracy mode A is in action, the
high-accuracy mode A is temporarily cancelled only while the command is in action. In addition,
the commands that move the feed axes and additional axis simultaneously by the cutting feed (G01,
G02, G03) are invalid.

3.3 Imposition Checked by High-accuracy Mode A


Command
If any of the following conditions is satisfied, an imposition is checked by an M code command in
the high-accuracy mode A:
• M code commands (M260-M269) alone in the high-accuracy mode A
• Commands changed to the high-accuracy mode A (M260-M267) from a modal state other
than the high-accuracy mode A
• When a value of the <Cutting feed time constant selection> or <Smooth override> changes
Example) M260G1X-10.Y-10.
G1X-20.Y-20.
M261G1X-30.Y-30...(1)
G1X-40Y-40
The program like above checks the imposition of the block (1) before operation if the value of the
User parameter (Switch 1) <Cutting feed time constant selection> or <Smooth override> of M260
or M261 differs.

3.4 Feedrate When Commanding of High-accuracy


Mode A
The feedrate when commanding the high-accuracy mode A is limited by the machine parameter
(high-accuracy) <Reference feedrate A>.
In addition, the limited speed can be adjusted by setting the user parameter (high-accuracy)
<Smooth override>. (For details, refer to “ 4.1 (4) Smooth override function (To adjust a cutting
time constant)”).
However, if a speed faster than the machine parameter (high accuracy) <Max. feedrate A> is
commanded, the <<Feedrate error>> appears.
The machine parameter (system 1) <X- to Z-axis max. cutting feedrates > and the user parameter
(switch 1) <Max. actual cutting travel speed> are not used in the high-accuracy mode A.

3.5 Notes in Motions by Smooth Path Offset


Function
• Operates only when the user parameter (high accuracy) <Smooth path offset function> is set
to <1: Valid>.
• The block stop position in a single operation differs from the program command position.
• Mode change is unavailable.
• Dry run is unchangable. If changed, the operator message <<The spline function is valid.>>
appears.
• A block that is cutting with the smooth path offset function cannot be specified as a block for
resuming or restarting the program. If it is specified, the alarm <<Program restart error>> is
triggered.
• If the user parameter (high accuracy) <Smooth path offset cancel angle> is set too large, the
alarm <<Curve speed error>> may be triggered.
13

2019/09/02 13 - 1 - 9 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

4 Detailed Explanations and


Adjustments of Parameters
4.1 Detailed Explanations
We are gpoing to explain the following functions provided in the high-accuracy mode A:
(1) Automatic corner decelerating function
(2) Automatic arc decelerating function
(3) Automatic curve approximation decelerating function
(4) Fully automatic deceleration function
(5) Smooth override (Cutting time constant adjusting method)
(6) Smooth path offset function

(1) Automatic corner decelerating function


Function
If a tool approaches a corner in corner machining, the actual tool path moves away from the
command path a little by little. It is an error. In addition, the faster the feedrate is at a corner,
the larger the error becomes.
This function automatically decelerates only the feedrate near the corner according to the
setting value of <Corner deceleration override> so that the shape accuracy is kept constant
with respect to any corner specified in the NC program.

Setting
The setting area of the <Corner deceleration override> is up to “0% or 10%-9999%”. The
smaller the setting value is, the more strongly the deceleration function works to minimize the
error and makes the shape accuracy better. In addition, if you input “0%”, the automatic
corner deceleration function goes off.

Guide amount of shape error


The shape error at a corner becomes a value in proportion to the<Corner deceleration
override>. For example, if the error amount when the <Corner deceleration override> is set at
100% is 100, it becomes 200 when set at 200%, and it becomes 50 when at 50%.

(2) Automatic arc decelerating function


Function
For machining of arc interpolation, the actual tool path has an error in the command in the
radius direction to minimize the arc radius. In addition, the faster the feedrate is, the bigger the
error tends to become.
This function automatically decelerates the feedrate of circular cutting according to the setting
values of <Arc deceleration override> so that the shape accuracy in the radial direction is kept
constant with respect to any arc specified in the NC program.

Setting
The setting area of the <Arc deceleration override> is up to “0% or 10%-9999%” (Default
value “100%”). The smaller the setting value is, the more the deceleration function works
strongly to minimize the error and the shape accuracy becomes better. In addition, if you input
“0%”, the automatic arc deceleration function goes off.

Guide amount of shape error


The shape error at an arc becomes a value in proportion to the <Arc deceleration override>.
13 For example, if the error amount when the <Arc deceleration override> is set at 100% is 100,
it becomes 200 when set at 200%, and it becomes 50 when set at 50%.

2019/09/02 13 - 1 - 10 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

(3) Automatic curve approximation decelerating function


Function
This function automatically decelerates the feedrate at the curve approximate block part
according to the setting value of the <Curve approximate deceleration override> so that the
shape accuracy is kept fixed for any curve approximate block (where the curve is represented
by the group of the minute linear blocks) commanded by an NC program.

Setting
The setting area of the <Curve approximate deceleration override> is up to “0% or
10%-9999%” (Default value is “100%”). The smaller the setting value is, the more strongly
the deceleration function works to minimize the error and the shape accuracy becomes better.
In addition, if you input “0%”, the automatic curve approximate deceleration function goes
off.

Guide amount of shape error


The shape error at a curve becomes a value in proportion to the <Curve approximate
deceleration override>. For example, if the error amount when the <Curve approximate
deceleration override> is set at 100% is 100, it becomes 200 when set at 200%, and it becomes
50 when set at 50%.

(4) Fully automatic deceleration function


Function
This function automatically decelerates the feedrate in order to limit the margin of error from
the command path within the value set in the <Accuracy level> on corner, arc and curve
approximation blocks that are specified in the NC program.

Set value
The setting range for the <Accuracy level> is from <0 (Invalid)> to 5.000 mm (when the user
parameter (switch 1) <Machine unit system> is set to <1: Inch>, then the range is from <0
(Invalid)> to 0.1999 inch) (Default value: <0 (Invalid)>).
When the parameter is set to <0 (Invalid)>, the functions: (1) automatic corner deceleration
function, (2) automatic arc deceleration function and (3) automatic curve approximation
deceleration function are enabled. When it is configured to another setting, (1) automatic
corner deceleration function, (2) automatic arc deceleration function and (3) automatic curve
approximation deceleration function are disabled and fully automatic deceleration function is
enabled.

Approximation for margin of error on shape


The set value for the <Accuracy level> is an approximation for the margin of error.

(5) Smooth override function (To adjust a cutting time constant)


Function
This function is to improve the face dignity. The command path created by CAM or the like in
machining a curved shape or 3-dimentional shape becomes a linearly commanded continual
polygon to have stripes (parallel grooves) or drops the face dignity. This function makes the
machining face smoother than before and improves the face dignity.
The <Smooth override>can adjust the face dignity.

Setting
The setting area of the <Smooth override> is up to ”10%-9999%” (Default value is “100%”).
If it becomes bigger than 100, smoother face dignity is attained. If it becomes smaller than 100,
the shape accuracy becomes better.
13
Guide amount of shape error
Shape errors at a corner, arc, and curve vary depending on the settings of the <Smooth
override>.
The shape error at a corner becomes a value in proportion to the square root of the setting
value. For example, if the error amount when the setting value is set at 100% is 100, it
becomes 140 when set at 200%, and it becomes 70 when set at 50%.
The shape error at an arc or curve becomes a value in proportion to the setting value. For
example, if the error amount when the setting value is set at 100% is 100, it becomes 200
when set at 200% and it becomes 50 when set at 50%.

2019/09/02 13 - 1 - 11 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

To adjust the limit value of cutting feedrate


The cutting feedrate that can be commanded in a program is limited as follows:
• If the <Smooth override> is 100% or more, the limit value becomes double of the
machine parameter (high accuracy) “Reference feedrate A” × “√(Smooth override
value/100)”. (The amount afte the decimal point is rounded off.)
• If the <Smooth override> is less than 100%, the limit value becomes double of the
machine parameter (high accuracy) “Reference feedrate A” × “(Smooth override
value/100)”. (The amount afte the decimal point is rounded off.)
If the smooth override value is set at 100% or more, the cutting feedrate can be raised. In
addition, if the limit value exceeds the machine parameter (high accuracy) <Max. feedrate A>,
it is clamped by the <Max. feedrate A>.

Example) Limit value of cutting feedrate for the reference feedrate A: 10000 mm/min, Max.
feedrate A: 20000 mm/min

Smooth override: 100% : 10000 mm/min


400% : 20000 mm/min
50% : 5000 mm/min

(6) Smooth path offset function


Function
This function improves the face dignity as same as the smooth override function.
It makes a program, which creates a curved shape from minute blocks, create a curve line
from multiple program command points, approximate the path, and perform curve
interpolation.
This function changes the program command to a curve line, so the automatic deceleration is
minimized compared with the smooth override.
The <Smooth path offset level> can adjust the face dignity.

Setting
The setting area of the <Smooth path offset level> is “1-5” (The default value is “1”). If this
value is made bigger, the path is offset by more command points to have much smoother path.
However, if it is made big, the path may error.
(If the user parameter (high accuracy) <Smooth path offset function> is “Invalid”, this setting
value becomes invalid.)

13

2019/09/02 13 - 1 - 12 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

4.2 Explanation About Parameters


Each level is controlled by referring to the setting values of the user parameter (high-accuracy).

Every time when the [PAGE] key is pressed, the screen display changes to <High accuracy A
(M260~M264)> → <High accuracy A (M265~M267)> → <High accuracy B> → <High accuracy
common>.

(High-accuracy common)

13

2019/09/02 13 - 1 - 13 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

(High accuracy mode A)


Parameter name Contents Setting range
Corner This is used together with the automatic corner deceleration function. 0, 10~9999
deceleration When "100" is set, automatic corner deceleration is performed based on the (%)
override machine’s unique deceleration rate.When a value larger than "100" is set, the
deceleration rate is smaller, making machining time shorter. When a value
smaller than "100" is set, the deceleration rate is larger, resulting in more
accurate machining. When "0" is set, automatic corner deceleration is not
performed.
When the <Accuracy level> is set to another value besides "0", this parameter
is disabled.
Arc deceleration This is used together with the automatic arc deceleration function. 0, 10~9999
override When "100" is set, automatic arc deceleration is performed based on the (%)
machine’s unique deceleration rate. When a value larger than "100" is set, the
deceleration rate is smaller, making machining time shorter. When a value
smaller than "100" is set, the deceleration rate is larger, resulting in more
accurate machining. When "0" is set, automatic arc deceleration is not
performed.
When the <Accuracy level> is set to another value besides "0", this parameter
is disabled.
Curve This is used together with the automatic curve approximate deceleration 0, 10~9999
approximation function. (%)
deceleration When "100" is set, automatic curve approximation deceleration is performed
override based on the machine’s unique deceleration rate. When a value larger than
"100" is set, the deceleration rate is smaller, making machining time shorter.
When a value smaller than "100" is set, the deceleration rate is larger,
resulting in more accurate machining. When "0" is set, automatic curve
approximation deceleration is not performed.
When the <Accuracy level> is set to another value besides 0, this parameter
is disabled.
Smooth path This is used when the <Smooth path offset function> (explained later) is set 1~5
offset level <Valid>. The larger it is set, the smoother it becomes.
Smooth override When "100" is set, the cutting feed time constant selected by the <Cutting 10~9999
feed time constant selection> is used. (%)
When a value larger than "100" is set, a smoother surface is attained, or when
a value smaller than "100" is set, the accuracy becomes higher.
Cutting feed time The cutting feed time constant of the high-accuracy mode A is selected. 0~2
constant <0: Group 1>
selection Use <High accuracy A cutting feed time constant 1-3 (Group 1)> of the
machine parameter (high accuracy).
<1: Group 2>
Use <High accuracy A cutting feed time constant 1-3 (Group 2)> of the
machine parameter (high accuracy).
<2: Group 3>
Use <High accuracy A cutting feed time constant 1-3 (Group 3)> of the
machine parameter (high accuracy).
Minute block If the travel distance of a block is less than the parameter value, the block is 0~2.000
deletion distance deleted. (mm)
If the <Smooth path offset function> is <Valid>, it is performed at a
command point after path approximation.
Accuracy level Used with the fully automatic deceleration function. 0~5.000
13 When a value other than 0 is set, automatic deceleration is carried out so that (mm)
the margin of error from the command path is less than the set value. In this
situation, the following are disabled: <Corner deceleration override>, <Arc
deceleration override> and <Curve approximation deceleration override>.
When set to 0, the fully automatic deceleration function is disabled and the
following are enabled: <Corner deceleration override>, <Arc deceleration
override> and <Curve approximation deceleration override>.

2019/09/02 13 - 1 - 14 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

(High-accuracy common)
Parameter name Contents Setting range
Smooth path offset The <Valid/invalid> of the <Smooth path offset function> is set. 0~1
function
Smooth path offset This is used when the <Smooth path offset function> is set <Valid>. 0~99.999
cancel distance If the travel distance of one block is longer than the set value, the (mm)
smooth path offset is cancelled.
If the set value is too large, it may deviate significantly from the
program path. Be careful when changing the value.
Smooth path offset This is used when the <Smooth path offset function> is set <Valid>. 0~120.000
cancel angle If the angle difference between blocks is larger than the set value, the (°)
smooth path offset is cancelled.
If the set value is too large, it may deviate significantly from the
program path. Be careful when changing the value.
Smooth path offset This is used when the <Smooth path offset function> is set <Valid>. 0~9.999
angle determination The smooth path offset is not cancelled even if the block where the (mm)
invalid distance smooth path offset is cancelled for decision of the <Smooth path offset
cancel angle> is less than the value set for a travel distance of one
block.
Smooth path offset Used when <Smooth path offset function> is set to <Valid>. 0~9.999
reference length If the travel distance of one block is longer than the set value, the path (mm)
is offset using the set value.
Minute block deletion Used when the <Smooth path offset function> is set to <Valid>. 0~1
when smooth path When this parameter is set to <1: Enabled>, depending on the settings
offset is cancelled for <Smooth path offset cancel distance> and the <Smooth path offset
cancel angle>, the <Minute block deletion distance> applies the
deletion even if the smooth path offset is cancelled for the block.
(Note) Update the software version to W*10.*** or later in
order to change the parameter setting to <1:
Enabled>.
Accuracy level method Set the deceleration method when the accuracy level is specified in 0~1
high accuracy mode A.

13

2019/09/02 13 - 1 - 15 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

4.3 Relationship Between Parameters and Shape


Errors
1. Corner shape error
The relationship between a shape error and an override when the shape error is 1.0 where the
deceleration override is 100% and the smooth override is 100% is as follows:

Relationship between corner shape error and deceleration override


9.0
Corner shape error

8.0
7.0
6.0
5.0
4.0
3.0
2.0 Smooth override: 100%

1.0

0% 100% 200% 300% 400% 500% 600% 700% 800%


Deceleration override setting value

Relationship between corner shape error and smooth override


3.5

3.0
Corner shape

2.5

2.0

1.5
Deceleration override: 100%
1.0

0.5

0
0% 100% 200% 300% 400% 500% 600% 700% 800% 900% 1000%
Smooth override setting value

Reference
Corner shape error = E * D * S
E : Error when the corner deceleration override is 100% and the smooth override is 100%
(Guide amount: 100-120 µm)
D : Corner deceleration override/100
13 S : Smooth override/100

2019/09/02 13 - 1 - 16 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

2. Arc/curved shape error


The relationship between a shape error and an override when the shape error is 1.0 where the
deceleration override is 100% and the smooth override is 100% is as follows:

Relationship between shape error and deceleration override of an arc or curve


7.0

6.0
Arc/curve shape error

5.0

4.0

3.0

2.0 Smooth override: 100%

1.0

0
0% 100% 200% 300% 400% 500% 600% 700% 800%
Deceleration override setting value

Relationship between Arc/curve shape error and smooth override


8.0

7.0
Arc/curve shape error

6.0

5.0

4.0

3.0

2.0 Deceleration override: 100%

1.0

0
0% 100% 200% 300% 400% 500% 600% 700% 800% 900% 1000%
Smooth override setting value

Reference
Arc/curved shape error = E * D * S
E : Error when the arc (approximate curve) deceleration override is 100% and the smooth
override is 100% (Guide amount is 10-20 µm)
D : Arc (approximate curve) deceleration override/100
S : Smooth override/100

13

2019/09/02 13 - 1 - 17 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

4.4 Adjusting Parameters


The M code can be changed to set up the appropriate machining depending on the machining
conditions. However, the parameters can also be adjusted to further optimize the machining.
There are 2 types of parameters that can be adjusted: the parameter for adjusting shape accuracy
and the smooth override. There are 4 parameters that can adjust the shape accuracy: Corner
deceleration override, arc deceleration override, curve approximation deceleration override and
accuracy level. A description of each parameter function is noted below.

Parameter for adjusting shape accuracy Smooth override


Parameter for improving shape accuracy. Override for improving the surface quality.
It reduces the speed depending on the shape in It reduces the unevenness in the command
Description order to improve the shape accuracy. path in order to improve the surface quality.
It impacts the shape accuracy and the It impacts the surface quality and the shape
machining time. accuracy.
Deceleration override: 0, 10 to 9999 (%)
Setting range 10 to 9999 (%)
Accuracy level: 0 to 5.000 (mm)
Deceleration override: The surface quality is the same as when
When the <Accuracy level> is set to another setting 100 as the normal mode. When it is set
value besides 0, this parameter is disabled. to a small value, the shape accuracy improves
When it is set to 0, deceleration override is but the surface quality deteriorates. In
disabled. addition, the maximum speed for the cutting
When it is set to a small value, the shape feed is limited.
accuracy improves but the machining time When it is set to a large value, the surface
becomes longer. quality improves but the shape accuracy
When it is set to a large value, the machining deteriorates.
time becomes shorter but the shape accuracy
deteriorates.
Description Accuracy level:
When it is set to 0, the fully automatic
deceleration override is disabled and the
deceleration override is enabled.
When it is set to a small value, the shape
accuracy improves but the machining time
becomes longer.
When it is set to a large value, the machining
time becomes shorter but the shape accuracy
deteriorates.
How much the machining time increases or
decreases varies depending on the model.

13

2019/09/02 13 - 1 - 18 eCOM3NCPR13-1
Chapter 13 High-accuracy Mode

CHAPTER 13 (2)

HIGH-ACCURACY MODE B

1 Outline
2 How to Use
3 Restrictions
4 Explanations on Parameters

13

2019/09/02 13 - 2 - 1 eCOM3NCPR13-2
Chapter 13 High-accuracy Mode

1 Outline
The high-accuracy mode B can perform better shape accuracy machining compared with the
high-accuracy mode A by looking ahead a program and accelerating/decelerating the speed before
interpolation.
The high-accuracy mode B has the following functions as same as the high-accuracy mode A:
• Automatic arc decelerating function
• Automatic curve approximation decelerating function
• Smooth override function
• Smooth path offset function

Note, the following specifications vary based on whether the machine is equipped with the option
or not.
Not equipped: High
Option Equipped: High accuracy mode BII
accuracy mode BI
No. of look ahead blocks 30 or 40 (*1) Machine parameter (high accuracy)
No.8087 <No. of look-ahead blocks B>
Smooth path offset Not available Available
function
*1 The number of look ahead blocks varies depending on the machine model.

No. of look
Machine model
ahead blocks
300X1/S500X1/S700X1/S1000X1/R450X1/R650X1/M140X1 30
S500Z1/S700Z1/R450Z1
S300X1N/S500X1N/S700X1N/S1000X1N/R450X1N/R650X1N 40
M140X2/F600X1
S300X2/S500X2/S700X2
R450X2/R650X2
M200X3/M300X3

In addition, when the machine parameter <No. of look-ahead blocks B> is less than 30 or 40, that
set value is valid.

13

2019/09/02 13 - 2 - 2 eCOM3NCPR13-2
Chapter 13 High-accuracy Mode

2 How to Use
2.1 To Select a Machining Level
High accuracy mode B is equipped with a function to improve shape accuracy (arc deceleration
and curve approximation deceleration) and another to improve surface quality. The default setting
is configured to the optimum machining level for shape accuracy and surface quality.
In addition to the level mentioned above, there are 7 separate user defined levels, and the user can
adjust the settings to the most appropriate machining level. Refer to the “Detailed description of 4
functions and parameter adjustment” in “Chapter 13 (1) High Accuracy Mode A III” for further
details. For details, refer to “Chapter13 (1) 4. Detailed explanations and adjustments of
parameters”.

2.2 How to Use Programs


The following M codes are used for the high-accuracy mode B:

M280-M287 : To activate the high-accuracy mode B


M289 : To diactivate the high-accuracy mode A/B

Example of Use
Program example:
NC program
G00 X0 Y0 Z0;
;
M285; To activate the high-accuracy mode B
G01 X20. Y30. Z50.;
X40. Y20. Z30.; The high-accuracy mode B is in action.
;
M289; To deactivate the high-accuracy mode B
M30;

2.3 Usable Conditions


To use the high-accuracy mode B, the modal status must be as follows:
M97: To cancel interruptive macro program
M299: Cancel machining mode specification
In addition, this condition is applied when power is supplied.

(Note) If the high-accuracy mode B is used when the above modal status is not
applied, the alarm <<High-accuracy B unable modal>> appeas.

2.4 Conditions to be Cancelled


The high-accuracy mode B goes off if the following operations are done in the high-accuracy
mode B:
• Power is supplied.
• The [RST] key is pressed.
• Memory operation is reset by pressing the [Z.RTN] key in the manual operation mode.
• End of program (M02, M30)
13

2019/09/02 13 - 2 - 3 eCOM3NCPR13-2
Chapter 13 High-accuracy Mode

3 Restrictions
3.1 Commandable Functions
The functions available using commands while high accuracy mode B is executing are as follows.
1. All M code commands are possible except M96 (interrupt type macro).
2. All G code commands are possible.

(Note 1) If an uncommandable function is commanded, the alarm <<High-accuracy


B unable command>> appears.
(Note 2) The high-accuracy mode B is temporarily cancelled when the following
commands (modes) are issued:
When these commands (modes) finish, the high-accuracy mode B
becomes valid again.
• M-code command
• S-code command
• T-code command
• Blocks that have no travel amount
• Blocks that have no cutting feed
• Every rotary feed
• Fixed cycle
• Thread cutting
• Thread cutting cycle
• Complex thread cutting cycle
• Exact stop mode
• Skip feed (G31, G131 and G132)
• Measurement related G code commands (G120 to G129)
• Inverse time feed

(Note 3) The smooth path offset function of the high-accuracy mode B is


temporarily cancelled when the following commands (modes) are issued.
When these commands (modes) finish, the high-accuracy mode B
becomes valid again.
• M-code command
• S-code command
• T-code command
• Blocks that have no travel amount
• Blocks that have no cutting feed
• Blocks with an additional axis travel command
• Every rotary feed
• Fixed cycle
• Thread cutting
• Thread cutting cycle
• Complex thread cutting cycle
• Arc interpolation
• Involute interpolation
• Exact stop mode
• Diameter offset mode
• Scaling
• Mirror image
• Rotation of coordinates
• Feature coordinate manufacturing mode
13 • Inverse time feed

2019/09/02 13 - 2 - 4 eCOM3NCPR13-2
Chapter 13 High-accuracy Mode

3.2 Temporary Stop of Operation


If an operation is tried to be stopped by the [FEED HOLD] switch in the high-accuracy mode B,
it may not stop in the commanded block because it decelerates smoothly in the allowable
acceleration.

3.3 Single Operation


As reasoned in “3.3 Temporarily stop of operation”, even if you try to perform a single operation
in the high-accuracy mode B and press the [SINGL] key, it may not stop in the commanded block.

3.4 Cutting Override


The cutting override in the high-accuracy mode B is valid. However, if an override value
exceeding 100% is commanded, the override is not performed in the connection part with blocks
but becomes 100%.

3.5 Dry Run


It is unable to switch ON/OFF a dry run in the high-accuracy mode B. If the [DRY] key is pressed,
the operator message “During high-accuracy B” appears.

3.6 Feedrates When Commanding the


High-accuracy Mode B
If you command a speed faster than the machine parameter (high accuracy) <Maximum feedrate
B>, the message << Feedrate error>> appears.
The high-accuracy mode B cannot use the machine parameter (system 1) <X- to Z-axes max.
cutting feedrates > and the user parameter (switch 1) <Max. actual cutting travel speed>.

3.7 Notes in Smooth Path Offset Function


• The smooth path offset function works only when the user parameter (high accuracy)
<Smooth path offset function> is “Valid”.
• The block stop position in single operation differs from the program command position.
• Mode change is unavailable.
• Dry run change is unavailable.
• No block during cutting by the smooth path offset function can be specified in a program
restart block. If specified, the message <<Program restart error>> appears.
• If the <Smooth path offset cancel angle> set in the user parameters (high precision) is too
large, a <<Curve speed error>> may occur.

3.8 Additional Axis Travel Command


When a travel command is issued on the additional axis in high accuracy mode B, make sure to
check the setting beforehand for <High accuracy B additional axes> in the machine parameter
(high accuracy).

When set to <1: Valid>, the additional axis travel operates in high accuracy mode B.

When set to <0: Invalid>, the additional axis travel does not operate in high accuracy mode B.
• If a travel command is issued only for the additional axis, then high accuracy mode B is
temporarily canceled only during that command. 13
• The feed axis and the additional axis cannot move at the same time during the cutting feed.
When issuing a travel command on the additional axis in high accuracy mode B, contact the index
manufacturer and set the appropriate value in the machine parameter before using it.

2019/09/02 13 - 2 - 5 eCOM3NCPR13-2
Chapter 13 High-accuracy Mode

4 Explanations on Parameters
(High-accuracy mode B)
Parameter name Contents Setting range
Corner deceleration Used for automatic corner deceleration function. 0, 10-9999
override Automatic corner deceleration is performed at 100 based on the (%)
machine's unique deceleration rate. When a value larger than 100 is set,
the deceleration rate is smaller, making machining time shorter. When
a value smaller than 100 is set, the deceleration rate is larger, resulting
in more accurate machining. In addition, when 0 is set, automatic
corner deceleration is not performed.
This parameter is disabled when the smooth override type is set to <1:
Type 2>.
Arc deceleration Used for automatic arc deceleration. 0, 10-9999
override When 100 is set, automatic arc deceleration is performed based on the (%)
machine's unique deceleration rate. When a value larger than 100 is set,
the deceleration rate is smaller, making machining time shorter. When
a value smaller than 100 is set, the deceleration rate is larger, resulting
in more accurate machining. In addition, when 0 is set, automatic arc
deceleration is not performed.
Curve approximation Used for automatic curve approximation deceleration. 0, 10-9999
deceleration override When 100 is set, automatic curve approximation deceleration is (%)
performed based on the machine's unique deceleration rate. When a
value larger than 100 is set, the deceleration rate is smaller, making
machining time shorter. When a value smaller than 100 is set, the
deceleration rate is larger, resulting in more accurate machining. In
addition, when 0 is set, automatic curve approximation deceleration is
not performed.
Smooth path offset Used when <Smooth path offset function> (described later) is set to 1-5
level <Valid>.
The larger the value is, the smoother the path becomes.
Smooth override Used machine parameter (high accuracy) <High accuracy B cutting 100-9999
feed time constant> at a value of 100. (%)
If the value is larger than 100, the path becomes smoother.
Minute block deletion If the travel distance of one block is less than the parameter value, the 0-2.000
distance block is deleted. (mm)
If <Smooth path offset function> is set to <Valid>, it is executed at a
programmed point after path approximation.
Smooth override type Change the smooth override type. 0-1
<0: Type 1>
Even if the smooth override setting is changed, the speed difference
that is permitted between blocks does not change.
<1: Type 2>
The speed difference that is permitted between blocks is equal to:
machine parameter (high accuracy) “speed difference” × “smooth
override value”/100.
When type 2 is selected, increasing the set value for the smooth
override makes it more difficult to decelerate at corners. Therefore, the
machining time can be reduced.

13

2019/09/02 13 - 2 - 6 eCOM3NCPR13-2
Chapter 13 High-accuracy Mode

(High-accuracy common)
Parameter name Contents Setting range
Smooth path offset The <Valid/invalid> of the <Smooth path offset function> is set. 0-1
function
Smooth path offset This is used when the <Smooth path offset function> is set <Valid>. 0-99.999
cancel distance If the travel distance of one block is longer than the set value, the (mm)
smooth path offset is cancelled.
If the set value is too large, it may deviate significantly from the
program path. Be careful when changing the value.
Smooth path offset This is used when the <Smooth path offset function> is set <Valid>. 0-120.000
cancel angle If the angle difference between blocks is larger than the set value, the (°)
smooth path offset is cancelled.
If the set value is too large, it may deviate significantly from the
program path. Be careful when changing the value.
Smooth path offset This is used when the <Smooth path offset function> is set <Valid>. 0-9.999
angle determination The smooth path offset is not cancelled even if the block where the (mm)
invalid distance smooth path offset is cancelled for decision of the <Smooth path offset
cancel angle> is less than the value set for a travel distance of one
block.
Smooth path offset Use when <Smooth path offset function> is set to <Valid>. 0-9.999
reference length If the travel distance of one block is longer than the set value, the path (mm)
is offset using the set value.
Minute block deletion Used when the <Smooth path offset function> is set to <Valid>. 0~1
when smooth path When this parameter is set to <1: Enabled>, depending on the settings
offset is cancelled for <Smooth path offset cancel distance> and the <Smooth path offset
cancel angle>, the <Minute block deletion distance> applies the
deletion even if the smooth path offset is cancelled for the block.
(Note) Update the software version to W*10.*** or later in
order to change the parameter setting to <1:
Enabled>.
Accuracy level method Set the deceleration method when the accuracy level is specified in 0~1
high accuracy mode A.

13

2019/09/02 13 - 2 - 7 eCOM3NCPR13-2
Chapter 13 High-accuracy Mode

(This page was intentionally left blank.)

13

2019/09/02 13 - 2 - 8 eCOM3NCPR13-2
Chapter 13 High Accuracy Mode

CHAPTER 13 (3)

QUICK SETTING FOR HIGH


ACCURACY MODE

1 Overview
2 High Accuracy (Adjustment) Function
3 High Accuracy (Accuracy Specification) Function
4 Mode Selection Using Program Command
5 Check Current Mode

13

2019/09/02 13 - 3 - 1 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

1 Overview
The quick setting function for high accuracy mode streamlines the steps required for adjusting
parameters in order to access and use high accuracy mode quickly.
There are two functions available: the “High accuracy (adjustment) function” for selecting the
desired function from the graph on the screen and “High accuracy (accuracy specification)
function” for directly specifying the accuracy level.
Use the desired mode to support the machining content.

This function is available on the following machine models.


Model S300X2/S500X2/S700X2
R450X2/R650X2
M200X3/M300X3
The function can also be used on the following models if the software version is
W*0*.08.010 or later.
S500X1/S500X1N

2 High Accuracy (Adjustment)


Function
The user can use the high accuracy (adjustment) function to browse from 6 available machining
modes and select the one that best fits the machining content, for example, the user can select an
option that focuses on machining accuracy or on the smoothness of the machining surface.

Machining mode Description


Standard Standard setting that balances accuracy and smoothness
Rough Setting with shorter machining time
Medium rough Setting between rough and finishing
Medium rough S Setting focused on machining surface quality
Finishing Setting focused on true accuracy for program command
Finishing S Setting focused on machining surface quality and true accuracy of program
commands, machining time is longer

The shape accuracy refers to the margin of error on the inner turning that occurs during linear
interpolation and circular interpolation as shown in the diagram below.
■ Linear interpolation ■ Circular interpolation
Margin of
Margin of error on Program path
error on inner
inner turning Actual path
turning

The user can add up to 3 machining modes that can be customized in addition to the 6 modes
noted above.
Machining mode Description
Adjustment A Machining mode A set by customer
13 Adjustment B Machining mode B set by customer
Adjustment C Machining mode C set by customer

2019/09/02 13 - 3 - 2 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

2.1 Usage
This section provides a description on using the high accuracy (adjustment) function.
There are 6 basic machining modes for the high accuracy (adjustment) function, and there are an
additional 2 modes (machining mode adjustment) that the user can customize based on the basic
modes.

2.1.1 Machining mode


1. Open the <High accuracy (Adjustment)> screen in the user parameter (high accuracy).

2. Enter the desired machining mode number for <Machining mode>, and press the [ENT] key.
The machining mode that is set is displayed in the green box on the graph on the bottom of the
screen.
e.g.) When <1. Std > is set for the <Machining mode>

3. Press the [F0] (Completion mode) key to complete and exit the editing. After pressing the
[RST] key, the setting appears. 13

2019/09/02 13 - 3 - 3 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

2.1.2 Machining mode adjustment


After setting <7. Adjust. A>, <8. Adjust. B> and <9. Adjust. C> for the machining mode, the user
can add the customized machining modes, which are based on the 6 basic modes already available,
i.e. <1. Std.> and <2: Rough>.

The following procedure is a description when adding <7. Adjust. A>.


The procedures for adding <8. Adjust. B> and <9. Adjust. C> are the same.
1. Use [F0] to open the <High accuracy (Adjustment)> screen in the user parameter (high
accuracy).

2. Enter <7. Adjust. A> for the <Machining mode>, and press the [ENT] key.

13

2019/09/02 13 - 3 - 4 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

3. Enter the mode number to set the <Standard mode>, and press the [ENT] key. <7. Adjust. A>
is displayed inside a box on the graph on the bottom of the screen. The fields <Accuracy> and
<Smoothness> will no longer be grayed out.

e.g.) When <6. Finishing S> is set for the <Standard mode>

4. Set the accuracy level for the standard mode that is set in <Accuracy>. The accuracy refers to
the vertical axis on the graph on the bottom of the screen. The higher the value is, the more
accurate (increase) the machining becomes. The smaller the value is, the faster (decrease) the
machining becomes. The accuracy can be adjusted to 5 levels in the positive and negative
directions for the standard mode.
If the <Accuracy> is changed, the display on the axis changes only for the increment set for
the standard mode (<Adjust. A>) on the bottom of the screen.

e.g.) When <6. Finishing S> is set for the <Standard mode>, and <-2> is set for <Accuracy>

13

2019/09/02 13 - 3 - 5 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

5. Set the smoothness level on the machining surface for the standard mode that is set in
<Smoothness>. The smoothness level is displayed in the light blue gauge. The higher the
value is, the smoother the machining surface becomes.
The smoothness level can be adjusted to 5 levels in the positive and negative directions for the
standard mode (When <2. Rough> is set for the standard mode, the <Smoothness> becomes
+5.) The adjusted value is displayed in the parentheses above the gauge.

e.g.) When <6. Finishing S> is set for the <Standard mode>, and <-2> is set for <Accuracy>
and <3> is set for smoothness

6. Press the [F0] (Completion mode) key to complete and exit the editing. After pressing the
[RST] key, the setting appears.

(Note) The position and the gauge on the graph from <7. Adjust. A> to <9.
Adjust. C> show the relationship with the standard mode. When
comparing with a mode that is not the standard mode, the position on
the graph and the relationship with the gauge may be different from
the actual machining results.

13

2019/09/02 13 - 3 - 6 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

2.2 Restrictions
• Depending on the machining mode, the alarm <<The high-accuracy B is being executed>>
may trigger and switching the dry run may be unavailable during cutting travel.
• Depending on the machining mode, if cutting travel is carried out in single operation mode,
the operation message <<Command interrupted in high-accuracy mode B>> may appear.
• Depending on the machining mode, the feed axis and the additional axis cannot be moved at
the same time.
• M96 (interrupt type macro) cannot be used.
• When using a feedrate faster than 20,000 mm/min and the machining mode is changed, the
alarm <<Feedrate error>> may trigger.
• When equipped with the option: high accuracy B/smooth path offset, the cycle time may
become shorter and the machining surface may change slightly.
• The following restrictions apply when the smooth path offset function is enabled. Refer to
“Chapter 13 (1) High accuracy mode A“ and “Chapter 13 (2) High accuracy mode B“ for
further details on the smooth path offset function.
1. Block stop position in single operation mode is different from the program command
position.
The mode cannot be changed.
2. The dry run cannot be changed.
3. A block that is cutting with the smooth path offset function cannot be specified as a block
for resuming or restarting the program. If it is specified, the alarm <<Program restart
error>> is triggered.
4. If the user parameter (high accuracy) <Smooth path offset cancel angle> is set too large,
the alarm <<Curve speed error>> may be triggered.
5. The user parameter (high accuracy) <Minute block deletion distance> does not apply to
blocks where the smooth path offset function has been cancelled.

(Note) When a function command is accidentally issued even though it is not


available in the selected machining mode, the alarm <<Invalid
command in machining mode>> is triggered.

13

2019/09/02 13 - 3 - 7 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

3 High Accuracy (Accuracy


Specification) Function
When using the user parameter (high accuracy) <Accuracy spec. mode>, the machining
automatically decelerates so that if a margin of error on inner turning, between the actual path and
the programmed path, occurs when performing linear or circular interpolation, the difference
becomes less than the value specified in the <Accuracy level>, as shown in the diagram below.

■ Linear interpolation ■ Circular interpolation

Margin of Program path


error on
Margin of inner
Actual path
error on
inner

There are 3 accuracy specification modes, and the default factory settings are as follows.
The set value is a guide and cannot always be guaranteed to fall within the tolerance.

Accuracy specification mode Description


Accuracy spec. A Rough
Accuracy spec. B Medium rough
Accuracy spec. C Finishing

3.1 Usage
The following description is a setting procedure for <1. Accuracy spec. A>.
The setting procedures for <2. Accuracy spec. B> and <3. Accuracy spec. C> are the same.
1. Open the <High accuracy (Accuracy spec.)> screen in the user parameter (high accuracy).

13

2019/09/02 13 - 3 - 8 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

2. Enter <1. Accuracy spec. A> for the <Accuracy spec. mode>, and press the [ENT] key. The
<Accuracy spec. A> is the mode for rough machining in the default factory settings. To adjust
the accuracy and machining time, change the accuracy level and the smoothness in steps (3)
and (4).

3. Enter the target accuracy in units (setting units depends on the user parameter (switch 1)
<Machine unit system>) of mm for the <Accuracy level>, and press the [ENT] key.
4. Set the smoothness level in <Smoothness>. The higher the value is, the smoother the
machining surface becomes.
5. Press the [F0] (Completion mode) key to complete and exit the editing. After pressing the
[RST] key, the setting appears.

3.2 Restrictions
• The feed axis and the additional axis cannot be moved at the same time while in accuracy
specification mode.
• When equipped with the option: high accuracy B/smooth path offset, the cycle time may
become shorter and the machining surface may change slightly.
• M96 (interrupt type macro) cannot be used.
• The following restrictions apply when the smooth path offset function is enabled. Refer to
“Chapter 13 (1) High accuracy mode A“ and “Chapter 13 (2) High accuracy mode B“ for
further details on the smooth path offset function.
1. Block stop position in single operation mode is different from the program command
position.
2. The mode cannot be changed.
3. The dry run cannot be changed.
4. A block that is cutting with the smooth path offset function cannot be specified as a block
for resuming or restarting the program. If it is specified, the alarm <<Program restart
error>> is triggered.
5. If the user parameter (high accuracy) <Smooth path offset cancel angle> is set too large,
the alarm <<Curve speed error>> may be triggered.
6. The user parameter (high accuracy) <Minute block deletion distance> does not apply to
blocks where the smooth path offset function has been cancelled.

(Note) When a function command is accidentally issued even though it is not 13


available during accuracy specification mode, the alarm <<Invalid
command in accuracy specification mode>> is triggered.

2019/09/02 13 - 3 - 9 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

4 Mode Selection Using Program


Command
Issue an M298 command in memory operation to set the machining mode or the accuracy
specification mode.

Command format M298 L

Issue a machining mode or an accuracy specification mode command by using the numerical
values that come after the “L” (Refer to the table below).
L0 (OFF) is the setting to not use the high accuracy mode. The same is true when the user
parameter (high accuracy) <Machining mode> and <Accuracy spec. mode> are both <0>.

L0 OFF
L1 Standard
L2 Rough
L3 Medium rough
L4 Medium rough S
L5 Finishing
L6 Finishing S
L7 Adjustment A
L8 Adjustment B
L9 Adjustment C
L21 Accuracy spec. A
L22 Accuracy spec. B
L23 Accuracy spec. C

(Note) If a command is issued when high accuracy mode A/B is ON, the alarm
<<Unavailable modal for machining mode specification>> is triggered and
operation stops.

Issuing an M299 command can cancel the machining mode that was initiated by the command
M298.

Command format M299

The M298 command is canceled regardless of the following operations.


• If the power is turned ON
• If the [RST] key is pressed
• If an operation resets the memory operation such as pressing the [Z.RTN] key in manual
operation mode
• If end of program (M02, M30) is executed

13

2019/09/02 13 - 3 - 10 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

The following is an example of a program when <1. Std.> is set for <Machining mode> in the user
parameter (high accuracy).

(Program example)
G00 X0 Y0 Z0;
;
G01 X20. Y30. Z50.; <Std. >machining mode
X40. Y20. Z30.;
;
M260; High accuracy mode A (Level 1) ON
G01 X20. Y30. Z50.;
X40. Y20. Z30.;
M269;
;
M298 L5; <Finishing> machining mode ON
G01 X20. Y30. Z50.;
X40. Y20. Z30.; <Finishing> machining mode OFF
M299;
;
G01 X20. Y30. Z50.; <Std.> machining mode
X40. Y20. Z30.;
;
M30;

13

2019/09/02 13 - 3 - 11 eCOM3NCPR13-3
Chapter 13 High Accuracy Mode

5 Check Current Mode


The current status of the high accuracy mode can be checked on the <Modal info 2> screen.

Status Description
OFF High accuracy mode is not be used.
Standard The machine is operating in <Standard> machine mode.
Rough The machine is operating in <Rough> machine mode.
Medium rough The machine is operating in <Medium rough> machine mode.
Medium rough S The machine is operating in <Medium rough S> machine mode.
Finishing The machine is operating in <Finishing> machine mode.
Finishing S The machine is operating in <Finishing S> machine mode.
Adjustment A The machine is operating in <Adjust. A> machine mode.
Adjustment B The machine is operating in <Adjust. B> machine mode.
Adjustment C The machine is operating in <Adjust. C> machine mode.
Accuracy spec. A The machine is operating in accuracy specification mode: <Accuracy spec. A>.
Accuracy spec. B The machine is operating in accuracy specification mode: <Accuracy spec. B>.
Accuracy spec. C The machine is operating in accuracy specification mode: <Accuracy spec. C>.
M260 to M267 The machine is operating in high accuracy mode A.
M280 to M287 The machine is operating in high accuracy mode B.

13

2019/09/02 13 - 3 - 12 eCOM3NCPR13-3
(This page was intentionally left blank.)
©2012-2019 BROTHER INDUSTRIES, LTD.
All Rights Reserved.
Printed in Japan.
This is the original instructions.

693716001
1908(15)

eCOM3NCPROKU

You might also like