0% found this document useful (0 votes)
11 views

A00 NC Programming Manual

Brother Drill Tap Center operator Manual and Maintenance Manual

Uploaded by

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

A00 NC Programming Manual

Brother Drill Tap Center operator Manual and Maintenance Manual

Uploaded by

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

TC-31A/31AN/22A/S2A

32A/R2A/20A/S2B Title

TC-31A
TC-31AN
TC-22A
TC-S2A
TC-32A
TC-R2A
TC-20A
TC-S2B

NC-PROGRAMMING
MANUAL

Please read this manual carefully before starting operation.

2007/05/23 1 eTCOMNCPRT
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Title

This manual describes the NC-Programming of the TC-31A, TC-31AN, TC-22A, TC-S2A,
TC-32A, TC-R2A, TC-20A and TC-S2B.
(The description of TC-31AN is same as that of TC-31A.)
The tapping centre is able to perform drilling, tapping, and facing.
We shall not bear any responsibility for accidents caused by user's special handling or handling
deviating from the generally recognized safe operation.

The relation between the manuals is as follows.


- OPERATION MANUAL
This manual describes the operations of the machine.

- INSTALLATION MANUAL
This manual describes the installation of the machine.

- PROGRAMMING MANUAL
This manual describes the programming of the machine.

Keep this manual for future reference.


Please include this manual when reselling this product.
When this manual or labels are lost or damaged, please replace them (charged) from your nearest
agency.

2007/05/23 2 eTCOMNCPRT
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Title

INTRODUCTION
Congratulations on your purchase of the Brother CNC tapping center. Correct usage of
the machine is of most importance to assure the expected machine capabilities and
functions as well as operator's safety.
Read this Manual thoroughly before starting operation.

* All rights reserved: No part of this manual may be reproduced, stored in a retrieval system,
or transmitted in any form without prior permission of the manufacturer.
* The contents of this Manual are subject to change without notice.
* This manual are complied with utmost care. If you encounter any question or doubt,
please contact your local dealer.
(c) Copyrigt 1997-2007 BROTHER INDUSTRIES,LTD. Machinery & Solution Company.
ALL RIGHTS RESERVED.

2007/05/23 3 eTCOMNCPRT
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Title

HOW TO USE THE MANUAL

This Instruction Manual consists of the following elements:


(1) General description Is an outline of the description given in the section.
(2) Alarm Is a alert given against a danger which may cause serious
damage or death to human being or may damage the machine.
The hazards are explained in this order:
degree of danger,
subject of danger,
expected damage,
preventive measure,
(3) Operation procedure Is a procedure of activating a function.
(4) Screen Is given to describe important points of a procedure given.
NOTE: This screen is only a representation of the information
displayed on the actual screen and therefore differs somewhat
from the actual screen layout and screen fonts.
(5) Illustration Is a sketch, figure, view, etc. indicating dimensions, position or
zone, given in the points where it is necessary to provide
complementary information to the text description.

(2) Alarm (3) Operation procedure


(1) General description

1.3 Precautions of first 1.3.1Before starting


operation
Before starting operation careful to read bellow.

WARNING
(1)Turn off the main power breaker handle on
Dropping a heavy object onto the control box door. Never touch the primary side
power source or the terminal of the main power
your foot may fracture your foot breaker, as these have high voltage applied.
bones. (2)Put up a signboard which says' Under Maintenance
When lifting heavy objects, (3)Never allow people to approach the machine,
particularly moving areas.
wear safety shoes. (4)Do not place any unnecessary object around the
machine.
(5)Wear a helmet and safety shoes.

1 - 2 1 - 3

(5) Illustration (4) Screen

2007/05/23 4 eTCOMNCPRT
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Contents

Chapter 1 Program Composition ---------------- 1-1


1.1 Types and composition of program --------------------------------------- 1-2
1.2 Composition of block -------------------------------------------------------- 1-2
1.3 Composition of word ------------------------------------------------------- 1-3
1.4 Numerical values -------------------------------------------------------------- 1-3
1.5 Sequence number ------------------------------------------------------------- 1-4
1.6 Optional block skip --------------------------------------------------------- 1-4
1.7 Control out/in function ------------------------------------------------------ 1-5

Chapter 2 Coordinate Command ---------------- 2-1


2.1 Coordinate system and coordinate value ------------------------------ 2-2
2.2 Machine zero point and machine coordinate system -------------- 2-3
2.3 Working coordinate system ------------------------------------------------ 2-3

Chapter 3 Preparation Function ----------------- 3-1


3.1 Outline of G code --------------------------------------------------------- 3-2
3.2 Positioning (G00) -------------------------------------------------------------- 3-7
3.3 Linear interpolation (G01) -------------------------------------------------- 3-7
3.3.1 Chamfering to desired angle and cornering C ---------------------------------------------- 3-9

3.4 Circular / helical interpolation (G02, G03) ----------------------------- 3-12


3.4.1 Circular interpolation ------------------------------------------------------------------------ 3-12

3.4.1.1 XY Circular interpolation -------------------------------------------------------------- 3-12

3.4.1.2 XZ Circular interpolation -------------------------------------------------------------- 3-13

3.4.1.3 YZ Circular interpolation -------------------------------------------------------------- 3-14

3.4.2 Helical interpolation -------------------------------------------------------------------------- 3-18

3.5 Dwell (G04) --------------------------------------------------------------------- 3-18


3.6 Exact stop check (G09, G61, G64) ------------------------------------- 3-19
3.7 Programmable data input (G10) ----------------------------------------- 3-22
3.8 Soft limit ----------------------------------------------------------------------- 3-25
3.8.1 Stroke ------------------------------------------------------------------------------------------- 3-25

3.8.2 Stroke limit ------------------------------------------------------------------------------------- 3-25

3.8.3 Programmable stroke limit (G22) --------------------------------------------------------- 3-26

3.9 Return to the reference point (G28) ------------------------------------- 3-27


3.10 Return from the reference point (G29) --------------------------------- 3-28

2004-5-18 1 eTCOMNCPRC
TC-31A/31AN/22A/S2A
Contents 32A/R2A/20A/S2B

3.11 Return to the 2nd/3rd/4th reference point (G30) --------------------- 3-28


3.12 Selection of machine coordinate system (G53) ------------------------- 3-29
3.13 Selection of working coordinate system (G54~G59) ----------------- 3-29
3.14 Additional working coordinate system selection (G54.1) -------------- 3-29
3.15 Coordinate rotation function (G68,G69) ---------------------------------- 3-30
3.16 Coordinate rotation using measured results (G168) -------------------- 3-31
3.17 Absolute command and incremental command (G90, G91) ---------- 3-31
3.18 Change of working coordinate system (G92) -------------------------- 3-33
3.19 Measurement feed (G131,G132) ------------------------------------------- 3-35
3.20 Change of tap twisting direction (G133,G134) ------------------------- 3-36
3.21 Local coordinate system function (G52) ------------------------------------ 3-36
3.22 Single direction positioning function(G60) --------------------------------- 3-37
3.23 G code priority --------------------------------------------------------------- 3-38

Chapter 4
Preparation Function (tool offset function)-- 4-1
4.1 Tool Dia Offset (G40,G41,G42) ----------------------------------------- 4-2
4.1.1 Tool dia offset function ------------------------------------------------------------------ 4-2
4.1.1.1 Tool dia fine compensation -------------------------------------------------------- 4-2
4.1.2 Cancel Mode --------------------------------------------------------------------------------- 4-3
4.1.3 Start -up ---------------------------------------------------------------------------------------- 4-4
4.1.3.1 Inside cutting ( 4-4
4.1.3.2 Outside cutting ( )---------------------------------------------- 4-5
4.1.3.3 Outside cutting ( ) -------------------------------------------------------- 4-6
4.1.4 Offset Mode ----------------------------------------------------------------------------------- 4-7
4.1.4.1 Inside cutting ( ) ----------------------------------------------------------- 4-7
4.1.4.2 Outside cutting ( ) ---------------------------------------------- 4-9
4.1.4.3 Outside cutting ------------------------------------------------------------------------- 4-10
4.1.4.4 Exceptional case ------------------------------------------------------------------------ 4-11
4.1.5 Offset Cancel ---------------------------------------------------------------------------------- 4-12
4.1.5.1 Inside cutting ( ) ----------------------------------------------------------- 4-12
4.1.5.2 Outside cutting ( ) ---------------------------------------------- 4-13
4.1.5.3 Outside cutting ( ) --------------------------------------------------------- 4-14
4.1.6 G40 single command -------------------------------------------------------------------------- 4-15
4.1.7 Change of offset direction in offset mode -------------------------------------------------- 4-16
4.1.8 Change of offset direction in offset mode -------------------------------------------------- 4-17

2004-5-18 2 eTCOMNCPRC
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Contents

4.1.8.1 When there is a cross point --------------------------------------------------------- 4-17


4.1.8.2 When there is no cross point ------------------------------------------------------- 4-18
4.1.8.3 When offset path becomes more than a circle ----------------------------------- 4-19
4.1.9 G cord command for tool dia offset in offset mode ---------------------------------- 4-20
4.1.10 Notes on tool dia offset ------------------------------------------------------------------ 4-21
4.1.11 Override function related to tool dia offset ------------------------------------------- 4-27
4.1.11.1 Automatic corner override ------------------------------------------------------------ 4-27
4.1.11.2 Override of the inside circular cutting ------------------------------------------- 4-28
4.2 Tool length offset (G43,G44,G49) --------------------------------------- 4-29
4.2.1 Tool length fine offset ------------------------------------------------------------------ 4-30

Chapter 5
Preparation Function (canned cycle) ---------- 5-1
5.1 List of canned cycle function ---------------------------------------------- 5-2
5.2 Basic motions in canned cycle -------------------------------------------- 5-4
5.3 General description of canned cycle ------------------------------------- 5-5
5.3.1 Command related to canned cycle motions ----------------------------------------- 5-5
5.3.2 Setting of data in absolute / incremental command ------------------------------- 5-5
5.3.3 Types of return point (G98,G99) -------------------------------------------------------- 5-6
5.3.4 Canned cycle motion conditions -------------------------------------------------------- 5-6
5.3.5 Machining data of canned cycle ------------------------------------------------------- 5-7
5.3.6 Repeat number of canned cycle -------------------------------------------------------- 5-8
5.4 Details of Canned Cycle ---------------------------------------------------- 5-9
5.4.1 High-speed peck drilling cycle (G73) ------------------------------------------------ 5-9
5.4.2 Reverce tapping cycle (G74) ------------------------------------------------------------- 5-10
5.4.3 Fine boring cycle (G76) ------------------------------------------------------------------- 5-11
5.4.4 Tapping cycle (G77) ----------------------------------------------------------------------- 5-12
5.4.5 Reverse tapping cycle (synchro mode) (G78) ---------------------------------------- 5-13
5.4.6 Drilling cycle (G81,G82) -------------------------------------------------------------------- 5-14
5.4.7 Peck drilling cycle (G83) ------------------------------------------------------------------ 5-16
5.4.8 Tapping cycle (G84) ------------------------------------------------------------------------ 5-17
5.4.9 Boring cycle (G85,G89) --------------------------------------------------------------------- 5-18
5.4.10 Boring cycle (G86) ------------------------------------------------------------------------- 5-19
5.4.11 Back boring cycle (G87) ----------------------------------------------------------------- 5-21
5.4.12 High speed peck drilling cycle (G173) ------------------------------------------------ 5-22
5.4.13 End mill tap cycle (G177) ----------------------------------------------------------------- 5-23
5.4.14 End mill tap cycle (G178) --------------------------------------------------------------- 5-24

2004-5-18 3 eTCOMNCPRC
TC-31A/31AN/22A/S2A
Contents 32A/R2A/20A/S2B

5.4.15 Double drilling cycle (G181,G182) ------------------------------------------------------ 5-25


5.4.16 Peck drilling cycle (G183) --------------------------------------------------------------- 5-26
5.4.17 Double boring cycle (G185,G189) -------------------------------------------------------- 5-27
5.4.18 Double boring cycle (G186) ------------------------------------------------------------- 5-28
5.4.19 Canned cycle of reducing step -------------------------------------------------------- 5-29
5.4.20 Canned cycle cancel (G80) ------------------------------------------------------------- 5-35
5.4.21 Notes on canned cycle ------------------------------------------------------------------- 5-36
5.5 Canned cycle for tool change (non-stop ATC)(G100) ------------------ 5-37

Chapter 6
Preparation Function (coordinate calculation) 6-1
6.1 List of coordinate calculation function --------------------------------------- 6-2
6.2 Coordinate calculation parameter --------------------------------------------- 6-2
6.3 Details of coordinate calculation function -------------------------------- 6-3
6.3.1 Bolt hole circle -------------------------------------------------------------------------------- 6-3
6.3.2 Linear (angle) --------------------------------------------------------------------------------- 6-4
6.3.3 Linear (X,Y) ----------------------------------------------------------------------------------- 6-4
6.3.4 Grid ---------------------------------------------------------------------------------------------- 6-5
6.4 Usage of coordinate calculation function --------------------------------- 6-6

Chapter 7 Macro -------------------------------------- 7-1


7.1 What is a Macro? --------------------------------------------------------------- 7-2
7.2 Variable Function --------------------------------------------------------------- 7-3
7.2.1 Outline of variable function ------------------------------------------------------------------ 7-3
7.2.2 Expression of variable ------------------------------------------------------------------------ 7-3
7.2.3 Undefined variable ---------------------------------------------------------------------------- 7-4
7.2.4 Types of variables ----------------------------------------------------------------------------- 7-5
7.2.5 Variable display and setting ------------------------------------------------------------------ 7-6
7.2.6 Macro (system variable) ---------------------------------------------------------------------- 7-6
7.3 Calculation Function ------------------------------------------------------------ 7-11
7.3.1 Calculation type ------------------------------------------------------------------------------- 7-11
7.3.2 Calculation order ------------------------------------------------------------------------------ 7-12
7.3.3 Precautions for calculation ------------------------------------------------------------------- 7-12
7.4 Control Function ---------------------------------------------------------------- 7-13

2004-5-18 4 eTCOMNCPRC
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Contents

7.4.1 GOTO statement (unconditional branch) -------------------------------------------------- 7-13


7.4.2 IF statement (conditional branch) ----------------------------------------------------------- 7-14
7.4.3 WHILE statement (repetition) ---------------------------------------------------------------- 7-15
7.4.4 Precautions for control function ------------------------------------------------------------- 7-16
7.5 Call Function -------------------------------------------------------------------- 7-18
7.5.1 Simple call function --------------------------------------------------------------------------- 7-19
7.5.2 Modal call function --------------------------------------------------------------------------- 7-20
7.5.3 Argument for macro calls -------------------------------------------------------------------- 7-21
7.5.4 Difference between G65 and M98 --------------------------------------------------------- 7-23
7.5.5 Multiple nesting call ------------------------------------------------------------------------- 7-24

Chapter 8 Z axis measurement system ------- 8-1


8.1 Cautions -------------------------------------------------------------------------- 8-2
8.2 Setting---------------------------------------------------------------------------- 8-3
8.3 Z-axis thermal displacement offset ---------------------------------------- 8-6
8.3.1 Offset capacity ------------------------------------------------------------------------------- 8-6
8.3.2 For correct thermal displacement offset ---------------------------------------------- 8-7
8.3.3 Command --------------------------------------------------------------------------------------- 8-8
8.3.3.1 Determination of thermal measurement ------------------------------------------ 8-8
8.3.3.2 Thermal measurement operation ---------------------------------------------------- 8-9
8.3.4 Program examples ----------------------------------------------------------------------------- 8-10
8.3.5 Thermal measurement data screen -------------------------------------------------------- 8-11
8.3.6 Outputting thermal displacement measurement data to the computer ----------- 8-12
8.3.7 Example parameter setting and alarm -------------------------------------------------- 8-13
8.3.8 Example offset -------------------------------------------------------------------------------- 8-14
8.4 Tool breakage detection ------------------------------------------------------ 8-20
8.4.1 Determination of tool breakage detection ---------------------------------------------- 8-20
8.4.2 Progrram examples --------------------------------------------------------------------------- 8-21
8.5 Automatic tool length measurement ----------------------------------------- 8-23
8.5.1 Command --------------------------------------------------------------------------------------- 8-23
8.5.2 Operation --------------------------------------------------------------------------------------- 8-25

9.1 Before origin measurement -------------------------------------------------- 9-4


9.2 Setting of data on origin measurement -------------------------------- 9-4

2004-5-18 5 eTCOMNCPRC
TC-31A/31AN/22A/S2A
Contents 32A/R2A/20A/S2B

9.3 Operation of origin measurement ---------------------------------------- 9-8


9.3.1 Corner------------------------------------------------------------------------------------------- 9-8
9.3.2 Parallel ------------------------------------------------------------------------------------------ 9-12
9.3.3 Circle -------------------------------------------------------------------------------------------- 9-15
9.3.4 Z level ------------------------------------------------------------------------------------------ 9-19
9.3.5 Positioning to the measurement position ------------------------------------------ 9-19
9.4 Display of the measured results ------------------------------------------ 9-20
9.5 Lock key operations -------------------------------------------------------- 9-22

10.1 Making subprogram ---------------------------------------------------------- 10-2


10.2 Simple call --------------------------------------------------------------------- 10-3
10.3 Return No. designation from sub program --------------------------- 10-4
10.3.1 Command by sub program -------------------------------------------------------------- 10-4
10.3.2 Command by main program- ------------------------------------------------------------ 10-4

11 Feed function ------------------------------------------------------------------ 11-2

12.1 S function ---------------------------------------------------------------------- 12-2


12.2 T function --------------------------------------------------------------------- 12-2
12.2.1 Commanded by tool No. ------------------------------------------------------------------- 12-2
12.2.2 Commanding by pot No. (magazine No.) ------------------------------------------------ 12-2
12.2.3 Commanded by group No. ----------------------------------------------------------------- 12-2
12.3 M function --------------------------------------------------------------------- 12-4
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 Commands on the spindle (M03, M04, M05, M19, M111) ------------------------------ 12-10
12.3.4.1 Spindle orientation to desired angle (M19) ---------------------------------------- 12-10
12.3.5 M signal level output (M400~M409) ------------------------------------------------------ 12-10
12.3.6 Tool change (M06) -------------------------------------------------------------------------- 12-10
12.3.7 Workpiece counter specification (M211~M214) ---------------------------------------- 12-23
12.3.8 Workpiece counter cancel (M221~M224) ------------------------------------------------ 12-23

2004-5-18 6 eTCOMNCPRC
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Contents

12.3.8.1 Tool life counter ---------------------------------------------------------------------- 12-24


12.3.9 Automatic corner deceleration (M232, M233) ------------------------------------------- 12-24
12.3.10 M120 function ------------------------------------------------------------------------------ 12-24
12.3.11 Tool breakage detection (M200 and M201) --------------------------------------------- 12-24
12.3.12 Tap time constant selection (M241 to 250) --------------------------------------------- 12-24
12.3.13 Pallet related M codes (M410, M411, M430, and M431) ------------------------------ 12-26
12.3.14 Unclamping and clamping C axis (M440 and M441) ---------------------------------- 12-26
12.3.15 Unclamping and clamping B axis (M440 and M441) ---------------------------------- 12-26
12.3.16 Unclamping and clamping Aaxis (M442 and M443)----------------------------------- 12-26
12.3.17 One-shot output (M450, M451, M455, and M456) ------------------------------------- 12-27
12.3.18 Waiting until response is given (M460 to M469) -------------------------------------- 12-27

13.1 Memory capacity expansion ---------------------------------------------- 13-2


13.2 Programming precautions when using rotation axis (index table) --- 13-2

2004-5-18 7 eTCOMNCPRC
TC-31A/31AN/22A/S2A
Contents 32A/R2A/20A/S2B

(This page ia a blank.)

2004-5-18 8 eTCOMNCPRC
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Quick index

QUICK INDEX

Chpt. 1 PROGRAM COMPOSITION 1

Chpt. 2 COORDINATE COMMAND 2

Chpt. 3 PREPARATION FUNCTION 3

Chpt. 4 PREPARATION FUNCTION


(TOOL OFFSET FUNCTION) 4

Chpt. 5 PREPARATION FUNCTION


(CANNED CYCLE) 5

Chpt. 6 PREPARATION FUNCTION


(COORDINATE CALCULATION) 6

Chpt. 7 MACRO 7

Chpt. 8 Z AXIS MEASUREMENT SYSTEM 8

Chpt. 9 ORIGIN MEASUREMENT 9

Chpt.10 SUBPROGRAM FUNCTION 10

Chpt.11 FEED FUNCTION 11

Chpt.12 S,T,M FUNCTION 12

Chpt.13 OPTION 13

2004-5-18 1 eTCOMNCPRINDEX
TC-31A/31AN/22A/S2A
Quick index 32A/R2A/20A/S2B

2004-5-18 2 eTCOMNCPRINDEX
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 1 Program composition

CHAPTER 1

PROGRAM COMPOSITION

1.1 Types and composition of program


1.2 Composition of block
1.3 Composition of word
1.4 Numerical values
1.5 Sequence number
1.6 Optional block skip
1.7 Control out/in function

2004-5-18 1-1 eTCOMNCPR1-1


TC-31A/31AN/22A/S2A
Chapter 1 Program composition 32A/R2A/20A/S2B

1.1 Types and composition of program


The program is divided into the main program and the subprogram.

1 (1) Main program


The main program is for machining one workpiece. While the main program is in use,
a subprogram can be called to use the program more efficiently.
Command M02 (or M30) to finish the main program.

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

(2) Subprogram
A subprogram is used by calling it from the main program or other subprograms.
Command M99 to finish the subprogram.
Sub program
N0100 G91X10 ;
:
:
:
M99;

1.2 Composition of block


The program is composed of several commands. One command is called a block. A
block is composed of one or more words. One block is discriminated from another
block by an end of block code (EOB).
This manual expresses the end of block code by the symbol ";".

... ; N0001 G92X100 ; ... ; M02 ;

block block

(Note 1) The end of block code


ISO code : [LF] 0A(hexadecimal)
EIA code : [CR] 80(hexadecimal)
(Note 2) One block has maximum 128 characters.

2004-5-18 1-2 eTCOMNCPR1-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 1 Program composition

1.3 Compositiom of word


A word is composed of an address and some digit of figures as shown below.
(Algebraic sign + or - may added before a numerical value.)

1
X -1000

address numerical value

word

(Note 1) The address uses one of the alphabetical letters.


(Note 2) The address "O" can not be used except for comments.

1.4 Numerical values


(1) Decimal point programming
Numerical values can be input in the following two ways and set by the user
parameter (Switch 1).
Command type 1 (Standard)
Programmed Commanded Actual amount Actual amount
command axis (mm) (inch)

Feed axis 1mm 1inch


1
Rotation axis 1deg 1deg

Feed axis 1mm 1inch


1.
Rotation axis 1deg 1deg

Command type 2 (Minimum)


Programmed Commanded Actual amount Actual amount
command axis (mm) (inch)

Feed axis 0.001mm 0.0001inch


1
Rotation axis 0.001deg 0.001deg

Feed axis 1mm 1inch


1.
Rotation axis 1deg 1deg

(Note)User parameter : Refer to Instruction manual.

2004-5-18 1-3 eTCOMNCPR1-1


TC-31A/31AN/22A/S2A
Chapter 1 Program composition 32A/R2A/20A/S2B

(2) Programmable range of address


The maximum number of digits is 9.
The digits less than the minimum range are ignored.

1
1.5 Sequence number
A sequence number (1~9999) can be used following the address N for each block.
There are such functions as a sequence search and restart.

Command format N* * * *;

i) A sequence number is used following the address N.


ii) A sequence number can be specified with up to 4-digit number.

(Note 1) The sequence number "N0" should not be used.


(Note 2) It is used at the head of a block.
Ex.)
When a block has a slash (/) code at the head of block (the optional block skip
is commanded), a sequence number can be used either before or after it.
Ex.)
(Note 3)
The order of sequence numbers is arbitary and need not be
consecutive.
(Note 4)
The sequence number is recognized as numerical values. Therefore
such numerical values as 0001, 001, 01 and 1 are regarded as the
same number.

1.6 Optional block skip


When a block has a slash (/) code at the start and [BLOCK SKIP] key on the
operation panel is turned ON, all information in the block with the slash code is
ignored during the automatic operation.
If the [BLOCK SKIP] key is OFF, information in the block with the slash code is
effective.
That is, the block with a slash code can selectively be skipped.

..... ; / N0100 G00X100 ..... ; N0101 .....

Ignore these words

2004-5-18 1-4 eTCOMNCPR1-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 1 Program composition

(Note 1)
A slash (/) code must be put at the start of a block. If it is placed
elsewhere in the block, an alarm is generated.
This code can be also put right after a sequence number.
(Note 2) 1
In the sequence number search function, all the blocks with a slash
code can be searched regardless of the [BLOCK SKIP] key ON or OFF
status.
(Note 3) In the single block mode during automatic operation, when
the [BLOCK SKIP] key is ON the operation does not stop at a block with
a slash code, but stops at the next block.

1.7 Control out/in function


For a easier look at the program, comments can be inserted in the program.
The comment is discriminated from operation by "(" and ")" at the start and the
end.

( ............ )

control out code comment control in code

(Ex.)

(Note)
A comment including the control out and in codes should not be
longer than one block.

2004-5-18 1-5 eTCOMNCPR1-1


TC-31A/31AN/22A/S2A
Chapter 1 Program composition 32A/R2A/20A/S2B

(This page is a blank.)

2004-5-18 1-6 eTCOMNCPR1-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 2 Coordinate command

2
CHAPTER 2

COORDINATE COMMAND

2.1 Coordinate system and coordinate value


2.2 Machine zero point and machine coordinate
system
2.3 Working coordinate system

2004-5-18 2-1 eTCOMNCPR2-1


TC-31A/31AN/22A/S2A
Chapter 2 Coordinate command 32A/R2A/20A/S2B

2.1 Coordinate system and coordinate value


Coordinate values should be set in one coordinate system to specify a tool
movement.
There are two types of coordinate systems.
(i) Machine coordinate system
(ii) Working coordinate system
2 The coordinate values are expressed by each component of the program axes (X, Y
and Z for this unit).

Z
Y

Tool target position:


CommandedX20.Y10.Z15.;

15

10

X
0 20

2004-5-18 2-2 eTCOMNCPR2-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 2 Coordinate command

2.2 Machine zero point and machine coordinate


system
(1) Machine zero point
The machine zero point is the reference point on the machine.
(2) Machine coordinate system
The coordinate systen with the machine zero point as its reference point is called 2
the machine coordinate system. Each machine has its own coordinate system.

Machine zero point


X axis stroke (0,0,0)

-X

Y axis
stroke
table

-Y

2.3 Working coordinate system


The working coordinate system is used to specify a tool motion for each
workpiece.
A coordinate system previously set in the "Data Bank" is once selected,
programming
afterward can be easily done by specifying that coordinate system.
Each coordinate system is set by using an offset amount from the machine zero
point to the working zero position.
(Note) Data Bank : Refer to Instruction manual.

2004-5-18 2-3 eTCOMNCPR2-1


TC-31A/31AN/22A/S2A
Chapter 2 Coordinate command 32A/R2A/20A/S2B

(This page is a blank .)

2004-5-18 2-4 eTCOMNCPR2-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

CHAPTER 3
3

PREPARATION FUNCTION
3.1 Outline of G code
3.2 Positioning (G00)
3.3 Linear interpolation (G01)
3.4 Circular/helical interpolation (G02, G03)
3.5 Dwell (G04)
3.6 Exact stop check (G09, G61, G64)
3.7 Programmable data input (G10)
3.8 Soft limit
3.9 Return to the reference point (G28)
3.10 Return from the reference point (G29)
3.11 Return to the 2nd/3rd/4th reference point (G30)
3.12 Selection of machine coordinate system (G53)
3.13 Selection of working coordinate system (G54~G59)
3.14 Additional working coordinate system selection (G54.1)
3.15 Coordinate rotation function (G68,G69)
3.16 Coordinate rotation using measured results (G168)
3.17 Absolute command and incremental command (G90, G91)
3.18 Change of working coordinate system (G92)
3.19 Measurement feed(G131,G132)
3.20 Change of tap twisting direction (G133,G134)
3.21 Local coordinate system funcction (G52)
3.22 Single direction positioning funcction (G60)
3.23 G code priority

2004-5-18 3-1 eTCOMNCPR3-1


TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

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

The G code is effective until another G code in the same


Modal
group is commanded.

3 One-shot
The G code is effective only at the block in which it is
specified.

2004-5-18 3-2 TCOMNCPR


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

Group G cord Contents Modal


G00 * Positioning

G01 Linear interpolation

G02 Circular / helical interpolation (CW)


G03 Circular / helical interpolation (CCW)
Modal
G102 XZ Circular interpolation (CW)
G103 XZ Circular interpolation (CCW)
G202 YZ Circular interpolation (CW)
G203 YZ Circular interpolation (CCW)
G04 Dwell One-shot 3
G09 Exact stop check One-shot
G10 Programmable data input One-shot
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/3rd/4th reference point
G36 Coordinate calculation function (Bolt hole circle)

G37 Coordinate calculation function (Line-angle)


(Note1) One-shot
G38 Coordinate calculation function (Line-angle)

G39 Coordinate calculation function (Grid)

G40* Tool dia offset cancel

(Note2) G41 Tool dia offset left Modal


G42 Tool dia offset right
0303-2.tbl

The G codes with * mark indicade the modal status when the power is turned ON.
(Note1) Details of coodinate calculation functions are described in " Chapter 6 ".
(Note2) Details of tool dia offset are described in " Chapter 4 ".

2004-5-18 3-3 eTCOMNCPR3-1


TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

Group G code Contents Modal/ One-shot

G43 Tool length offset +

(Note1) G44 Tool length offset - Modal

G
G49* Tool length offset cancel

G52 Local coordinate system


One-shot
G53 Machine coordinate system selection

G54* Working coordinate system selection 1

G55 Working coordinate system selection 2

3 G56

G57
Working coordinate system selection 3

Working coordinate system selection 4 Modal

G58 Working coordinate system selection 5

G
G59 Working coordinate system selection 6

G54.1 Extended working coordinate system selection

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

G69* Coordinate rotation function cancel Modal

G168 Coordinate rotation using measured results

0304-2

The G codes with * mark indicade the modal status when the power is turned ON.
(Note1) Details of tool length offset are described in " Chapter 4 ".

2004-5-18 3-4 TCOMNCPR


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

Modal /
Group G cord Contents
one-shot

G90* Absolute command


Modal
G91 Incremental command

G92 Working coordinate system setting One-shot

G94 Feedrate per minute

G98* Return to the initial point level


Modal
G99 Return to the R point level
3
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)

G78 Canned cycle (Reverse tapping cycle, synchro mode)

G80* Canned cycle cancel

G81 Canned cycle (Drill, spot drilling cycle) Modal

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)

G87 Canned cycle (Back boring cycle)

G89 Canned cycle (Boring cycle)

TR2A/3042 TBL

2004-5-18 3-5 eTCOMNCPR3-1


TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

Modal/
Group G cord Contents
One-shot

G173 Canned cycle (High-speed peck drilling cycle) One-shot

G177 Canned cycle (End mill tap cycle)


Modal
G178 Canned cycle (End mill tap cycle)

G181 Canned cycle (Double drilling cycle)


Modal
G182 Canned cycle (Double drilling cycle)

G183 Canned cycle cancel (Peck drilling cycle) One-shot


3
G185 Canned cycle (Double boring cycle)

G186 Canned cycle (Double boring cycle) Modal

G189 Canned cycle (Double boring cycle)

G100 Non-stop Automatic Tool Change One-shot

MTR2A/3043 TBL

Modal /
Group G cord Contents
one-shot

G120 Positing to the measuring point One-shot

G121 Automatic measurement Corner (Boss)

G122 Automatic measurement Parallel(Groove)

G123 Automatic measurement Parallel(Boss)

G124 Automatic measurement Circle center(Hole,3 points)

One-shot
G125 Automatic measurement Circle center(Boss,3 points)

G126 Automatic measurement Circle center(Hole,4 points)

G127 Automatic measurement Circle center(Boss,4 points)

G128 Automatic measurement Z-axis height

G129 Automatic measurement Corner(Groove)

G31 Measurement feed

G131 Measurement feed One-shot

G132 Measurement feed

G133 Changeover of tap twisting direction (CW)


One-shot
G134 Changeover of tap twisting direction (CCW)

TR2A/3044 TBL

(Note)
Commands G120 to G129 are described in detail in " Option,
Automatic Measurement " in the operation manual.

2004-5-18 3-6 TCOMNCPR


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

3.2 Positioning (G00)


A tool moves from its current position to the end point at the rapid traverse rate in
each axis direction independently. Therefore, a tool path is not always a linear line.

Command fromat G00 X_Y_Z_A_B_C_ ;

When the additional axis is commanded and the optional additional axis is not
installed, an alarm will occur.
3
In the positioning mode actuated by the G00 code, the execution proceeds to the
next block after confirming the in-position check. (Note 1)

(Note 1)
In-position check is to confirm that the machine detecting position is
within the specified range around the target (end) point.
(This range is set by the machine parameter for each axis.)
(Note 2)
The rapid traverse rate is set by the machine parameter for each axis.
Accordingly, rapid traverse rate cannot be specified by the F
command.

3.3 Linear interpolation (G01)


Linear interpolation moves a tool linearly from the current position to the target
position at the specified feedrate.

Command fromat G01 X_Y_F_ ;

2004-5-18 3-7 eTCOMNCPR3-1


TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

Up to two of the X,Y,Z,A,B or C axes can be controlled simultaneously.


Linear interpolation can not be operated between the additional axes.
However, the X ,Y,and Z axes can be operated simultaneously.
When the additional axis is commanded and the optional additional axis is not
installed, an alarm will occur.
The feedrate is commanded by the address F. Once the feedrate is commanded, it is
effective until another value is specified.
When the X, Y, and Z axes are commanded, the feedrate is determined by the value
entered to mm / min.
When the additional axis is commanded, the feedrate is determined by the value
3 entered to °/min.

End
point

Start
point

(Note 1) Feedrate along each axis is as follows:

(Note2)

2004-5-18 3-8 TCOMNCPR


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

Feedrate along X axis

Feedrate along B axis

3
3.3.1 Chamfering to desired angle and
cornering C
Chamfering to the desired angle or rounding can be performed between
interpolation commands.

Chamfering

Command fromat G01 X_Y_, C_ ;

C : Distance from virtual corner to the chamfer start point and


end point.

Virtual Chamfer end point


corner
intersection
Chamfer start point
c

c
X

(1) The corner chamfering command block and subsequent block must contain
the interpolation command (G01-G03).
When the subsequent block does not contain an interpolation or movement
command, an alarm will occur.
(2) The inserted block belongs to the corner chamfering command block. Thus,
if the feed rate differs from the corner chamfering command block and the
subsequent block , the inserted block moves at the feed rate of the corner
chamfering command block. Further, the program does not stop before the
inserted block occurs even during single block operation. (It stops after the
inserted block occurs.)
(3) Tool diameter compensation applies to the configuration after corner
chamfering is performed.
(4) The corner chamfering command can be commanded only on the XY
(2-D)plane.
2004-5-18 3-9 eTCOMNCPR3-1
TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

(5) When the chamfering amount is longer than the chamfering command block
and feeding quantity of the subsequent block, set extended point from each
blocks as "chamfer start point" and "chamfer end point".
(But the path becomes abnormal in cutter compensation mode.
Do not specify a chamfering amount longer than travel amount in cutter
compensation mode.)
Example.1: Liner cutting
(4)

C
3 (7)
(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)
(6)
C
(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.

Cornering

Command fromat G01 X_Y_, R_ ;

R : Radius of cornering

2004-5-18 3 - 10 TCOMNCPR
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

Corner-R end point

R
3
Virtual corner
Corner-R start point intersection
X
(1) The cornering command block and the subsequent block must contain the
interpolation command (G01-G03).
When the subsequent block does not contain an interpolation or movement
command, an alarm will occur.
(2) The inserted block belongs to the cornering command block. Thus, if the
feed rate differs from the cornering command block and the subsequent
block , the inserted block moves at the feed rate of the cornering command
block. Further, the program does not stop before the inserted block occurs
even during single block operation. (It stops after the inserted block occurs.)
(3) Tool diameter compensation applies to the configuration after cornering is
performed.
(4) The corner-R command can be commanded only on the XY (2-D)plane.
(5) When the radius is longer than the corner R command block and the
subsequent command block, set extended point from each blocks as
"chamfer start point" and "chamfer end point".
(But the path becomes abnormal in cutter compensation mode. Do not
specify diameter longer than travel amount in cutter compensation mode.)

Example.1: Liner cutting

(7)
R
(4)

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

When set the programmed path to(1.2.3.4.)and the block R as (2), operate to
1-5-6-7-4.

2004-5-18 3 - 11 eTCOMNCPR3-1
TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

3.4 Circular/helical interpolation (G02, G03)


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

3.4.1.1 XY Circular interpolation

G02 X_ Y_ I_ J_ F_ ;
Command fromat
3 G03 R_

The commands are given in the following format:

G 02 Clockwise (CW).
Rotation direction
G 03 Counterclockwise (CCW).

G90 mode X,Y End point in the working coordinate system.

End Distance from the start point to the end point in the X
point X
direction.
G91 mode

Distance from the start point to the end point in the Y


Y
direction.

Distance from the start point to the center of arc in the X


I
direction.
Distance between start point
and arc center
Distance from the start point to the center of arc in the Y
J
direction.

Arc radius R Arc 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.

2004-5-18 3 - 12 TCOMNCPR
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

3.4.1.2 XZ Circular interpolation

G102 X_ Z_ I_ K_ F_ ;
Command fromat
G103 R_

The commands are given in the following format:

Rotation
G 102 Clockwise (CW).
3
direction
G 103 Counterclockwise (CCW).

G90 mode X,Z End point in the working coordinate system.

End
Distance from the start point to the end point in the X
point X
direction.
G91 mode
Distance from the start point to the end point in the Z
Z
direction.

Distance
Distance from the start point to the center of arc in the X
between I
direction.
start
point
and arc Distance from the start point to the center of arc in the Z
K
center direction.

Arc radius R Arc 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 1)
In contrast to the XY arc case, an error occurs when the diameter
compensation command (G40, G41, G42) or coordinate rotation
command (G68, G69, G168) is used, and the machine stops operation.

2004-5-18 3 - 13 eTCOMNCPR3-1
TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

3.4.1.3 YZ Circular interpolation

G202 Y_ Z_ J_ K_ F_ ;
Command fromat
G203 R_

The commands are given in the following format:

3 Rotation direction
G 202 Clockwise (CW).

G 203 Counterclockwise (CCW).

G90 mode Y,Z End point in the working coordinate system.

End Distance from the start point to the end point in the Y
Y
point direction.
G91 mode

Distance from the start point to the end point in the Z


Z
direction.

Distance from the start point to the center of arc in the Y


J
direction.
Distance between start point
and arc center
Distance from the start point to the center of arc in the Z
K
direction.

Arc radius R Arc 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 1)
In contrast to the XY arc case, an error occurs when the diameter
compensation command (G40, G41, G42) or coordinate rotation
command (G68, G69, G168) is used, and the machine stops operation.

2004-5-18 3 - 14 TCOMNCPR
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

The end point of the circular arc takes either the absolute value or the incremental
value according to G90 or G91. The incremental value commands the distance from
the circular arc start point to the end point.
The circular arc center is commanded by both I,J and K according to X,Y and Z axes.
I,J and K form a vector component when viewed from the circular arc start point to
the center.
It is commanded by the incremental value regardless of G90 or G91.

Absolute command;
3
G90G03XxYyIiJjFf;

Incremental command;
G91G03XxYyIiJjFf;

Insted of commanding I,J and K to specify the center of arc, the radius of arc can be
used.
There are two types of circular arcs (one is less than 180°and the other is more than
180°).
When commanding a circular arc of more than 180°, put the algebrac mark "-" before
the value for the radius.

(1) G02XxYyRr
(2) G02XxYyR-r

2004-5-18 3 - 15 eTCOMNCPR3-1
TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

Absolute command;
G03X-60. Y-10. I-50. J-20. F1000 ;
Incremental command;
G03X-30. Y30. I-50. J-20. F1000 ;

(1) G02X-70. Y-50. R25. F1000 ;


(2) G02X-70. Y-50. R-25. F1000 ;

2004-5-18 3 - 16 TCOMNCPR
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

(Note 1) When either I,J or K is omitted, it is regarded zero.


(Note 2) The circular arc, when its radius is zero, cannot be
commanded.
(Note 3) When both X,Y and Z are omitted, the end point and the start
point are regarded identical, and:
i) a 360°arc (full circle) is assumed to be commanded when the
arc center is programmed using the address I,J and K.
ii) When the address R is used, a circle of zero degree is
assumed and the tool does not move.
(Note 4) The address R and "I,J and K" cannot be commanded
simultaneously.
3
(Note 5) When the end point is not on the arc specified by start point
and arc radius, the tool moves as shown below.

Transition of radius

(Note 6) If the ending radius is extremel larger than that of the starting
radius, an alarm will occur.
(Note 7) The G36~G39 codes cannot be commanded in the circular arc
mode.

2004-5-18 3 - 17 eTCOMNCPR3-1
TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

(Note) Helical interpolation is optional function.


If helical interpolation is commanded without using the optional
function, an alarm is generated.

3.4.2 Helical interpolation


Putting the Z axis command in the circular arc block permits a helical cutting.

G02 X_ Y_ Z_ I_ J_ F_ ;
Command fromat
G03 R_
3
The F code commands the feedrate in the X-Y plane.

If the value of F is larger than the X,Y MAXIMUM CUTTING SPEED or the X, Y
MAXIMUN RAPID SPEED set by the machine parameter , an alarm is generated.

The feedrare in the Z axis direction is determined by the values of "feedrate" in the
X, Y axes direction, "end point X", "end point Y" and "end point Z". It can be
calculated as follows:

Z axis feedrate
Z travel distance
Radius(start point - center)
Angle
Commanded feedrate(XY axes)

If the Z axis feedrate is larger than the Z MAXIMUM CUTTING SPEED or Z


MAXIMUM RAPID SPEED set by the machine parameter , an alarm is generated.

When tool dia offset command is given, an offset is applied to the circular arc (XY
axes).

3.5 Dwell (G04)


Upon completion of the previous block and in-position check, some time elapses
before executing the next block.

2004-5-18 3 - 18 TCOMNCPR
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

Command fromat G04 P_ ;

or G04 X_ ;

P,X : Dwelling time (sec)

3.6 Exact stop check (G09, G61, G64)


Since acceleration and deceleration is applied independently to each axis, the actual
3
tool path comes inside the programmed path if each axis speed changes greatly
between the former block and the new block in the cutting feed.
The exact stop check is used to solve this problem.

2004-5-18 3 - 19 eTCOMNCPR3-1
TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

: Programmed path
3
: Actual tool path

(1) Exact stop check (G09)

Command fromat G09 ;

This command executes an in-position check at the end of a block before


proceeding to the next block.
(Note 1) G09 is effective only in the commanded block.
(Note 2) In the positioning mode (G00) the exact stop check function is
effective regardless of this command.

(2) Exact stop check mode (G61)

Command fromat G61 ;

After this command is given, the exact stop check function is effective at the end of
each block until the cutting mode (G64) is commanded.

2004-5-18 3 - 20 TCOMNCPR
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

(3) Cutting mode (G64)

Command fromat G64 ;

When this command is given, the execution proceeds to the next block without
slowing down between the continuing two blocks. This command is effective until
G61 is commanded.

(Note 1) Even during the cutting mode (G64), the exact stop check is 3
executed in the blocks in the positioning mode (G00) or in the
exact stop check mode (G09), or in the disconnected cutting
feed block.
(Note 2)

Old block
Cutting feed No traveling
New block

Positioning

Cutting feed

No traveling

Cutting mode
Exact stop check mode

When the old block is clamped while the additional axis is traveling, exact stop
check is executed.
When the new block is unclamped while the additional axis is traveling, exact stop
check is executed.

2004-5-18 3 - 21 eTCOMNCPR3-1
TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

3.7 Programmable data input (G10)


(1) Input of workpiece zero position

Command fromat G10L2Pn X_ Y_ Z_ A_ B_ C_ ;

3
When the G90 mode (absolute command) is selected, the commanded offset amount
becomes newly effective.
When the G91 mode (incremental command) is selected, the commanded offset
amount is added to the currently set offset amount to become a renewed offset
amount.

When the additional axis is commanded while an optional additional axis is not
installed, an alarm will occur.

(Note) Workpiece zero position..........Refer to “Data bank” in the operation manual.

(2) Input of tool data


Tool length offset data
G10L10 P_ R_ ;

Tool dia offset data G10L12 P_ R_ ;

P: offset number
R: offset amount
When the G90 mode (absolute command) is selected, the commanded offset amount
becomes newly effective.
When the G91 mode (incremental command) is selected, the commanded offset
amount is added to the currently set offset amount to become a renewed offset
amount.
(Note) Tool data..........Refer to “Data bank” in the operation manual.

(3)Input of tool fine offset value


When tool length /Tool diameter compensation command is issued using the
program,the data of the fine offset number corresponding to the commanded offset
number is automatically reflected in operation.

Change of tool fine offset data in program

2004-5-18 3 - 22 TCOMNCPR
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

Command fromat G10L11 P_ R_ ;

G10L13 P_ R_ ;

L11 : Fine offset of tool length

L13 : Fine compensation of tool diameter

P : Fine offset No. 3


Range : 1~99

R : Fine offset amount


The commanded value is added to the compensation
amount in absolute mode (G90) and the preset value
in inclremental mode (G91).
Setting range +/- 99.999 mm +/- 9.9999 inch

(4) Input of measured working coordinate zero point data.

Command fromat G10L99 Pn X_ Y_ Z_ Q_ ;

Q : The number that stores the measured results.

After automatic measurement (G121 to G129), set the coordinate system based on
the measured position.

Input of additional working coordinate

Command fromat G10L98 Pn X_ Y_ Z_ Q_ ;

n : Additional working coordinate system (1 to 48).


Q : The number that stores the measured results.
Ex.) Assume that automatic measurement is carried out on the G54 coordinate
system and the measurement result turned out to be (120, 80). Set the
coordinate system that this position will be (50, 50).

2004-5-18 3 - 23 eTCOMNCPR3-1
TC-31A/31AN/22A/S2A
Chapter 3 Preparation function 32A/R2A/20A/S2B

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

Y Y

3
80 50 Measurement result

X
G54 New working 50
zero point

X
Old working
120
zero point

(Note)
If the G10 code is commanded during the tool dia offset, the tool
moves to the point where a vertical vector is formed to the last
movement command of X and Y.

2004-5-18 3 - 24 TCOMNCPR
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation function

3.8 Soft limit


The allowable area of the tool motions can be specified in the following three ways.
1. Stroke setting by the parameter 2
2. Stroke limit setting by the parameter 1
3. Programmable stroke limit setting by the G22 code

3.8.1 Stroke
The maximum machine stroke is set by the parameter 2.
This should not be changed by the user
3

+Z

Y axis Z origin
stroke (Zero point return
position)
Z axis Axes working area
stroke

-X Machine zero point


(0,0,0)

X axis stroke
-Y

(Note) Z origin is set by the machine parameter.

3.8.2 Stroke limit


The allowable area of the tool motions in each axis of the X, Y and Z is set by the
user parameter.

2004-5-18 3 - 25 eTCOMNCPR3-1
TC-31A/31AN/22A/S2A
Chapter 3 Preparation fnction 32A/R2A/20A/S2B

3.8.3 Programmable stroke limit (G22)


The allowable area of the tool motions is commanded by the program.

Command format

X : Programmable stroke limit on + direction of X axis


Y : Programmable stroke limit on + direction of Y axis
Z : Programmable stroke limit on + direction of Z axis
I : Programmable stroke limit on - direction of X axis
3 J : Programmable stroke limit on - direction of Y axis
K : Programmable stroke limit on - direction of Z axis

These are commanded with the coordinate values in the machine coordinate system.
The command is done by the absolute values regardless of the G90 and G91 codes.

(X, Y, Z)
+Z

Movable area

-X
(I, J, K)
-Y

(Note 1) The programmable stroke or the stroke is used as the soft limit
in the following ways.
G22: The programmable stroke is checked as the soft limit.
G23: The stroke is checked as the soft limit.
(Note 2) Right after turning ON the power, the stroke limit set by the
user parameter becomes effective.
After that, the setting by changing the user parameter or the
G22 command whichever is done later becomes effective.
As for the axis which is not specified by the G22 command, the
stroke limit set by the user parameter recognized as the
command value.
If the stroke limit by the user parameter is changed,
however, all the axes which are not changed become as
specified by the user parameter.
(Note 3) The stroke set by the machine parameter is always effective.

2004-5-18 3 - 26 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation fnction

3.9 Return to the reference point (G28)


Command format

This command provides an automatic return to the reference point through an


intermediate point for commanded axes. Positioning to the reference point is made
through an intermediate point as specified by X_Y_Z_A_B_C_.
It can be 3.12 Selection of machine coodinate system (G53) commanded by either
the absolute command (G90) or the incremental command (G91).
The coordinate values of the intermediate point commanded in this block are
3
memorized.
All the commanded axes are moved to the reference point at the rapid traverse rate
by way of intermediate point.
(Note 1)As for the coordinate value of the intermediate point, only the
values commanded by this G28 block are newly memorized.
The coordinate value of axis not commanded by this G28 block
is regarded as that of preivous G28 block.
(Note 2)The reference point is set by the user parameter.
(Note 3)A tool motion to the intermediate point or the reference point
is done by positioning, and interpolation is not available.
(Note 4)During the single block operation, the block stops at the
intermediate point.
(Note 5)The coordinate value of the intermediate point is memorized
by the absolute value in the working coordinate system.
Therefore, if the working coordinate system is changed after
the G28 is commanded, the intermediate point is also
changed to the new coordinate system.
(Note 6)When the additional axis is commanded while an optional
additional axis is not installed, an alarm will occur.

2004-5-18 3 - 27 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
Chapter 3 Preparation fnction 32A/R2A/20A/S2B

3.10 Return from the reference point (G29)


Command format

This command provides positioning to the commanded position through an


intermediate point for commanded axes. At an incremental command, an
incremental distance from the intermediate point must be commanded.
3 The commanded axes are moved to the intermediate point at the rapid traverse rate,
then positioned at the commanded point.

(Note 1) A tool motion to the intermediate point or the commanded point is done by
positioning, and interpolation is not available.

(Note 2) The tool goes through the intermediate point commanded by the G28 or G30
whichever is given later.

(Note 3) During the single block operation, the block stops at the intermediate point.

(Note 4) For axes whose intermediate point is not memorized using G28 or G30, the
current position is regarded as the center point.

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

3.11 Return to the 2nd/3rd/4th reference point (G30)

Command format

P2 : Return to the 2nd reference point


P3 : Return to the 3rd reference point
P4 : Return to the 4th reference point

This command moves the axes to the 2nd, 3rd or 4th reference point in the same way
as commanded by G28.
The G29 code can be used as the same way as G28.
(Note 1) The 2nd, 3rd and 4th reference points are set by the user parameter .

(Note 2) When P_ is omitted, return to the 2nd reference point is automatically


selected.

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

2004-5-18 3 - 28 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation fnction

3.12 Selection of machine coodinate system (G53)


The coordinate values in the machine coordinate system can be commanded in the
following ways.

Command format G53 ;

The coordinate values commanded in the same block as G53 is recognized in the ma-
chine coordinate system.
(Note) When the incremental mode (G91) is selected, the G53
3
command is ignored.

3.13 Selection of working coordinate system


(G54~G59)
When 6 sets of the coordinate systems for each workpiece are set in the data
previously, necessary coordinates system can be selected by commanding the G54
through G59 codes.

Command format G54


.
. ;
.
G59
G54 : working coordinate system 1
G55 : working coordinate system 2
G56 : working coordinate system 3
G57 : working coordinate system 4
G58 : working coordinate system 5
G59 : working coordinate system 6

3.14 Additional working coordinate system selection


(G54.1)
Command format

Pn : Specification code for additional working coordinate


system.
n : 1~48
The working coordinate system can be selected from 48pairs using the above
command.
G54 provides this function instead of G54.1.

Data setting method


1) The data can be confirmed or set on the working coordinate origin screen.
2) The data can be set by commanding G10 in the program.

2004-5-18 3 - 29 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
Chapter 3 Preparation fnction 32A/R2A/20A/S2B

Command format

Pn : Specification code for additional working coordinate


system.
n : 1~48
X,Y,Z :Setting value of workpiece origin offset value
When the absolute mode (G90) is selected, the commanded value is considered the
offset value. When the incremental mode (G91) is selected, the commanded value is

3 added to the preset offset value.

3.15 Coordinate rotation function (G68,G69)

Command format

X,Y,Z :Rotation center coordinate value


The coordinate system commanded in the absolute value is always recognized.
When this setting is omitted, the position in whitch the block has shifted from G69
to G68 is considered the center.
R : Rotation angle
Conforms to G90/G91 ; the counterclockwise direction is considered the positive
direction.
When this setting is omitted,an alarm will occur.
Commanded range : -360.000~360.000
1) The tool diameter is compensated for after coordinate rotation.
2) An alarm will occur when commanded in the MDI mode.
3) An alarm will occur when following commands is operated during coordinate
rotation.
G28~G30,G36,G131,G92,G120,G121
4) Coordinate rotation doesn't apply to G53.
5) An alarm will occur when G01X_Z_; G01 Y_Z_; is commanded during c
oordinate rotation.
6) The rotation center coordinate value is converted to the machine coordinate
value and stored inside the NC unit.
Thus, even if the coordinate system is changed after coordinate rotation has
been commanded, the rotation centeer coordinate value will not change.

Command format

Coordinate rotation is canceled

Coordinate rotation can be canceled even by the following operations:


CommandM02(M30).
Reset operation

2004-5-18 3 - 30 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation fnction

3.16 Coordinate rotation using measured results


(G168)
Command format

X,Y : Rotation center coordinate value.


Q : Selects the desired measured result by setting "1" to "4".
When the slection is omitted, the setting is considered to be "1".
The coordinate system commanded in the absolute value is always recognized.
When this setting is omitted, the position in whitch the block has shifted from G69
3
to G168 (or G68) is considered the center.

The coordinate is rotated using the angle obtaind from the measurement.
Other features are the same as those for the coordinate rotation function.

3.17 Absolute command and incremental command


(G90, G91)
The axis movement amount can be specified by either the absolute command or the
incremental command.
(1) Absolute command (G90)
This is commanded by the G90 code. It specifies an end point of the block in the
working coordinate system.
(2) Incremental command (G91)
This is commanded by the G91 code. It specifies a distance from the start point to
the end point in the block.

Absolute command

Incremental command

End point

Start point

2004-5-18 3 - 31 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
Chapter 3 Preparation fnction 32A/R2A/20A/S2B

(3) When additional axis is commanded

1. Absolute command (e.g., Baxis)

When B STROKE of user parameter is set to 1: YES, the B axis rotates to the
commanded angle.
When B STROKE of user parameter is set to 0: NO, the B axis rotates in the
direction closer to the commanded angle.
When the commanded angle is the same both in the positive and negative
directions (e.g. 180 deg.), the B axis rotates in the positive direction.
3 When B STROKE of user parameter is set to 0: NO, even a larger angle than
360 degrees is commanded, this is handled within 360 degrees.

When B STROKE is set to 0: NO

Machine pos

Absol pos

(ex.1) When B0.000 is entered, the axis


rotates 90 degrees in the negative di-
rection
(ex.3) When B0.000 is entered, the axis rotates 90
degrees in the negative direction (ex.2) When B180.000 is entered, the
axis rotates 180 degrees in the positive
direction
B-axis machine zero point
B-axis work zero point (Set to 90 degrees in this example)
B-axis carrent position before travering (Angle)

2. Incremental command

Regardless of the setting of B STROKE (1: YES or 0: NO) of user parameter ,


the axis rotates for the commanded angle.
However, when B STROKE of user parameter is set to 1: YES, STROKE OVER
or LIMIT OVER alarm may occur due to stroke and stroke limit control.

2004-5-18 3 - 32 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation fnction

3.18 Change of working coordinate system (G92)


Change of working zero position can be commanded as follows:

Command format

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

Y Y'
3

Tool position

X'
Shift amount
New working
zero point

X
Old working
zero point

Ex.) The absolute coordinate of the tool position changes to (80, 60) from the
current position (150, 100) as commanded "G92 X80. Y60.;"
(Note 1) The commanded coordinate values are always absolute
regardless of G90 and G91.
(Note 2) The working coordinate values of the uncommanded 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.

2004-5-18 3 - 33 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
Chapter 3 Preparation fnction 32A/R2A/20A/S2B

NewG54 NewG55
working zero p. working zero p.

3
Old G54 working zero p. Old G55 working zero p.

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 G92 is commanded during the tool dia offset, the tool
moves to the position where the offset vector is formed
vertically to the X/Y movement direction.
And the working coordinate system is created with the current
position in the program as commanded by G92.

New zero position

Working zero position


Programed path
Tool path

(Note 5) When G92 is commanded during the tool length offset, the
working coordinate system is created so that the target value
of the programmed Z axis becomes the same as commanded
by G92.

2004-5-18 3 - 34 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation fnction

Spindle end face

Tool top point

The target value in the program becomes the same 3


as commanded by G92.
(Note 6) When the additional axis is commanded while an optional
additional axis is not installed, an alarm will occur.

3.19 Measurement feed(G131,G132)


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

Command format

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


The feedrate is set by address F. Once the feedrate is set, 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 G132, an alarm does not occur.
Note 1: An alarm occurs when tool dia offset mode is selected.
Note 2: The tool does not move during a dry run state.
Note 3: The tool moves to the target posision during a machine lock
state.
Note 4: When the G131/G132 are used in a restarting program, the tool
returns to the target position.
Note 5: When the detection signal is already ON, the tool stops at the
current position when attempting to execute G131/G132.

2004-5-18 3 - 35 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
Chapter 3 Preparation fnction 32A/R2A/20A/S2B

3.20 Change of tap twisting direction (G133,G134)

Command format

Commanding G133 anf G134 rotates the spindle clockwise and counterclockwise
respectively.
3 Z axis target position.
Comforms to G90/G91 mode.

Thread pitch

No, of thread

Spindle speed

The Z axis is moved synchronousy with the spindle.


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

3.21 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.
5) When this command is executed during tool compensation, the tool moves
to the position where the offset equivalent to the tool diameter is vertically
applied to the end point of the previous block.
6) The local coordinate system is canceled when any of the following
operations are performed:
G52 is used to instruct “0” for the command value of the axis.
G92 is used
M02 (M30) is used.

2004-5-18 3 - 36 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation fnction

3.22 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

Single stop does not apply.

Start point
3

Start point

Stop
End point
Travel amount

Operation is reset.
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.
The travel amount is set for the user parameter.

1) Single direction positioning is not performed for the Z-axis during a canned
cycle, or the XY-axes when they are moving for the preset amount of shift in
the G76 and G87 cycles.
2) Single direction positioning is not performed for any axis that does not have
the travel amount set for the parameter.
3) Single direction positioning is performed even when “0” is specified for the
travel amount.
4) An error will occur when G60 is used during tool compensation.

2004-5-18 3 - 37 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
Chapter 3 Preparation fnction 32A/R2A/20A/S2B

3.23 G code priority


How to see the table

G00
Command ~
G code G03

(3)
G00~G03

3 G102,G103
G202,G203 (1)

(4)
G04
(1)

In the above table,(4) is the case when G01 (G00 to G03) group and G04 are
commanded in the same block. The modal for G01 is updated and G04 is executed.
(1) is the case when G04 is commanded while G01 group is modal.
G04 is executed correctly.

(1) Executed correctly.


(2) Error
(3) The last G command is effective.
(4) One-shot is executed and the modal is updated.
(5) One-shot is executed and the modal is updated, but an error occurs when
circle arc is commanded.
(6) Executed when the modal is G00 or G01, but an error occurs when circle arc is
commanded.
(7) G22 is executed when G22 is commanded and the model for G00 group is
updated. Both are executed when G23 is commanded.
(8) An error occurs when circular command is output.
(9) An error occurs while circular arc mode is selected.
(10) The one commanded after the block is executed.
When G80 group is executed, the model for G00 group is updated.
When G00 group is executed, G80 group is canceled (G80).
(11) An error occurs, but both are executed when commanded with G80.
(12) One shot execution, modal cancellation.
(13) Executed correctly except when the XZ or YZ arc command is executed.
(14) An error occurs, but both are executed when commanded with G69.
(15) G00 group is executed. G80 group is cancelled (G80).
(16) One shot is executed and the model is updated, but an error occurs when
G54P is used.
(17) Both are executed when used simultaneously with G80.
An error occurs when used simultaneously with G54P.
(18) An error occurs when G54P is used.

2004-5-18 3 - 38 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation fnction

G code priority list (1)


Upper step : When commanded in the same block
Lower step : When commanded in another block

G code G00,
G03,
G43, G68, G73 G90,
G102, G22, G40 G54 G61, G66, G98, G177
G44, G54.1 G69, ~G89 G91
Command G103, G23 ~G42 ~G59 G64 G67 G94 G99 ~G189
G49 G168
G202,
G code G203

G00~G03 (3) (7) (8) (8) (1) (1) (1) (2) (4) (10) (1) (1) (1) (10)
G102,G103
G202,G203 (1) (1) (13) (1) (1) (1) (1) (1) (13) (15) (1) (1) (1) (15)

G04
(4) (2) (2) (2) (16) (2) (1) (2) (14) (11) (1) (1) (1) (2) 3
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(1) (1) (1) (1) (1) (1) (4) (2) (1) (1) (1) (1) (1) (1)
G09
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(4) (2) (2) (2) (16) (2) (1) (2) (14) (11) (1) (1) (1) (2)
G10
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(7) (3) (2) (2) (1) (1) (1) (2) (14) (11) (1) (1) (1) (2)
G22,G23
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(4) (2) (2) (1) (16) (2) (1) (2) (14) (11) (1) (1) (1) (2)
G28~G30
(1) (1) (2) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1)
(5) (2) (2) (1) (16) (2) (1) (2) (14) (11) (1) (1) (1) (2)
G36~G39
(6) (1) (2) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1)
(8) (2) (3) (1) (1) (1) (1) (2) (14) (11) (1) (1) (1) (2)
G40~G42
(9) (1) (1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (2)

G43,G44 (8) (2) (1) (3) (1) (1) (1) (2) (14) (1) (1) (1) (1) (1)
G49 (9) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(4) (2) (2) (2) (1) (1) (1) (2) (14) (11) (1) (1) (1) (2)
G52
(1) (1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1)
(1) (1) (1) (1) (4) (4) (1) (2) (1) (1) (1) (1) (1) (1)
G53
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)

G54~G59 (1) (1) (1) (1) (3) (3) (1) (2) (1) (17) (1) (1) (1) (17)
(1) (1) (1) (1) (1) (1) (1) (1) (1) (18) (1) (1) (1) (18)
(1) (1) (1) (1) (1) (1) (1) (2) (1) (2) (1) (1) (1) (2)
G54.1
(1) (1) (1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (2)
(4) (2) (2) (1) (1) (1) (1) (2) (14) (1) (1) (1) (1) (1)
G60
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)

0307-3.tbl

2004-5-18 3 - 39 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
Chapter 3 Preparation fnction 32A/R2A/20A/S2B

G code priority list (2)


Upper step : When commanded in the same block
Lower step : When commanded in another block
G code
G00~G03
G102,
G40 G43, G68, G73 G90, G177
G103, G54 G61, G66, G98,
G22, ~ G44, G54.1 G69, ~ G91 G94 ~
G202, ~G59 G64 G67 G99
G23 G42 G49 G168 G89 G189
G203
Command
G code

(1) (1) (1) (1) (1) (1) (3) (2) (1) (1) (1) (1) (1) (1)
G61,G64
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
3 (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2)
G65
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(2) (2) (2) (2) (2) (2) (2) (3) (2) (2) (2) (2) (2) (2)
G66,G67
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(11)
G68,G69, (13) (2) (2) (2) (1) (1) (1) (2) (3) (1) (1) (1) (2)
(14)
G168
(13) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(11)
(10) (11) (11) (1) (17) (2) (1) (2) (3) (1) (1) (1) (3)
G73~G89 (14)
(1) (1) (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (3) (1) (1) (1)
G90,G91
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(4) (2) (2) (2) (1) (1) (1) (2) (2) (11) (1) (1) (1) (2)
G92
(1) (1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1)
(1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1) (1)
G94
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (3) (1)
G98,G99
(1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
(4) (2) (1) (1) (1) (1) (1) (2) (14) (11) (1) (1) (1) (2)
G100
(1) (1) (1) (1) (1) (1) (1) (1) (1) (12) (1) (1) (1) (12)
(4) (2) (2) (1) (1) (1) (1) (2) (14) (11) (1) (1) (1) (2)
G120
(1) (1) (2) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1)
(8) (2) (2) (1) (1) (1) (1) (2) (14) (11) (1) (1) (1) (2)
G121~G129
(9) (1) (2) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1)

0308-1.tbl

2004-5-18 3 - 40 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation fnction

G code priority list (3)


Upper step : When commanded in the same block
Lower step : When commanded in another block
G code G00~G03
G177
G102, G43, G68, G90,
G22, G40 G54 G61, G66, G73 G98, ~G182,
G103, G44, G54.1 G69, G91 G94
Command G23 ~G42 ~G59 G64 G67 ~G89 G99 G185~
G202, G49 G168
G189
G code G203
(4) (2) (2) (1) (1) (1) (1) (2) (14) (11) (1) (1) (1) (2)
G131,G132
(1) (1) (2) (1) (1) (1) (1) (1) (2) (2) (1) (1) (1) (2)
(4) (2) (2) (2) (1) (1) (1) (2) (14) (11) (1) (1) (1) (2)
G133,G134
(1) (1) (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) 3
(10) (2) (2) (1) (17) (2) (1) (2) (14) (3) (1) (1) (1) (3)
G173,G183
(1) (1) (2) (1) (1) (2) (1) (1) (1) (1) (1) (1) (1) (1)

G177~G182, (10) (2) (2) (1) (17) (2) (1) (2) (14) (3) (1) (1) (1) (3)
G185~G189 (1) (1) (2) (1) (1) (2) (1) (1) (1) (1) (1) (1) (1) (1)

0308-5.tbl

2004-5-18 3 - 41 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
Chapter 3 Preparation fnction 32A/R2A/20A/S2B

G code priority list (4)


Upper step : When commanded in the same block
Lower step : When commanded in another block
G code G121 G31,
G28~ G36~ G133, G173,
G04 G09 G10 G52 G53 G60 G65 G92 G100 G120 ~ G131,
Command G30 G39 G134 G183
G code G129 G132
G00~G03 (4) (1) (4) (4) (5) (4) (1) (4) (2) (4) (4) (4) (8) (4) (4) (10)
G102,G103
G202,G203
(1) (1) (2) (2) (2) (2) (1) (2) (2) (2) (2) (2) (2) (2) (2) (2)
G04

3 (1) (1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1) (1) (1)
G09

(2) (1) (1) (2) (2) (2) (1) (2) (2) (2) (2) (2) (2) (2) (2) (2)
G10

(2) (1) (2) (2) (2) (2) (1) (2) (2) (2) (2) (2) (2) (2) (2) (2)
G22, G23

(2) (1) (2) (3) (2) (2) (1) (2) (2) (2) (2) (2) (2) (2) (2) (2)
G28 ~G30

(2) (1) (2) (2) (3) (2) (1) (1) (2) (2) (2) (2) (2) (2) (2) (2)
G36~G39

(2) (1) (2) (2) (2) (2) (1) (2) (2) (2) (1) (2) (2) (2) (2) (2)
G40~G42

G43, G44 (2) (1) (2) (1) (1) (2) (1) (1) (2) (2) (1) (1) (1) (1) (1) (1)
G49

(2) (1) (2) (2) (2) (1) (1) (2) (2) (2) (2) (2) (2) (2) (2) (2)
G52

(1) (1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1) (1) (1)
G53

(16) (1) (1) (16) (16) (1) (4) (1) (2) (1) (1) (1) (1) (1) (1) (17)
G54~G59

(2) (1) (2) (2) (2) (1) (4) (1) (2) (1) (1) (1) (1) (1) (1) (2)
G54.1

(2) (1) (2) (2) (1) (2) (1) (1) (2) (2) (2) (2) (2) (2) (2) (1)
G60

0310-1-2

2004-5-18 3 - 42 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 3 Preparation fnction

G code priority list (5)


Upper step : When commanded in the same block
Lower step : When commanded in another block
G code G28 G36 G121 G31 G173
G133
Command G04 G09 G10 ~ ~ G52 G53 G60 G65 G92 G100 G120 ~ G131
G134
~
G code G30 G39 G129 G132 G183

G61, (1) (4) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1) (1) (1)
G64

(2) (2) (2) (2) (2) (2) (2) (2) (1) (2) (2) (2) (2) (2) (2) (2)
G65

G66, (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) 3
G67

G68, (14) (1) (14) (14) (14) (14) (1) (14) (2) (14) (14) (14) (14) (14) (14) (14)
G69,
G168
(11) (1) (11) (11) (11) (11) (1) (1) (2) (11) (11) (11) (11) (11) (11) (3)
G73~G89

G90, (1) (1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1) (1) (1)
G91

(2) (1) (2) (2) (2) (2) (1) (2) (2) (1) (2) (2) (2) (2) (2) (2)
G92

(1) (1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1) (1) (1)
G94

G98, (1) (1) (1) (1) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1) (1) (1)
G99

(2) (1) (2) (2) (2) (2) (1) (2) (2) (2) (1) (2) (2) (2) (2) (2)
G100

(2) (1) (2) (2) (2) (2) (1) (2) (2) (2) (2) (1) (2) (2) (2) (2)
G120

G121~ (2) (1) (2) (2) (2) (2) (1) (2) (2) (2) (2) (2) (3) (2) (2) (2)
G129

0310-1.tbl

2004-5-18 3 - 43 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
Chapter 3 Preparation fnction 32A/R2A/20A/S2B

G code priority list (6)


Upper step : When commanded in the same block
Lower step : When commanded in another block
G code
G28~ G36~ G121~ G131, G133, G173,
G04 G09 G10 G52 G53 G60 G65 G92 G100 G120
Command G30 G39 G129 G132 G134 G183
G code

(2) (1) (2) (2) (2) (2) (1) (2) (2) (2) (2) (2) (2) (3) (2) (2)
G131, G132

(2) (1) (2) (2) (2) (2) (1) (2) (2) (2) (2) (2) (2) (2) (3) (2)
G133, G134

3 (2) (1) (2) (2) (2) (2) (1) (1) (2) (2) (2) (2) (2) (2) (2) (3)
G173, G183

G177~G182 (2) (1) (2) (2) (2) (2) (1) (1) (2) (2) (2) (2) (2) (2) (2) (3)

G185~G189
0311-1.tbl

2004-5-18 3 - 44 eTCOMNCPR3-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

CHAPTER 4

PREPARATION FUNCTION 4
(TOOL OFFSET FUNCTION)

4.1 Tool dia offset (G40,G41,G42)


4.2 Tool length offset (G43,G44,G49)

2004-5-18 4-1 eTCOMNCPR4-1


TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

4.1 Tool dia offset (G40, G41, G42)


4.1.1 Tool dia offset function
Programming is done according to the actual workpiece form, but this function
enables the tool to move along the path with an offset from actual workpiece form,
which is equivalent to the used tool radius.

G41 Dn ;
Command format
G42

G codes and D code used for tool dia offset

G40 : Tool dia offset cancel (Effective at power ON)


4 G41 : Left offset along tool path
G42 : Right offset along tool path

G41 and G42 command an offset mode, while G40 commands a cancel of the offset
mode.

Dn : Tool offset number (n=0~99)


The offset amount of D0 is always zero.
The offset amount is set on the tool data setting screen.
(Note)Refer to "Chapter 10" in the Instruction Manual for details of the
tool data setting screen.
(Note)When a command without X and Y axis travel of more than
three blocks or a command with a travel amount of zero (0) is
given in tool dia. offset mode, excessive cutting or insufficient
cutting may occur, respectively.

4.1.1.1 Tool dia fine compensation


When G41and G42 are commanded in the program, the tool dlameter fine
compensation value corresponding to the commanded tool number is added
tothetool diameter compensation value. The tooldiameter fine compensation value is
placed on the tool list screen.

2004-5-18 4-2 eTCOMNCPR4-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

4.1.2 Cancel mode


The system enters the cancel mode right after the power is turned ON or the
[RESET] key is pressed.
In the cancel mode, the path of the tool center coincides with the programmed path.
Terms and symboles for tool dia offset
1. Inside and outside
If the angle measured on workpiece side is larger than 180°, it is called "Inside".
If the angle measured on workpiece side is smaller than 180°, it is called
"Outside".

2. Symbols in figure
Programmed path
Tool center path
Auxiliary line
Linear line
Circular line
Tool dia offset amount
Tool dia offset angle
Circular tangent
Cross point
Single block stop point

2004-5-18 4-3 eTCOMNCPR4-1


TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

4.1.3 Start-up
When a block which satisfies all the following conditions is executed in the cancel
mode, the system enters the offset mode. The control in this operation is called the
start-up.

a) G41 or G42 is commanded.


b) The tool offset number is not zero.
b) The movement command other than circular arc (G02 or G03) is given on the
X-Y plane,and the movement distance is not zero.
(Note 1) In the case of circular arc command, an alarm is generated.
(Note 2) In case of the linear interpolation XZ or YZ axes command,
an alarm is generated.

4
4.1.3.1 Inside cutting

Linear-Linear

Linear-Arc

2004-5-18 4-4 eTCOMNCPR4-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

4.1.3.2 Outside cutting


(a)Type 1 : Linear - Linear

Type 1 : Linear - Arc

(b)Type 2 : Linear - Linear

Type 2 : Linear - Arc

(Note 1) Type 1 and 2 can be selected in parameter 1 for start-up and


cancel motions.
(Note 2) If the angle is close to 180°(179° 180°)while type 2 is
being selected,actual movement will be type 1.

2004-5-18 4-5 eTCOMNCPR4-1


TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

4.1.3.3 Outside cutting

(a)Type 1 : Linear - Linear

Type 1 : Linear - Arc


4

(b)Type 2 : Linear - Linear

Type 2 : Linear - Arc

(Note 1) Type 1 and 2 can be selected in parameter 1 for start-up and


cancel motions.
(Note 2) If the angle is close to 1°( ) while type 2 is being
selected, actualmovement will be type 1.

2004-5-18 4-6 eTCOMNCPR4-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

4.1.4 Offset mode


A tool movement command in the offset mode includes a positioning, a linear
interpolation, a circular interpolation and a helical interpolation.
(Note) The linear interpolation XZ or YZ axes command is excluded.
When this command is given, an alarm is generated.

4.1.4.1 Inside cutting

Linear - Linear

Arc - Linear

Linear - Arc

Arc - Arc

2004-5-18 4-7 eTCOMNCPR4-1


TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

(Note 1) When going around at a narrow angle , there is


no crosspoint of 2 perpendicular lines from programmed
lines, so that tool centerpath will be exceptionally as follows;

Linear - linear

4
Linear -Arc

It will be processed in the same procedure as above in case of Arc-Linear and Arc-Arc.

(Note 2) When( 180° 181°), tool center path will be as


follows;

Linear - linear

It will be processed in the same procedure as above in case of Arc-Linear, Linear-


Arc and Arc-Arc.

2004-5-18 4-8 eTCOMNCPR4-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

4.1.4.2 Outside cutting


Linear - Linear

Arc - Linear

Linear - Arc

Arc - Arc

(Note 1) When 179° 180°, tool center path will be as follows;

Linear -Linear

It will be processed in the same procedure as above in case of Arc - Linear,


Linear - Arc and Arc - Arc.

2004-5-18 4-9 eTCOMNCPR4-1


TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

4.1.4.3 Outside cutting


Linear - Linear

4 Arc - Linear

Linear - Arc

Arc - Arc

2004-5-18 4 - 10 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

4.1.4.4 Exceptional case


There is no cross point at inside cutting.

As above figure shows, the cross point of the arcs is present if the offset value is
small, but it may be disappear if the offset value becomes large.
In this case, alarm occurs in the preceding block, and the machine stops.

2004-5-18 4 - 11 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

4.1.5 Offset cancel


When the command satisfying all the conditions as shown below is executed in the
offset mode, the offset cancel mode becomes effective.
The tool motion in this status is called an offset cancel.

a) G40 is commanded.

Command format G40 ;

b) The movement command other than circular arc (G02 or G03) is given on the
X-Y plane.
(Note 1) In the case of a circular arc command, an alarm is generated.
4
(Note 2) In case of the linear interpolation XZ or YZ axes command, an
alram is generated.

4.1.5.1 Inside cutting


Linear - Linear

Arc - Linear

2004-5-18 4 - 12 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

4.1.5.2 Outside cutting

Type 1:Linear-Linear

Type 1:Arc-Linear

Type 2:Arc-Linear

Type 2:Linear-Linear

(Note 1) Type 1 and 2 can be selected in parameter 1 for start-up and


cancel motions.
(Note 2) If the angle is close to 180°(79° 180°)while type 2 is
being selected,actual movement will be type 1.

2004-5-18 4 - 13 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

4.1.5.3 Outside cutting

Type 1:Linear-Linear

Type 1:Arc-Linear

Type 2:Linear-Linear

Type 2:Arc-Linear

(Note 1) Type 1 and 2 can be selected in parameter 1 for start-up and


cancel motions.
(Note 2) If the angle is close to 1( 1°) while type 2 is being
selected, actual movement will be type 1.

2004-5-18 4 - 14 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

4.1.6 G40 single command


When G40 is specified independently, the tool moves to the position offseted
perpendicularly in the preceding block and stops.

Linear - Linear

4
Arc - Linear

(Note) Offset amount is cancelled by the axial movement command in


the following block.

2004-5-18 4 - 15 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

4.1.7 Change of offset direction in offset mode


By commanding G41 or G42, or converting the algebraic sign (+,-) of the offset
amount, the offset direction can be changed even in the offset mode.

Offset amount sign

G code

G41 Left side offset Right side offset

G42 Right side offset Left side offset

4
Conditions of execution

Offsetmode command Linear-Linear Linear-Arc Arc-Linear Arc-Arc

Where the offset equivalent to the


G41 G41
tool dia is vertically applied to the
Perform
end point of the previous block
G42 G42 becomes the stop point.

G41 G42
Perform Perform
G42 G41

When the offset direction is changed, the "inside" and "outside" cuttings are not
discriminated. But whether there is a cross point or not discriminates those cuttings.
The offset amount described hereafter has a positive value.

2004-5-18 4 - 16 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

4.1.8 Change of offset direction in offset mode


4.1.8.1 When there is a cross point

Linear - Linear

4
Linear - Arc

Arc - Linear

Arc - Arc

2004-5-18 4 - 17 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

4.1.8.2 When there is no cross point

Linear - Linear

4
Linear - Arc

Arc - Linear

2004-5-18 4 - 18 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

Arc - Arc

4.1.8.3 When offset path becomes more than a


circle
By changing offset direction offset path becomes more than a circle, but actual
offset path is short cutted as shown below.
In this case the circle must be specified in segments.

2004-5-18 4 - 19 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

4.1.9 G code command for tool dia offset in


offset mode

Linear - Linear

Block commanded
G42

4
Linear - Arc

Block commanded
G42

Arc - Linear

Block commanded
G42

Arc - Arc
Block commanded
G42

2004-5-18 4 - 20 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

4.1.10 Notes on tool dia offset


(1) Command of tool dia offset amount
The offset amount is commanded by the number of the D command.
When G41 or G42 is commanded, the offset amount is commanded in the same
block.
If it is omitted, the number of D command previously used becomes effective.

(2) Change of tool dia offset amount


When the offset amount is changed in the offset mode, the offset amount is
changed at the end point of the block.
N1 G41 X_Y_D1;
N6 Xa1 Yb1; 4
N7 Xa2 D2;....Change of offset amount
N8 Xa3 Yb3;

2004-5-18 4 - 21 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

(3) Current position display


The current position display corresponds to the tool center position

(4) Machining of inner wall of circular arc smaller than the used tool radius

Since cutting is not available, the operation stops at the end point of the previous
block and an alarm is generated.

(5) Cutting insufficient


This problem occurs in the case of a program containing a step smaller than the tool
radius.

(6) Corner movement


When cutting the outer side, the tool moves around the corner from different
angles.The movement mode and the feedrate up to the single block stop point are as
specified in the current block.

2004-5-18 4 - 22 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

When the movement amount around the corner is small as shown in the figure 4
below and the following conditions are satisfied, the movement is ignored.

The value is set by the parameter 1.

Thus, extremely small movements around the corner can be reduced.

2004-5-18 4 - 23 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

This function is not available if the following block is a full circular arc.

The original movement in the above figure are:


P0-P1-P2 Linear movement
P2-P3 Linear movement
The tool moves once around the circular arc afterwards with P3 as the target.
If this small movement function is used, the movement from P2 to P3 is ignored and
executed as follows:
P0-P1-P2 Linear movement
P2-P3 (small) circular movement
A full circular is ignored and the movement from P2 to P3 becomes a small circular
movement, thus ignoring this function.

(7) Block without movement


When the command without any X/Y movement is given for more than 3 blocks
during the tool dia offset mode, the movement is as shown below and overcutting
or undercutting occurs.

2004-5-18 4 - 24 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

(Note 1) The block with the movement amount zero will result in the
same as above.

(8) Tool movement in case of tool dia offset amount zero


a) Start-up
When G41 or G42 is commanded in the cancel mode, the offset mode becomes
effective but the start-up motion is not available as the offset amount is zero.
When another offset number is specified and the offset amount is not zero, the
motion becomes the same as the case of changing the tool dia offset amount as
described in (2).

(Note 2) Even if the X/Y movement command is not given at the start-
up, the start-up motion begins at the time the X or Y
movement command is executed.

b) During offset mode


If the offset amount is changed to zero in the offset mode, the cancel mode is not
available any longer. The motion becomes the same as the case of changing the tool
dia offset amount as described in (2).
Even if the offset number is changed again and the offset amount is not zero, the
motion becomes the same as the case of changing the tool dia offset amount as
described in (2).

2004-5-18 4 - 25 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

4 (9) Exceptional case or alarm-generating command


1.Command to produce the vertical vector
G10 : Programmable data input
G52 : Local coordinate system
G92 : Coordinate system setting
When the above command is given, the tool moves to the point which is offset as
much as the tool dia as specified by the last X/Y movement command.

2.Forcible tool dia offset cancel


M06 : Tool change
G100 : Non-stop ATC
When the above command is given, G40 (tool dia offset cancel) becomes
automatically effective and the tool moves to the point which is offset as much as
the tool dia as spcified by the last X/Y movement command.

3.Alarm-generating command
G28 : Return to reference point
G29 : Return from reference point
G30 : Return to 2nd, 3rd and 4th reference point
G36 ~ G39 : Coordinate calculation
G60 : Single direction positioning
G66 : Macro
G73 ~ G89, G173 ~ G189 : Canned cycle
M200, M201 : Tool breakage detection
M120 : TOUCH signal check
G120 : Positioning to the measuring point
G121 ~ G128 : Automatic measurement
G131, G132 : Measurement feed
G133, G134 : Changeover of tap twisting direction
M203 : Tool breakage detection judgement
M206 : Thermal watch condition judgement
M207 : Thermal measurement motion
M410, M411 : Index of the pallet

2004-5-18 4 - 26 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

(10) Input command in MDI operation


When inputting the tool dia offset command (G40, G41, G42) in the MDI operation,
an alarm is generated.

(11) Manual intervention


When moving the tool by manual operation in the offset mode and starting
the memory operation again, the corrected offset path starts from two blocks ahead.

When moving the tool by manual operation after it stopped at the block end point
P2, the tool moves from P2' to P3, then follows the corrected offset path after P3.

4.1.11 Override function related to tool dia offset


4.1.11.1 Automatic corner override
When the blocks before and after the inner corner satisfy the following conditions,
an automatic override is applied to reduce the load on the tool.

1.Movement is commanded by G01, G02 or G03.


2.The offset mode is selected and the offset amount is not zero.
3.The corner is inside and its angle is less than the AUTO.CORNER OVERRIDE
ANGLE set by the parameter 1.
4.The block does not contain G41, G42 and G40.
5.There is no change in the offset direction.

The parameter 1 has the following setting values.


1)AUTO.CORNEROVERRIDELEN1
: Deceleration stroke at corner end point :Le
2)AUTO.CORNEROVERRIDELEN1
: Deceleration stroke at corner start point :Ls
3)AUTO.CORNER OVERRIDE RATIO :Reduction ratio (%) :Y
4)AUTO.CORNER OVERRIDE ANGLE :Corner inside reference angle :θ

2004-5-18 4 - 27 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

An override is applied to the thick lined area between a and b.

Deceleration stroke
Actual feedrate = Commanded feedrate ×
100

4.1.11.2 Override of the inside circular cutting


When cutting along the circular arc whitch is offset inside during the offset mode,
the actual feedrate is calculated by multiplying the commanded feedrate by Rc/Rp.
Rc
Actual feedrate = Commanded feedrate ×
Rp
Rp: Programmed radius
Rc: Tool center path radius

(Note 1)
When the value of Rc/Rp becomes smaller than the OVERRIDE LMT IN
INSIDE ARC set by the parameter 1, multiply that parameter value
instead of Rc/Rp.

2004-5-18 4 - 28 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 4 Preparation finction(tool offset function)

OVERRIDE LMT IN INSIDE ARC


Actual feedrate = Commanded feedrate ×
100

4.2 Tool length offset (G43, G44, G49)


This function corrects the tool position so that the tool nose comes to the
programmed position.
In either the absolute command or the incremental command, the end point in the
programmed Z-axis move command is offset as specified by H code to become the
actual end point.
(1) Tool length offset (+)

4
Command format G43 Hn ;

Hn: Tool length offset No. (n=0~99)


(Note)
The offset amount of H0 is always zero.
The offset amount is set on the tool data setting screen.
The tool length offset is done in the Z-axis direction.

(2) Tool length offset (-)

Command format G44 Hn ;

Hn: Tool length offset No. (n=0~99)

(3) Tool length offset cancel

Command format G49 ;

(Note 1)
The tool length offset can be cancelled by commanding G49 or
specifying zero for the tool length offset number.
(Note 2)
The tool length offset is cancelled by M06 (tool change) or
G100 (non-stop ATC).
(Note 3)
If the Z-axis command is not given to the block of "G43H_;" or
"G44H_;", it isregarded that the Z-axis command is given to the
current position and Z axismoves by the offset amount specified by the
H code.
In the same way, if the Z-axis command is not given to the block of
"G49;", it is regarded that the Z-axis command is given to the current
position and Z axis moves by the offset amount specified by the final H
code.

2004-5-18 4 - 29 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
Chapter 4 Preparation finction(tool offset function) 32A/R2A/20A/S2B

(Note 4)
If the Z-axis command of the reference point return (G28) or the 2nd,
3rd,4th reference point return (G30) is given, the tool moves while the
tool length offset is applied to the intermediate point and the tool
returns to the reference point by cancelling the tool length offset
tentatively.
The Z-axis movement afterwards is executed with the tool length
offset.
If the incremental mode is selected at this time, the tool movement is
regarded to start from the reference point.
(Note 5)
When G53Z_; is commanded during tool length offset, tool length offset

4 is canceled temporarily and the Z axis moves to a certain point.

4.2.1 Tool length fine offset


When G43 and G44 are commanded in the program, the tool length fine offset value
corresponding to the commanded tool No. is added to the tool length offset value.
Offset value to be reflected = Tool length offset value + Tool length fine offset
value.

The tool length fine offset value is placed on the tool list screen.

2004-5-18 4 - 30 eTCOMNCPR4-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

CHAPTER 5

PREPARATION FUNCTION
(CANNED CYCLE)
5

5.1 List of canned cycle function


5.2 Basic motions in canned cycle
5.3 General description of canned cycle
5.4 Details of canned cycle
5.5 Canned cycle for tool change
(non-stop ATC)(G100)

2004-5-18 5-1 eTCOMNCPR5-1


TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5. Canned cycle
For repetitive machining, a series of paths that is usually specified in a few blocks
can be specified in one block.

5.1 List of canned cycle function


Table 5-1 List of canned cycle function

Feeding type Spindle motion at Retracting Spindle at return


G code Content
at machining bottom of hole motion point

G73 High speed intermittent feed dwell rapid feed


peckdrilling

G74 Reverse tapping cutting feed dwell CW cutting feed stop


5
G76 Fine boring cutting feed dwell orientation rapid feed CW
rapid
G77 Tapping intermittent feed CCW cutting feed
(synchro mode) stop

G78 Reverse tapping intermittent feed CW cutting feed


(synchro mode) stop

G80 Cancel ~ ~ ~ ~

G81 Drilling cutting feed dwell rapid feed

G82 Drilling cutting feed dwell rapid feed

G83 Peck drilling intermittent feed dwell rapid feed

G84 Tapping cutting feed dwell CCW cutting feed stop

G85 Boring cutting feed dwell cutting feed

G86 Boring cutting feed dwell stop rapid feed CW

G87 Back boring cutting feed dwell orientation rapid feed CW

G89 Boring cutting feed dwell cutting feed

G173 High speed peck Intermittent feed dwell none _


drilling

2004-5-18 5-2 eTCOMNCPR5-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

Feeding type Spindle motion at Retracting Spindle at return


G code Content
at machining bottom of hole motion point

G177 End mill tap cutting feed CCW cutting feed stop
cycle

G178 End mill tap cutting feed CW cutting feed stop


cycle

G181 Double drilling cutting feed dwell rapid feed


cycle

G182 Double drilling cutting feed dwell rapid feed


cycle

G183 Peck drilling intermittent dwell none _ 5


feed

G185 Double boring cutting feed dwell cutting feed


cycle rapid feed

G186 Double boring cutting feed dwell stop rapid feed CW


cycle

G189 Double boring cutting feed dwell cutting feed


cycle rapid feed

2004-5-18 5-3 eTCOMNCPR5-1


TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.2 Basic motions in canned cycle


In general, the canned cycle is composed of the following six motions.

Motion 1 : Positioning (at rapid feed) to the drilling position (X/Y)


Motion 2 : Positioning to R point (at rapid feed)
Motion 3 : Hole machining (cutting feed)
Motion 4 : Machining at the bottom of hole
Motion 5 : Relief to R point (at rapid feed/cutting feed)
Motion 6 : Positioning to initial point (at rapid feed)

Motion 1
Initial point

5 Motion 2 Motion 6

R point

Motion 3 Motion 5

Z point
Motion 4

The system stops upon completion of the motion 1, 2 or 6 in the single block
operation.
(Note) Temporary stop range in tapping cycle (G74, G77, G78, G84,
G177, G178, ).
(1)During the motion 1, 2 or 6 in the tapping cycle, a temporary stop is available.

(2)During the motions 3 through 5 in the tapping cycle, a temporary stop is


forbidden.
If such a stop is forcibly done (by pressing the HOLD switch or changing to the
manual mode), the system stops upon completion of the motion 5.
If the RESET key is pressed during the motion 3 through 5, the system also stops
after completion of the motion 5.

2004-5-18 5-4 eTCOMNCPR5-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.3 General description of canned cycle

5.3.1 Command related to canned cycle motions

G90 Absolute command


(1) Data format
G91 Incremental command

G98 Initial point level return


(2) Return level
G99 R point level return

G73 , G74
G76 ~ G78
(3) Drilling mode G80 ~ G87 5
G89
G173 Refer to table 5-1(P5-2)
G177 , G178
G181 ~ G183
G185 , G186
G189

5.3.2 Setting of data in absolute/incremental


command
Absolute command Incremental command

Initial point Initial point

Z=0

R
R

R point Z R point

Z point Z point

2004-5-18 5-5 eTCOMNCPR5-1


TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.3.3 Types of return point (G98, G99)


There are two types of return points - initial point level return (G98) and R point
level return (G99) - when the canned cycle motions are finished.

Initial point level return (G98) R point level return (G99)

Initial point

R point R point
5

Z point Z point

(Note 1)
G98 and G99 are modal commands. G98 is effective when the power is
turned ON.
(Note 2)
If there is no Z-axis movement even if the tool length offset mode is
selected, the initial point is memorized without offset.
(Note 3)
The Z-axis machine coordinate value becomes the initial point when
the canned cycle cancel mode changes to the canned cycle mode.

5.3.4 Canned cycle motion conditions


The canned cycle motions are available when the following commands are given.
(1) The drilling mode (G73, G74, G76~G78, G81~G87, G89, G173,
G177,G178,G181~G183,G185,G186, G189) command blocks contain any of
X, Y, Z, R, A, B or C.
(2) The blocks after the drilling mode command block through the canned cycle
cancel block contain any of X, Y, Z, R, A, B or C.
(Note)
If there is no X, Y, Z, R, A, B or C in the block during the canned cycle,
and the drilling data other than those are commanded, the drilling
data only are memorized.

2004-5-18 5-6 eTCOMNCPR5-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.3.5 Machining data of canned cycle

Command format

G** X_Y_ Z_R_Q_P_F_S_ K_;

G code Position data Machining data Repeat number

G codeG73, G74, G76~G78, G81~G87, G89, G173, G177, G178,


G181~G183,G185,G186,G189.

The G codes of the canned cycle are all modal.(except G173,G183)

X, Y : Drilling positon. 5
The tool motion to the drilling position is done at a rapid feed.

Z : Bottom position
When the incremental mode is selected, the distance from
the R point to the bottom of hole is specified.

R : R point position.
When the incremental mode is selected, the distance from
the point before the canned cycle becomes effective to the
R point is specified.

Q : Cutting amount, shift amount, distance to feeding speed


changeover point.
(1) Each cutting amount commanded by G73, G83, G173 or G183.
(2) Each cutting amount commanded by G77 or G78.
(3) Each shift amount commanded by G76 or G87.
(4) The distance to the feeding change point by G177or G178.

P : Dwelling time.
(The unit is the same as specified by G04.)

F : Cutting feedrate.

S : Spindle speed.

K : Repeat number of canned cycle.

2004-5-18 5-7 eTCOMNCPR5-1


TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.3.6 Repeat number of canned cycle

When drilling at an equal interval is repeated in the same canned cycle, use the
address K and specify the repeat number.

The command range of K is 0 - 9999.


K is effective only in the specified block.
If K is not specified, the value of K is regarded 1.
When K0 is specified, drilling is not executed. Then the specified drilling data are
memorized and the X and Y command are given, these axes move accordingly.

The programming of "X_Y_" commands the initial drilling position in incremental


mode (G91).
If the absolute command (G90) is given, drilling is repeted at the same position.

(example)
5
Final machining position

First machining position

Current position

G81 X _ Y _ Z _ R _ K5F _ ; (in G91 mode)

2004-5-18 5-8 eTCOMNCPR5-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.4 Details of canned cycle

5.4.1 High-speed peck drilling cycle (G73)

Command format G73 X_Y_Z_R_P_Q_F_;

R point
Return point 5

Q
d

Z point
dwelling for P sec
rapid feed
cutting feed

The relief amount d is set by the parameter 1.


If the minus value is commanded for the cutting amount Q, the algebraic mark (-) is
ignored.

2004-5-18 5-9 eTCOMNCPR5-1


TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.4.2 Reverse tapping cycle (G74)

Command format G74 X_Y_Z_R_P_F_S_;

Return point

R point Spindle stop


5 rapid feed
cutting feed
spindle CW
spindle CCW
Z point

Spindle rotation stops at Z point.


After dwelling for P sec, spindle rotates CW.
When a temporary stop is applied on the way from the R point to the Z point or the
R point, the tool stops after returning to the R point.
If the address S exceeds the max, spindle speed in tapping, an alarm is generated.

2004-5-18 5 - 10 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.4.3 Fine boring cycle (G76)

Command format G76 X_Y_Z_R_Q_P_F_;

Return point

R point

Spindle stop

5
Z point

rapid feed
Dwelling for P sec cutting feed
Spindle orientation shift (rapid feed)
spindle CCW

If the minus value is commanded for the shift amount Q, the algebraic mark (-) is
ignored.
The shift direction is selected from +X, -X, +Y and -Y set by the parameter 1 in
advance.
The shift direction can be selected only from the above four. Therefore, the tool
should be mounted so that the tool nose faces in one of the specified direction
when the spindle orientation executes.

2004-5-18 5 - 11 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.4.4 Tapping cycle (G77)

I_
Command format G77 X_Y_Z_R_ Q_S_;
J_

Return point

R point Spindle stop

Q
5
d

Q
d

Z point
rapid feed
cutting feed
spindle CW
spindle CCW

The relief amount d is set by the parameter 1.

If the minus value is commanded for the cutting amount Q, the algebraic mark (-) is
ignored.

When a temporary stop is applied on the way from the R point to the Z point or the
R point, the tool stops after returning to the R point.

A thread pitch or number of threads should be specified.


Set the data on a thread pitch following the address I, and the data on a number of
threads following the address J.

If the address S exceeds the max, spindle speed in tapping, an alarm is generated.

2004-5-18 5 - 12 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.4.5 Reverse tapping cycle (synchro mode)


(G78)
I_
Command format G78 X_Y_Z_R_ Q_S_;
J_

Return point

R point Spindle stop

Q
5
d

Q
d

Z point
rapid feed
cutting feed
spindle CW
spindle CCW

The relief amount d is set by the parameter 1.

If the minus value is commanded for the cutting amount Q, the algebraic mark (-) is
ignored.

When a temporary stop is applied on the way from the R point to the Z point or the
R point, the tool stops after returning to the R point.

A thread pitch or number of threads should be specified.


Set the data on a thread pitch following the address I, and the data on a number of
threads following the address J.

If the address S exceeds the max, spindle speed in tapping, an alarm is generated.

2004-5-18 5 - 13 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

Tapping high-speed return

The spindle speed at a return of synchro tapping (G77 or G78) is variable.

G77 I_
Command format
X_Y_Z_R_Q_ S_L_;
G78 J_

The address L commands the spindle speed during the return motion.

When the address L is omitted, the spindle speeds at cutting and return motion
become identical.

The address L, once commanded, is regarded as modal in the canned cycle mode.

If the address L command value is larger than the max, spindle speed in tapping, an
5 alarm is generated and the tool stops at the R point.

When the address L command value is smaller than the address S command value,
the spindle rotates according to the address S command value.

5.4.6 Drilling cycle (G81, G82)

G81
Command format
X_Y_Z_R_P_ F_ ;
G82

Return point

R point

rapid feed
Z point cutting feed
dwelling for P sec

2004-5-18 5 - 14 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

High speed cycle

Feed speed at start and end of drilling cycle (G81 or G82) is variable.

G81
Command format
X_Y_Z_R_W_V_F_E_L_;
G82

W : Speed changeover point


Distance from point "R", regardless of absolute mode (G90) or incremental
mode (G91)
E : Feed speed from point "R" to point specified by "W"
V : Speed changeover point
Distance from point "Z", regardless of absolute mode (G90) or incremental
mode (G91)
L : Feed speed from point "Z" to point specified by "V" 5

Return point

R point
Feed speed E W

Feed speed F

Feed speed L V
Z point
rapid feed
cutting feed

2004-5-18 5 - 15 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.4.7 Peck drilling cycle (G83)

Command format G83 X _ Y _ Z _ R _ P _ Q _ F _ ;

Return point

R point

5 d

Q
d

Z point
dwelling for P sec

rapid feed
cutting feed

The cutting start point d is set by the parameter.

If the minus value is commanded for the cutting amount Q, the algebraic mark (-) is
ignored.

2004-5-18 5 - 16 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.4.8 Tapping cycle (G84)

Command format G84 X _ Y _ Z _ R _ P _ F _ S _ ;

Return point

R point Spindle stop

Z point
rapid feed
cutting feed
spindle CW
spindle CCW

Spindle rotation stops at Z point.


After dwelling for P sec, spindle rotates CW.

When a temporary stop is applied on the way from the R point to the Z point or the
R point, the tool stops after returning to the R point.

If the address S exceeds the max, spindle speed in tapping, an alarm is generated.

2004-5-18 5 - 17 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.4.9 Boring cycle (G85, G89)

G85
Command format X_Y_Z_R_P_F_;
G89

Return point

R point
5

Z point rapid feed


dwelling for P sec
cutting feed

High speed cycle


Free speed at return of boring cycle (G85 or G89) is variable.

G85
Command format X_Y_Z_R_ F_E_
G89 ;

F : Feed speed from point "R" to point "Z"


E : Feed speed from point "Z" to point "R"

Return point

R point

Feed speed F Feed speed E

rapid feed
Z point cutting feed

2004-5-18 5 - 18 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.4.10 Boring cycle (G86)

Command format G86 X_Y_Z_R_ P_F_ ;

Return point

R point

5
rapid feed
Z point cutting feed
dwelling for P sec Spindle stop spindle CW

2004-5-18 5 - 19 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

High speed cycle


Feed speed at start and end of boring cycle (G86) is variable.

Command format
G86 X_Y_Z_R_ W_V_F_E_L_ ;

W : Speed changeover point


Distance from point "R", regardless of absolute mode (G90) or incremental
mode (G91)
E : Feed speed from point "R" to point specified by "W"
V : Speed changeover point
Distance from point "Z", regardless of absolute mode (G90) or incremental
mode (G91)
L : Feed speed from point "Z" to point specified by "V"

5
Spindle rotates CW
while moving to point "R"

Return point

R point
Feed speed E W
Spindle returns to return point
and then rotates CW.
Feed speed F

Feed speed L V
Z point
Spindle stop
rapid feed
cutting feed
spindle CW

2004-5-18 5 - 20 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.4.11 Back boring cycle (G87)

Command format G87 X_Y_Z_R_ Q_P_F_ ;

single block stop point

spindle orientation

Z point
5
dwelling for P sec rapid feed
cutting feed
R point shift (rapid feed)
spindle CW
spindle CCW
single block stop point

If the minus value is commanded for the shift amount Q, the algebraic mark (-) is
ignored.

The shift direction is selected from +X, -X, +Y and -Y set by the parameter 1 in
advance.

The shift direction can be selected only from the above four. Therefore, the tool
should be mounted so that the tool nose faces in one of the specified direction
when the spindle orientation executes.

G99 (R point level return) is unused.

2004-5-18 5 - 21 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.4.12 High speed peck drilling cycle (G173)

Command format G173 X_Y_Z_R_ Q_ F_ ;

R point

5 d

Q
d

Z point
rapid feed
cutting feed

2004-5-18 5 - 22 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.4.13 End mill tap cycle (G177)

Command format
I_
G177 X _ Y _ Z _ R _ S_ L _ Q _E _ ;
J_

Q: Feeding speed changeover point.


Distance from point "R", regardless of absolute mode (G90) or
incremental mode (G91).
Start the tapping operation from this position.
E: Feeding speed in zone "Q"
L: Spindle speed when returning from point 'Z' topoint 'R' when not
specified, spindle returns at speed specified by 'S'.
I : Thread pitch in tap zone.
J : Number of threads pitch in tap zone.
S : Spindle speed.
Start spindle with XY axes moving.
5

Return point

R point

Feed speed E Q

Spindle speed S

Thread pitch I
or number of
threads J
Z point
rapid feed
cutting feed
spindle CW
spindle CCW

2004-5-18 5 - 23 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.4.14 End mill tap cycle (G178)

Command format G178 X_Y_Z_R_ I_ S_ L _ Q _E _ ;


J_

Q: Feeding speed changeover point.


Distance from point "R", regardless of absolute mode (G90) or
incremental mode (G91).
Start the tapping operation from this position.
E: Feeding speed in zone "Q"
L: Spindle speed when returning from point 'Z' topoint 'R' when not
specified, spindle returns at speed specified by 'S'.
I : Thread pitch in tap zone.
J : Number of threads pitch in tap zone.
S : Spindle speed.
5 Start spindle with XY axes moving.

Return point

R point

Feed speed E Q

Spindle speed S

Thread pitch I
or number of
threads J
Z point

rapid feed
cutting feed
spindle CW
spindle CCW

2004-5-18 5 - 24 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.4.15 Double drilling cycle (G181,G182)

G181
Command format X_Y_Z_R_I_J_W_V_F_E_L_ ;
G182

I: Double rapid feed start point (follow G90/G91)


Distance from point "R" when incremental mode is specified
J: Double cutting feed start point (follow G90/G91)
Distance from point "I" when incremental mode is specified
W: Speed changeover point
Incremental regardless of absolute mode (G90) or incremental mode (G91)
E: Feed speed within range specified by "W"
V: Speed changeover point
Incremental regardless of absolute mode (G90) or incremental mode (G91)
L: Feed speed within range specified by "V".
5

Return point
R point
Feed speed E W

Feed speed F

Feed speed L V
I point
rapid feed
J point
Feed speed E W

Feed speed F

Feed speed L V
Z point

rapid feed
cutting feed

2004-5-18 5 - 25 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.4.16 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

5
Q

Z point
dwelling for P sec
rapid feed
cutting feed

2004-5-18 5 - 26 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.4.17 Double boring cycle (G185,G189)

G185
Command format
X_Y_Z_R_I_J_F_E_ ;
G189

I: Double rapid feed start point (follow G90/G91)


Distance from point "R" when incremental mode is specified
J: Double cutting feed start point (follow G90/G91)
Distance from point "I" when incremental mode is specified
F: Cutting feed speed from point "R" to point "Z"
E: Cutting feed speed from point "Z" to point "R"

R point

Feed speed F Feed speed E

I point

rapid feed rapid feed

J point

Feed speed F Feed speed E

Z point
rapid feed
cutting feed

2004-5-18 5 - 27 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.4.18 Double boring cycle (G186)

Command format G186 X_Y_Z_R_I_J_W_V_F_E_L_ ;

I: Double rapid feed start point (follow G90/G91)


Distance from point "R" when incremental mode is specified
J: Double cutting feed start point (follow G90/G91)
Distance from point "I" when incremental mode is specified
W: Speed changeover point
Incremental regardless of absolute mode (G90) or incremental mode (G91)
E: Feed speed within range specified by "W"
V: Speed changeover point
Incremental regardless of absolute mode (G90) or incremental mode (G91)

5 L: Feed speed within range specified by "V"

Spindle rotation while moving to point "R"

Return point
Spindle returns to return point
and then rotates CW.
R point
Feed speed E W

Feed speed F

Feed speed L V
I point
rapid feed
J point
Feed speed E W

Feed speed F

Feed speed L V
Z point
Spindle stop
rapid feed
cutting feed
spindle CW

2004-5-18 5 - 28 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.4.19 Canned cycle of reducing step


For G73, G77, G78, G83, G173 and G183 fixed cycles, reducing step is available which
reduces the cutting feed depth gradually.
(1) High-speed peck drilling cycle (G73) (Reducing step)

Command format G73 X_Y_Z_R_P_W_V_F_ ;

W : 1st cutting feed


V : Minimum cutting feed

Return point

5
R point

2nd cutting feed


d

3rd cutting feed

.
.
.
V

Z point
dwelling for P sec
rapid feed
cutting feed

The relief amount d is set by the parameter 1.

If a negative value is entered for the cutting amount V and W, the algebraic symbol
(-) is ignored.

2004-5-18 5 - 29 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

(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

W
5
d

2nd cutting feed

3rd cutting feed


d

.
.
.
V

Z point
dwelling for P sec

rapid feed
cutting feed

The relief amount d is set by the parameter 1.

If a negative value is entered for the cutting amount V and W, the algebraic
symbol (-) is ignored.

2004-5-18 5 - 30 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

(3) Tapping cycle (synchro mode)(G77) (Reducing step)

I_
Command format
G77 X_Y_Z_R_ J_ W_V_S_ ;

W : 1st cutting feed


V : Minimum cutting feed

Return point

spindle
stop
R point

W
5
d

2nd
cutting
feed d

3rd
cutting
feed d

.
.
.
V
Z point
rapid feed
cutting feed
spindle CW
spindle CCW

. The relief amount d is set by the parameter 1.


. If a negative value is entered for the cutting amount V and W, the algebraic
symbol (-) is ignored.
. When a temporary stop is applied on the way from the R point to the Z point or
the R point, the tool stops after returning to the R point.
. A thread pitch or number of threads should be specified.
. Set the data on a thread pitch following the address I, and the data on a number of
threads following the address J.
. If the address S exceeds the max, spindle speed in tapping, an alarm is generated.

2004-5-18 5 - 31 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

(4) Reverse tapping cycle (synchro mode)(G78) (Reducing step)

Command format I_
G78 X_Y_Z_R _ W_V_S_ ;
J_

W : 1st cutting feed


V : Minimum cutting feed

Return point

spindle
stop
R point

5
W

2nd
cutting
feed d

3rd
cutting
feed d

.
.
.
V
Z point
rapid feed
cutting feed
spindle CW
spindle CCW
. The relief amount d is set by the parameter 1.
. If a negative value is entered for the cutting amount V and W, the algebraic symbol
(-) is ignored.
. When a temporary stop is applied on the way from the R point to the Z point or the
R point, the tool stops after returning to the R point.
. A thread pitch or number of threads should be specified.
. Set the data on a thread pitch following the address I, and the data on a number of
threads following the address J.
. If the address S exceeds the max, spindle speed in tapping, an alarm is generated.

2004-5-18 5 - 32 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

(5) High-speed peck drilling cycle (G173) (Reducing step)

Command format G173 X_Y_Z_R_W_V_F_ ;

W : 1st cutting feed


V : Minimum cutting feed

R point

W
5
d

2nd cutting feed


d

3rd cutting feed

.
.
.
V

Z point
rapid feed
cutting feed
The relief amount d is set by the parameter 1.

If a negative value is entered for the cutting amount V and W, the algebraic symbol
(-) is ignored.

2004-5-18 5 - 33 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

(6) Peck drilling cycle (G183) (Reducing step)

Command format G183 X_Y_Z_R_W_V_F_ ;

W : 1st cutting feed


V : Minimum cutting feed

R point

W
5
d

2nd cutting feed

3rd cutting feed


d

.
.
.
V

Z point
dwelling for P sec
rapid feed
cutting feed

The relief amount d is set by the parameter 1.

If a negative value is entered for the cutting amount V and W, the algebraic symbol
(-) is ignored.

(7) For G73, G83, G173 and G183 fixed cycles, the cutting feed after the second time
will be as below.
Cutting feed depth = Coefficient × 1st cutting feed (W)

2004-5-18 5 - 34 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

Time of cutting 2 3 4 5 6 7 8 9 10
Coefficient 0.825 0.675 0.525 0.425 0.35 0.3 0.225 0.175 0.15

11 12 13 14
0.1 0.1 0.075 0.075
Coefficient of 14th cutting is applied to 15th cutting and after.
When the cutting feed has become smaller than the V value (minimum cutting feed),
the V value is applied for cutting.

(8) For G77 and G78 fixed cycles, the cutting feed after the second time will be as
below.
Cutting feed depth = Coefficient × 1st cutting feed (W)
Time of cutting 2 3 4 5 6 7 8 9 10
Coefficient 0.85 0.65 0.55 0.4 0.35 0.3 0.2 0.2 0.15

11 12 13 14
5
0.1 0.1 0.05 0.05
Coefficient of 14th cutting is applied to 15th cutting and after.
When the cutting feed has become smaller than the V value (minimum cutting feed),
the V value is applied for cutting.
(Note 1) When switching between reducing step feed and fixed step
feed, use the W and Q commands.
(Note 2) When the W and Q commands are specified to the same
block, the W command has a priority.
(Note 3) When the W or Q command is not given, or 0 is given, cutting
is carried out once.
(Note 4) When the V command is not given, or 0 is given, V=0.001
(metric) or V=0.0001(inch) is used.

5.4.20 Canned cycle cancel (G80)


The canned cycle (G73, G74, G76 to G78, G81 to 87, G89, G173, G177, G178, G181 to
G183, G185, G186, G189) is cancelled and ordinary motion becomes effective
afterwards.
The R point, Z point, and other data on drilling are all cancelled.

Command format G80 ;

(Note 1) The canned cycle is cancelled not only by G80 but also by
G00-G03. The tool change command G100 and M06 can
cancel the canned cycle after the tool change motion.
(Note 2) When the axis move command is given in the same block as
G80, the axis movement starts after the canned cycle is
cancelled.

2004-5-18 5 - 35 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

5.4.21 Notes on canned cycle


(1) When commanding the canned cycle (G73, G81 to G83, G85, G89, G173,G181 to
G183, G185, G189) which does not control the spindle rotation, the spindleshould
be rotated in advance by the M code.

(2) When the M code is commanded in the same block as the canned cycle, the M
code is executed at the same time as the initial X/Y positioning or after that.
When the repetition is specified by K code, the M code is executed only at the
first time and not executed any longer.

(3) When M00 or M01 is commanded in the same block as the canned cycle, the
spindle and coolant stop after the X/Y positioning and automatic resetting is not
available.
If resetting is necessary, command it in the manual operation mode or the MDI
operation mode.
5
(4) When G00 to G03 are commanded in the same block as that of the canned cycle,
the motion will be as below.

G00 G81 X_ Y_ Z_ R_ P_ F_ ;
In this case, the modal for G00 is updated and the canned cycle by G81 is executed.

G81 G00 X_ Y_ Z_ R_ P_ F_ ;
In this case, X, Y, and Z axes move in accordance with G00 and the canned cycle is
not executed.

(5) M200, M201, and M120 cannot be commanded in the same block as that of the
canned cycle.

2004-5-18 5 - 36 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

5.5 Canned cycle for tool change (non-stop ATC)


(G100)
(1) When TC-31A or TC-22A.

Command format G100 T_ X_ Y_ Z_ R_ A_B_L_;

(3)
ATC position

(2) (4)

5
Z origin position

(1) (5)
Single block stop point

T__ : Tool number.


T1 _ _ : Pot number.
T9 : Group number.
X, Y, A, B : Target value when moving X, Y, A, and B axes at in rapid
feed simultaneously with tool change motion.
Z : Target value of movement in rapid feed.
R : Retern position before tool change motion.
(operated with tool length compensation applied)
When "R" is not commanded, operation is performed using
[ATC SYNCHRONOUS START POS] of USER PARAMETER 1
as "R" command value.
L : Specify the tool number, pot (magazine) number, and group
number after “L”.
The pot with the corresponding tool attached is indexed by
operation (3) after ATC. (Next tool preparation)

2004-5-18 5 - 37 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

Operations
(1) Tool moves to the Z-axis point "R" while performing 0-degree spindle
orientation.
(2) Tool moves to theZ-axis ATC origin while X,Y,A and B axes move to
commanded value.
When "T" is commanded, the tool moves to Z-axis ATC origin and magazine
swivels.
(3) Arm swivels to change tool.
Tool change motion differs depending on setting on [MAGAZINE TOOL]
screen.
Refer to the "Tool Change Motion" for detailes.
(4) Tool moves to the Z-axis point "R".
Operation, if specified by spindle command, occurs simultaneously.
(5) Tool moves to Z-axis commanded position.

5 Caution
. When performing cycle operation, tool moves in cutting mode
between operations (1)and (2), operations (4) and (5).
. When [RESET] key or [STOP SWITCH] key is pressed between
operations (2) and (4) , machine stops after motion (4) is completed.
For operation (3) (X, Y, A, and B axes movement), machine stops
immediately.
. Machine does not stop if single block occurs between operations (1)
and (4).
. All data other than G100 can be omitted. However, code "T" must
be commanded once by operator before G100 is commanded.
. Tool offset is canceled when G100 is commanded. Further, tool
length compensation is canceled from operation (2).
. When tool offset (G41 or G42) and X and Y axes movement are
commanded to block G100, tool offset begins when X and Y axes
movement (2) commences.
. Start-up is performed in format 1, regardless of parameters.
When tool offset is commanded to block G100, tool offset becomes
valid from operation (4) .
. When G100 is commanded while tool length compensation (G49) is
canceled, operation (1) is performed subject to [ATC REFERENCE
TOOL LENGTH] selection for user parameter.
. When tool offset is not commanded to block G100, operations (4)
are performed subject to [ATC REFERENCE TOOL LENGTH] selection
for user parameter.
. Alarm appears when code M other than spindle command is
commanded to block G100.
Alarm appears when axis A or B is commanded while optional A
and B axes are not in use.
When point "R" command position (4) is lower than Z axis
command position (5), tool moves to Z-axis commanded position,
and operation (5) is not performed.

2004-5-18 5 - 38 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

Tool change motion

Tool change motion differs depending on tool type set on [MAGAZINE TOOL]
screen.

(When large tool is not set on [MAGAZINE TOOL])

The following sequence is performed:


(1) Pot raises.
(2) Magazine swivels.
(3) Pot lowers.
(4) Arm swivels at high speed.

(When large tool is set on [MAGAZINE TOOL])


5
Tool change from standard tool to standard tool, and large tool to large tool.

The following sequence is performed:


(1) Pot raises.
(2) Magazine swivels.
(3) Pot lowers.
(4) Arm swivels.
(5) Pot raises.

When pot is already at upper limit before tool change motion commences, sequence
starts from (2).

When ((4) arm swivels) changing from large tool to large tool, arm swivels at low
speed.
When ((4) arm swivels) changing from standard tool to standard tool, arm swivels at
high speed.

2004-5-18 5 - 39 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

Tool change from large tool to standard tool or vice versa.

The following sequence is performed:


(1) Pot raises.
(2) Magazine swivels. (Empty pot is indexed.)
(3) Pot lowers.
(4) Arm swivels.
(5) Pot raises.
(6) Magazine swivels. (Specified pot is indexed.)
(7) Pot lowers.
(8) Arm swivels.
(9) Pot raises.
When pot is already at upper or lower limit before tool change motion commences,
sequence starts from (3) or (4), respectively.

5 For operation (2), empty pot is indexed appropriately for large tool and standard
tool.
Operation (9) is performed for the TC-31A only. However, it may also be performed for
the TC-22A when “next tool preparation” is performed.

Arm swivels ((4) or (8)) at low speed when large tool is to be changed, and at high
speed when standard tool is to be changed.

Notes
1) If empty pot for large tool is not available when change from large
tool to standard tool is attempted, [*NO EMPTY POT] alarm appears.

2) If empty pot for standard tool is not available when change from
standard tool to large tool is attempted, [*NO EMPTY POT] alarm
appears.

2004-5-18 5 - 40 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

Next tool preparation


Next tool preparation is performed after the arm has swiveled or the pot has risen
after the arm swivels in the ATC sequence.
When ATC is not performed, only next tool preparation is performed.
Next tool preparation is not performed when the next tool is already indexed.

The next tool preparation sequence differs depending on the type of tool set on the
magazine tool screen.

When large tool is not set on [MAGAZINE TOOL]


(1) Pot rises
(2) Magazine swivels
(3) Pot lowers
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit before next
tool preparation commences.
5
When large tool is set on [MAGAZINE TOOL]
· Both spindle tool and next tool are standard or large
(1) Pot rises
(2) Magazine swivels
(3) Pot lowers (not performed for TC-31A)
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit before next
tool preparation commences.

Spindle tool is standard and next tool is large or vice versa


(1) Pot rises
(2) Magazine swivels (empty pot is indexed)
(3) Pot lowers (not performed for TC-31A)
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit before next
tool preparation commences.

Note 1) When the next tool is changed from a large tool to a standard
tool and there is no empty pot for a large tool, the [NO EMPTY POT]
error occurs.

Note 2) When the next tool is changed from a standard tool to a large
tool and there is no empty pot for a standard tool, the [NO EMPTY POT]
error occurs.

2004-5-18 5 - 41 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

(2) When TC-S2A, TC-R2A or TC-S2B.

Command format G100 T _ X _ Y _ Z _ R _ A _ B _ L _ ;

(3)
ATC position

(2) (4)

Z origin position

5
(1) (5)
Single block stop point

T__ : Tool number.


T1 _ _ : Magazine number.
T9 _ _ : Group number.
X, Y, A, B : Target value when moving X, Y, A, and B axes at in rapid
feed simultaneously with tool change motion.
Z : Target value of movement(5) in rapid feed.
Command the distance from the Z origin when the incremental
mode is selected.
L : Specify the tool number, magazine number, and group number
after “L”. The number specified by “L” becomes the T model
after G100.

2004-5-18 5 - 42 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

Operations
(1) Tool moves to the Z-axis point and spindle orientation are executed at the same
time.
(2) Movement to the ATC origin position.
When "X, Y, A or B" is commanded in the same block, the motions are done at
the same time.
(3) The magazine indexes the tool as commanded by the address "T".
(4) Movement to the Z-axis origin position.
(5) Movement to the commanded position when Z-axis is commanded.
When the spindle command (M3 group) is given, the motion is done at the same
time.
. When performing cycle operation, tool moves in cutting mode between
operations (1) and (2)and operations (4) and (5).

. When [RESET] key or [STOP SWITCH] key is pressed between operations


(2)and (4), machine stops after motion (4) is completed. 5
For operation (2) (X, Y, A, and B axes movement), machine stops immediately.

Caution
. All data other than G100 can be omitted. However, code "T" must be commanded
once by operator before G100 is commanded.

. The tool length offset and the tool dia offset are canceled when G100 is
commanded.

. When tool offset (G41 or G42) and X and Y axes movement are commanded to
block G100, tool offset begins when X and Y axes movement (2) commences.
Start-up is performed in format 1, regardless of parameters.

. When tool offset is commanded to block G100, tool offset becomes valid from
operation (5).

. Alarm appears when code M other than spindle command is commanded to block
G100.

. Alarm appears when axis A or B is commanded while optional A and B axes are
not in use.

2004-5-18 5 - 43 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

(3) When TC-32A.

Command format G100 T _ X _ Y _ Z _ R _ A _ B _ L _ ;

(3) (4)
ATC
position X origin X ATC
position position

(2) (5) (2) (3)

(4)
R point
(6) (5)

5 (1) (7) Y ATC


Single position
block
XY axes direction
stop
Z axis direction point

T__ : Tool number.


T1 _ _ : Pot number.
T9 _ _ : Group number.
A, B : Target value when moving A and B axes at in rapid feed
simultaneously with tool change motion.
X,Y : Target value of movement(6) in rapid feed.
Z : Target value of movement(7) in rapid feed.
R : Retern position before tool change motion.
(operated with tool length compensation applied)
When "R" is not commanded, operation is performed using [ATC
SYNCHRONOUS START POS] of USER PARAMETER 1 as "R"
command value.
L : Specify the tool number, pot (magazine) number, and group number
after “L”. The pot with the corresponding tool attached is indexed by
operation (4) after ATC. (Next tool preparation)

2004-5-18 5 - 44 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

Operations

(1) Tool moves to the Z-axis point "R" while performing 0-degree spindle
orientation. When "T" is commanded, magazine swivels.

(2) Tool movement to theZ-axis ATC origin, to the X axis origin point and to Y axis
ATC position, A, B axes movement to the the commanded value and also maga
zine cover opening occur simultaneously.

(3) Tool moves to theX-axis ATC position.

(4) Arm swivels to change tool.


Tool change motion differs depending on setting on [MAGAZINE TOOL]
screen. Refer to the "Tool Change Motion" for detailes.

(5) Tool movement to the X axis orgin point and Z axis point "R" and magazine
5
cover closing occurs stimultaneously.

(6) XY axes moves to the commanded value.

(7) Tool moves to Z-axis commanded position.

Caution
When performing cycle operation, tool moves in cutting mode between operations
(1)and (6). And tool moves in position check mode.
For XY positioning at operation (2) and (3) ( from X:origin Y: ATC position to X
axis positioning (ATC position)) ,tool moves in cutting mode when Y axis positions
at the ATC position before X axis does.

When [RESET] key or [STOP SWITCH] key is pressed at operations (2) , machine
stops after Z axis movement to ATC origin point.
For X, Y, A, and B axes movement, machine stops immediately.

When [RESET] key or [STOP SWITCH] key is pressed between operations (3) and
(5) , machine stops after motion (5) is completed.
For the operation (2), A, and B axes movement, machine stops immediately.

Machine does not stop if single block occurs between operations (1) and (6).

For operation (5), machine goes to the next opeation after closing the magazine
cover without checking if the magazine cover is closed.

Mode can not be switched between operation (2) and (6).

All data other than G100 can be omitted. However, code "T" must be commanded
once by operator before G100 is commanded.

2004-5-18 5 - 45 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

Tool offset is canceled when G100 is commanded. Further, tool length


compensation is canceled from operation (2).

When tool offset (G41 or G42) and X and Y axes movement are commanded to block
G100, tool offset begins when X and Y axes movement (6) commences.
Start-up is performed in format 1, regardless of parameters.

When tool offset is commanded to block G100, tool offset becomes valid from
operation (5) .

When G100 is commanded while tool length compensation (G49) is canceled,


operation (1) is performed subject to [ATC REFERENCE TOOL LENGTH] selection
for user parameter.
When tool offset is not commanded to block G100, operations (5) are performed
subject to [ATC REFERENCE TOOL LENGTH] selection for user parameter.

5
Alarm appears when code M other than spindle command is commanded to block
G100.
Alarm appears when axis A or B is commanded while optional A and B axes are not
in use.

When point "R" command position (5) is lower than Z axis command position (7),
tool moves to Z-axis commanded position, and operation (7) is not performed.

Tool change motion


Tool change motion differs depending on tool type set on [MAGAZINE TOOL]
screen.

(When large tool is not set on [MAGAZINE TOOL])

The following sequence is performed:


(1) Pot raises.
(2) Magazine swivels.
(3) Pot lowers.
(4) Arm swivels at high speed.

2004-5-18 5 - 46 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

(When large tool is set on [MAGAZINE TOOL])

Tool change from standard tool to standard tool, and large tool to large tool.

The following sequence is performed:


(1) Pot raises.
(2) Magazine swivels.
(3) Pot lowers.
(4) Arm swivels.
(5) Pot raises.

When pot is already at upper limit before tool change motion commences, sequence
starts from (2).

When ((4) arm swivels) changing from large tool to large tool, arm swivels at low
speed.
5
When ((4) arm swivels) changing from standard tool to standard tool, arm swivels at
high speed.

Tool change from large tool to standard tool or vice versa.

The following sequence is performed:


(1) Pot raises.
(2) Magazine swivels. (Empty pot is indexed.)
(3) Pot lowers.
(4) Arm swivels.
(5) Pot raises.
(6) Magazine swivels. (Specified pot is indexed.)
(7) Pot lowers.
(8) Arm swivels.
(9) Pot raises.

When pot is already at upper or lower limit before tool change motion commences,
sequence starts from (3) or (4), respectively.

For operation (2), empty pot is indexed appropriately for large tool and standard
tool.

Arm swivels ((4) or (8)) at low speed when large tool is to be changed, and at high
speed when standard tool is to be changed.

Notes
1) If empty pot for large tool is not available when change from large tool to
standard tool is attempted, [*NO EMPTY POT] alarm appears.

2) If empty pot for standard tool is not available when change from standard tool to
large tool is attempted, [*NO EMPTY POT] alarm appears.

2004-5-18 5 - 47 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

Next tool preparation


Next tool preparation is performed after the arm has swiveled or the pot
has risen after the arm swivels in the ATC sequence.
When ATC is not performed, only next tool preparation is performed.
Next tool preparation is not performed when the next tool is already
indexed.

The next tool preparation sequence differs depending on the type of tool
set on the magazine tool screen.

When large tool is not set on [MAGAZINE TOOL]


(1) Pot rises
(2) Magazine swivels
(3) Pot lowers
Next tool preparation ends when the above sequence is completed.
5 The sequence starts from (2) when the pot is already at the upper limit
before next tool preparation commences.

When large tool is set on [MAGAZINE TOOL]


· Both spindle tool and next tool are standard or large
(1) Pot rises
(2) Magazine swivels
(3) Pot lowers
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit
before next tool preparation commences.

· Spindle tool is standard and next tool is large or vice versa


(1) Pot rises
(2) Magazine swivels (empty pot is indexed)
(3) Pot lowers
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit
before next tool preparation commences.

Note 1) When the next tool is changed from a large tool to a stan
dard tool and there is no empty pot for a large tool, the [NO EMPTY POT]
error occurs.
Note 2) When the next tool is changed from a standard tool to a
large tool and there is no empty pot for a standard tool, the [NO EMPTY
POT] error occurs.

2004-5-18 5 - 48 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

(4) When TC-20A.

Command format G100 T _ X _ Y _ Z _ R _ A _ B _ L _ ;

(2)
Z ATC
position

(3)

R point

(1)

T :T__ :Tool number


:T1__ :Pot number
:T9__ :Group number

X,Y,A,B: Target value when moving X, Y, A, and B axes in rapid feed


simultaneously with ATC

Z : Target value of operation (3) in rapid feed

R : Return position before ATC (with tool length compensation


applied)
The “Z ATC position” is regarded as “R command value + 50
mm”.
When the “R” command is not specified, operation is performed
regarding “Z origin - 50 mm” as “R” command value.

L : Specify the tool number, pot (magazine) number, and group


number after “L”.
The pot with the corresponding tool is indexed by operation (2)
after ATC. (Next tool preparation)

2004-5-18 5 - 49 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

Operations
1)The tool moves to Z ATC position (50 mm above “R” point or Z origin) while
performing 0-degree spindle orientation.
When the tool specified by “T” is indexed in the magazine, the pot lowers. It starts
lowering when the Z-axis has passed the position set for
[POT LOWERING START POS.] (user parameter).
2)When the tool specified by “T” is not indexed in the magazine, the magazine swivels
and then the pot lowers.
When the specified tool is indexed in the magazine and the pot is at the lower limit,
the arm swivels and then the pot rises.
X, Y, A, and B axes also move to the specified positions.
See the ATC section for details of ATC sequence.
3)The tool moves to the specified Z-axis position.

Precautions
. The pot, magazine, and arm do not stop even when the [RST] key or the [STOP]
button is pressed during operations 1) to 3) above. The X, Y, Z, A, and B axes stop
immediately.
. All data other than G100 can be omitted. However, a T code must be used at least
once before G100 is used.
. When G100 is used, tool diameter compensation is canceled. Tool length
compensation is also canceled in operation 3).
. When the tool diameter compensation (G41 or G42) and XY axes movement
commands are used for the G100 block, tool diameter compensation begins in format
1 when X and Y axes movement 2) commences, regardless of the current parameters.
. The tool length compensation command is used for the G100 block, tool length
compensation become valid from operation 3).
. The Z-axis moves as described below during operation 1).
(1) When R point is specified for G100 block
The Z-axis moves to the position where the tool tip is “R point + 50 mm” in
accordance with the tool length compensation.
The larger tool compensation value before or after change is applied.
When tool length compensation is not applied, the setting for
[ATC REFERENCE TOOL LENGTH] (user parameter) is used.
(2) When R point is not specified for G100 block
The tool rises to the Z origin, regardless of the tool length.

2004-5-18 5 - 50 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 5 Preparation function(canned cycle)

. When the Z-axis movement and tool length compensation commands are not used
for the G100 block, operation 3) is performed in accordance with the setting for
[ATC REFERENCE TOOL LENGTH] (user parameter).
· An alarm occurs when an M code other than a spindle command is used for the
G100 block.
An alarm occurs when the A- or B-axis command is used although the optional A-
or B-axis is not installed.
· The target position the pot lowers to is determined by the distance between
[ATC RETURN HEIGHT] and [POT LOWERING START POSITION]
(user parameters).

ATC

(1) Magazine swivels


(2) Pot lowers
5
(3) Arm swivels
(4) Pot rises
ATC ends when the above sequence is completed.
Operation (3) (arm swivels) is performed at high speed.
When the tool breakage detection command is specified for tools in the magazine,
detection is performed after operation (4) (pot rises).

Next tool preparation

Next tool preparation is performed after the pot has risen in the ATC sequence.
When ATC is not performed, only next tool preparation is performed.
When the next tool is already indexed, next tool preparation is not performed.
1) Magazine swivels
Next tool preparation ends when the above sequence is completed.

2004-5-18 5 - 51 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
Chapter 5 Preparation function(canned cycle) 32A/R2A/20A/S2B

(This page is a blank.)

2004-5-18 5 - 52 eTCOMNCPR5-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 6 Preparation function(coordinate calculation)

CHAPTER 6

PREPARATION FUNCTION
(COORDINATE CALCULATION)

6.1 List of coordinate calculation function


6.2 Coordinate calculation parameter
6.3 Details of coordinate calculation function
6.4 Usage of coordinate calculation function

2004-5-18 6-1 eTCOMNCPR6-1


TC-31A/31AN/22A/S2A
Chapter 6 Preparation function(coordinate calculation) 32A/R2A/20A/S2B

6. Coordinate calculation function


This function is for calculating the point group coordinates in one block.
Point groups are such as on a linear line, on a grid and on a circular arc.
By combining such functions as the canned cycle etc., drilling at each point group
is available by one command.

6.1 List of coordinate calculation function


Table 6-1 List of coordinate calculation function
G code Name Function

G36 Bolt hole circle Coordinate calculation of point group on circular


arc.

G37 Linear (angle) Coordinate calculation of point group on linear line


by angle designation.
6
G38 Linear(X,Y) Coordinate calculation of point group on linear line
by coordinate designation.

G39 Grid Coordinate calculation of point group on grid.

6.2 Coordinate calculation parameter


Command format
G36
.
. X_Y_I_J_K_P_Q_ ;
.
G39

X,Y: Reference point of coordinate calculation


I,J,K,P,Q: Coordinate calculation parameter
(1) Reference point coordinate (X,Y)
This should be commanded by the working coordinate system.
When this is omitted, the current position becomes the reference point.

(2) Coordinate calculation parameter (I,J,K,P,Q)


This should be commanded in the same block as the G36~G39.
This parameter is effective only in the block, and automatically cleared after
calculation is finished.

2004-5-18 6-2 eTCOMNCPR6-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 6 Preparation function(coordinate calculation)

Relation of each calculation function and parameter is as shown below.

Parameter
Function G code
I J K P Q

Bolt hole circle G36

Linear(angle) G37

Linear(X,Y) G38

Grid G39

Be sure to specify. Otherwise, alarm occurs.


If the command is omitted, it is regarded as 1.
Brank It is no need to enter any data. Any data will be ignored.

6.3 Details of coordinate calculation function


6.3.1 Bolt hole circle 6
While setting the commanded coordinate value as a circular center, the coordinate
value equally dividing a circular arc from a certain point is calculated.

Command format G36 X_ Y_ I_ J_ K_ P_ ;

X,Y : Coordinate of the circular arc center


I: Circular arc radius
J: Angle of the start point to the X axis
K: No. of machining (Max. 999)
P: No. of divisions (Max. 999.999)
(Ex.) G36 X0 Y0 I50 J30 K5 P6 ;

2004-5-18 6-3 eTCOMNCPR6-1


TC-31A/31AN/22A/S2A
Chapter 6 Preparation function(coordinate calculation) 32A/R2A/20A/S2B

(Note) Coordinate values are calculated from the start point in the
CCW direction.

6.3.2 Linear (angle)


With the reference point at the commanded coordinate, the coordinate values along
the linear line at the angle formed by the X axis are calculated.

Command format G37 X_ Y_ I_ J_ K_ ;

X,Y : Coordinate of reference point


I : Interval between machning points
J: Angle intersecting the X axis
K: No. of machining (Max. 999)

(Ex.) G37 X0 Y0 I20 J30 K6 ;

(Note 1) When K is omitted, it is regarded as 1.


(Note 2) The reference point becomes the first machining point.

6.3.3 Linear (X, Y)


With the reference point at the commanded coordinate, the coordinate values added
in the X and Y directions respectively are calculated.

Command format G38 X_ Y_ I_ J_ K_ ;

X,Y : Coordinate of reference point


I : Interval on the X axis
J: Interval on the Y axis
K: No. of machining (Max. 999)

2004-5-18 6-4 eTCOMNCPR6-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 6 Preparation function(coordinate calculation)

(Ex.) G38 X0 Y0 I20 J15 K4 ;

(Note 1) When K is omitted, it is regarded as 1.


(Note 2) The reference point becomes the first machining point. 6
6.3.4 Grid
With the reference point at the commanded coordinate, the coordinate values of the
grid composed of points arranged at an even interval and parallel to both the X-
axis and the vertical axis are calculated.
By specifying an angle to the X axis, the total form can be inclined.

Command format G39 X_ Y_ I_ J_ K_ P_ Q_ ;

X,Y : Coordinate of reference point


I : Interval on the X axis
J: Interval on the Y axis
K: No. of machining point in the X direction (Max. 999)
P: No. of machining point in the Y direction (Max. 999)
Q: Angle intersecting the X axis

2004-5-18 6-5 eTCOMNCPR6-1


TC-31A/31AN/22A/S2A
Chapter 6 Preparation function(coordinate calculation) 32A/R2A/20A/S2B

(Ex.) G39 X0 Y0 I20 J25 K4 P3 Q30 ;

(Note 1) The reference point becomes the first machining point.


(Note 2) The coordinate is calulated in the X direction from the

6 reference point.

6.4 Usage of coordinate calculation function

When drilling at 6 points along a circular arc of radius 50 as shown above:


¦
N100G81R2.Z-10.F1000K0;
N105G36X0.Y0.I50.J0.K6P6;
¦
The canned cycle data are stored by N100 and the coordinates are calculated by
N105, thus executing drilling at each point.

2004-5-18 6-6 eTCOMNCPR6-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

CHAPTER 7

MACRO

7.1 What is a Macro? 7


7.2 Variable Function
7.3 Calculation Function
7.4 Control Function
7.5 Call Function

2004-5-18 7-1 eTCOMNCPR7-1


TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

7.1 What is a Macro?


A “macro” has four main functions: variable function, calculation function, control
function (condition branch), and call function (performs the same operation
repeatedly). Using these macro functions allows you to create original canned
cycles or more flexible programs.
Details of these functions are explained in the following sections:
7.2 Variable function
7.3 Calculation function
7.4 Control function
7.5 Call function
Examples of how these functions are combined are shown below in example 1 and
on the following page in example 2.
The program creation procedure will be explained in the subsequent sections.

e.g.1 Tool breakage detection is performed once when machine program has been
executed ten times.

e.g.2 Program that performs arc cutting by designating center, radius, and angle.
X: CENTER X Y: CENTER Y R: RADIUS Z: CUT POS Z
W: STOP BEFORE WORK U: CUT START ANGLE
V: CUT END ANGLE F: FEEDRATE

Main program

2004-5-18 7-2 eTCOMNCPR7-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

Macro program O0042

7.2 Variable Function


7.2.1 Outline of variable function
For normal programs, commands are given by directly designating a numerical value
(e.g. G90, X200). Using the macro’s variable function allows you to use the value
stored in the variable for G and X commands.
The value stored in the variable can be changed in PROGRAM mode or in MDI
mode.

7.2.2 Expression of variable


(Note 1) The variable number is designated after “#”.
[Example] #100

2004-5-18 7-3 eTCOMNCPR7-1


TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

(Note2) Using brackets [ ] when designating the variable number allows you
to use the value stored in the variable or to use a formula.
[Example] #100 = #[100+10]
This formula specifies that the value stored in variable
#110 is written to #100.
(Note3) When #1 = 9, #9 = 20, and #20 = 30,
#5 = # [# [#1]] is equal to #5 = 30.
(Note4) A variable can be used instead of designating a numerical value.
[Example] #3=#2+10;
G01X#3Y10;
This formula specifies the X coordinate as the value
stored in variable 2 with 10 added to it. (If #2 is 40, X#3
is 50.) When a variable is used as address data as
shown in example 4, however, the values below the
significant digits used as address data are rounded off.
Note that an alarm will occur if the value rounded off
to the nearest significant digit exceeds the maximum
address command value.
(Ex.)Assume that the G00X#1; command is used for a
machine with a significant digit setting of 1/1000.
When #1 is 12.345678, the command format will be
7 G00X12.346.
(Note5) Variable cannot be quoted in adress N.
[Example] N#20 cannot be used.

7.2.3 Undefined variable


When the value of the variable is not defined, it is called a “NULL” variable.
#0 is always a “NULL” variable. This can be read but cannot be write.
e.g.1 When #1 is <Blank>.

e.g.2 Calculation

e.g.3 Condition formula

When #1 is <Blank> When #1 is 0 (zero)

For EQ and NE, <Blank> is considered not equal to 0 (zero).

2004-5-18 7-4 eTCOMNCPR7-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

7.2.4 Types of variables


There are two types of variables:
1. Local variable (#1 ~ #26)
2. Common variable (#100 ~ #199, #500 ~ #599)
Local variables are provided for each call level of the macro program. When a macro
program is called, the local variables of the called macro level are stored, and a new
local variable area is created for the called macro program.
Details on local variables and levels will be explained in 7.5 Call Function.

Common variables can be read from and written to any programs between any
levels.

The table below shows the detailed specifications.


Variable No. Variable type Function

#0 Constantly NULL This variable is constantly kept NULL; thus no value can
be entered.

#1 to #26 Local variable These variables can be used for each macro level.
When power is turned off, these variables are cleared to be
blank.
Substitute the variable for these range bellow.
-1.0 by 1099 to -1.0 by 10-99 , 0, 1.0 by 10-99 to 1.0 by 1099.

#100 to #199 Common variable These variables can be used among variables macro 7
programs.
When power is turned off, these variables are cleared to be
blank.
Substitute the variable for these range bellow.
-1.0 by 1099 to -1.0 by 10-99 , 0, 1.0 by 10-99 to1.0 by 1099.
Caution: Not display all of the significant figures, when the
number in a range.
Display number is rounded number.
Therefore, not always same the number on display and the
correct conference of the variable.
Refer to the "Macro display and setting".

#500 to #599 These variables can be used among variables macro


programs.
Keep the data if turn off the power.
Substitute the variable for these range and significant
figures
Meter: -999999.999 to 999999.999
(Integer: six figures, Decimal:Three figures)
Inch:-99999.9999 to 99999.9999
(Integer: five figures, Decimal: four figures)

When substitute from the number of many decimal figures


to these variable, to be upper figures by round.
Alarm occured when substitute to the over range of
numbers.

2004-5-18 7-5 eTCOMNCPR7-1


TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

7.2.5 Variable display and setting


Variables are displayed and manually set on the data bank screen.
Press the [3] and [ENT] keys at the data bank menu screen, or shift the cursor to the
menu No.3 and press the[ENT] key. The following items are displayed on the screen.

Common variables (#100~#199, #500~#599) can be referred to or changed.


MACRO DATA BANK

VARIABLE VALUE VARIABLE VALUE


#100 10.000 #101 -10.000
#102 0.000 #103 0.000
#104 0.000 #105 0.000
#106 0.000 #107 0.000
#108 100.000 #109 0.000
#110 0.000 #111 0.000
#112 0.000 #113 0.000
#114 0.000 #115 -300.000
#116 0.000 #116 0.000

#100→ _

7 EDIT
END
MODE
F0 F1 F2 F3 F4

Number display
Variable for #100 to #199, display the number, only variable is in a range bellow.
The display changes to [***********], if not in a range.

Meter:-999999.999 to 999999.999
(Integer: six figures, Decimal: three figures)
Inch:-99999.9999 to 99999.9999
(Integer: five figures, Decimal: four figures)

Not display all of the significant figures, when the number in a range.
Display number is rounded number.
Therefore, not always same the number on display and the correct conference of
the variable.

7.2.6 Macro (system variable)


1. Interface input/output signal

Signal input #1000 ~ #1015 R

Signal output #1100 ~ #1115 R/W


Signal batch reading (16 bits) #1032 R
Signal batch writing (16 bits) #1132 R/W

2004-5-18 7-6 eTCOMNCPR7-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

[Example of use]
A signal is output from the program to external output port 103.
· Assign #1100 to port N103 using the user parameter (external output signal).

EXTRL OUT SIIGNAL USERPARAMETER

NO. 103 #1100 NO. 104


NO. 105 NO. 106
NO. 107 NO. 108
NO. 109 NO. 110
NO. 303 NO. 304
NO. 305 NO. 306
NO. 307 NO. 308
NO. 309 NO. 310

NO. 103® _
92.OILPMP 97.POSSW 102. #1102
93.BATALM 98.POSSW 103. #1103
94.XPOSSW 99.POSSW 104. #1104
95.YPOSSW 100. #1100 105. #1105
96.ZPOSSW 101. #1101 106. #1106

NEXT MENU

EDIT
END
MODE

F0 F1 F2 F3 F4

· A signal is output to port 103 when the command is used in the program below. 7
.
.
#1100 = 1;
.
.

2. Workpiece coordinate origin


The workpiece coordinate origin is read and written.
Workpiece coordinate (G54) #5221 ~ #5226 R/W

(G55) #5241 ~ #5246 R/W


. . .
. . .

(G59) #5321 ~ #5326 R/W


(G54.1P1) #7001 ~ #7006 R/W
(G54.1P2) #7021 ~ #7026 R/W

. . .
. . .
(G54.1P48) #7941 ~ #7946 R/W

2004-5-18 7-7 eTCOMNCPR7-1


TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

3. Tool data
The tool length and tool dia. is read and written.
TL OFFSET #11001 ~ #11099 R/W
FINE OFFSET #10001 ~ #10099 R/W
TL Ø COMP #13001 ~ #13099 R/W

FINE Ø COMP #12001 ~ #12099 R/W

4. Alarm indication
#3000 = n (ALARM MESSAGE)
Alarm number 9000 + n (n: 0 ~200) occurs, and the alarm message in the brackets
(the first 20 characters, reset by the [RESET] key) is displayed.
Only alphanumerical characters are used in the brackets and registered in the alarm
log.
[Example of use]
When the following block is executed:
#3000 = 6 (ABCD);
”9006 *ABCD” alarm occurs.

5. Message display and stop


7 #3006 = (MESSAGE)
After execution of the previous block is stopped, a message up to 20 characters is
displayed in brackets. When the message contains 21 characters or more, only the
first 20 characters are displayed.
The alarm number is fixed at 9300 (stop level 1, reset level 1).

6. Time
Time 1 #3001 R/W This timer counts the operation time in
increments of 10 msec.
The timer is reset to zero when the counted
time reaches 42949672.96 seconds (approx.
497 days) or when power is turned on.
After resetting to zero, it starts counting.

Time 2 #3002 R/W This timer counts the time when the start
LED is lit (STL) in increments of 10 msec.
The timer is reset to zero when the counted
time reaches 42949672.96 seconds (approx.
497 days).
The value is stored even when the power is
turned off.

2004-5-18 7-8 eTCOMNCPR7-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

7. Operation control
Operation #3003 R/W MFIN
control 0: WAIT
2: NOT WAIT

Operation #3004 R/W FEEDOVERRIDE EXACT STOP


control 0: VALID
2: INVALID

#3003
·”0" is set when power is turned on.
·”0" is set when the [RESET] button is pressed or M30 is used.
·When MFIN is set to [NOT WAIT], the program proceeds to the next block without
waiting for MFIN. In addition, MFIN is not confirmed to be OFF before the M
signal is output.
·When MFIN is set to [NOT WAIT], the next M signal is output after the time set
for [EXT SIGNAL OUTPUT TIME (MFIN OFF)] (user parameter - switch 1) has
elapsed.

#3004
·”0" is set when power is turned on.
·”0" is set when the [RESET] button is pressed or M30 is used. 7
·When [SPINDLE OVERRIDE] is set to [INVALID], override is fixed at 100%,
regardless of the position of the [OVERRIDE] switch on the operation panel.
·Spindle override and rapid feed override are also fixed at 100%.

2004-5-18 7-9 eTCOMNCPR7-1


TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

8. Modal information
The called modal information can be read.
Variable No. G Code

#4001 G00~G03,G102,G103,G202,G203

#4002 G17
#4003 G90,G91
#4004 G22,G23

#4005 G94
#4006 Inch 20, Metric 21
#4007 G40,G41,G42

#4008 G43,G44,G49
#4009 G73~G89,G177~G189
#4010 G98,G99

#4012 G66,G67
#4014 G54~G59
#4015 G61,G64
7 #4016 G68,G69,G168
#4107 D code
#4109 F code

#4111 H code
#4113 M code
#4114 Sequence number

#4115 Program number


#4119 S code
#4120 T code

#4113
· M code returns the M number executed last.

#4114
· Sequence number returns the N number executed last, instead of the
number of the block currently being executed.
N90 #100 = 0;
N100 #100 = #4114:
When the above is used, 100 is set for #100.

#4115
· Program number returns the sub program number if the sub program is
being executed.

2004-5-18 7 - 10 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

9. Current position
Coordinate Tool Read while
No. Contents
system offset traveling
#5001~ End point Workpiece coordinate Included Possible
#5006 coordinate system

#5021~ Current Machine coordinate system Included Not possible


#5026 position

#5041~ Current Workpiece coordinate Included Not possible


#5046 position system

#5061~ Skip Workpiece coordinate Included Possible


#5066 coordinate system

#5081~ Tool length Not possible


#5086 offset

#5101~ Servo Not possible


#5106 deviation

“Not possible” is listed in the “Read while traveling” column for “Current position”,
“Tool length offset”, and “Servo deviation”. This means that the value is not
guaranteed because the value is set when “interpretation” is performed.
In the program below, the macro command is executed in the block during
interpretation while the axis travel block is being executed, so the position during
travel is read, instead of the position traveled to in the previous block.
7
X-10.;
X-10.;
X-10.;
#100=#5021;

7.3 Calculation Function


7.3.1 Calculation type
Calculations such as those below are possible for variables and numerical values.

[Supplementary explanation]
· Numerical values are entered for i, j, and k of #i, #j, and #k (e.g. #10),
indicating they are macro variables.
· Instead of #j and #k, a constant can also be used for the right side of the
equation.

2004-5-18 7 - 11 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

Variable definition Definition and replacement


and replacement

Addition Addition
Subtraction
Logical OR
Exclusive OR

Multiplication Multiplication
Division
AND

Function Sine
Cosine
Tangent
Reverse tangent
Square root
Absolute value
BCD to BIN conversion
BIN to BCD conversion
7 Rounding off
Rounding down to nearest
whole number
Rounding off to nearest whole
number

7.3.2 Calculation order


The order that an expression is evaluated is as shown below.
1. Function
2. Multiplication
3. Addition
To replace the above order, use brackets [ ].
Brackets [ ] can be used up to five times, including the brackets for the function.

7.3.3 Precautions for calculation


Note 1 Formula
The right side of the equation can be connected using a constant, variable,
function, or operator. When using a constant, any value without a decimal
point is regarded as having a decimal point at its end.
[Example] #1 =12;, #1 is regarded as 12.000.
Be sure to use brackets [ ] when performing calculation.
[Example] G1Y [#100+0.1]
Note 2 Angle calculation
The unit for SIN, COS, TAN, and ATAN functions is “degree”.
For example, 90 degrees and 30 minutes is designated as 90.5 degrees.

2004-5-18 7 - 12 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

Note 3 Logical calculation


Logical sum (OR), logical product (AND), and exclusive-or (XOR) perform
the following calculation for each bit of the integral number. Decimal places
are regarded as “0”.
Note 4 Calculation
Result of AND Result of OR Result of XOR
object
0 and 0 0 0 0
0 and 1 0 1 1
1 and 0 0 1 1
1 and 1 1 1 0
0602.doc
Conversion between BCD and BIN
BIN indicates binary number.
BCD indicates binary-coded decimal number. The value of each digit in a
decimal number is expressed as a 4-bit binary number.
[Example] 12 = 0001 (4 bits) 0010 (4 bits)
The binary number 00010010 is the decimal number 18. When 12 is
converted from BIN to BCD, the result will be 18.
Conversion from BCD to BIN is performed in the reverse of the above.
Decimal places in the conversion source number are always regarded
as zero (0).
Note 5 Range of constant
The range of constants that can be used in the formula is as below.
-999999999~-0.000000010 7
+0.00000001~+999999999
The maximum number of digits that can be designated is 9 for a decimal
number.

Note 6 Calculation accuracy


When calculation is performed for the macro statement, small calculation
errors occur and these accumulate as the calculation is repeated. However,
the data is retained internally using up to approximately 15 significant digits
in floating-point format, thus ensuring calculation accuracy.

7.4 Control Function


The control function allows you to change the flow of the program in the middle of
the program by designating certain conditions.
The control function has the following three types:
1. GOTO statement (Unconditional branch)
2. IF statement (Conditional branch)
3. WHILE statement (Repetition)
Possible controls using these statements will be described below.

7.4.1 GOTO Statement (unconditional branch)


The program is branched unconditionally to sequence number “n” (n: 1 ~ 9999).

Command format GOTO n; (n: sequence number)

2004-5-18 7 - 13 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

An alarm will occur when the sequence number “n” is not within the range 1 to 9999
or there is no corresponding sequence number.
The sequence number can also be designated by a formula.

[Example]
N1 GOTO 3;
N2 GOTO #10;
N3 ;

N2 (sequence number 2) is skipped unconditionally.


If N2 is executed, the program skips to the sequence number of the value stored in
#10.

The sequence number can be skipped by GOTO only within the same program.
When GOTO is designated, a search is started toward the end of the program, and
the first sequence number found is enabled.
When the search reaches the end of the program, it starts again from the top of the
program.

7.4.2 IF statement (conditional branch)


7 IF is followed by a condition formula.

Command format IF [condition formula] GOTO n; (n: 1 ~ 9999)

When the condition formula is satisfied, the program is branched to the sequence
number “n”.
When not satisfied, the next block is executed.
The following condition formulas are available:

Types of condition formula

#i EQ #j #i is EQ #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 #j or more

#i LE #j #i is #j or less
(Note 1) Use square brackets for condition formula.
(Note 2) The range of numerical values that can be used in the
conditional expression is -2147483647 to 2147483647.
If a value not within this range is used, an alarm will
occur.

2004-5-18 7 - 14 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

[Example]

:
:
(1) IF[#100 EQ 50] GOTO 123;
:
:
(2) IF[#101 GT 102] GOTO 123;

:
:
(3) GOTO 124;
:
:
(4) N123;
:
:
(5) N124;
:
:

At (1) above,
7
If variable #100 is 50, the program skips to (4), where the sequence number is
123.
If it is not 50, the program proceeds to the next block (2).
At (2) above
If #101 is larger than 102 (#101 > 102), the program skips to (4), where the
sequence number is 123.
If #101 is less than 102 (#101 £ 102), the program proceeds to the next block
(3).
At (3) above, the program unconditionally skips to (5) via the GOTO statement.

7.4.3 WHILE statement (repetition)

Command format

WHILE is followed by a condition formula.


When the condition formula is satisfied, the program between DO and END is
executed.
When not satisfied, the program proceeds to the block after END.
When WHILE (condition formula) is omitted, the program between DOm and END is
repeated endlessly.
Use square brackets for the condition formula.
[Example1] WHILE statement]
WHILE [condition formula] DO m; (m = 1 ~ 4)

2004-5-18 7 - 15 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

(Note 1) The range of numerical values that can be used in the


conditional expression is -2147483647 to 2147483647.
If a value not within this range is used, an alarm will
occur.

Condition satisfied Processing Condition not satisfied

END m; 0603.doc

7.4.4 Precautions for control function

Note1 DOm to ENDm must correspond one to one in the WHILE statement.
If not, an alarm will occur.

:
WHILE [#100 LT 10]DO 1;
:
:
7 WHILE [#101 EQ 50]DO 1;
:
:
END 1;
:

Identifier “m” can be used multiple times as long as the above condition is met.

:
WHILE [#100 LT 10]DO 1;
:
:
END 1;
:
:
WHILE [#101 EQ 50]DO 1;
:
:
END 1;
:

2004-5-18 7 - 16 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

Note 2 DOm ~ ENDm should not be overlapped in the WHILE statement.

:
WHILE [#100 LT 10]DO 1;
:
:
WHILE [#101 EQ 50]DO 2;
:
:
END 1;
:
:
END 2;
:

Note 3 Depth of nesting for DO is up to 4-fold in the WHILE statement.

.
.
.
.
WHILE [ ”100 LT. 10 ] DO 1;
.
.
.
WHILE [ ”101
.
LT 20 ]DO 2;
.
.

WHILE [ ”102
.
.
LT 30 ]DO 3; 7
.
.
.
WHILE [ ”103 LT 40 ]DO 4;
.
.
.
.
END 4;
. 4-fold 3-fold 2-fold 1-fold
.
.
.
END 3;
.
.
.
.
END 2; .
.
.
.
END 1;
.
.
.
.

Note 4 IF statement and WHILE statement


IF ~ GOTO cannot be branched to a section between WHILE and END.
IF[#100 LT 10]GOTO 123;
:
:
WHILE [#101 EQ 0] DO 1;
:
:
N123;
:
:
END 1;

2004-5-18 7 - 17 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

Note 5 IF statement and WHILE statement


IF ~ GOTO within WHILE ~ END cannot be branched to a section outside
WHILE ~ END.

WHILE [#101 EQ 0] DO 1;
:
:
IF[#101 EQ 10]GOTO 123;
:
:
END 1;
:
:
N123

7.5 Call Function


Using G65 and G66 (described in a later section), another program can be called and
executed. This function is called a “macro call function”. The called program is
called a “macro program”.
7
A unique canned cycle can be easily created using this function when performing
the same operation repeatedly.

A macro program call (G65, G66) can be executed in MEM mode but cannot be
executed in MDI mode.
The called macro program is returned to the call source by executing M99. When
M02 or M30 (end of program) is executed, the macro program ends without
returning to the calling source. (Memory operation ends.)

<Difference between M99 and M02>

G65 G65

M99 M02
Return End

0604.doc
In addition, one macro program can call another macro program using G65 and G66.
This parent/child relationship is possible for up to four generations. (This state is
described by the phrase “the depth of nesting for macro program is up to 4-fold”.
This is called a “multiple nesting call”.)

2004-5-18 7 - 18 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

A macro program call function enables the designated value to be transferred from
the call source program to the call destination program using arguments. (See 7.5.3
for details on arguments.)

M98 (sub program call) (see chapter 10 for details) is a function similar to a macro
program call (G65, G66). The difference between these functions is explained in
section 7.5.3.

Each type of macro call function is explained in the following sections.

7.5.1 Simple call function


G65 is generally used to call a macro program.

Command format G65 P_L_(Argument);

P : Macro program number to be called


L : Number of calls to be repeated (up to 9999)
If “L” is omitted, “1” is automatically selected.

(Argument): Data transferred to macro. Can be omitted.


See 7.5.3 for argument.
7
[Example1]
G65 P200;
This format specifies that a program between Nos. 200 and 299 is called once.

[Example2]
G65 P200L2;
and
G65 P200;
G65 P200;
This format specifies that a program between Nos. 200 and 299 is called twice.

2004-5-18 7 - 19 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

7.5.2 Modal call function


When a macro program is automatically called each time an axis movement command
is given once registered, it is called a “modal call function”.

Use G66 to register a modal call and G67 to cancel registration. When a modal call is
registered, the macro program is executed after each axis movement.

Command format G66 P_L_(Argument);

P : Macro program number to be called


L : Number of calls to be repeated (up to 9999)
If “L” is omitted, “1” is automatically selected.
(See descriptions for G65).
(Argument) :Data transferred to macro. Can be omitted.
See 7.5.3 for argument.
To cancel a modal call, use the following command.

Command format G67;

[Example1]
7 G66 P10: (1) Register call for program number 10.
G01X10.0Y10.0; (2) Call program number 10 after execution of ‚.
G01X1.0Y1.0; (3) Call program number 10 after execution of ƒ
G67; (4) Cancel registration.
G01X10.0Y10.0; (5) Does not call any program.
G01X1.0Y1.0; (6) Does not call any program.
Program number 10 is called once after (2) is executed. Program number 10 is also
called once after (3) is executed.
Programs are not called after (5) and (6) are executed.

Note 1 G67 must be designated by a program besides a call program.


G66 mode can also be canceled using M30.

Note 2 G66 cannot be designated in G66 mode.

Note 3 G66 command is only used to register macro program call.


Macro programs cannot be called with this command.

2004-5-18 7 - 20 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

7.5.3 Arguments for macro calls


The macro call function enables numerical data to be transferred from the call source
to the call destination using arguments.

[Example of argument designation]


Example: G65 P200L2A50D60;
In this case, [A50D60] is an argument, meaning A = 50 and D = 60.
(See 7.5.1 for “P” and “L”.)

Note 1 "A” and “D” are called an “address”.


The macro program called with an argument designated receives the value as a local
variable.
[Example]
The values designated for “A” and “D” are copied to local variables #1 and #7
respectively.
Thus, the called macro program obtains the value referring to corresponding
variables.
Example of reference: #24 = #7; (variable #24 ← Value of D, 60)

Note 2 Characteristics of local variables differ from those of common variables.


See 7.2.4 for details.
7
Note 3 The command range using an argument is as bellow.
Metric unit system :+/-999999.999
Imperial unit system :+/-99999.999

2004-5-18 7 - 21 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

The table below shows the relationship between addresses with an argument
designated and variables in macro.

Argument designation
A #1

B #2
C #3
D #7

E #8
F #9
G -

H #11
I #4
J #5

K #6
L -
M #13
7 N -
O -
P -

Q #17
R #18
S #19

T #20
U #21
V #22

W #23
X #24
Y #25

Z #26

(Note)Arguments can be designated by all address except for G, L,


N, O, and P.
Some addresses may not require designation of arguments.
Local variables corresponding to omitted addresses are blank.

2004-5-18 7 - 22 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 7 Macro

7.5.4 Difference between G65 and M98

1. Arguments can be designated for G65, but cannot be designated for M98.
2. Local variables are available for G65 depending on the depth of nesting,
but are not available for M98.
3. Calling depth of nesting for G65 is up to 4-fold.
When combined with that for M98, up to 8-fold are possible.

2004-5-18 7 - 23 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
Chapter 7 Macro 32A/R2A/20A/S2B

7.5.5 Multiple nesting call


Macro calling depth of nesting is up to 4 -fold.
Local variables (#1 ~ #26)are provided for each macro level. When macro is called
by G65, local variable of called macro level is stored once, and new local valiable of
called macro program is prepared. When M99 is executed,stored local variable
becomes valid.
Common variables can be read and written even between different macro 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.;

M30; M99; M99; M99; M99;


7
Local variable Local variable Local variable Local variable Local variable
of level 0 of level 1 of level 2 of level 3 of 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
. . . . .
. . . . .
#26 #26 #26 #26 #26

Common variables : Commonly read and written from any macro level.

#100 ~ #199
#500 ~ #599

2004-5-18 7 - 24 eTCOMNCPR7-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

CHAPTER 8

Z AXIS MEASUREMENT SYSTEM

8.1 Cautions
8.2 Setting
8.3 Z-axis Thermal Displacement Offset
8
8.4 Tool Breakage Detection
8.5 Automatic Tool Length Measurement

2004-5-18 8-1 eTCOMNCPR8-1


TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

8.1 Cautions
We thank you very much for your purchase of Z-axis Measurement System
(hereinafter "the product"). The following sections describe the features, parts
configuration, precautions on use and compatibility between data bank and
machining data of the product and important points in your studying this manual.
Precaution
M406 signal is used for air blow. This signal cannot be used for other purposes.
The tool length measurement device is used fastened on the sub-table. This
decreases available surface area of the table. In installing workpieces and jigs,
exercise due care not to strike the tool length measurement device. Take the same
care in removing these.
Make sure of the Z-axis position. Inaccurate positioning may cause collision with
the tool length measurement device, workpieces and jigs.
After use, remove chips and other debris depositing inside the cover. Particularly
be sure to thoroughly remove cutting oil and the like adhering to the contact area.

Feature
This product precisely detects the Z-axis position of the tool tip. This function
permits three functions: Z-axis thermal displacement offset, tool breakage detection
and automatic tool length measurement. The tool length detector is used for
detection. The following are the brief description of each function.

Z-axis thermal displacement offset:


Restricts dimensional displacement due to Z-axis elongation within a given range.
8 Displacement is measured to correct the machine position.

Tool breakage detection:


Detects tool breakage during operation.

Automatic tool length measurement:


Permits the measurement of tool length with the tool remaining set on the spindle.
You can enter the automatic tool length measurement mode on the block operation
screen for the MDI operation mode.

Parts Configuration
The product includes the following parts. Check for the numbers. If anything is
missing, please contact us at the store where you bought the product or a nearby
branch of our company.
Instruction manual : 1 copy
Tool length measurement device : 1 unit
Relay plate : 1 pc
M10 bolt : 2 pcs
Flat washer : 2 pcs
M5 nut : 2 pcs
Electric wire : 1 pc
Reference tool : 1 pc

2004-5-18 8-2 eTCOMNCPR8-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

Important Points in Studying the Manual


If you use a single function only, read the description of that function, tool length
measurement device installation method and parameters. In setting parameters,
choose only those which are required for the function. Alarm codes are listed at the
end with alarm causes and remedy therefore provided. Use the list in the event of
alarm.

Technical Terms
In this manual alarm messages, parameters and operation indications are written in
capitals. In explaining key operation key names are written in capitals as well and
enclosed in [ ] as shown below.
Example for indicating key operation
"Press [RST] key." Since "reset" is the key name, it is enclosed in [ ].

8.2 Setting
There are a number of parameters not included in the Parameter List. The following
explain such parameters.

MSMT DEV INSTALL POSITN


This sets the coordinates of the measurement device placed on the sub-table. Begin
setting this 1 h or more after turning the machine power off. Heat remaining in the
machine may affect operation.

Procedures
1. Install the tool length measurement device. For the method, refer to page.
8
2. Install the provided reference tool in the tool holder. For the method, refer to
page.
3. Install 2 in the magazine.
4. Register the reference tool in the tool menu and on the magazine screen.
Check that the tool length value is correctly input.
5. Detaching the tool now on the spindle, attach the reference tool thereon.
Press [Z. RTN] key.
6. Adjust position in manual operation. Adjust Z-axis in the increment of 0.001
mm.
X- and Y-axes: Move the reference tool tip to the center of the tool
length measurement device contact face.
Z-axis: Upon completion of X- and Y-axis positioning, adjust Z-
axis as follows.
Z-axis positioning Display the I/O screen (slave). Descend the spindle
until its tip contacts the contact face. Further descend
the spindle until the numeral on the screen changes
from "0" to "1."
INPUT 4 00000000 00000000

Changes from "0" to "1."

2004-5-18 8-3 eTCOMNCPR8-1


TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

7. Press [POS] key. Note down the machine coordinates indicated on the
screen.
8. Raise the z axis. Set the value so that the tool length of the reference tool is
subtracted from the value noted on the parameter.
With this the setting of measurement device installation position is
completed.

THERMAL MEASUREMENT MOTION COND.


This sets conditions for measurement motion.

EVERY COMMAND
This specifies a series of measurement motion to be performed each time the
command is issued.

WATCHING
With this parameter, measurement motion is not performed each time the command
is issued, because frequent measurement is not necessary when elongation due to
heat on Z-axis is constant. Based on displacement measured, the subsequent
measurement motion is canceled. The premise for WATCHING is that environment
of the machine remains unchanged. When room temperature is radically fluctuating
and when work replacement time is not constant, WATCHING does not correctly
operate. In that case set the thermal measurement motion conditions to EVERY
COMMAND.

More about WATCHING


Normal operation of WATCHING requires the setting of the following parameters.
Z-AXISMACHININGACCURACY
THERMAL MATCH DISPLACMT AMNT
NUMBER OF THERMAL WATCHING
NO. OF THERMAL WATCHING CANCEL
INITIAL SET NO. OF THERMAL MSMT
THERMAL WATCHING STOP TIME

2004-5-18 8-4 eTCOMNCPR8-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

In setting these, although the initial set values are used as a rule, values must be
changed in some cases depending on the type of works to be machined and work
replacement time.

The next page presents examples of such change.

Example changing of set value


Procedures
1. Check a cycle time (work replacement time) of the machine program.
2. Set THERMAL MEASUREMENT MOTION COND. to EVERY COMMAND
and begin machining.
3. Upon completion of 280 to 290 or so cycles or 1 h before the end of working
hours, stop the machine for a period twice longer than work replacement
time.
4. Repeat machining once again (only once).
5. Referring to the thermal measurement data on the PRODUCTION MONITOR
screen, set respective parameters as follows.

Z-AXIS MACHING ACCURACY


Set that machining accuracy which must be at least maintained.
The value thus set is used to only check the range of displacement, not to keep the
machining accuracy within itself.
(Ex.) Set 0.020 when is required.

THERMAL WATCH DISPLACMT AMNT


Set about half the Z-axis MACHINING ACCURACY. The value thus set is used to 8
judge displacement. Based on the result of judgment, update the frequency of
watching.
THERMAL WATCHING STOP TIME
If displacement after work replacement time is increased twofold (displacement in 4.
above) is within THERMAL WATCH DISPLACMT AMNT, set time twice longer
than work replacement time. If the value exceeds this amount, set THERMAL
MEASUREMENT MOTION COND. to EVERY COMMAND. In this case presume
that WATCHING is impossible. The value set herein indicates time to initialize the
watching conditions.
THERMAL WATCHING STOP TIME
This sets the number of watching motions at which displacement becomes stable
within THERMAL WATCH DISPLACMT AMNT after machining is began. The
value thus set indicates the frequency of measurement unconditionally taken after
machining is began.

Parameters for watching are valid for works of the same type. When the type of
. work is changed, change parameters as well.

Caution
Do not turn machine power off until all setting is completed. Turning power off
before this causes thermal measurement data on the PRODUCTION MONITOR
screen to be lost.

2004-5-18 8-5 eTCOMNCPR8-1


TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

XY POSITION RADIUS SHIFT DIRCTN, THERMAL


Use this depending on the tool used.

THRM OFFSET AMT LIMIT VALUE, RETRACT AMNT AFT


MEASUREMENT
Do not change this unless special reasons are justified.

MSMT FEEDRATE B TOOL DIAMTR


For measurement feedrates 1 and 2, A or B applies depending on the tool diameter.
This parameter sets the diameter of a tool to which feedrate B applies.

MEASUREMENT FEEDRATE 1 A, MEASUREMENT


FEEDRATE 2 A
Set a feedrate not to cause tool breakage. When a tool with a small diameter is
caused to contact the tool length measurement device, choose the slower rate.
Otherwise the tool may break.

MEASUREMENT FEEDRATE 1 B, MEASUREMENT


FEEDRATE 2 B
Set this to 3,000 mm/min or lower. Setting of a larger value than this may break the
tool length measurement device.

MEASUREMENT FEEDRATE 2 A, MEASUREMENT


FEEDRATE 2 B, THERMAL MEASUREMENT FEEDRATE
8 Set this to 50 mm/min or lower.

8.3 Z-axis Thermal Displacement Offset


This chapter explains thermal displacement offset and the offset method using
thermal measurement data.

8.3.1 Offset Capacity


As shown below.

Offset Capacity Conditions

0.01 mm max./day Aluminum machining.


Room temperature fluctuation
Machining at the same height as the measuring
height.
Reference tool is used.
Thermal displacement detection is executed
immediately before machining.

The offset capacity varies with environment in the factory.


Use these conditions only as a guideline.
Offset requires time to complete thermal displacement detection, which is some
12 s or shorter per operation.

2004-5-18 8-6 eTCOMNCPR8-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

8.3.2 For Correct Thermal Displacement Offset


Observe the following instructions not to cause errors in offset.
Measuring tool
Use reference tools. Do not use cutting tools. The following explain reference tools
and cutting tools.
Reference tool: Tools used for measurement only are called reference tools in
this manual. Although a place on the magazine available for
tool installation is occupied, it is advisable to use the reference
tool for accurate measurement.
Cutting tool: This indicates a tool used for practical machining. If a cutting
tool is used as measuring tool, position detection is executed
under the influence of worn cutting edge, tool thermal
expansion and chip adhesion. The machine deems the position
detected as Z-axis thermal displacement in correcting it.
Although measurement is possible with cutting tools, it is
advisable to use the reference tool for accurate measurement.

.
Measurement of measuring tool length
. Use the automatic tool length measurement function.
To eliminate the effect of thermal displacement during setting, begin
measurement 1 h or more after power is turned off.
For the method for automatic tool length measurement, refer to Chapter 6.
Do not measure measuring tool length after executing thermal displacement
offset. 8
Programming
Place the command before machining which requires accuracy.
If the tool is left installed on the spindle for over 2 or 3 min under heat generating
in the spindle, heat conducting via the spindle elongates the tool, consequently
deteriorating accuracy. Therefore, write the program such that the reference tool
and the cutting tool requiring accuracy are not installed on the spindle.

Measuring height
Adjust insomuch as possible the measuring height to that at which practical
machining is carried out. For the method, refer to page.

Machining environment
Maintain room temperature as constant as possible.
Maintain air current in the factory as constant as possible.
Do not add coolant during machining. Otherwise coolant temperature changes,
affecting tool elongation.
When machining has to be stopped for over 20 or 30 min, cut coolant off. If the
coolant motor is kept turning without circulating coolant, coolant temperature
abnormally increases.
Firmly fasten jigs so that works do not chatter or deflect. In jigs with the motor,
heat develops in the motor, causing thermal expansion to the jigs. This may
deteriorate accuracy in some cases.

2004-5-18 8-7 eTCOMNCPR8-1


TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

8.3.3 Command
This section describes the commanding method and valid conditions for
commanding. An example program is presented as well.
Effective conditions
The command is valid after M206 is excuted in the memory operation mode until the
next operation is perfoemed or the next command is executed.
Reset
Program completion (including program completion during the execution of the
schedule program)
Setting the memory operation program
M206 and M207 cannot be commanded in the MDI mode.

8.3.3.1 Determination of thermal measurement

Command format

T : Command for the next tool preparation when it is


determined that a thermal measurement should be
performed based on the motion check. If no command is
given, a [Z MESRMENT COMD ER] error will occur.
L : Command for the next tool preparation when it is
determined that a thermal measurement should NOT be
performed based on the motion check.
8 Whether to execute a thermal measurement is determined,
and the number of commands is then updated.
When performing thermal measurement has been determined
Command the next tool preparation to address"T".
M206 is executed for the tool designated to address "T", and the designated sub
program is executed using the subsequent M207command.

When not to perform thermal measurement has been determined.


When "L" is present in the address, the next tool preparation is executed.
If "L" is omitted, however, the next tool preparation is not executed.
The subsequent M207 command is ignored.
Note:
When the Z axis measurement system is not provided, a [NO Z-AX
MEASUREMENT] error will occur.
When M206 is re-commanded between command M206 and M207, a
[Z MESRMENT COMD ER] error will occur.
When the [THERMAL MEASUREMENT FUNCTION] is set to [INVALID], it
is determined that the thermal measurement is not performed. [this
could mean “should not be performed,* or “has not been performed”]
When the machine is in the dry run or machine lock mode, the
number of commands is not counted, and it is determined that the
thermal measurement is not performed.

2004-5-18 8-8 eTCOMNCPR8-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

When the NC is TC-31A, TC-32A, TC-R2A.


When the pallet not selected by the parameter is commanded, it is
determined that the thermal measurement is not performed.
When [MEASURING DEVICE] is set to [NO] for the target pallet, a
[NO MEASURING DEVICE] error will occur.

8.3.3.2 Thermal measurement operation

Command format

P: Sub program No.


When the result of the motion check by M206 is EXECUTE, the designated sub
program is executed; when NOT EXECUTE, nothing is performed using command
M207.

When the tool diameter compensation command is not cancelled, a [COMMAND


INVALID (M)] error will occur.

Note:
When the Z axis measurement system is not provided, a [NO Z-AX
MEASUREMENT] error will occur.
When M207 is commanded without M206 being commanded, a [Z
MESRMENT
COMD ER] error will occur.
8
When the NC is TC-31A, TC-32A, TC-R2A.
When the pallet not selected by the parameter is commanded, it is
determined that the thermal measurement is not performed.
When [MEASURING DEVICE] is set to [NO] for the target pallet, a [NO
MEASURING DEVICE] error will occur.
When the pallet is not indexed, a [PALLET POS ERROR] will occur.

2004-5-18 8-9 eTCOMNCPR8-1


TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

8.3.4 Program examples


This section describes an example for the Z-axis thermal displacement offset
subprogram.

Set coolant to OFF.

Air blow ON.

Changes the tool. Positions the XY axes to the thermal


measurement position.

Cover open check. Operation is halted until the tool length


measurement device cover opens. If the cover does not open after
10 s, alarm *COVER DOESN'T OPEN occurs.

Spindle rotation in CCW direction.

Compensate the tool length.

Positions the Z axis to the measurement start position.

DWELL.

8 Detection signal OFF check.

Measurement motion.

DWELL.

Returns the Z axis to the preset retraction value.

Spindle orientation.

Detection signal OFF check.

Measurement motion.

Returns the Z axis to its home position.

Position compensation.

Air blow OFF.

Set coolant to ON.

2004-5-18 8 - 10 eTCOMNCPR8-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

R: Measurement start position


D: Measurement stop range

· When the service life of the tool set for thermal measurement has expired and the
tool is replaced, a thermal measurement is performed for the replacement tool.
With power turned off, the position offset amount due to thermal displacement is
reset.
· When memory operation is started with signal output 406 remaining on, alarm
*M406 IS ON occurs.

8.3.5 Thermal Measurement Data Screen


The current state of measurement can be referred to on the PRODUCTION 8
MOINTOR screen. This screen can display the results of a maximum of 300
measurements taken in the past. These data can be browsed for reference only.
The screen below presents data of the first thru the third measurements.

F0 F1 F2 F3 F4

2004-5-18 8 - 11 eTCOMNCPR8-1
TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

Explanation
PRT POS COMP .......... Indicates how much the offset has been achieved until
Z-axis is in the current position.
This screen indicates offset of • |0.061.
PRST NO.OF CMND ....... Represents the number of commands issued by now.
This screen indicates that the command is the third.
MSR FRQ ............... Represents the number of measurements taken.
TL OFST NO. ........... Represents the tool length offset number used for
measurement.
DISPMT AMT ............ Represents displacement measured.
TOTL DISPMT ........... Represents total displacement.
* Measurement data are displayed from here.
Caution:
Turning power off causes all data to be lost.

8.3.6 Outputting Thermal Displacement


Measurement Data to the Computer
With the aid of the optional external communications equipment, thermal
displacement measurement data can be output to the computer.
Data are in the text form.
The use of table calculation software makes possible data analysis.
Data possible to be output: MSR FRQ
TL OFST NO.
8 NO OF CMND
DISPMT AMT
TOTL DISPMT

F0 F1 F2 F3 F4

2004-5-18 8 - 12 eTCOMNCPR8-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

. Move the cursor to [THRM MSR DT], and press the [1] and [E. STA] keys. The
thermal measurement data is output.
. When using the metric system or the imperial system, MSMTNM or MSMTNI is
added to the file name respectively.
Data format.
. A line consists of 35 bytes. Each item is sectioned in a fixed length.

TOOL NO. OF DISPMT TOTL


MSR FRQ NO. CMND AMT DISPMT Line feed
6 bytes 2 bytes 7 bytes 7 bytes 7 bytes

****** , ** , ******* , ******* , ******* (0Dh) (0Ah)

For details of communications, refer to Chapter 11, External Communications


Equipment, of the Instruction Manual for Optional Equipment.

8.3.7 Example Parameter Setting and Alarm


This section presents an example of parameter setting. When the value set in the
parameter is not as specified, the corresponding alarms occur. Such alarms are
explained in this section as well.

Example setting
The following example shows a case where a cycle time in the program is short when
periodical measurement is wanted.
ITEM Setting 8
THERMAL MEASUREMENT MOTION COND 1 (WATCHING)
Z-AXISMACHINIGACCURACY 0.999
THERMAL WATCH DISPLACMT AMNT 0.999
NUMBER OF THERMAL WATCHING 1
NO.OF THERMAL WATCHING CANCEL 5
INTIAL SET NO.OF THERMAL MSMT 1

For THERMAL WATCHING STOP TIME, refer to page.


Measurements are taken at the first, second, fourth and eighth commands. After the
eighth, measurements are taken every five commands, namely at the 13th, 18th, 23rd
and so on.

2004-5-18 8 - 13 eTCOMNCPR8-1
TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

Alarm occurrence
. *TRM DISPMT AMT OVR occurs at the beginning of machining after turning
power on.
The cause is considered unstable displacement at the beginning of machining.
Increase INITIAL SET NO. OF THERMAL MSMT.
*TRM DISPMT AMT OVR occurs not only at the beginning of machining after
turning power on, but also at other occasions.
. Increase NUMBER OF THERMAL WATCHING and decrease THERMAL
WATCH DISPLACMT AMNT.
With larger NUMBER OF THERMAL WATCHING, measurement begins only
after displacement stabilizes better than otherwise. This is because past
measurement data are referred to the number of times equal to the number of
thermal watching settings.
THERMAL WATCH DISPLACMT AMNT provides a criterion by which it is
judged whether or not measurement can be canceled. With smaller THERMAL
WATCH DISPLACMT AMNT, measurement is canceled only after thermal
displacement stabilizes better than otherwise.
Should *TRM DISPMT AMT OVR occurs even after these operations, set
THERMAL MEASUREMENT MOTION COND. to EVERY COMMAND.

8.3.8 Example Offset


This section presents an example of practical offset using a time-course change
8 graph of Z-axis thermal displacement and thermal measurement data.

Graph of Z-axis thermal displacement


TOTL DISPMT(mm)

NUMBER OF PROGRAM(NO OF CMND)

2004-5-18 8 - 14 eTCOMNCPR8-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

THERMAL MEASUREMENT DATA

The following lists parameters setting values.


THERMALMEASUREMENTMOTIONCMND................WATCHING
Z-AXIS MACHINIG ACCURACY....................................0.020(mm)
THERMALWATCHDISPLACMTAMNT.........................0.010(mm)
NUMBEROFTHERMALWATCHING................................2(TIMES)
NO.OFTHERMALWATCHINGCANCEL..........................10(TIMES)
INTIALSETNO.OFTHERMALMSMT..............................10(TIMES)

Measurement are taken unconditionally


until 10 commands are issued.

( )Indicats MSR.FRQ

[*TRM DISPMT AMT OVR]

( )Indicates the frequency of watching

2004-5-18 8 - 15 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

Interpretation and explanation of thermal measurement


data
The previous page shows the data of the first thru 30th measurements. The data are
divided by lateral lines into eight sections (1) thru (8).
The following give explanation by section.

(1) INITIAL SET NO. OF THER•~MAL MSMT is 10. Measurements are taken
unconditionally until 10 commands are issued. Watching frequency is
initially set to 1. For the meaning of watching frequency, refer to the section
describing parameters.

(2) From the 11th measurement onwards, judgment as to whether or not


measurement motion should be canceled begins. Since the watching
frequency is 1, judgment concerns possibility whether or not the frequency
can be 2 (1×2).
The judging method is as follows.
Since watching frequency is wanted to be 2, subtract total displacement A
obtained two measurements before from total displacement A at the current
measurement. The resulting value is checked if it is within THERMAL
WATCH DISPLACMT AMNT.
If it exceeds this amount, that indicates that thermal displacement has not
stabilized yet, making judgment that the watching frequency cannot be

8 updated.
If the resulting value of subtraction is within THERMAL WATCH
DISPLACMT AMNT, since the NUMBER OF THERMAL WATCHING is 2,
subtract total displacement A obtained three measurements before from total
displacement A obtained a measurement before.
The resulting value is checked if it is within THERMAL WATCH
DISPLACMT AMNT.
If it is within, since the difference between two successive displacements A
and another A is within THERMAL WATCH DISPLACMT AMNT, thermal
displacement is judged stabler than before, consequently setting watching
frequency to 2.
Thus, cancellation is executed once in every two measurements from the
subsequent measurement onwards. This process can be summarized as
follows.
Judgment is made to see if watching frequency can be made twice larger than
the current setting. If judged possible, the watching frequency is updated
and cancellation takes place at that frequency. Based on in this judgment is
the difference between total displacement A at the current measurement and
total displacement A obtained (watching frequency•~2) measurements
before, which is checked if it is within THERMAL DISPLACMT AMNT and
if it remains so at all measurements taken the number of times equal to the
NUMBER OF THERMAL WATCHING.

2004-5-18 8 - 16 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

(3) Since watching frequency is 2, judgment is made to see if the frequency can
be made 4 (2×2). At the 18th command specified conditions are met, making
it possible to update watching frequency to 4.

(4) Since watching frequency is 4, judgment is made to see if the frequency can
be made 8 (4×2). At the 30th command specified conditions are met, making
it possible to update watching frequency to 8.

(5) Since watching frequency is 8, judgment is made to see if the frequency can
be made 16 (8×2). At the 54th command specified conditions are met, making
it possible to update watchingfrequency. However, since NO. OF
THERMAL WATCHING CANCEL is 10, the watching frequency is set to 10.

(6) Since watching frequency is 10, judgment is made to see if the frequency can
be made 20 (10×2). Since the NO. OF THERMAL WATCHING CANCEL is
10, it is impossible to have 20 for watching frequency. Measured
displacement registers -0.011 at the 84th command. This value falls between
Z-axis MACHINING ACCURACY and THERMAL WATCH DISPLACMT
AMNT, which suggests that thermal displacement begins to lose stability.
Hence, the watching frequency should be updated to 5 (10÷2).

(7) Since watching frequency is 5, judgment is made to see if the frequency can
be made 10 (5×2). At the 104th command specified conditions are met,
making it possible to update watching frequency to 10.
8
(8) Displacement registers 0.021 at the 124th command. Since this value exceeds
the Z-axis machining accuracy, alarm *TRM DISPMT AMT OVR occurs, stop
ping the machine.

The flowchart of this method is as shown on the next page.


It is designed to help your understanding.

2004-5-18 8 - 17 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

Flowchart

Start

Program end?

No

Read one motion from


machining data

Measurement Yes
command?

No
Operation hold time Yes
Execute a machining data >
Thermal watching
stop time?
Initializethermal
measurement conditions
8 No

Watching frequency Yes


yet to be omitted = 0?

Execute measurement and


No compensation

Number of command:= Number of command +1


Revise measurement history

Watching frequency yet to be omitted: =


Watching frequency yet to be omitted 1
Watching frequency
renewal decision

End

2004-5-18 8 - 18 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

Flowchart

Watching frequency omission judgment start

Measurement
result (displacement) Yes
>
THERMAL WATCH
DISPLACMT AMNT

No

Judging pointer
Yes
Watching frequency
Current no. of commands issued
1

No
Judgment to be made at the Yes
frequency equal to NUMBER OF
THERMAL WATHING
completed

Measurement result
No Yes
(displacement)
>
Z-axis MACHINING
ACCURACY
From judgment pointer
Total thermal displacement in Yes
the section of 2 watching frequency No
<=
THERMAL WATCH
DISPLACMT AMNT Watching frequency

Watching frequency/2
8
When watching frequency/2
No is less than 1, assume it as 1.
When the value is not an
Watching frequency Watching frequency integer, discard decimals.
updating unallowable updating allowable

Judging pointer

Judging pointer watching frequency


Thermal measurement conditions initialization

Alarm *TRM DISPMT AMT OVR occurs.


All updating possible Yes
&
Initial measurement
completed
Watchingfrequency

No 2* watching frequency
Watching frequency is clamped within
the number of thermal watching cancel.

Watching frequency yet to be omitted

Watching frequency -1

Watching frequency updating judgment completed

2004-5-18 8 - 19 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

8.4 Tool Breakage Detection


This chapter describes operation to detect tool breakage. For the method for
installing the measurement device, refer to Chapter 2. Relevant parameters are
provided in the parameter list in Chapter 3. Choose from the list the ones required
for this function and set.

8.4.1 Determination of tool breakage detection

Command format M203 P_ ;

P: Sub program NO.


Note:
When the tool diameter compensation command is not cancelled, a
[COMMAND INVALID(M)] error will occur.
When the Z axis is measurement system is not provided, a [ NO Z-AX
MEASUREMENT] error will occur.
When the [TOOL BREAKAGE DETECT FUNCTION] is set to [INVALID], it is
determined that the thrmal measurement shoud not be performed.
When the [TOOL BREAKAGE DETECT FUNCTION] is set to [INVALID], the
command is ignored.
When M203 is used in a restarting program, a RESTART ERROR will occur.
When the NC is TC-31A , TC-32A , TC-R2A.
When no measuring device is provided for the target pallet, the command is
8 ignored.
When the pallet is not indexed, a [PALLET POS ERROR] will occur.

M203 cannot be comanded in the MDI mode.

2004-5-18 8 - 20 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

8.4.2 Program examples

This section describes an example for the Z- axis thermal displacement offset
subprogram.

Set coolant to OFF.

Returns the Z axis to its home position.

Air blow ON.

Positions the XY axes to the thermal measurement position.

Cover open check.

Spindle rotation

Positions the Z axis to the measurement start position.

DWELL.

Detection signal OFF check.

Measurement motion.
8

Push in the Z axis direction (to turn the detectin signal ON)

Detection signal ON check.

Returns the Z axis to its home position.

Air blow OFF.

Set coolant to ON.

2004-5-18 8 - 21 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

R:Measurement start position


D:Measurement stop range

Supplementaryexplanation
If [RST] key is pressed after alarm *TOOL BROKEN ERROR occurs, the service life
setting of the broken tool is reset to zero (0).

In machines provided with the Z-axis measurement system, when signal output 406
is on, memory operation cannot be started. If memory operation is started
nevertheless, alarm *M406 IS ON occurs.

8 Dry run during operation with broken tools


When dry run is valid, measurement movement and detection signal confirmation
are not executed.

2004-5-18 8 - 22 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

8.5 Automatic Tool Length Measurement


This chapter describes operation to automatically measure tool length.
For the method for installing the measurement device, refer to Chapter 2.
Relevant parameters are provided in the parameter list in Chapter 3.
Choose from the list the ones required for this function and set.

8.5.1 Command
Commandingmethod
Automatic measurement of tool length: command this on the screen.
First display the MDI operation screen in the MDI operation mode.

F0 F1 F2 F3 F4

Method to display automatic tool length measurement screen


With [F1] key pressed on the MDI operation screen, the machine enters the
automatic tool length measurement mode, displaying the automatic tool length
measurement screen as shown on the next page.

2004-5-18 8 - 23 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

F0 F1 F2 F3 F4

Setting method
· Tool
A single tool or more than one tools can be measured. Set the pot number for the
tool(s) to be measured.
Ex:
When the setting is "1": The tool in pot 1 is measured.
8 When the setting is "1/10": Tools in pot from 1 to 10 are measured successively
in the order that the pot number increases.
When the setting is "2/1": Tools in pot from 2 to 1 are measured successively
in the order that the pot number increases. Since
this case begins with "2," measurement ends with "1."
Measurements are taken of those tools only which are registered in magazines.
When measuring more than one tools, the measuring position is all the same.

· Measuring position

For "0": XY position is equal to TOOL LENGTH MSM DEV INSTALL


POSITN.
For "1": XY position is equal to TOOL LENGTH MSM DEV INSTALL
POSITN + tool radius. Set the radius shift direction via XY POSITION
RADIUSSHIFTDIRECTN.
For "2": Set the machining XY coordinates position.
When the cursor is on X or Y items, with [F4] key pressed, the current
machining coordinates are taken in.

Reference
Once these values are set, they remain on the screen even after operation is
completed. To clear the screen, press [DELETE].

2004-5-18 8 - 24 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 8 Z axis measurement sysytem

8.5.2 Operation
This section explains a series of operations for automatic measurement of tool
length. The following show operation indications to appear on the screen and the
description of the operations indicated.
Returns the Z axis to its home position.

Spindle orientation.

Changes the tool.

This allows XY coordinates to be positioned


at the comanded point.

Air blow ON. If the cover does not open after 10 s,


alarm * COVER DOESN'T OPEN occurs.

Cover open check.

Spindle orientation.

Detection signal OFF check.

Measurement motion (at MEASUREMENT FEEDRATE1 ).

Feed (at MEASUREMENT FEEDRATE1 ).

Detection signal OFF check.

Measurement motion(at MEASUREMENT FEEDRATE2 ).


8
Measurement display

Set the tool length.

Returns the Z axis to its home position( Z ).

Spindle orientation.

Changes the tool.

This allows XY coordinates to be positioned


at the comanded point.
Repeat (6) to (13).

Set the tool length.

Returns the Z axis to its home position( Z ).

Air biow OFF

2004-5-18 8 - 25 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
Chapter 8 Z axis measurement sysytem 32A/R2A/20A/S2B

Supplementary explanation

Use [SINGL] key for single operation.


Manual operation in the MDI operation mode is possible.
With [MANU] pressed while pressing [MDI] key, axis movement is possible with
8 [JOG] key even if the current mode is set to automatic tool length
measurement.
Axis movement is possible with [+/-] [RPD] [JOG] and [STEP] keys.
If [START] key is pressed ahead of other keys, alarms may occur. Relationship
between circumstances under which the key is pressed and the resulting alarms
is as shown below.
Circumstances under which the key is pressed Resulting alarm

PROTECT switch is ON. *PROGRMPROTECT


Tool menu is being edited. TOOL MENU EDITING
Tool is absent. *NO TOOL IN MGZN
Specified XY position is absent. DATA IMCOMPLETE

If magazine tools are changed during automatic measurement of tool length,


alarm *CHG TOOL DG WK occurs.

Single stop in operation (8), SENSOR OFF CONFTN


When FEEDRATE A for the small diameter is chosen for measurement in
operation (9), even if the current operation is cyclic, execute single stop before
performing operation (8).
At this operation the machine becomes ready for accepting manual operation in
the key input operation mode, thus displaying message AFTER LOWERING Z
MANUALLY CLOSE TO MEASUREMENT DEVICE, PRESS START KEY. Press
[-Z] key to move Z-axis to the vicinity of the measurement device and thereafter
re-start. This shortens measurement time.

2004-5-18 8 - 26 eTCOMNCPR8-2
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

CHAPTER 9

ORIGIN MEASUREMENT

9.1 Before origin measurement


9.2 Setting of data on origin measurement
9.3 Operation of origin measurement
9.4 Display of the measured results
9.5 Lock key operations 9

2004-5-18 9-1 eTCOMNCPR9-1


TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

Origin measurement
Origin measuring functions
1. G121 -- X and Y coordinates of a corner

+Z

+Y

+X

2. G129 -- X and Y coordinates of a groove

+Z

+Y

+X

3. G122 -- X and Y coordinates of the axis of parallel groove

+Z
9
+Y

+X

4. G123 -- X and Y coordinates of the axis of parallel bos

+Z

+Y

+X

2004-5-18 9-2 eTCOMNCPR9-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

5. G124,G126 -- X and Y coordinates of the center of a hole

+Z

+Y

+X

6. G125,G127 -- X and Y coordinates of the center of a boss

+Z

+Y

+X

7. G128 -- Z coordinate of the top surface of a workpiece

+Z

+Y

+X

9
+Z

+Y

+X

2004-5-18 9-3 eTCOMNCPR9-1


TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

9.1 Before origin measurement


Set the necessary parameters of User Parameter 7 (ZERO MEASUREMENT).
Unless the parameters are set correctly, the probe may be damaged.

9.2 Setting of data on origin measurement


User Parameter 7 (ZERO MEASUREMENT)

Item Description

PROBE OFFSET VALUE 1 Sets the difference between the stylus tip ball center and the spindle center
when the detection signal is turned on while the touch probe is attached to
PROBE OFFSET VALUE 2 the spindle.
X component and Y component of the difference are prob offset 1 and 2
respectively.
To set the difference, carry out 6.PROBE OFFSET(G121/G129 ) of automatic
centering.

Setting range: -9.999 ~ 9.999 mm


-0.9999 ~ 0.9999 inch

PROBE OFFSET VALUE 3 Sets the difference of the center of the circle obtained by the three-point
measurement(G124,G125) and the actual circle center.
PROBE OFFSET VALUE 4
X component and Y component of the difference are probe offset 3 and 4
respectively.
To set the difference, carry out 7.PROBE OFFSET(G124/G125) of automatic
centering.

Setting range: -9.999 ~ 9.999 mm


-0.9999 ~ 0.9999 inch

2004-5-18 9-4 eTCOMNCPR9-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

Item Description

MEASURING MOTION (0:TYPE1)


1) It is checked that the detection signal is off.
2) The probe moves in the specified axis direction at the speed preset to
(0:TYPE11:TYPE2)
MEASURING SPEED 1.
3) When the detection signal has turned on, the axis stops traveling.
4) The probe moves forward for the RETURN DISTANCE AFT MEASURNG.
5) The probe moves in the specified axis direction at the speed preset to
MEASURING SPEED 2.
6) When the detection signal has turned on, the axis stopstraveling.
7) The probe returns to the position of 4).
8) It is checked that the detection signal is off.

(1:TYPE2)
1) It is checked that the detection signal is off.
9
2) The probe moves in the specified axis direction at the speed preset to
MEASURING SPEED 2.
3) When the detection signal has turned on, the axis stops traveling.
4) The probe moves forward for the RETURN DISTANCE AFT MEASURNG.
5) It is checked that the detection signal is off.

2004-5-18 9-5 eTCOMNCPR9-1


TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

Item Description

MEASURINGSPEED1 Sets the first measuring speed for MEASURING MOTION(TYPE1).

*Relief amount of probe = L (mm)


*SKIP FEED TIME CONSTANT 1 = t (msec)
*MEASURING SPEED 1 = F1 (mm/min)
*Delay in control system = td (msec) = 12 (msec)

Overtravel amount due to Overtravel amount


delay in control system

Safety rate
Setting range:1 5000 mm/min
0.1 196.8 inch/min

MEASURINGSPEED2 Sets the second measuring speed for MEASURING MOTION(TYPE1) and the
measuring speed for MEASURING MOTION(TYPE2).

*Allowable error in control system = E (mm)


*MEASURING SPEED 2 = F2 (mm/min)
*Delay in control system = td (msec) = 0.5 (msec)

Setting range:1 5000 mm/min


9 0.1 196.8 inch/min

STOPDISTANCE Sets the distance between the probe end face at the MSRNG measurement
BEFORE start point and the estimated workpiece surface. When measuring has been
skipped for the values preset to STOP DISTANCE BEFORE MSRING and
MEASURING TRAVEL LMT DISTANCE , SENSOR SIGNAL OFF alarm will
occur.

Setting range:0.000~99.999mm
0.0000~9.9999inch

2004-5-18 9-6 eTCOMNCPR9-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

Item Description

MEASURINGTRAVELLMT Sets the amount of overtravel when the measuring skip has exceeded the
DISTANCE estimated value(program command value).
Setting range:0.000~99.999mm
0.0000~9.9999inch

MEASUREMENT When the difference between the measured value and the estimated value
TOLERANCE 1 (program command value) has exceeded the preset value, MEASD VAL
ERR LRG(1) will occur. When 0 is set, the value error check is not carried
out.
Setting range:0.000~99.999 mm
0.0000~9.9999 inch

MEASUREMENT If the difference between the current measurement result and the previous
TOLERANCE 2 measurement result exceeds the setting range, MEASD VAL ERR LRG(2)
occurs. However, the difference is not checked in the following cases:
*Zero (0) is set.
*1st origin measurement is performed after the power is turned on (1st
measurement for each of measurement results 1 to 4).
*No previous measurement result exists.
*Current G code differs from the previous G code.
Setting range:0.000~99.999mm
0.0000~9.9999inch

MEASURNG Sets the amount that the measuring probe retracts where it has contacted
RETURN DISTANCE AFT the non measuring object during automatic measurement.
9
*RETURN DISTANCE AFT MEASURNG = Lb (mm)
*SKIP FEED TIME CONSTANT 1 = t (msec)
*MEASURING SPEED 2 = F2 (mm/min)

Setting range:0.000~99.999mm
0.0000~9.9999inch

2004-5-18 9-7 eTCOMNCPR9-1


TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

(Note)
·The setting values of MEASURING SPEED, RETURN DISTANCE AFT
MEASURNG and so on differ according to the probe mounted. Consult the probe
maker and set the values.
·During origin measurement,the speed that the probe moves to the measurement
start point or returns from the measured point conforms to the modal of G00 and
G01.
G00... Rapid traverse rate
G01... F command value
G02/G03/G102/G103/G202/G203... IN ARC MODE alarm will occur
·Perform origin measurement with the tool length offset function ON or the probe
may be damaged.
·Check that the chips are not stuck to the measuring probe tip and the surface of
the workpiece to be measured. We shall not bear responsibility for the decreased
measurement accuracy due to the above cause.
·The mode cannot be changed during origin measurement.
If mode selection is attempted, DURING ORIGIN MEASURNG alarm will occur.
·To prevent the probe from being damaged, press the [SINGL] key for the first
origin measurement and check the condition every single operation.

9.3 Operation of origin measurement


9.3.1 Corner
boss G121 X_ Y_ I_ J_ K_L_D_Z_ R_Q_
Command format
groove G129 X_Y_ I_ J_ K_ L_D_Z_R_Q_ ;

+Z

+Y

+X

2004-5-18 9-8 eTCOMNCPR9-1


TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

+Z

+Y

+X

X,Y ...Estimated corner value


I ,K ...X-axis position when measuring in the Y direction, offset value from (X, Y)
J ,L ...Y-axis position when measuring in the Y direction, offset value from (X, Y)
D ...Tool offset number
Z ...Z coordinate during measurement
R ...Z coordinate of return point when the Z axis has traveled from one measure
ment point to the other measurement point or when the movement has com
pleted.
Q ...Register No. that stores the measured results ("1" when omitted)

Note 1)
When either “I” or “J” is not commanded , when “I” is zero (o) , or
when “J” is zero (0), an alarm occurs. 9
Note 2)
When "K" or "L" is commanded, the tilt angle (the angle used for
coordinate rotation) is calculated should the work piece become tilted.
An [ZERO MESR ADRS ERR] error will occur when both "K" and "L" are
commanded or zero (0) is commanded.
Note 3)
Before executing G121/ G129, execute PROBE OFFSET VALUE (G121/
G129) of CENTER ALIGNMENT and set the offset value to PROBE
OFFSET VALUE 1 and PROBE OFFSET VALUE 2 of parameter 7.

2004-5-18 9-9 eTCOMNCPR9-1


TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

Measurment pattern
1. The spindle is oriented. The probe moves to the first measurement start point of
the X and Y axes.
2. The probe moves to the Z axis measurement height.
3. The first measurement is carried out (Position "J").
4. Measured by position "L" when "L" is commanded
5. The probe moves to the Z axis return point.
6. The spindle is oriented. The probe moves to the second measurement start
point of the X and Y axes.
7. The probe moves to the Z axis measurement height.
8. The second measurement is carried out.
9. Measured by position "K" when "K" is commanded
10. The probe moves to the Z axis return point.

I and J symbols, spindle orientation, and direction of the measuring skip movement.

+Y

1ST

J +X

I
1ST ... spindle 0° , in the +X direction
2ND
2ND... spindle 0° , in the +Y direction

9
2ND
+Y
I

+X
J

1ST
1ST ... spindle 0° , in the +X direction
2ND ... spindle 180° , in the -Y direction

+Y

1ST
+X
J

I 1ST ... spindle180°, in the -X direction


2ND 2ND... spindle 0°, in the +Y direction

2004-5-18 9 - 10 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

2ND
+Y
I
J
+X

1ST

1ST... spindle180°, in the -X direction


2ND... spindle180°, in the-Y direction

Measurment pattern
1. The spindle is oriented. The probe moves to the first measurement start point of
the X and Y axes.
2. The probe moves to the Z axis measurement height.
3. The first measurement is carried out (Position "J").
4. Measured by position "L" when "L" is commanded
5. The spindle is oriented. The probe moves to the second measurement start point
of the X and Y axes.
6. The second measurement is carried out.
7. Measured by position "K" when "K" is commanded
8. The probe moves to the Z axis return point.

1ST +Y

9
2ND +X

1ST ... spindle 180° , in the -X direction


2ND... spindle 180° , in the -Y direction

+Y

2ND +X

1ST ... spindle 180° , in the -X direction


1ST 2ND... spindle 0° , in the +Y direction

2004-5-18 9 - 11 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

1ST +Y
2ND
J
I +X

1ST ... spindle 0° , in the +X direction


2ND... spindle 180° , in the -Y direction

+Y

I
2ND J +X
1ST ... spindle 0° , in the +X direction
1ST
2ND... spindle 0° , in the +Y direction

9.3.2 Parallel
groove G122 X_ Y_ I_(J_) D_ Z_ R_ Q_
Command format
boss G123 X_ Y_ I_(J_) D_ Z_ R_ Q_

+Z

+Y

9 +X

+Z

+Y

+X

X,Y ... Estimated groove (boss) center value


I,J ... Width of groove
I : Measures in the X direction.
J : Measures in the Y direction.
Note: I and J cannot be commanded at the same time.
D ... Tool offset number
Z ... Z coordinate during measurement
R ... Z coordinate of return point when the Z axis has traveled from one
measurement point to the other measurement point or when the
movement has completed.
Q ... Register No. that stores the measured results ("1" when omitted)

2004-5-18 9 - 12 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

Groove

Measurment pattern
1. Spindle orientation 0 .
The probe moves to the first measurement start point of the X and Y axes.
2. The probe moves to the Z axis measurement height.
3. The first measurement is carried out .
4. Spindle orientation 18 0. The probe moves to the second measurement start
point of the X and Y axes.
5. The second measurement is carried out.
6. The probe moves to the Z axis return point.

a) When I is commanded
+Y

I
+X

2nd 1st

b)When J is commanded

+Y

+X
9
1st
2nd

2004-5-18 9 - 13 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

Boss

Measurment pattern
1. Spindle orientation 180 . The probe moves to the first measurement start point of
the X and Y axes.
2. The probe moves to the Z axis measurement height.
3. The first measurement is carried out.
4. The probe moves to the Z axis return point.
5. Spindle orientation 0 . The probe moves to the second measurement start point
of the X and Y axes.
6. The probe moves to the Z axis measurement height.
7. The second measurement is carried out.
8.The probe moves to the Z axis return point.

a) When I is commanded

+Y

+X

2nd 1st

b) When J is commanded
9 +Y
1st

+X

2nd

2004-5-18 9 - 14 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

9.3.3 Circle
The circle center is calculated by measuring three points.
hole G124 X_ Y_ I_ D_Z_ R_Q_
Command format
boss G125 X_ Y_ I_ D_ Z_ R_Q_

The circle center is calcutaled by measuring four points.


hole G126 X_ Y_ I_D_ Z_ R_Q_
Command format
boss G127 X_ Y_ I_ D_Z_ R_Q_

X,Y Estimated hole (boss) center value


I Diameter of measuring circle
D Tool offset number
Z Z coordinate during measurement
R Z coordinate of return point when the Z axis has traveled from one
measurement point to the other measurement point or when the movement
has completed.
Q Register No. that stores the measured results ("1" when omitted)

+Z

+Y

+X

+Z

+Y 9
+X

2004-5-18 9 - 15 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

Measurment pattern

Hole ... Three-point measurement


1. Spindle orientation 0 • K . The probe moves to the first measurement start point of
the X and Y axes.
2. The probe moves to the Z axis measurement height.
3. The first measurement is carried out (in the +Y direction ).
4. Spindle orientation 0 . The probe moves to the second measurement start point
of the X and Y axes.
5. The second measurement is carried out (in the direction of 120 from the first
point).
6. Spindle orientation 0 . The probe moves to the third measurement start point of
the X and Y axes.
7. The third measurement is carried out (in the direction of 240 from the first point).
8. The probe moves to the Z axis return point.

1ST

2ND 3RD

9
Boss Three-point measurement

1. Spindle orientation 180 . The probe moves to the first measurement start point
of the X and Y axes.
2. The probe moves to the Z axis measurement height.
3. The first measurement is carried out (in the -Y direction ).
4. The probe moves to the Z axis return point.
5. Spindle orientation 180 . The probe moves to the second measurement start
point of the X and Y axes.
6. The probe moves to the Z axis measurement height.
7. The second measurement is carried out (in the direction of 120 from the first
point).
8. The probe moves to the Z axis return point.
9. Spindle orientation 180 . The probe moves to the third measurement start point
of the X and Y axes.
10. The probe moves to the Z axis measurement height.
11. The third measurement is carried out (in the direction of 240 from the first
point).
12. The probe moves to the Z axis return point.

2004-5-18 9 - 16 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

1ST

3RD
2ND

Hole ... Four-point measurement


1. Spindle orientation 0• K. The probe moves to the first measurement start point of
the X and Y axes.
2. The probe moves to the Z axis measurement height.
3. The first measurement is carried out (in the +X direction ).
4. Spindle orientation 180• K. The probe moves to the second measurement start
point of the X and Y axes.
5. The second measurement is carried out (in the -X direction ).
6. Spindle orientation 0• K. The probe moves to the third measurement start point
of the X and Y axes.
7. The third measurement is carried out (in the +Y direction ).
8. Spindle orientation 180• K. The probe moves to the third measurement start point
of the X and Y axes.
9. The fourth measurement is carried out (in the -Y direction ). 9
10.The probe moves to the Z axis return point.

3RD

2ND 1ST

4TH

2004-5-18 9 - 17 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

Boss ... Four-point measurement


1. Spindle orientation 180• K. The probe moves to the first measurement start point
of the X and Y axes.
2. The probe moves to the Z axis measurement height.
3. The first measurement is carried out (in the -X direction ).
4. The probe moves to the Z axis return point.
5. Spindle orientation 0 . The probe moves to the second measurement start point
of the X and Y axes.
6. The probe moves to the Z axis measurement height.
7. The second measurement is carried out (in the +X direction ).
8. The probe moves to the Z axis return point.
9. Spindle orientation 180 . The probe moves to the third measurement start point
of the X and Y axes.
10.The probe moves to the Z axis measurement height.
11.The third measurement is carried out (in the -Y direction ).
12.The probe moves to the Z axis return point.
13.Spindle orientation 0 . The probe moves to the fourth measurement start point
of the X and Y axes.
14.The probe moves to the Z axis measurement height.
15.The fourth measurement is carried out (in the +Y direction ).
16.The probe moves to the Z axis return point.

3RD

9
2ND 1ST

4TH

2004-5-18 9 - 18 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

9.3.4 Z LEVEL

Command format G128 X_ Y_ Z_Q_

X,Y ... X and Y coordinates of measuring point


Z ... Z coordinate of measuring start point
Q ... Register No. that stores the measured results
("1" when omitted)

Measurment pattern

1. Spindle orientation 0 . The probe moves to the first measurement start point of
the X and Y axes.
2. The probe moves to the Z axis measurement height.
3. The first measurement is carried out (in the -Z direction ).
9

9.3.5 Positioning to the measurement position

Command format G120 X_ Y_ Z_Q_

X,Y and Z ... Incremental amount from the measurement


position
Q ... Select the desired register No. that stores
the measured results ("1" when omitted).

2004-5-18 9 - 19 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

measyrement
position

G120 Xa Yb Zc

When [G120 Xa, Yb, and Zc] is commanded, the probe moves to point P.
When the measurement data does not exist, NO MEASRUING DATA alarm will
occur.

9.4 Display of the measured results


The following screen appears when [6] is pressed on the <PRODUCTION
9 MONITOR MENU> screen or the cursor is moved to [6. MEASUREMENT
RESULTS] and [ENT] is pressed.

F0 F1 F2 F3 F4

2004-5-18 9 - 20 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 9 Origin measurement

Press the [F2] key and the previous measurement results are displayed.

F0 F1 F2 F3 F4

The measured results are reflected in the working coordinate system.

Command format G10 L99 Pn X_ Y_ Z_ Q_


Pn: n= 1 G54
2 G55
3 G56
4 G57 9
5 G58
6 G59

Command format G10 L98 Pn X_ Y_ Z_ Q_


Pn: n=1 G54.1 P1
n=2 G54.1 P2
· ·
· ·
· ·
n=48 G54.1 P48

X, Y, Z ... Coordinate of the measured position


Q ... Measurement No. to be used

e.g. Assume that the value measured by measurement No. 2 is (X, Y) = (-80,
-120) in the machine coordinate system. To assign this position to (-40,
-40) of the absolute coordinate system G55, command [G10, L99 P2 X-40
Y-40 Q2].

2004-5-18 9 - 21 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
Chapter 9 Origin measurement 32A/R2A/20A/S2B

machine
coordinate
-120 -80 system

-40
G55 -40

-40
-80

The working coordinate data G55 is changed to X = -40.000 and Y = -80.000.

9.5 Lock key operations


DRY RUN
The probe moves to the measurement start point, but measurement is not carried
out.Measurement data is not transferred, either.
MACHINE LOCK
Axes are not moved. The coordinate value on the<POSITION> screen varies.

Restart
9 When G121 to G129 are commanded during restarting, RESTART ERROR will occur.

2004-5-18 9 - 22 eTCOMNCPR9-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 10 Subprogram function

CHAPTER 10

SUBPROGRAM FUNCTION

10.1 Making subprogram


10.2 Simple call
10.3 Return No.designation from sub program

10

2004-5-18 10 - 1 eTCOMNCPR10-1
TC-31A/31AN/22A/S2A
Chapter 10 Subprogram function 32A/R2A/20A/S2B

10. Function of subprogram


When a program contains fixed sequences or frequently repeated patterns, these
sequences or patterns may be entered into the memory as a subprogram.
The subprogram can be called out in the memory operation mode.
A subprogram called by the main program can also call another subprograms.
Max 8 fold nesting is available.

main program sub program A sub program B

sub program A sub program B


calling calling

M99; M99;

One calling command can call a subprogram repeatedly.

10.1 Making subprogram


Generally, a subprogram is made by the following format.
10

M99 ;

(Note 1) Specify M99 at the last block of subprogram.


(Note 2) If another G or M code is commanded in the M99 block, an
alarm is generated.
The axis movement is not available even by commanding X,
Y or Z address.

2004-5-18 10 - 2 eTCOMNCPR10-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 10 Subprogram function

Special uses of M99


If the M99 command is executed in the main program, the control returns to the start
of the main program.

When optional
block skip is off; When optional
block skip is on;
/N0100 M99;

N0200 M30;

If the programming is done as shown above, and if the optional block skip is OFF, the
control returns to the start of the main program and executes the program repeatedly up
to N0100.
If the optional block skip is turned ON, the N0100 block is omitted and control goes to
the next block.

10.2 Simple call


A subprogram can be called out from the main program or another subprogram and
executed accordingly.

Command format M98 P_L_ ;

P: Subprogram number to be called.


L: Number of execution to be repeated. (Max. 9999) 10
If L is omitted, it is regarded as once.
(Note) If another G or M code is commanded in the M98 block, an
alarm is generated.
The axis movement is not available even by commanding X, Y
or Z address.

2004-5-18 10 - 3 eTCOMNCPR10-1
TC-31A/31AN/22A/S2A
Chapter 10 Subprogram function 32A/R2A/20A/S2B

10.3 Return No. designation from program

Command format M99 P_ ;

P : Sequence No.

10.3.1 Command by sub program


(Program execution sequence )
When the command is executed, the program returns the commanded sequence
No.of the parent program. The sequence No is serched from the top of the
program,and the program returns to the block initially found.
An alarm will occur when the commanded sequence No.is not present.

M98 P_ ;

G01 Z_ ;

N0001 ;

M99 P0001 ;

(Note)An alarm will occur unless the number of repeats commanded


by M98 is “1.”

10.3.2 Command by main program


10 When the command is executed,the program to the sequence No. commanded
within the main program. The sequence No.is searched from the top of the program
,and the program jump to the block initially found.
An alarm will occur when the commanded sequence No. is not present.

(Program execution sequence )

N0001 ;

M99 P0001 ;

2004-5-18 10 - 4 eTCOMNCPR10-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 11 Feed function

CHAPTER 11

FEED FUNCTION

11

2004-5-18 11 - 1 eTCOMNCPR11-1
TC-31A/31AN/22A/S2A
Chapter 11 Feed function 32A/R2A/20A/S2B

11. Feed function


Feedrate is specified by the number following address F.
(1) Command range
Metric system : 1~999999mm/min
1~999999 /min
Inch system : 0.1~99999.9inch/min
0.1~99999.9 /min
(2) Clamp
If the axis movement at a higher feedrate than the values specified by the machine
parameter, an alarm is generated.

11

2004-5-18 11 - 2 eTCOMNCPR11-1
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

CHAPTER 12

S,T,M FUNCTION

12. 1 S function
12. 2 T function
12. 3 M function

12

2005-06-07 12 - 1 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

12. S,T,M function


By commanding the following functions, machine motions other than the axis
movements are available.
S : Spindle speed command
T : Tool magazine number command
M : ON/OFF command of various solenoids of the machine

12.1 S function
The S code is used for specifying the spindle speed.
The spindle speed is specified by the address S and a following within 5-digit
number.
(Note 1)
The S command is not cancelled by the NC reset function, but it
becomes zero when the power is turned ON.
(Note 2)
The S command should be always given before commanding the
spindle rotation (M03,M04)
(Note 3)
When the S command is in the same block as that of axis movement,
the S command becomes effective at the same time the axis
movement starts.

12.2 T function
When commanded, the magazine rotates to the corresponding pot.
(TC-31A,22A,32A,20A)
Three commanded forms are provided as below.

12.2.1 Commanded by tool No.


Command fromat T_ _ _;

Commanded by tool No. after “T” (T1-T99), and the pot with the corresponding tool
attached is Indexed. (TC-31A,22A,32A,20A)
12 12.2.2 Commanding by pot No.(magazine No.)
Commanding by pot No.
Commanded the pot number (magazine number) using the two digit numerical values
after "T1", and the pot with the corresponding tool attached is indexed. (T101-T 1nn
,” nn” indicates the maximum numbers of the attached pots) (TC-31A,22A,32A,20A)

12.2.3 Commanded by group No.


Commanded the group number using the two digit numerical value after “ T9”
( T901-T930), and the pot with the corresponding tool attached is indexed.
(TC-31A,22A,32A,20A)

2005-06-07 12 - 2 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

12.3 M function
The M codes are used for commanding ON/OFF of various solenoids of the
machine.
It is commanded 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 devided 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.

List of M code (1)


Operration Modal/
Group M code Content order vs.
axis feed one-shot

M00 Program stop after one-shot

M01 Optinal stop after one-shot

M02 End of program

M30 End of program

M03 Spindle CW

M04 Spindle CCW

simultaneous modal
M05* Spindle stop

M19 Spindle orientation

M111 Spindle orientation(180


12
M08 Coolant pump ON before
modal
M09* Coolant pump OFF after

M06 Tool change simultaneous one-shot

M98 Sub program call

M99 Return from subprogram

The code with * is already set when the power is turned on.
2005-06-07 12 - 3 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

List of M code (2)


Operration Modal/
Group M code Content order vs.
axis feed one-shot

M400 M400 ON (Chip shower On) simultaneous modal

M401* M400 OFF (Chip shower Off)

M402 M402 ON simultaneous modal

M403* M402 ON

M404 M404 ON simultaneous modal

M405 * M404 OFF

M406 M406 ON

M407* M406 OFF

M408 M408 ON (Oil hole On)

after
M409* M408 OFF (Oil hole Off)

simultaneous modal
M458 Coolant blow On (Coolant blow)

M459 * Coolant blow Off (Coolant blow)

M490 High pressure coolant On (Coolant blow) before modal


M491
M492
M493
M494 (1)High pressure coolant type
High pressure coolant On (Coolant blow)
(2)CTS type
CTS On
12 M495 * (1)High pressure coolant type after
High pressure coolant Off (Coolant blow)
(2)CTS type
CTS Off
M496 Back washing cycle On before one-shot

2005-06-07 12 - 4 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

List of M code (2)


Operration Modal/
Group M code Content order vs.
axis feed one-shot

M211 Workpiece counter 1set


Simultaneous Modal
M221* Workpiece counter 1cancel

M212 Workpiece counter 2set


Simultaneous Modal
M222* Workpiece counter 2cancel

M213 Workpiece counter 3set


Simultaneous Modal
M223* Workpiece counter 3cancel

M214 Workpiece counter 4set


Simultaneous Modal

M224* Workpiece counter 4cancel

M230* Tool life counter set


Simultaneous Modal

M231 Tool life counter cansel

M232 Automatic corner deceleration


on
Simultaneous Modal
M233 Automatic corner deceleration
off

M800~ Signal output * for sequence


Simultaneous One-shot
M899 controller

The code with * is already set when the power is turned on.

12

2005-06-07 12 - 5 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

List of M code (3)


Operration Modal/
order vs.
Group M code Content one-shot
axis feed

M120 TOUCH signal check after one-shot

M200 Tool breakage detection


(with return motion) one-shot
after
M201 Tool breakage detection

M203 Tool breakage detection judgement ___ one-shot

M206 Thermal watch condition judgement ___ one-shot

M207 Thermal measurement motion ___ one-shot

M320 Measurement device sensor ON ___ one-shot


confirmation

M321 Measurement device sensor OFF ___ one-shot


confirmation

M322 Sensor cover open check ___ one-shot

M332 Z-Axis position correction before one-shot

M350 Thermal displacement compensation(x) before one-shot

M351 Thermal displacement compensation(Y)

M352 Thermal displacement compensation(Z) before one-shot

M353 Thermal displacement compensation


(XYZ)

M438 Magazine cover open


simultaneous one-shot
M439 Magazine cover close
12

2005-06-07 12 - 6 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

List of M code (3)


Operration Modal/
Group M code Content order vs.
axis feed one-shot

M241 Tap time constant 10% simultaneous modal

M242 Tap time constant 20%

M243 Tap time constant 30%

M244 Tap time constant 40%

M245 Tap time constant 50%

M246 Tap time constant 60%

M247 Tap time constant 70%

M248 Tap time constant 80%

M249 Tap time constant 90%

M250* Tap time constant 100%

M234 High-accurate mode ON simultaneous modal

M235* High-accurate mode OFF

M410 Index of the pallet 2 to the outside


one-shot
M411 Index of the pallet 1 to the outside

M430 Pallet (C axis) unclamp


modal
M431* Pallet (C axis) clamp

The code with * is already set when the power is turned on. 12

2005-06-07 12 - 7 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

List of M code (4)


Operration Modal/
Group M code Content order vs.
axis feed one-shot

M440 Unclamping B axis


modal
M441 Clamping B axis

M442 Unclamping A axis


modal
M443 Clamping A axis

M450 One-shot output (Proceeds to the


next block after the signal has
M451 turned off )
simultaneous one-shot
One-shot output (Proceeds to the
M455
next block without waiting untill
the signal has turned off )
M456

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

M465 Waiting forM464 signal OFF

M466 Waiting for M466 signal ON

M467 Waiting for M466 signal OFF

12
M468 Waiting for M468 signal ON

M469 Waiting for M469 signal OFF

2005-06-07 12 - 8 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

List of M code (4)


Operration Modal/
order vs.
Group M code Content one-shot
axis feed

M480 M480 signal ON

M481 M480 signal OFF

M482 M482 signal ON

M483 M482 signalOFF simultaneous modal

M484 M484 signalON

M485 M484 signalOFF

M486 M486 signalON

M487 M486 signal OFF

The code with is already set when the power is turned on.

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)
When the spindle should be rotated in the blocks after the M00
command, command M03 or M04. The coolant pump ON should also
be commanded if necessary.

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) 12


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 another G or M code is commanded in the M02 or M30 block, an
alarm is generated.
The axis movement is not available even by commanding X, Y or Z
address.

2005-06-07 12 - 9 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

12.3.4 Commands on the spindle


(M03,M04,M05,M19,M111)
When the axis movement command is in the same block, that command and the
spindle command are executed at the same time.

12.3.4.1 Spindle orientation to desired angle


(M19)

Command format M19 R_;

R: Spindle angle (-360Deg to 360Deg )


Orients the spindle to the angle commanded by “R”.
Turns the spindle clockwise when the angle is commanded in the positive value and
counter clockwise when the angle is commanded in the negative value.
After the Spindle is activated, the servo motor stays on.

12.3.5 M signal level output (M400 ~ M409)


External output ON OFF
terminal name (low voltage) (high voltage)

M400 M400 M401


M402 M402 M403
M404 M404 M405
M406 M406 M407
M408 M408 M409

· Using M401 command turns off the chip shower when the time set for [CHIP
SHOWER DRAIN TIME] (user parameter - switch 1) has elapsed.

12.3.6 Tool change (M06)


(1) When TC-31A,22A

Command format M06 T _ X _ Y _ Z _ R _ A _ B _ L _;


12
(3)

ATC position
(2) (4)

R origin position

(1) (5)
Single block stop point

2005-06-07 12 - 10 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

T _ _ : Tool number.
T1 : Pot number
T9 : Group number
X, Y A,B Target value when moving the X , Y ,A, and Baxes at in rapid feed
simultaneously with tool change motion.
Z : The target value of movement‡D in rapid feed.
R : Return position before tool change motion
(operatedated with tool length compensation applied)
L : Specify the tool number, pot (magazine) number, and group number
after “L”. The pot with the corresponding tool attached is indexed by
operation (3) after ATC. (Next tool preparation)
Operations
(1)Tool moves to Z axis point "R" while performing O-degree spindle orientation.
(2)Tool moves to Z-axis ATC origin while X,Y,A,and Baxes move to commanded
value.
When "T"is commanded tool moves to Z-axis ATCorigin and magazine swivels.
(3)Arm swivels to change tool.
Tool change motion differs depending on setting on [MAGAZINE TOOL]screen.
See section on "Tool Change Motion"for details.
(4)Tool moves to Z-axis point"R".
(5)Tool moves to X-axis commanded position.

Caution
When performing cycle operation,tool moves in cutting mode
between operations (1) and (2) and operrations (4) and (5).

When [RESET]key or [STOP SWICH]key is pressed between operrations (2)


and (4),machine stops after motion (4) is completed. For operation (3) (X,Y,A and
axes movement),machine stops immediately.
Machine does not stop if single block occurs between operations (1) and (4).

All data other than M06 can be omitted. However,code “T”must be commanded
once by operator before M06 is commanded.
· Tool offset is canceled when M06 is commanded. Further, tool length
compensation is canceled from operation (2).
· When tool offset (G41 or G42)and X and Y axes movement are commanded to
block M06, tool offset begins when X and Yaxes movement 2 commences.
12
Start-up is performed in format 1, regardless of parameters.
· When tool offset is commanded to block M06 ,tool offset becomes valid from
operation (4) .
· When M06 commanded is while tool length compensation (G49)is canceled,
operation (1),is performed subject to [ATC REFERRENCE] selection for user
parameter.
· Alarm appears when axis A or B is commanded while optional A and B axis are
not in use.
· When point "R” commanded position( 4 )is lower than Zaxis command position
(5), tool moves to Z-axis commanded position , and operation (5) is not performed.

2005-06-07 12 - 11 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

Tool change motion


Tool change motion differs depending on tool type set on [MAGAZINE TOOL]
screen.
(When large tool is not set on [MAGAZINE TOOL] )
The following sequence is performed:
(1)Pot raises.
(2)Magazine swivels.
(3)Pot lowers.
(4)Arm swivels at high speed.

(When large tool is set on [MAGAZINE TOOL] )


Tool change from standard tool to standard tool, and large tool to large tool
The following sequence is performed:
(1)Pot raises.
(2)Magazine swivels.
(3)Pot lowers.
(4)Arm swivels at high speed.
(5)Pot raises.
When Pot is already at upper limit before tool change motion commences,
sequences starts from (2).

When changing from large tool to large tool, arm swivels at low speed.
When changing from standard tool to standard tool, arm swivels at high speed.

Tool change from large tool to standard tool or vice versa.


The following sequence is performed:
(1)Pot raises.
(2)Magazine swivels.(Empty pot is indexed.)
(3)Pot lowers.
(4)Arm swivels .
(5)Pot raises.
(6)Magazine swivels.(Specified pot is indexed.)
(7)Pot lowers.
(8)Arm swivels .
(9)Pot raises.
12 When pot is already at upper or lower limit before tool change motion
commences,sequence starts from (3)or( 4),respectively.
For operation (2), empty pot is indexed appropriately for large tool and standard
tool.
Arm swivels at low speed when large tool is to be changed, and at high speed when
standard tool is to be changed.
Operation (9) is performed for the TC-31A only. However, it may also be performed for
the TC-22A when “next tool preparation” is performed.

2005-06-07 12 - 12 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

Notes
1) If empty pot for large tool is not available when change from large
tool to standard tool is attempted.[*NO EMPTY POT] alarm appears.
2) If empty pot for large tool is not available when change from
standard tool to large tool is attempted.[*NO EMPTY POT] alarm
appears.

Next tool preparation


Next tool preparation is performed after the arm has swiveled or the pot has risen after
the arm swivels in the ATC sequence.
When ATC is not performed, only next tool preparation is performed.
Next tool preparation is not performed when the next tool is already indexed.

The next tool preparation sequence differs depending on the type of tool set on the
magazine tool screen.

When large tool is not set on [MAGAZINE TOOL]


(1) Pot rises
(2) Magazine swivels
(3) Pot lowers
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit before next tool
preparation commences.

When large tool is set on [MAGAZINE TOOL]


· Both spindle tool and next tool are standard or large
(1) Pot rises
(2) Magazine swivels
(3) Pot lowers (not performed for TC-31A)
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit before next tool
preparation commences.

Spindle tool is standard and next tool is large or vice versa


(1) Pot rises
(2) Magazine swivels (empty pot is indexed) 12
(3) Pot lowers (not performed for TC-31A)
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit before next tool
preparation commences.

Note 1) When the next tool is changed from a large tool to a standard tool and there
is no empty pot for a large tool, the [NO EMPTY POT] error occurs.
Note 2) When the next tool is changed from a standard tool to a large tool and there
is no empty pot for a standard tool, the [NO EMPTY POT] error occurs.

2005-06-07 12 - 13 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

(2) When TC-S2A, TC-R2A or TC-S2B.

Command format M06 T _ X _ Y _ Z _ A _ B _ L _ ;

(3)
ATC position

(2) (4)

Z origin position

(1) (5)
Single block stop point

T__ : Tool number.


T1 _ _ : Magazine number.
T9 _ _ : Group number.
X, Y, A, B : Target value when moving X, Y, A, and B axes at in rapid
feed simultaneously with tool change motion.
Z : Target value of movement in rapid feed.
Command the distance from the Z origin when the incremental
mode is selected.
L : Specify the tool number, magazine number, and group number
after “L”.
The number specified by “L” becomes the T model after M06.

12

2005-06-07 12 - 14 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

Operations
(1) Tool moves to the Z-axis point and spindle orientation are executed at the same
time.
(2) Movement to the ATC origin position.
When "X, Y, A or B" is commanded in the same block, the motions are done at
the same time.
(3) The magazine indexes the tool as commanded by the address "T".
(4) Movement to the Z-axis origin position.
(5) Movement to the commanded position when Z-axis is commanded.
When the spindle command (M3 group) is given, the motion is done at the same
time.

. When performing cycle operation, tool moves in cutting mode between operations
(1) and (2)and operations (4) and (5).

. When [RESET] key or [STOP SWITCH] key is pressed between operations


(2)and (4), machine stops after motion (4) is completed.
For operation (2) (X, Y, A, and B axes movement), machine stops immediately.

Caution
. All data other than M06 can be omitted. However, code "T" must be
commanded
once by operator before M06 is commanded.
. The tool length offset and the tool dia offset are canceled when M06
is commanded.
When tool offset (G41 or G42) and X and Y axes movement are
commanded to
block M06, tool offset begins when X and Y axes movement (2)
commences.
Start-up is performed in format 1, regardless of parameters.
. When tool offset is commanded to block M06, tool offset becomes
valid from operation (5).
. Alarm appears when the other code M is commanded to block M06.
. Alarm appears when axis A or B is commanded while optional A and
B axes are not in use.

12

2005-06-07 12 - 15 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

(3) When TC-32A.

Command format M06 T _ X _ Y _ Z _ R _ A _ B _ L _ ;

(3)(4)
ATC position

(2) (5)

R Point

(1) (7)
Single block stop point

X origin X ATC
position position
(2) (3)

(4)

(6) (5)

Y ATC
position

T__ : Tool number.


T1 _ _ : Pot number.
T9 _ _ : Group number.
A, B : Target value when moving A and B axes at in rapid feed

12 simultaneously with tool change motion.


X,Y : Target value of movement(6) in rapid feed.
Z : Target value of movement(7) in rapid feed.
R : Retern position before tool change motion.
(operated with tool length compensation applied)
When "R" is not commanded, operation is performed using
[ATC SYNCHRONOUS START POS] of USER PARAMETER 1as "R"
command value.
L : Specify the tool number, pot (magazine) number, and group number
after “L”.
The pot with the corresponding tool attached is indexed by operation (4)
after ATC. (Next tool preparation)

2005-06-07 12 - 16 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

Operations
(1) Tool moves to the Z-axis point "R" while performing 0-degree spindle
orientation. When "T" is commanded, magazine swivels.
(2) Tool movement to theZ-axis ATC origin, to the X axis origin point and to Y axis
ATC position, A, B axes movement to the the commanded value and also maga
zine cover opening occur simultaneously.
(3) Tool moves to theX-axis ATC position.
(4) Arm swivels to change tool.
Tool change motion differs depending on setting on [MAGAZINE TOOL]
screen. Refer to the "Tool Change Motion" for detailes.
(5) Tool movement to the X axis orgin point and Z axis point "R" and magazine
cover closing occurs stimultaneously.
(6) XY axes moves to the commanded value.
(7) Tool moves to Z-axis commanded position.

Caution
· When performing cycle operation, tool moves in cutting mode
between operations (1)and (6). And tool moves in position check
mode.
For XY positioning at operation (2) and (3) ( from X:origin Y: ATC to
X axis positioning (ATC position)) ,tool moves in cutting mode when Y
axis positions at the ATC position before X axis does.
· When [RESET] key or [STOP SWITCH] key is pressed at operations
(2), machine stops after Z axis movement to ATC origin point.
For X, Y, A, and B axes movement, machine stops immediately.
· When [RESET] key or [STOP SWITCH] key is pressed between
operations (3) and (5) , machine stops after motion (5) is completed.
For the operation (2), A, and B axes movement, machine stops
immediately.
· Machine does not stop if single block occurs between operations
(2) and (6) .
· For operation (5), machine goes to the next opeation after closing the
magazine cover witho6ut checking if the magazine cover is closed.
· Modes can not be switched between operation (1) and (6).
· All data other than M06 can be omitted. However, code "T" must be
commanded once by operator before M06 is commanded. 12
· Tool offset is canceled when M06 is commanded. Further, tool
length compensation is canceled from operation (2).
· When tool offset (G41 or G42) and X and Y axes movement are
commanded to block M06, tool offset begins when X and Y axes
movement (6) commences.
Start-up is performed in format 1, regardless of6 parameters.
· When tool offset is commanded to block M06, tool offset becomes
valid from operation (5) .

2005-06-07 12 - 17 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

· When M06 is commanded while tool length compensation (G49) is


canceled, operation (1) is performed subject to [ATC REFERENCE
TOOL LENGTH] selection for user parameter.
When tool offset is not commanded to block M06, operations (5) are
performed subject to [ATC REFERENCE TOOL LENGTH] selection for
user parameter.
· Alarm appears when code M other than spindle command is
commanded to block M06.
Alarm appears when axis A or B is commanded while optional A and
B axes are not in use.
· When point "R" command position (5) is lower than Z axis command
position (7), tool moves to Z-axis commanded position, and operation
(7) is not performed.

Tool change motion


Tool change motion differs depending on tool type set on [MAGAZINE TOOL]
screen.
(When large tool is not set on [MAGAZINE TOOL])
The following sequence is performed:
(1) Pot raises.
(2) Magazine swivels.
(3) Pot lowers.
(4) Arm swivels at high speed.

(When large tool is set on [MAGAZINE TOOL])


Tool change from standard tool to standard tool, and large tool to large tool.
The following sequence is performed:
(1) Pot raises.
(2) Magazine swivels.
(3) Pot lowers.
(4) Arm swivels.
(5) Pot raises.
When pot is already at upper limit before tool change motion commences, sequence
starts from (2).

12 When ((4) arm swivels) changing from large tool to large tool, arm swivels at low
speed.
When ((4) arm swivels) changing from standard tool to standard tool, arm swivels at
high speed.

2005-06-07 12 - 18 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

Tool change from large tool to standard tool or vice versa.


The following sequence is performed:
(1) Pot raises.
(2) Magazine swivels. (Empty pot is indexed.)
(3) Pot lowers.
(4) Arm swivels.
(5) Pot raises.
(6) Magazine swivels. (Specified pot is indexed.)
(7) Pot lowers.
(8) Arm swivels.
(9) Pot raises.
When pot is already at upper or lower limit before tool change motion commences,
sequence starts from (3) or (4), respectively.

For operation (2), empty pot is indexed appropriately for large tool and standard
tool.

Arm swivels ((4) or (8)) at low speed when large tool is to be changed, and at high
speed when standard tool is to be changed.
Notes
1) If empty pot for large tool is not available when change from large
tool to standard tool is attempted, [*NO EMPTY POT] alarm appears.
2) If empty pot for standard tool is not available when change from
standard tool to large tool is attempted, [*NO EMPTY POT] alarm
appears.

Next tool preparation

Next tool preparation is performed after the arm has swiveled or the pot has risen after
the arm swivels in the ATC sequence.
When ATC is not performed, only next tool preparation is performed.
Next tool preparation is not performed when the next tool is already indexed.

The next tool preparation sequence differs depending on the type of tool set on the 12
magazine tool screen.

When large tool is not set on [MAGAZINE TOOL]


(1) Pot rises
(2) Magazine swivels
(3) Pot lowers
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit before next tool
preparation commences.

2005-06-07 12 - 19 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

When large tool is set on [MAGAZINE TOOL]


Both spindle tool and next tool are standard or large
(1) Pot rises
(2) Magazine swivels
(3) Pot lowers
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit before next tool
preparation commences.

Spindle tool is standard and next tool is large or vice versa


(1) Pot rises
(2) Magazine swivels (empty pot is indexed)
(3) Pot lowers
Next tool preparation ends when the above sequence is completed.
The sequence starts from (2) when the pot is already at the upper limit before next tool
preparation commences.

Note 1) When the next tool is changed from a large tool to a standard tool and there
is no empty pot for a large tool, the [NO EMPTY POT] error occurs.
Note 2) When the next tool is changed from a standard tool to a large tool and there
is no empty pot for a standard tool, the [NO EMPTY POT] error occurs.

12

2005-06-07 12 - 20 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

(4) When TC-20A.

Command format M06 T _ X _ Y _ Z _ R _ A _ B _ L _ ;

(2)
Z ATC
position

(3)

R point

(1)

T :T__ :Tool number


:T1__ :Pot number
:T9__ :Group number

X,Y,A,B: Target value when moving X, Y, A, and B axes in rapid feed


simultaneously with ATC

Z : Target value of operation (3) in rapid feed

R : Return position before ATC (with tool length compensation


applied)
The “Z ATC position” is regarded as “R command value + 50
mm”.
When the “R” command is not specified, operation is performed
regarding “Z origin - 50 mm” as “R” command value.

L : Specify the tool number, pot (magazine) number, and group


number after “L”. 12
The pot with the corresponding tool is indexed by operation (2)
after ATC. (Next tool preparation)

2005-06-07 12 - 21 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

Operations
(1) The tool moves to Z ATC position (50 mm above “R” point or Z origin) while
performing 0-degree spindle orientation.
When the tool specified by “T” is indexed in the magazine, the pot lowers.
It starts lowering when the Z-axis has passed the position set for
[POT LOWERING START POS.] (user parameter).
(2) When the tool specified by “T” is not indexed in the magazine, the magazine
swivels and then the pot lowers.
When the specified tool is indexed in the magazine and the pot is at the lower limit,
the arm swivels and then the pot rises.
X, Y, A, and B axes also move to the specified positions.
See the ATC section for details of ATC sequence.
(3) The tool moves to the specified Z-axis position.

Precautions
· The pot, magazine, and arm do not stop even when the [RST] key or the [STOP]
button is pressed during operations 1) to 3) above. The X, Y, Z, A, and B axes stop
immediately.
· All data other than M06 can be omitted. However, a T code must be used at least
once before M06 is used.
· When M06 is used, tool diameter compensation is canceled. Tool length
compensation is also canceled in operation 3).
· When the tool diameter compensation (G41 or G42) and XY axes movement
commands are used for the M06 block, tool diameter compensation begins in format
1 when X and Y axes movement 2) commences, regardless of the current parameters.
· The tool length compensation command is used for the M06 block, tool length
compensation become valid from operation 3).
· The Z-axis moves as described below during operation 1).
(1) When R point is specified for M06 block
The Z-axis moves to the position where the tool tip is “R point + 50 mm” in
accordance with the tool length compensation.
The larger tool compensation value before or after change is applied.
When tool length compensation is not applied, the setting for
[ATC REFERENCE TOOL LENGTH] (user parameter) is used.
(2) When R point is not specified for M06 block
12 The tool rises to the Z origin, regardless of the tool length.
· When the Z-axis movement and tool length compensation commands are not used
for the M06 block, operation 3) is performed in accordance with the setting for
[ATC REFERENCE TOOL LENGTH] (user parameter).
· An alarm occurs when an M code other than a spindle command is used for the
M06 block.
An alarm occurs when the A- or B-axis command is used although the optional A-
or B-axis is not installed.
· The target position the pot lowers to is determined by the distance between
[ATC RETURN HEIGHT] and [POT LOWERING START POSITION]
(user parameters).

2005-06-07 12 - 22 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

ATC
(1) Magazine swivels
(2) Pot lowers
(3) Arm swivels
(4) Pot rises
ATC ends when the above sequence is completed.
Operation (3) (arm swivels) is performed at high speed.
When the tool breakage detection command is specified for tools in the magazine,
detection is performed after operation (4) (pot rises).

Next tool preparation


Next tool preparation is performed after the pot has risen in the ATC sequence.
When ATC is not performed, only next tool preparation is performed.
When the next tool is already indexed, next tool preparation is not performed.
1) Magazine swivels
Next tool preparation ends when the above sequence is completed.

12.3.7 Workpiece counter specification


(M211~M214)
When M211~M214 are specified to the counter 1~4 respectively, and M211 ~ M214
are commanded in the memory operation, the commanded counter counts up by
specified step at the execution of M02 or M30.
The counter specification is cancelled when the power is turned ON, the [RESET]
key is pressed, M02 or M30 is executed, the operation is reset or M221~M224
(counter cancel) is commanded.
(Ex.) When the counter 1 counts 1 and the counter 2 counts 2, execution of M211
and M212 by the operation program makes the counter 1 count up 1, the counter 2
count up 2.
(Note) M211~ M214 can be commanded during MDI operation.

12.3.8 Workpiece counter cancel (M221~M224) 12


M221~M224 command cancellation of the counter 1~ 4 respectively.
When M221~M224 are commanded in the memory operation or MDI operation,
relative counter specificaton is cancelled.

2005-06-07 12 - 23 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

12.3.8.1 Tool life counter


Execute command M231 to interrupt counting the service life of the tool attached to
the spindle.
Execute command M230 to resume counting.

12.3.9 Automatic corner deceleration


(M232, M233)
·Automatic corner deceleration does not apply during tool compensation.
·This function is valid for commands that perform continuous XY-axes cutting
movement.

12.3.10 M120 function


When the M120 command is given, the input signal TOUCH (touch sensor) is
checked. If this is ON, operation is ended. If this is OFF , a tool breakage error is
generated and the TOOL (tool error) signal is output.

12.3.11 Tool breakage detection


(M200 and M201)
Operation procedures are described in Option, Tool Breakage Detection Unit in the
Instruction Manual.

12.3.12 Tap time constant selection


(M241 to 250)
Z-axis speed time constant while tapping is changed by the M241 to M250 M code
command in the range of 10 to 100% of the maximum time constant.

When the M241 command is given, 10% of the maximum time constant is adapted
when tapping.

When the M242 command is given, 20% of the maximum time constant is adapted
when tapping.

12 When the M250 command is given, 100% of the maximum time constant is adapted
when tapping.

For maximum tap rotation : 6000 rpm.

2005-06-07 12 - 24 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

Spindle rotation speed


when tapping(rpm)

Optimum M code

Spindle rotation speed


when tapping(rpm)

Optimum M code

For maximum tap rotation :8000 rpm.

Spindle rotation speed


when tapping(rpm)

Optimum M code

Spindle rotation speed


when tapping(rpm)

Optimum M code

(Note 1)
When a tap time constant command taht will become shorter than the
optimum time constant is given, the 'TOO SMALL TIME CONSTANT'
alarm is generated and the tool moves using the maximum time
constant.
(Note 2)
In tapping high-speed return mode, the tool moves using the 12
maximum time constant. However, tool returns during stepping in the
same conditions as for advancing.
(Note 3)
In dry run mode, the tool moves using the maximum time constant.

2005-06-07 12 - 25 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

12.3.13 Pallet related M codes


(M410, M411, M430, and M431)
· These functions are sffective for the TC-31A, TC-32A, TC-R2A.
· When command M410 is executed, the Z-axis is returned to its origin and then the
C-axis is indexed to -180° (pallet 2 is positioned outside).
· When command M411 is executed, the Z-axis is returned to its origin and then the
C-axis is indexed to 0° (pallet 1 is positioned outside).
· When command M430 is executed, the C-axis unclamped by override.
· When command M431 is executed, the C-axis clamped by override.

12.3.14 Unclamping and clamping C axis


(M430 and M431)
· These functions are sffective for the TC-22A, TC-32A, TC-20A, TC-S2B.
When M430 is commanded, the C axis is unclamped. Unclamping and clamping C
axis is not automatically controlled afterward.
· When M431 is commanded, the C axis is clamped. Unclamping and clamping C
axis is automatically controlled afterward.

This command is valid when C is set to operate using the mashine paramater and
the clamp merchanism is set to [1:Type2]or[2:Type3].
An alarm will occur in other cases.

12.3.15 Unclamping and clamping B axis


(M440 and M441)
· When M440 is commanded, the B axis is unclamped. Unclamping and clamping
B axis is not automatically controlled afterward.
· When M441 is commanded, the B axis is clamped. Unclamping and clamping B
axis is automatically controlled afterward.
This command is valid when B is set to operate using the mashine paramater and
the clamp merchanism is set to [1:Type2]or[2:Type3].
An alarm will occur in other cases.

12.3.16 Unclamping and clamping A axis


12
(M442 and M443)
· When M442 is commanded, the A axis is unclamped. Unclamping and clamping
A axis is not automatically controlled afterward.
· When M443 is commanded, the A axis is clamped. Unclamping and clamping A
axis is automatically controlled afterward.

This command is valid when A is set to operate using the mashine paramater and
the clamp merchanism is set to [1:Type2]or[2:Type3].
An alarm will occur in other cases.

2005-06-07 12 - 26 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 12 S,T,M function

12.3.17 One-shot output


(M450, M451, M455, and 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.
· The signal output time is set by user parameter 1.

12.3.18 Waiting until response is given


(M460 to M469)
For example
· M460 command waits until M460 signal turns on.
· M461 command waits until M460 signal turns off
· M462 command waits until M462 signal turns on.
· M463 command waits until M462 signal turns off.
· M464 command waits until M464 signal turns on.
· M465 command waits until M464 signal turns off.
· M466 command waits until M466 signal turns on.
· M467 command waits until M466 signal turns off.
· M468 command waits until M468 signal turns on.
· M469 command waits until M468 signal turns off.
The maximum waiting time is set by MAXIMUM TIME OF EXT SIGNAL of user
parameter 1.
If the actual time has exceeded the preset time, an alarm occurs.

12

2005-06-07 12 - 27 eTCOMNCPR12
TC-31A/31AN/22A/S2A
Chapter 12 S,T,M function 32A/R2A/20A/S2B

(This page is a blank.)

12

2005-06-07 12 - 28 eTCOMNCPR12
TC-31A/31AN/22A/S2A
32A/R2A/20A/S2B Chapter 13 Option

CHAPTER 13

OPTION

13.1 Memory capacity expansion


13.2 Programming precautions when using
rotation axis (index table)

13

2004-5-18 13 - 1 eTCOMNCPR13-1
TC-31A/31AN/22A/S2A
Chapter 13 Option 32A/R2A/20A/S2B

13.1 Memory capacity expansion


When the memory is expanded, the capacity will be three times larger than it used
to be. Then, more programs and data banks can be saved in the main machine.

Memory capacity (standard) 497 block


Memory capacity (after the expansion) 1509 block
(1block =256 byte)

There are same restrictions as those for the standard memory.

1. The maximum file number in total 256


This number is decided by adding number of programs and data banks.

2. The maximum editable capacity for an one program. 256 block

3. Operational program capacity 512 block


[Note]
All block capacity can not be used as a program area.
(497 block for the standard one, 1509 for the expanded one)
(33 blocks as a maximum are used as a memory maintenance area.)

13.2 Programming precautions when using rotation


axis (index table)
When using the QT table on the TC-31A, 32A, and R2A with the rotation axis
installed, be sure to place the rotation axis positioning command before the cutting
command in the program file.

13

2004-5-18 13 - 2 eTCOMNCPR13-1
eTCOMNCPROKU
693308001
0706(1)

eTCOMNCPROKU

You might also like