0% found this document useful (0 votes)
633 views361 pages

M300 M300-V Programming Manual

This document is a programming manual for Mitsubishi CNC systems. It provides an introduction and overview of the manual, which details programming for Mitsubishi 320M, 330M, 330HM, 335M, 320M-V, 330M-V, 330HM-V and 335M-V CNC systems. It contains general descriptions of the NC system from the standpoint of programming. The manual covers topics like control axes, input command units, data formats, buffer registers, position commands, interpolation functions, feed functions and more. Users are advised to check the functions provided for their specific CNC system and consult the machine builder's specifications.

Uploaded by

Andey Ribalko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
633 views361 pages

M300 M300-V Programming Manual

This document is a programming manual for Mitsubishi CNC systems. It provides an introduction and overview of the manual, which details programming for Mitsubishi 320M, 330M, 330HM, 335M, 320M-V, 330M-V, 330HM-V and 335M-V CNC systems. It contains general descriptions of the NC system from the standpoint of programming. The manual covers topics like control axes, input command units, data formats, buffer registers, position commands, interpolation functions, feed functions and more. Users are advised to check the functions provided for their specific CNC system and consult the machine builder's specifications.

Uploaded by

Andey Ribalko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 361

BNP-A2!

343B-E
USA-E99051-017-*

MITSUBISHI CNC
MELDllS 300/3004/ Series
PROGRAMMING MANUAL
320M1330M/330HM/335M(CNC)
320M-V/330M-V/330HM-V/335M-V(CNC) >

ADVANCED AND EVER ADVANCING


MITSUBISHI ELECTRIC
I’RODUC7?ON

INTRODUCTION
This manual has been prepared for the MELDAS 320M/330M/330HM/335M/320M-V/330M-V/
330HM-V/335M-V systems which are software-freed configuration types of computerized numerical
controllers (CNC) designed for executing high-performance contouring control mainly with milling
machines and machining centers.
This manual details the programming of the above systems and it should therefore be read prior to the use
of these systems.
This manual has been written on the assumption that all the system functions have been provided although
not all the functions may be featured when the CNC in question is supplied. For use, therefore, check the
table of functions provided for each system on the following page and also consult the specifications manual
issued by the machine builder.

CAUTIONARY NOTES ON READING THIS MANUAL


( 1 ) This manual contains general descriptions as seen from the standpoint of the NC system. Reference
should therefore be made to the manuals issued by the machine builder for descriptions concerning
individual machine tools. In the case of restrictions, usable states and other such notes, the
instructions in the manuals issued by the machine builder take precedence over this manual.
(2) Every effort has been made to describe instructions for special handling, but it should be considered
that any operations not mentioned in this manual cannot be conducted.
CONTENTS

CONTENTS

1. CONTROL AXIS ........................................................................................................................................... 1

1.1 COORDINATE WORD AND CONTROL AXES ...................................................................... 1


1.2 COORDINATE SYSTEMS AND COORDINATE ZERO
POINT SYMBOLS ............................................................................................................................ 2

2. INPUT COMMAND UNITS ....................................................................................................................... 3

2.1 INPUT COMMAND UNITS .......................................................................................................... 3


2.2 INPUT SETTING UNITS ............................................................................................................... 3
2.3 COMMAND UNIT xICI .................................................................................................................... 4

3, DATA FORMATS ......................................................................................................................................... 5

3.1 TAPE CODES .................................................................................................................................... 5


3.2 PROGRAM FORMATS .................................................................................................................. 8
3.3 TAPE STORAGE FORMAT ....................................................................................................... 10
3.4 OPTIONAL BLOCK SKIP (“/ “) ................................................................................................ 10
3.4.1 Optional block skip ................................................................................................................... 10
3.4.2 Precautions for using optional block skip ............................................................................. 10
3.5 PROGRAM, SEQUENCE AND BLOCK NUMBERS [0, N) .............................................. 11
3.6 PARITY HiV .................................................................................................................................... 12
3.7 TABLE OF G COMMANDS ........................................................................................................ 14

4. BUFFER REGISTER ................................................................................................................................. 16

4.1 INPUT BUFFER ............................................................................................................................. 16


4.2 PRE-READ BUFFERS .................................................................................................................. 16

5. POSITION COMMANDS .......................................................................................................................... 18

5.1 POSITION COMMAND SYSTEMS (G90, G91) ..................................................................... 18


5.2 INCH/METRIC CONVERSION (G20, G21) ............................................................................ 19
5.3 DECIMAL POINT INPUT ........................................................................................................... 20

6. INTERPOLATION FUNCTIONS ........................................................................................................... 23

6.1 POSITIONING (RAPID TRAVERSE GOO) ............................................................................ 23


6.2 UNI-DIRECTIONAL POSITIONING (G60) ........................................................................... 26
6.3 LINEAR INTERPOLATION (GO1) ........................................................................................... 27
6.4 PLANE SELECTION (G17, G18, G19) ..................................................................................... 28
6.4.1 Parameter entry ......................................................................................................................... 28
6.4.2 Plane selection system .............................................................................................................. 29

I
CONT.ENTS

6.5 CIRCULAR INTERPOLATION (G02, G03) ........................................................................... 30


6.6 R-SPECIFIED CIRCULAR INTERPOLATION (G02, G03) ............................................... 33
6.7 HELICAL INTERPOLATION (G17 – G19, G02, G03) ...................................................... 35
6.8 SPIRAL INTERPOLATION (G2.1, G3.1) ................................................................................. 38
6.9 IMAGINARY AXIS INTERPOLATION (G07) ...................................................................... 42
6.10 THREAD CUTTING ..................................................................................................................... 43
6.10.1 Constant lead thread cutting (G33) ....................................................................................... 43
6.10.2 Continuous thread cutting ....................................................................................................... 45
6.11 INCH THREAD CUTTING (G33) ............................................................................................. 45
6.12 NORMAL LINE CONTROL FUNCTIONS
(G40.1, G41.1, G42.1) ..................................................................................................................... 46

7. FEED FUNCTIONS ................................................................................................................................... 59

7.1 RAPID TRAVERSE RATE ......................................................................................................... 59


7.2 CUTTING FEED RATE ............................................................................................................... 59
7.3 F l-DIGIT FEED ............................................................................................................................ 60
7.4 SYNCHRONOUS FEED (G94, G95) ......................................................................................... 62
7.5 FEED RATE DESIGNATION AND EFFECTS ON CONTROL
AxEs ................................................................................................................................................. 63
7.6 EXACT STOP CHECK (G09) ..................................................................................................... 66
7.7 EXACT STOP CHECK MODE (G61) ....................................................................................... 67
7.8 AUTOMATIC CORNER OVERRIDE (G62) .......................................................................... 68
7.8.1 Description of function ............................................................................................................ 68
7.8.2 Application examples ................................................................................................................ 70
7.8.3 Relations with other functions ................................................................................................ 71
7.8.4 Checkpoints ................................................................................................................................ 72
7.9 TAPPING MODE (G63) ............................................................................................................... 73
7.10 CUTTING MODE (GM’) .............................................................................................................. 73
7.11 HIGH-PRECISION CONTROL MODE (G61.1) .................................................................... 74

8. DWELL ......................................................................................................................................................... 76

8.1 PER-SECOND DWELL (G94/G04) ............................................................................................ 76


8.2 PER-REVOLUTION DWELL (G95/G04) ................................................................................ 77

9. MISCELLANEOUS FUNCTIONS .......................................................................................................... 78

9.1 MISCELLANEOUS FUNCTIONS (M2-DIGITS BCD) ......................................................... 78


9.2 MISCELLANEOUS FUNCTIONS (M4-DIGITS BCD) ......................................................... 80
9.3 MISCELLANEOUS FUNCTIONS (M8-DIGITS) ................................................................... 80
cm?TENm

9.4 SECOND MISCELLANEOUS FUNCTIONS


(B/A/C8-DIGITS) ............................................................................................................................ 80

10. SPINDLE FUNCTIONS ............................................................................................................................. 81

10.1 SPINDLE FUNCTIONS (S2-DIGITS BCD) ............................................................................. 81


10.2 SPINDLE FUNCTIONS (S5-DIGITS ANALOG) ................................................................... 81
10.3 SPINDLE FUNCTIONS (S8-DIGITS) ....................................................................................... 81
10.4 CONSTANT PERIPHERAL SPEED CONTROL (G96, G97) ............................................. 82
10.4.1 Constant peripheral speed control ......................................................................................... 82
10.4.2 Spindle clamp speed setting (G92) ........................................................................................ 82

11. TOOL FUNCTIONS ................................................................................................................................... 83

11.1 TOOL FUNCTIONS (T2-DIGITS BCD) ................................................................................... 83


11.2 TOOL FUNCTIONS (T8-DIGITS) ............................................................................................. 83

12. TOOL OFFSET FUNCTIONS .................................................................................................................. 84

12.1 TOOL OFFSET ............................................................................................................................... 84


12.1.1 Outline ........................................................................................................................................ 84
12.1.2 Tool offset amount assignment ............................................................................................... 85
12.1.3 Tool offset memory .................................................................................................................. 86
12.1.4 Tool offset numbers (H/D) ..................................................................................................... 88
12.1.5 Number of tool offset sets ....................................................................................................... 88
12.2 TOOL LENGTH OFFSET/CANCEL (G43, G44/G49) ........................................................... 89
12.3 TOOL POSITION OFFSET (G45–G48) .................................................................................. 92
12.4 CUTTER COMPENSATION ....................................................................................................... 98
12.4.1 Outline ........................................................................................................................................ 98
12.4.2 Cutter compensation operations ............................................................................................. 99
12.4.3 Other commands and operations ......................................................................................... 107
12.4.4 G41/G42 commands and I, J, K assignment ...................................................................... 116
12.4.5 Interrupt during cutter compensation ................................................................................. 121
12.4.6 General checkpoints for cutter compensation .................................................................... 123
12.4.7 Changing the offset numbers ................................................................................................ 124
12.4.8 Cutter compensation start and z-axis cutting ..................................................................... 126
12.4.9 Interference check .................................................................................................................. 128
12.5 3-DIMENSIONAL CUTTER COMPENSATION ................................................................. 134
12.5.1 Function .................................................................................................................................... 134
12.5.2 Command method .................................................................................................................. 135
12.5.3 Relationship with other functions ......................................................................................... 139
CONTENTS

12.5.4 Other items relating to 3-dimensional cutter compensation ............................................ 140


12.6 PROGRAMMED CU’ITER COMPENSATION INPUT (G1O) ......................................... 141
12.6.1 Function and objective ........................................................................................................... 141

13. PROGRAM SUPPORT FUNCTIONS ................................................................................................. 145

13.1 CANNED CYCLES ...................................................................................................................... 145


13.1.1 Standard canned cycles
(G80 – G89, G73, G74, G76) ............................................................................................. 145
13.1.2 Initial point and R point level return (G98, G99) ............................................................. 159
13.1.3 Work coordinate setting in canned cycle mode ................................................................. 160
13.2 SPECIAL CANNED CYCLES (G34, G35, G36, G37.1) ...................................................... 161
13.3 SUBPROGRAM CONTROL (M98, M99) .............................................................................. 165
13.4 VARIABLE COMMANDS (#n) ............................................................................................... 1711
13.5 PATTERN ROTATION (M98) .................................................................................................. 172
13.6 COORDINATE ROTATION ..................................................................................................... 177
13.6.1 Programmed coordinate rotation (G68, G69) ................................................................... 179
13.6.2 Parameter coordinate rotation .............................................................................................. 181
13.7 USER MACROS ........................................................................................................................... 182
13.7.1 User macros ............................................................................................................................. 182
13.7.2 Macro call instructions ........................................................................................................... 183
13.7.3 Variables ................................................................................................................................... 193
13.7.4 Types of variables ................................................................................................................... 195
13.7.5 Arithmetic commands ............................................................................................................ 211
13.7.6 Control commands .................................................................................................................. 217
13.7.7 External output commands ................................................................................................... 220
13.7.8 Checkpoints .............................................................................................................................. 222
13.7.9 Examples using user macros ................................................................................................. 224
13.8 USER MACROS I (G101 – G11O, G200 – G202) .............................................................. 228
13.9 SCALING (G50, G51) .................................................................................................................. 233
13.9.1 Command format .................................................................................................................... 233
13.9.2 Detailed description ................................................................................................................ 233
13.9.3 Programming examples .......................................................................................................... 235
13.10 G COMMAND MIRROR IMAGE (G50.1, G51.1) ............................................................... 246
13.11 CORNER CHAMFERING, CORNER RI .............................................................................. 249
13.11.1 Corner chamfering (, C_) ...................................................................................................... 249
13.11.2 Corner rounding (, R_) .......................................................................................................... 250
13.12 LINEAR ANGLE COMMAND ................................................................................................. 251
CONTENTS

13.13 GEOMETRIC COMMAND ....................................................................................................... 252


13.13.1 Geometric command I ........................................................................................................... 252
13.14 G COMMAND COORDINATE ROTATION INPUT (G1O) ............................................. 254
13.15 CIRCLE CUTTING (G12, G13) ................................................................................................ 261

14. COORDINATE SYSTEM SETTING FUNCTIONS ......................................................................... 263

14.1 COORDINATE WORDS AND CONTROL AXES .............................................................. 263


14.2 BASIC MACHINE/WORKPIECE/LOCAL COORDINATE
SYSTEMS ....................................................................................................................................... 264
14.3 MACHINE ZERO POINT AND 2ND/3RD/4TH REFERENCE
(ZERO) POINTS ........................................................................................................................... 265
14.4 BASIC MACHINE COORDINATE SYSTEM ....................................................................... 266
14.5 COORDINATE SYSTEM SETTING (G92) ........................................................................... 267
14.6 AUTOMATIC COORDINATE SYSTEM SETTING ........................................................... 268
14.7 REFERENCE POINT (ZERO POINT) RETURN (G28, G29) ......................................... 269
14.8 2ND/3RD/4TH REFERENCE (ZERO)
POINT RETURN (G30) .............................................................................................................. 272
14.9 REFERENCE POINT CHECK (G27) ..................................................................................... 274
14.10 WORK COORDINATE SYSTEM SETTING AND OFFSET
(G54 – G59) .................................................................................................................................. 275
14.11 LOCAL COORDINATE SYSTEM SETTING ...................................................................... 280

15. PROTECTION FUNCTIONS ................................................................................................................. 284

15.1 STROKE CHECK BEFORE MOVEMENT (G22, G23) ..................................................... 284

16. MACHINING MODES ............................................................................................................................ 285

16.1 HIGH-SPEED MACHINING MODE (G05) .......................................................................... 285

17. MEASUREMENT SUPPORT FUNCTIONS ...................................................................................... 291

17.1 AUTOMATIC TOOL LENGTH MEASUREMENT (G37) ................................................ 291


17.2 SKIP FUNCTION (G31) ............................................................................................................. 293
17.2.1 Function .................................................................................................................................... 293
17.2.2 Skip coordinate readout ......................................................................................................... 294
17.2.3 G31 coasting ........................................................................................................................... 295
17.2.4 Skip coordinate readout error ............................................................................................... 296
17.3 MULTI-STAGE SKIP FUNCTION (G31.n, G04) ................................................................. 298
17.3.1 Function .................................................................................................................................... 298
17.3.2 Operation ................................................................................................................................. 299

v
C’0NTEN7’)S.

18. AXIS CONTROL FUNCTIONS ............................................................................................................ 300

18.1 CHOPPING FUNCTION ............................................................................................................ 300

APPENDIX 1. LIST OF FUNCTION CODES ................................................................................. 307


APPENDIX 2. LIST OF COMMAND VALUE RANGES ............................................................ 308
APPENDIX 3. LIST OF DATA RETENTION STATUSES AND
OUTPUT SIGNALS WITH NC SHUTDOWN ..................................................... 309
APPENDIX 4. SEQUENCE OF PRIORITY AMONG G
FUNCTION COMMANDS ........................................................................................ 313
APPENDIX 5. ARC CUTTING RADIUS ERRORS ...................................................................... 323
APPENDIX 6. STANDARD CANNED CYCLE SUBPROGRAMS ........................................... 324
APPENDIX 7. DETAILS OF USER MACRO INTERRUPT
FUNCTION ................................................................................................................... 329
APPENDIX 8. LIST OF ALARMS ...................................................................................................... 336

HISTORY OF PAST REVISIONS ..................................................................................................... 349

;,.

,.:

VI
INTR(XXK770N

TABLE OF FUNCTIONS FOR EACH SYSTEM ( 1 ) —: Not provided, O: Standard, A: Option

Item
No. Description I I 320M
330M
330HM
335M
-1 CONTROL AXES
1.1 COORDINl 4TE WORD o 0
2. MMA~
INPUT CO1.. _-.. UNIT
2.1 [NPUT COMMA] W) UNIT 1P o 0
2.2 [NPUT SE~”n’”
I J.NU UNIT O.lu A A
2.3 COMl””’-
M.ANJ) UNIT X 10 A A
3. DAT4 4 FORMAT
3.1 TAPE CODES (ISO/EI LA) o 0
.-. ——-—
———
3.2 PROGRAM FORMATS (WORDS/ADDR .ESSES) 0 0
3.4 OPTIONAL BL04CK SKIP o 0
3.5 PROGRAM/SEQUENCE/BLOCK NUMBERS
3.6
-. -—-. -.—.
o I o
I
4.
4.1
4.2
-5
5.1
5.2

5.3
6.
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.12

(V only)
7. FEED FUNCTIONS
7.1 RAPID TRAVERSE o 0
7.2 CUTTING FEED o 0
7.3 F l-DIGIT FEED A A
7.4 SYNCHRONOUS FEED (G94, G95) Per-minute feed
o 0
(G94)
Per-revolution feed
A A
(G95)
7.6 EXACT STOP CHECK (G09) o 0
7.7 EXACT STOP CHECK MODE (G61) o 0
INTRODUCTION

TABLE OF FUNCTIONS FOR EACH SYSTEM(2) —: Not provided, O: Standard, A: Option

330M
tern
Description 320M 330HM
No.
335M
~ 4UTOMATIC CORNER OVERRIDE (G62) I A I A
7.9 rAPPING MODE (G63) o 0
7.10 XJTTING MODE (G64) o 0
7.11 +IGH-PRECISION CONTROL MODE (G61.1) A A
(V only) (V only)
IWELL I
‘ER-SECOND DWELL (G94/G04) o 0
‘ER-REVOLUTION DWELL (G95/G04) — o
MISCELLANEOUS FUNCTIONS
tiISCELLANEOUS FUNCTIONS (M2-DIGITS) o 0
MISCELLANEOUS FUNCTIONS (M4-DIGITS) o 0
MISCELLANEOUS FUNCTIONS (M8-DIGITS) — o
;ECONDARY MISCELLANEOUS FUNCTIONS
A A
‘B/A/c8-DIGrrs)
$PINDLE FUNCTIONS
SPINDLE FUNCTIONS (S2-DIGITS) o 0
;PINDLE FUNCTIONS (S5-DIGITS ANALOG) A A
10.3 SPINDLE FUNCTIONS (S8-DIGITS) — o
10.4 SONSTANT PERIPHERAL SPEED CONTROL (G96, G97) — A
1. rOOL FUNCTIONS
11.1 rOOL FUNCTIONS (T2-DIGITS) o 0
11.2 rOOL FUNCTIONS (T8-DIGITS) o 0
12. rOOL OFFSET FUNCTIONS
12.1 rOOL OFFSET IMemory type I o 0
Memory type 11 — A
No. of sets 40 0 0
INo. of set~ 100 I IA IA
No. of set~ zoo I I — I A
No. of set~ 400 I — A
No. of setx 800 I — A
-12.J TOOL LENGTH OFFSET (G43, G44/G49) o 0
12.3 TOOL POSITION OFF3ET (G45 – G48) o 0
12.4 CUTTER COMPENSATION (G38 – G42) A A
12.5 3-DIMENSIONAL CUTTER COMPENSATION (G40 – G42) — A
g PROGRAMMED TOOL COMPENSATION INPUT (G1O) A A
~ PROGRAM SUPPORT FUNCTIONS
13.1 CANNED CYCLE CANCEL (G80) A A
DRILLING/SPOT DRILLING CANNED CYCLE (G81) A A
DRILLING/[ COUNTER BORING CANNED CYCLE (G82) A A
DEEP HOLE DRILLING CANNED } CYCLE (G83) A A
TAPPING CANNED CY(CLE (G84) A A
BORING CANNED CYCLE (G85) I A A
BORING CANNED CYCLE (G86) A A
BACK BORING CANNED CYCLE (G87) I A A
lNTRODUCTION

TABLE OF FUNCTIONS FOR EACH SYSTEM ( 3 ) —: Not provided, O: Standard, A: Option

330M

I
Item
Description 320M 330HM
No.
335M
13.1 BORING CANNED CYCLE (G88) A A
BORING CANN.IED CYCLE (G:
. -89) I A I A
STEPPING CANNED CYCLE (G73) A A
REVERSE TAPPING CANNE1 3 CYCLE (G74) A A
FINE BORING CANNEI D CYCLE (G76) A A
INITIAL POINT, REFERENCE POINT LEVEL RETURN
A A
(G98, G99)
13.2 SPECIAL CANNED CYCLE BOLT HOLE CIRCLE (G34) A A
LINE-AT-ANGLE (G35) A A
ARC (G36) A A
GRID (G37.1) A A
13.3 SUBPROGRAM CONTROL (M 98, M99) o 0
13.4 VARIABLE COMMANDS (#n) A A
13.5 PATTERN ROTATION (M98) — A
13.6 PATTERN ROTATION (G68, G69) Parameter . A
IProgram — A
13.7 USER MACROS (G65, G66, G66.1, G67) A A
MACRO INTERRUPT — A
13.8 USER MACROS I (G101 – Gllo, G200 – G202) A A
13.9 SCALING (G50, G51) — A
13.10 G COMMAND MIRROR IMAGE (G50.1, G51.1) o 0
13.11 CORNER CHAMFERING (,C_), — A
CORNER ROUNDING (,L) I
13.12 LINEAR ANGLE COMMAND o 0
13.13 GEOMETRIC COMMAND — A
13.14 G COMMAND COORDINATE ROTATION INPUT (G1O) A A
13.15 CIRCLE CUTTING (G12, G13) A A
14. COORDINATE SYSTEM SETTING FUNCTIONS
14.4 BASIC MACHINE COORDINATE SYSTEM o 0
14.5 COORDINATE SYSTEM SETTING (G92)
14.6 AUTOMATIC COORDINATE SYSTEM SE’ITING
14.7 AUTOMAT ‘IC REFERENCE POINT RETURN (G28, G29) o 0
14.8 SECOND, THIRD, FOURTH Seeond A A
REFERENCE POINT RETURN (G30) Third, Fourth
,x . . .
— ,’..
A ,

14.9 REFERENCE POINT CHECK (G27) o 0


14.10 woRK COORDINATE sYSTEM sETTING AND OFFSET
o 0
(G54 – G59)
14.11 LOCAL COORDINATE SYSTEM SETTING (G52) o 0
(12.6) PROGRAMMABLE WORK COORDINATE SYSTEM
A A
OFFSET (G1O)
15. PROTECTION FUNCTIONS
15.1 STROKE CHECK BEFORE MOVEMENT (G22, G23) — A
16. MACHINING MODES
16.1 HIGH-SPEED MACHINING MODE (G05) A A
I 17. IMEASUREMENT SUPPORT FUNCTIONS I
INTRODUCTION

TABLE OF FUNCTIONS FOR EACH SYSTEM(4) —: Not provided, O: Standard, A: Option

Item 330M
Description 320M 330HM
No. ---- .
17.1 AUTOMATIC TOOL LENGTH MEASUREMENT (G37) — A
17.2 SKIP FUNCTION (G31) A A
17.3 MULTI-STAGE SKIP FUNCTIONS (G31.1 – G31.3, G04) — A
18. AXIS CONTROL FUNCTIONS
18.1 CHOPPING FUNCTION ,— A
(V only)

,,
1. CONTROL AXIS
1.1 COORDINATE WORD AND CONTROL AXES

1. CONTROL AXIS

1.1 COORDINATE WORD AND CONTROL AXES


The number of control axes comes to 3 under the standard specifications although this can be expanded to
6 axes by adding the optional and special optional axes. Predetermined coordinate words (letters of the
alphabet) are used to denote each of the machining directions.

With X–Y table

+2

+Z
+-Y
k
Programmed+c~ordinates

Table movement Bed ~r~$i~novement


direction

With X–Y and rotary table

T#~iF~~n&~~
‘G3c Table rotation P;o~ammed coordinates
direction

-1-
1. CONTROL AXLS
1.2 COORDINATE SYSTEMS AND COORDINATE ZERO POINT
SYMBOLS

1.2 COORDINATE SYSTEMS AND COORDINATE ZERO POINT


SYMBOLS

-’$- : Reference point

: Machine coordinate zero


point
: Work coordinate zero
points (G54–G59)

-x Machine
Basic machine coordinate system

u
w
x,

yl

L
Y2
1st re$erence
Work coordinate Work coordinate Work coordinate point
system 3 (G56) system 2 (G55) system 1 (G54)

Local com

I –Y

-2-
2. INPUT COMMAND UNITS
2.1 INPUT COMMAND UNITS

2. INPUT COMMAND

2.1 INPUT COMMAND UNITS


These are the units used for the movement amounts in the program as commanded by the MDI input and
command tape. They are expressed in millimeters, inches or degrees ~).

2.2 INPUT SETTING UNITS


These are the units of setting data which are used, as with compensation amounts, in common for all axes.
The input command unit and input setting unit are selected by parameter for each axis from among the
following types. (For further details on settings, refer to the Control Instructions.)

CS-2 0.1 0.01 0.1


Input command unit CS-A 0.01 0.001 0.01
CS-B 0.001 0.0001 0.001
Cs-c O.0001 0.00001 0.0001
IS-A 0.01 0.001 0.01
Input setting unit IS-B 0.001 0.0001 0.001
IS-C O.0001 0.00001 0.0001

NOTE 1: Inch/metric conversion is performed in one of 2 ways: conversion from the parameter screen
~initial inch”: valid only when the power is switched on) and conversion using the G command
(G20 or G21).
However, when a G command is used for the conversion, the conversion applies only to the input
command units and not to the input setting units. Consequently, the tool offset amounts and
other compensation amounts as well as the variable data should be preset to correspond to
inches or millimeters.
NOTE 2 The millimeter and inch systems cannot be used together.
NOTE 3: Input setting units should be assigned for radial commands (R) and for center commands (I, J,
K) when conducting circular interpolation with axes having different input command units. (Use
a decimal point to avoid confusion.)

-3-
2. INPUT COMWD LL!VITS
2.3 COMMAND UNIT X 10

2.3 COMMAND UNIT X 10


The input command unit of machining programs can be processed as 10 microns through parameter
selection. When a machining program has already been prepared using the input command unit of 10
microns and it is run in an NC system which has been set to a command unit of 1 micron, the same
processing as before is enabled by selecting this parameter.
It is also possible to process a machining program using the 1P command in an NC unit which has been set
to the input command unit of O.1~. However, in this case, the two NC system decimal point input types must
match. This function cannot be applied to input command unit 10P systems (type A).
The parameter selection is set in the “command unit x 10” control parameter.
Coordinate value data without decimal point commands are all multiplied by 10.
The contents of tool offset amount commands H and D are treated as input setting units and so the
compensation amounts are not multiplied by 10.
When the input command unit is 1P:

Movement amount when program command is executed p:~em


Control Programmed
NC [A] to be MELDAS-300 [B]
axis command as is?
programmed Parameter OFF Parameter ON [A] + fBl
xl ; 1~ lop Yes
Linear axis low
(Yl ;, Z1 ;) lmm lmm No
O.O1° 0.OO1° 0.O1° Yes
Rotary (O.O1°system) 1.000” 1.OOOO No
B1 ;
axis 1.000” 0.OO1° 0.O1° No
(1° svstem) 1.000” 1.OOOO Yes

NOTE In the table, the fkures on the top level of the MELDAS-300 movement amounts apply to decimal
point input “type i and those on~he bottom level apply to decimal point input ~e-2. For rotary
axes, the type must be aligned with the command units when preparing the machining programs.
The parameters are changed by the machine parameter settings.

-4-
3. DATA FORMATS
3.1 TAPE CODES

3. DATA FORMATS
3.1 TAPE CODES
The command information used for this MELDAS series consists of combinations of alphabet letters (A,
B, C ... Z), numbers (O, 1, 2 ... 9) and signs (+, -, / ...). These alphabet letters, numbers and signs are
referred to as characters. Each character is represented by a combination of 8 holes which may, or may not,
be present on the paper tape.
These combinations make up what is called codes.
This MELDAS series employs two types of tape code~ the EIA code (RS–244–A) and the ISO code
(R–840).

NOTE 1: If a code not given in the tape code table in Fig. 1 is assigned, an illegal address error (P32)
results.
NOTE X The following codes which exist with ISO but not with EL4 can be designated by paramete~
[ (open parenthesis)
1# (closing parenthesis)
(sharp sign)
* (asterisk)
= (equals sign)
(colon)
Any codes which overlap with existing codes or codes which result in parity H cannot be designated.
NOTE 3 EIA/ISO conversion is done automatically by the first EOB/LF code after NC resetting.
NOTE 4 For the sake of convenience, a semicolon (;) has been used to indicate the end of block
(EOB/LF) which separates one block from another. Do not use the semicolon key, however, in
actual programming but use the keys in the following table instead.
EOB/130R keys and displays

Code used
EIA 1s0 CNC display
Key used
End of block EOB or CR LF or NL
End of record EOR % %
(1) Significant data section (label skip function)
After the power has been turned on or after operation has been reset, all data up to the first EOB (;),
is ignored during an automatic operation based on tape, a memory storage operation or during a
search operation. In other words, the significant data section of a tape extends from the character or
number code after the initial EOB (;) code after resetting to the point where the reset command is
issued.

E
‘hen “TEST1” has been set in the comment with title output available ~

6$0:049
@
96,9*
;@@@
e
*oe*
*O@
eeeee
:
● ;
@

a e
e 00090 @eee : 0: e
● OOa*@Ooo*. o ..amae.~.~.a *. @**~.*.@.* .

00 00 00 ● 0

The above title is output before the machining program.

-5-
3. DATA FORMATS
3.1 TAPE CODES

(2) Control out, control in


When the ISO codes are used, all data between control out “(” and control in “)” is ignored by the
NC system, although this data appears on the setting and display unit. Consequently, the command
tape name, number and other such data not directly related to control can be inserted in this section.
When the EL4 codes are used, the same operation as with “(” and “)” under the 1S0 code can be
performed by entering the codes of specific channel combinations as parameters.
This information (except the non-working codes indicated by (B) in Fig. 1 of the tape codes) will also
be stored, however, during tape storage.
The system is set to the “control in” mode when the power is switched on.

ECS

I Example of EIA codes


:0 ~PROGR..&U).

eo **O
P
oe:e
1 01!:

e
B
0000 @

m
e eo e 00

Tape name print-out example

Example of 1S0 codes


~~GOOX- 85000 Y-6 JO OO(CmER~RETURN)L
F

● .* Q*o OO***o OCO S**09SOOO*0 ● 900e0*e*@0s B ●0 ****000

Operator information print-out example


I
The information in this section is ignored and nothing is executed.

(3) EOR (%),.. , code


Generally, the end-of-record code is punched in at both ends of the tape. It has the following
functions:
1 ) Rewind stop when rewinding tape (with tape handler)
2 ) Rewind start during tape search (with tape handler)
3 ) Completion of storage during tape storage into memory
(4) Tape preparation for tape operation (with tape handler)

r’

~~
2m Initial block
(:,) (:)~
_ i “m
Last block
2m
L
If a tape handler is not used, there is no need for the 2-meter dummy at both
ends of the tape or for the head EOR (%) code.

-6-
3. DATA FORMATS
3.1 TAPE CODES

EIA or 1S0 code is automatically identified by the first EOB/LF code after NC resetting.

EIA codes (RS-244-A) ISO codes (R-84(I)


Feed holes Feed holes
+- Channel no. + Channel no.

:
3
4
6
6
7
i
9
0

or NJ.,

ee eo. ee [
00 *e. o e ]
*O*

. ..”
O*
“~’
“:”””””””””4$
‘“~”g”””’:”

&

‘emea,te..k(.)dm.n.t
denote an E~c~e-bu;
~
‘is used simply
. Under the ISO code system,
J .F m
—. ..- Nl. is F.(X3 and
.—.-—-- -
@Under the 1S0 code system,
% is EOI

for the sake of convenience. CR has no meaning and is not


equivalent to EOB.

Codes (A) are stored on tape but an error results (except when they are used in the comment section)
during operation.
Codes (B) are non-working codes and are always ignored. (They are, however, subject to the parity V
check.)
There’are no EIA standard codes corresponding to the~%~areas. Fig. 1 Table of tape codes

-7-
3. DATA FORMATS
3.2 PROGRAM FORMA TS

3.2 PROGRAM FORMATS


The prescxi%ed arrangement used when assigning control information to the NC control system is known
as the program format, and the format used with the MELDAS 300-V series is called the “word address
format.”
( 1 ) Words and addresses
A word is a collection of characters arranged in a specific sequence. This entity is used as the unit for
processing data and for causing the numerically controlled machine tool to execute specific
operations.
Each word used in the MELDAS 300-V series consists of an alphabet letter and a number which may
be several digits long (sometimes with a”+” or “-” sign placed before it).

Word
.- -.

❑000------0
2
Numerals

~ Alphabet (address)

Word configuration

The alphabet letter at the head of the word is the address. It defines the meaning of the numerical
inform~tion which follows it.
For details on the types of words and the number of significant digits in the words used with this MELDAS
series, refer to Table 1 containing the format abbreviations.
(2) Blocks
A block is a collection of words. It includes the information which is required for the numerically
controlled machine to execute specific operations. One block unit constitutes a complete command.
The end of each block is marked with an EOB (end-of-block) code.
(Example 1)
Gox-looo ;
GIX–2000F500
@xample 2)
;
1 2 blocks

(GOX–1OOO ;) (This counts as one block since the semicolon inside the parentheses
GIX–2000F500 ; does not denote EOB.)
}

(3) Programs
A program is a collection of several blocks.

-8-
3. DATA FORM4TS
3.2 PROGRAM FORMA TS

Table 1 Formatting details

Item Metric commands I Inch commands


?rogram number 08
;equence number I N5 J
Preparatory function G2/G21
Input unit A 0.01 ~), mm X+52 Y-i-52 Z+52 a+52
Input unit BO.001 ~),
Movement xi-53 Yi-53 Z+53 ot+53 x+44 Y+44 Z+44 a+44
mm/O.0001 inch
tis
Input unit CO.0001 ~),
x+44 Y+44 Z+44 iY+44 x+35 Y+35 Z+35 ff+35
mm/O.00001 inch
Irmut unit AO.01 P). mm 11+52 J +52 K+52 I I
Input unit BO.001 ~),
Auxiliary 1+53 J+53 K+53 1+44 J+44 K+44
mm/O.0001 inch
axis
Input unit CO.0001 ~),
1+44 J+44 K+44 1+35 J+35 K+35
mm/O.00001 inch
Input unit AO.01 (rev), mm X53 P8
Input unit BO.001 (rev),
X53 P8 X53 P8
Dwell mm/O.0001 inch
Input unit C 0.0001 (rev),
X44 P8 X44 P8
mm/O.00001 inch
Input unit AO.01 (“), mm F53
Input unit BO.001 ~),
Feed F53 F44
mm/O.0001 inch
function
Input unit CO.0001 ~),
F53 F44
mm/O.00001 inch
Input unit AO.01 ~), mm IR+52 Q52 P8 L4 I I
Input unit BO.001~),
Canned R+53 Q53 P8 L4 R+44 Q+44 P8 L4
mm/O.0001 inch
cycle
Input unit CO.0001 ~),
R+44 Q44 P8 L4 R35 Q35 P8 L4
mm/O.00001 inch
Tool offset I-13n33
Miscellaneous function M2/M4/M8
Spindle function S2/S5/S8
Tool function T2/T8
2nd miscellaneous function B8/A8/c8
Subprogram P8H51A
Variable number #5

NOTE 1: “a” denotes the U, V, W, A, B or C additional axis address.


NOTE 2 This format is the same for every numerical value input made from the tape, memory, MDI or
the setting and display unit.
NOTE 3 All leading zeros in numbers can be omitted.
NOTE 4: Program numbers are assigned in independent blocks. Assign them in the head block of each
program.
NOTE 5 The significance of the symboles and abbreviations used are as follows.
Example 1) 08: 8-digit program number
Example 2) G21 : Dimension G has 2 digits to the left of the decimal point and one to the right.
Example 3) X + 53: Dimension X has a‘< -t” or “-’’sign and 5 digits to the left of the decimal
point and 3 to the right.

-9-
3. DATA FORMATS
3.3 TAPE STORAGE FORMA T

The example given below is a case where the X-axis is positioned (by the GOOcommand) at the

~
45.123 mm position in the absolute value (G90) mode.
GO OX45123;
3 digits below decimal point

T“~
-This denotes 5 digits above decimal point. However, since the actual value
is “ + 00045”, the leading zeros and “ + “sign are omitted.
GO may be pogrammed instead.

3.3 TAPE STORAGE FORMAT


( 1 ) Storage tape and storage sections (automatic ISO/EIA identification)
As with tape operation, the codes of a tape which are to be stored in the memory can be either 1S0
/ EIA codes, and these codes are automatically identified by the head EOB code after resetting.
The section stored in the memory extends from the character following the first EOB to the EOB
code after resetting, otherwise, it extends from the present tape position to EOB. Usually, therefore,
tape storage is started after resetting.
What in the above storage section is actually stored in the memory is only the significant codes among
the tape codes shown in Fig. 1 in Section 3.1. All other codes are ignored and are not stored.
The data between control out “(” and control in “)” is stored in the memory.

3.4 OPTIONAL BLOCK SKIP (“/”)


This function selectively ignores specific blocks in a machining program which start with the “/” (slash)
code.

3.4.1 Optional block skip


Provided that the optional block skip switch is ON, blocks starting with the “/” code are ignored. They are
executed if the switch is OFF.
Parity check is valid regardless of whether the optional block skip switch is ON or OFF.
When, for instance, all blocks are to be executed for one workpiece but specific blocks are not to be
executed for another workpiece, the same command tape can be used to machine different parts by
inserting the “/” code at the head of those specific blocks.

3.4.2 Precautions for using optional block skip


1 ) Put the “/” code at the head of the block. An illegal address error (P32) will result if it is placed
inside the block.
Example: N20G1X25. /Y25. ; ..... NG
/N20GlX25. Y25. ; ..... OK
2 ) Parity checks (H and V) are conducted regardless of the optional block skip switch position.
3 ) The optional block skip is processed immediately before the pre-read buffer.
Consequently, it is not possible to skip up to the block which has been read into the pre-read
buffer.
4 ) This function is valid even during a sequence number search.
5 ) All blocks with the “/” code are also input and output during tape storage and tape output,
regardless of the position of the optional block skip switch.

-1o-
3. DATA FORM4TS
3.5 PROGRAM, SEQUENCE AND BLOCK NUMBERS (0, N)

3.5 PROGRAM, SEQUENCE AND BLOCK NUMBERS (O, N)


These numbers are used for monitoring the execution of the machining programs and for calling both
machining programs and specific stages in machining programs.
Program numbers are classified by workpiece correspondence or by subprogram units, and they are
designated by the address “O followed by a number with up to 8 digits.
Sequence numbers are attached where appropriate to command blocks which configure machining
programs, and they are designated by the address “N” followed by a number with up to 5 digits.
Block numbers are automatically provided inside the NC system itself. They are preset to zero every time
a program number or sequence number is read, and they are counted up one at a time unless program
numbers or sequence numbers are assigned in blocks which are subsequently read.
Consequently, all the blocks of the machining programs given in the table below can be determined without
further consideration by combinations of program numbers, sequence numbers and block numbers.

NC monitor display
NC input machining program
Program no. Sequence no. Block no.
012345678 (DEMO, PROG) ; 12345678 0 0
I G92XOY0 ; 12345678 I 01 1 I
G90G51X-150. Po. 75 ; 12345678 0 2
N1OOGOOX–5O. Y–25. ; 123456’78 100 0
N11OGO1X25O. moo ; 12345678 110 0
Y–225. ; 12345678 110 1
X–50. ; 12345678 110 2
Y–25. ; 12345678 110 3
I N120G51Y–125. PO. 5 ; 12345678 120 I o I
N13OGOOX–1OO. Y–75. ; 12345678 130 0
N140G01X–200. ; 12345678 140 0
Y–175. : 12345678 140 1
x–loo. ; 12345678 140 2
Y–75. ; 12345678 140 3
N150GOOG50XOY0 ; 12345678 150 0
! N160M02 : ! 12345678 i 160 \ o

-11-
3. DATA FORMATS
3.6 PARITY Hfl

3.6 PARITY H/v


Parity check provides a mean of checking whether the @pe has been correctly perforated or not. This
involves checking for perforated code errors or, in other words, for perforation errors. There are two types
of parity check parity H and parity V.
(1) Parity H
Parity H checks the number of holes configuring a character and it is done during tape operation, tape
input and sequence number search. When a parity H error occurs, the tape stops after the alarm code.
A parity H error arises in the following cases.
1 ) 1S0 code
When a code with an odd number of holes in a significant data section has been detected
2 ) EIA code
When a code with an even number of holes is found in a significant data section.

(Example 1) Parity H error (with EIA code)


f

● ***m **w*** ● ******S***= ● ********m* ● **~***

@
e ● e
1

<
L This character causes a parity H error.

(Example 2) Parity H error (with ISO code)


{ I
● 000
● ● @e.”
0000
e ●
●0 000 ● ●
00s0
●*QO
● ●

000 e :0 ● 00000* :: ●
. ●***e***** D*******-
● 9=******** ******9** **e***. ● ●

00* ● 00 ●* ● oe*
o
00
●0
O*
●:00000
● ● 0000
●000*:0000
●eeo*oo*o ::
●:000000
● ● 000006000
● 00
● 00 ● 00
c ● 0:00 ● ● 000 ● ●

I This character causes a parity H error.


L
(Example 3) Parity H error (with EIA code)

r
i
1 Block
1 i


::

*e*em*m
*O *em ●
:
**********
so:.
● ☛

● *m**
●s
e*
● 00

*D**

● m***

● *: ● 000
00
● OO
0.:0:: ●
@ ●s
● 0 ● ● ● ●
● ● s
f /
I t I This unpunched character
denotes the parity.

L These unpunched characters do


not denote a parity H error.

-12-
3. DATA FORlk?ATS
3.6 PARITY Hfl

(2) Parity V
A parity V check is done during tape operation, tape input and sequence number search when the
parity V check function is turned on by the parameter screen setting on the setting and display unit.
It is not done during memory operation. -
A parity V error occurs in the following case: when the number of codes from the first significant code
to the EOB (;) in the significant data section in the vertical direction of the tape is an odd number,
that is, when’the numb&of characters in one block is odd.
When a parity V error is detected, the tape stops at the code following the EO13 (;).
kmmle 3)

meee, aee **m,* *.*9******

t
This block causes a parity V error.

NOTE 1: Among the tape codes are both codes which are counted as characters for parity V and wales
which are not wunted as such. For details, refer to the tape wde table in Fig. 1 of Section 3.1.
NOTE 2 Any space wales which may appear within the section from the initial EOB wde to the address
code or “/” code are not counted for parity V check.

- 13 ‘-
,,

3. DATA FORMATS
3.7 TABLE OF G COMMANDS

3.7 TABLE OF G COMMANDS

G code G code
Group Function Group Function
system system
Special canned cycle
●OO 01 Positioning 34 00
(bolt hole circle)
*O1 01 Linear interpolation 35 00 Special canned cycle (line at angle)
02 01 Circular interpolation (clockwise) 36 00 Special canned cycle (arc)
Ckcular interpolation
03 01 37 00 Automatic tool length measurement
(counterclockwise)
02.1 00 Spiral interpolation (clockwise) 37.1 00 Special canned cycle (grid)
Spiral interpolation Cutter compensation vector
03.1 00 38 00
(counterclockwise) assignment
04 00 Dwell 39 00 Cutter compensation comer arc
Cutter compensation cancel/
05 00 High-speed mode *4O 07
3-D cutter compensation
Cutter compensation left/
06 (Spare) 41 07
3-D cutter compensation
Cutter compensation right/
07 00 Imaginary axis interpolation 42 07
3-D cutter compensation
08 (Spare) *40.1 15 Normal line control cancel
09 00 Exact stop check 41.1 15 Normal line control left
Program parameter input/compensa-
10 00 42.1 15 Normal line control right
tion input
11 00 Program parameter input cancel 43 08 Tool length offset (+)
12 00 Arc cutting (clockwise) 44 08 Tool length of&et (-)
13 00 Arc cutting (counterclockwise) 45 00 Tool position offset expansion
14 (Spare) 46 00 Tool position offset contraction
15 (Spare) 47 00 Tool position offset x 2 expansion
16 (Spare) 48 00 Tool position offset x 2 contraction
*17 02 Plane selection X — Y *49 08 Tool psition offset cancel
*18 02 Plane selection Z – X *5O 11 Scaling cancel
*19 02 Plane selection Y — Z 51 11 Scaling ON
*2O 06 Inch command *50.1 19 G command mirror image cancel
“21 06 Metric command 51.1 19 G command mirror image ON
22 04 Barrier check before movement ON 52 00 Local coordinate system setting
*23 04 Barrier check before movement OFF 53 00 Machine coordinate systemselection
24 (Spare) *54 12 Work coordinate system 1 selection
25 (Spare) 55 12 Work coordinate system 2 selection
26 (Spare) 56 12 Work coordinate systern 3 selection
27 00 Reference point check 57 12 Work coordinate w tern 4 selection
28 00 Reference point return 58 12 Work coordinate system 5 selection
29 00 Start point return 59 12 Work coordinate system 6 selection
30 00 2nd-4th reference point return 60 00 Unidirectional positioning
31 00 Skip function 61 13 Exact stop check mode
31.1 00 Multi-stage skip 1 61.1 13 High-precision control mode
31.2 00 Multi-stage skip 2 62 13 Automatic comer override
31,3 00 Multi-stage skip 3 63 13 Tapping mode
32 (Spare) %4 13 Cutting mode
33 01 Thread cutting 65 00 User macro simple call

-14-
3. DATA FORMATS
3.7 TABLE OF G COMMANDS

NOTE k The “*” asterisk denotes a ~de which should be se]ect~ or is se]@ed in the initi~ status.
The “*” asterisk denotes a code which should be selected or is selected in the initial status by a parameter.
NOTE 2 When two or more G codes in the same group have been assigned, the last G code is valid.
NOTE 3: G101 – G11O and G200 – G202 are user macro I codes. When they have been set by
parameter as G code call codes, the G code calls take precedence and the codes cannot be used
as user macro I codes.
NOTE 4 This list contains original NC G codes. Some machines may operate differently from these codes
using G code macro calls. Reference should be made to the operating instructions issued by the
machine builder.

-15-
4. BUFFER REGISTER
4.1 INPUT BUFFER

4. BUFFER REGISTER

4.1 INPUT BUFFER


1) When the pre-read buffers are empty during a tape operation or RS-232C operation, the
contents of the input buffer are immediately transferred to the pre-read buffers and, provided
that the data stored in the input buffer does not exceed 248x 4 characters, the following data
(up to 248 characters) is pre-read and stored into the input buffer.
These buffers are designed to eliminate the operational delay originating in the readout time of
the tape reader and to smooth out the block joins.
The pre-reading effects are lost, however, when the block execution time is shorter than the tape
readout time of the following block.

Analysis processing
p ---------- ------ .---— —--- 1
(Buffer simx 248x 5 characters) ~ Max. 5 execution blocks

Input
& buffer
n @ ‘{ (.U ;= !

u
I

Memo~ J I
I

Keyboard

u
h #
MDI
data —
~ NOTE: Data equivalent to 1 block is stored ~
in one pre-read buffer. I
I
-— --- ——-— .——. -1
i____ -–-–

2) The input buffer has a memory capacity of 248 x 5 characters (including the EOB code).
● The contents of the input buffer register are updated in 248-character units.
● Only the significant codes in the significant data sections are read into the input buffer.
● When codes (including “(” and “)”) are sandwiched in the control in or control out mode and
the optional block skip function is ON, the data extending from the “/” (slash) code up to the
EOB code is read into the input buffer.
● The input buffer contents are cleared by resetting.

4.2 PRE-READ BUFFERS


1) During automatic processing, the contents of 1 block are normally pre-read so that program
analysis processing is conducted smoothly. However, during cutter compensation, a maximum
of 5 blocks are pre-read for the intersection point calculation including interference check.
Furthermore, during automatic operation in the high-speed mode II, four blocks are pre-read
so that program analysis processing is conducted smoothly.
2) The specifications of the pre-read buffers are as follow,x

-16-
4. BUFFER REGISTER
4.2 PRE-READ BUFFERS

The data of one block is stored in a buffer.


Only significant codes in significant data sections are read into the pre-read buffers.
When codes are sandwiched in the control in or control out mode and the optional block skip
function is ON, the data extending from the “/” (slash) code up to the EOB code is not read into
the pre-read buffer.
The pre-read buffer contents are cleared with resetting.
When the single block function is ON during continuous operation, the pre-read buffer stores
the following block data and then stops operation.
Other checkpoints
When programs are run continuously or block by block, the timing at which the mirror image,
optional block skip and other external control signals are made valid/invalid will differ.
When the mirror image, optional block skip and other external control signals are set ON or
OFF by M commands, external control operation will not be made valid in pre-read programs
due to the NC buffer register.
Outlined below is the method used to prohibit pre-reading and perform calculation again for M
commands which exercise external control.
The M commands which exercise external control are identified by the PLC, and the
“calculation request” in the PLC - NC interface table is set ON.
(When “calculation request” is set ON, the NC system re-processes the pre-read programs.)

-17-
,.

5. POSITION COM..S
5.1 POSITION COMMAND SYSTEMS (G90, G91)

5. POSI’HON COMMANDS
5.1 POSITION COMMAND SYSTEMS (G90, G91)
(1) Function and objective
Once the G90 or G91 command has been assigned, the following coordinate commands can be
executed as absolute or incremental value commands. Incremental commands, however, always apply
to R-specified arc radii and I, J, K arc centers.
(2) Command format
G9A XXI Yyl Zzl a al ; (“a” is optional axis)
Where G90: Absolute command
G91: Incremental command
(3) Detailed description
1) In the abhlute value mode, the tool can be
moved to the position of the work coordi- ‘..mo. ,
nate system assigned by the program re- II
gardless of its present position, Tool
::#--
lmfN1
IN 1 G90GOOX0 YO ; I
In the incremental value mode, the tool is
moved as a relative value by the amount of
the value equivalent to the program com-
mand, with its present position as the start
point (0).

IN2 G90G01X200. Y50. F1OO; I


1N2 G91G01X200. Y50. F1OO: I
When the command is issued from the zero mint. of the work coordinate svstem.
. the same
coordinate command value auulies in either the absolute or incremental value mode.
2) The G90 or G91 command is~~ed last func-
tions as a modal for the following blocks.
(G90) I N 3x~oo. y~oo. .1
~
The work coordinate system X axis moves
to the 100. mm position and the Y axis to
the 100. mm position.
.(G91) I N 3 X_100. Y50. ~
\ 4
As incremental values, the X axis moves
–100. mm and the Y & moves +50. mm with the result that the X axis moves to the 100. mm
position and the Y axis moves to the 100. mm position.
3) A multiple number of commands can be f T
issued in the same block, and so only spe- ----- ---- -—-
cific addresses can be commanded as abso-
lute or incremental values.
IN 4 G90X300. G91Y1OO. ; 1 . .lm---
1
The X-axis movement is treated as an ab-
solute value by G90, and the X axis moves
to the 300. mm position in the work coordi-
nate svstem. The Y-axis movement is \
treated”as an incremental value bv G91. and
the Y axis moves + 100. mm from its present position, with the result that it moves to the 200.
mm position. G91 remains modal and the incremental value mode is established for the
following blocks.

-18-
5. POSIZ70N COMM4NDS
5.2 INCH/METRIC CONVERSION (G20, G21)

4 ) Whether the absolute or incremental commands are to apply when the power is switched on can
be selected by parameter setting on the setting and display unit.
5 ) When commands are issued by manual data input (MDI), they are treated as medals from the
block in question.

5.2 INCH/METRIC CONVERSION (G20, G21)


(1) Function and objective
These G commands are used to switch between the inch and millimeter (metric) systems.
(2) Command format
G20 Inch command
G21: Metric command
(3) Detailed description
G2(I and G21 selection is meaningful only for linear axes and it is meaningless for rotary axes.
(Example 1) Relationship between input command units and G20/G21 commands (with decimal point
input type 1)

Input Millimeter output


Command Inch output (in/out ON)
Mis command unit (in/out OFF)
example
type (cS-) G21 G20 G21 G20
x B Xloo ; 0.100 mm 0.254 mm 0.0039 inch 0.0100 inch
Y B Yloo ; 0.100 mm 0.254 mm 0.0039 inch 0.0100 inch
z A Zloo ; 1.00 mm 2,54 mm 0.039 inch 0.100 inch
B 2 B1OO; 10.OO 10.OO 10.OO 10.OO

NOTE 1: When providing G20/G21 conversion by a program command, the tool length, tool position, tool
radius and other such offset amounts as well as variables and parameters must be converted into
the input setting units of the metric command input setting unit system (for each axis) and set
on the setting screen or by parameter tape input.
(Example 2) When input setting unit system “B” (initial inch) is OFE
Position command unit .....0.001 mm
Compensation amount setting unit ....0.001 mm when compensation amount is 0.05 mm
In the above case, the compensation amount must be set as 0.002 (0.05 + 25.4 # 0.002) with
G21 e G20 conversion.
NOTE 2 As a rule, G20/G21 conversion is performed before the work machining starts. However, for
conversion midway through a program, stop operation with the MOOor other such command
after the G20 (or G21) command and then proceed to change the compensation amount.
(Example 3) G21 G92 Xxl Yyl Zzl ;
:,. :
:,. :
: :
G20 G9; XX’2Yy2 ZZ2 ;
MOO ; - Compensation amount must be reset.
:
F1O ; ~“ New F command must be input.
Whether the G20 or G21 command is to apply when the power is switched on can be
selected by means of “initial inch” on the parameter page.
NOTE 3 When conversion takes place, the F feed rate command will execute the data prior to conversion
in the command unit system applying after conversion. This means that the proper feed rate
command for the command unit system applying after conversion should be assigned again.

-19-
., ,,, ,.

5. POSIITON COMkOiNDS
5.3 DECIMAL POINT INPUT

5.3 DECIMAL POINT INPUT


(1) Function and objective
This function provides the decimal point command input. It assigns the decimal point in millimeter
or inch units for the machining program input information that defines the tool paths, distances and
speeds.
A parameter selects whether type I (minimum input command unit) or type II (zero point) is to apply
for the least significant digit of data without a decimal point.
(2) Command format
00000.000 Metric system
0000.0000 Inch system
(3) Detailed description
1 ) In machining programs, the decimal point command is valid for distance, angle, time, speed and
scaling factor (only after G51) commands.
2 ) With decimal point input types
.. I and II, the command values for data without a decimal point
differ according to the command unit system, as indicated in the table below.

Com- Command unit


Command unit x 10 Type I Type 11
mand system
Cs–1 OFF 1000 1
(p, 10-4 inch, 1030) (mm, inch, 0,
ON 1000 1
CS–2 OFF 100 1
ON 100 1
xl ; CS–A OFF 10 1
ON 10 1
CS–B OFF 1 1
ON 10 1
es–c OFF 0.1 1
ON 1 1
3 ) Valid addresses for the decimal point command include ~ Y, Z, U, V, W, A, B, C, I, J, & E,
F, P, Q and R. P is valid only with the scaling factor. For details, see the relevant table.
4 ) See below for the number of significant digits in decimal point commands. (Input
. . command unit
CS–B is given as an example:) -

Movement command Movement command


Feed rate Dwell
(linear) (rotary)
Decimal Decimal Decimal Decimal
Integer Integer Integer Integer
part part part part
MM (mil- o. .Ooo 0. .000 0. 0. .000
_!l?@& – 99999. – .999 – 99999. – .999 – 60000. “00 – “99 – 99999. – .999
INCH 0. .Oooo 99999. .0_ .999 0. .000 .000
- – 9999. – .9999 (359.) – 2362. – .999 “0 – “99 – .999
5) The decimal point command is valid for commands definin~ variable data used in sub~rom-ams.
6) The minimum unit for commands without a decimal ~-int designation applying ‘wh~n the
decimal point command is valid can be set to the minimum input command unit (0.lp, 1P or
10P) determined by the specifications or to millimeters. This setting is made by parameter
(decimal point command 2) on the setting and display unit.
7) Decimal point commands for decimal point invalid addresses are processed as integer data only
and everything below the decimal point is ignored. Addresses which are invalid for the decimal
point are D, H, L, M, N, O, S and T.
All variable commands, however, are treated as data with decimal points.

-20-
6. INl_i5RPOLA170N FVNCE?ONS
6.1 POSITIONING [RAPID TRA VERSE: GOOJ

6. INTERPOLATION FUNCTIONS

6.1 POSITIONING (RAPID TRAVERSE: GOO)


(1) Function and objective
This command is accompanied by coordinate words. It positions the tool along a linear or non-linear
path from the present point as the start point to the end point which is specified by the coordinate
words.
(2) Command format
GOOXx Yy Zz U. ; (“a” is optional axis)
Symbols x, y, z and a are coordinate values and, depending on the state of G90/G91, they denote
absolute or incremental positions.
(3) Detailed description -
1 ) Once this command has been issued, the GOOmode is retained until it is changed by another
G function or until the GO1. G02 or G03 command in the 01 mou~ is assimed. If the next
command is GOO,the only requirement is to speci~ the coordin~te ~ords. -
2) In the GOOmode, the tool is always accelerated at the start point of the block and decelerated
at the end point of the block. Execution proceeds to the next block after the in-position state has
been confirmed. The in-position width is set by parameter.
3) Any G command (G72 – G89) in the 09 group is canceled (G80) by the GOOcommand.
4) Whether the tool moves along a linear or non-linear path is determined by parameter, but the
positioning time does not change.
a. Linear path:
This is the same as linear interpolation (GO1), and the speed is limited by the rapid
traverse rate of each axis.
b. Non-linear path:
The tool is positioned at the rapid traverse rate independently for each axis.
5) A G command not followed bv a number is treated as GOO.
(4) Example of program
(Example 1)
G91 GOO X –270000 Y300000 Z 150000; (With an input setting unit of 0.001 mm)
z

+ 300)

Unit: mm

NOTE 1: When the “GO non-intertmlation” user uarameter is OFF, the Path along which the tool is
positioned is the shortest-path connecting the start and end poi~ts. The ~ositioning speed is
automatically calculated so that the shortest distribution time is obtained in order that the
assigned speeds for each axis do not exceed the rapid traverse rate.

-23-
6. INTERPOLA170N FUNCTiONS
6.1 POSITIONING (RAPID TRA VERSE: GOO)

When, for instance, the X-axis and Y-axis rapid traverse rates are both 9600 mm/min, the tool will
follow the path in the figure below if the fol~owing is programmed:
G91 GOOX–300000 Y200000 ; (With an input setting unit of 0.001 mm)

End point Actual Y aXiS


a
6400 mm/min

, \HL
Y

fy
\ E
x
Start point
. WI h

‘x-r’
Actual X axis rate: 9600 mm/min
(Unit: mm)

NOTE 2 When the “GO non-interpolation” user parameter is ON, the tool will move along the path from
the start point to the end point at the rapid traverse rate of each axis.
When, for instance, the X-axis and Y-axis rapid traverse rates are both 9600 mm/min, the tool
will follow the path in the figure below if the following is programmed:
G91 GOOX–300000 Y200000 ; (With an input setting unit of 0.001 mm)

End point” - Actual Y axis rate


I
9600 mm/min

fy
\ \yi-
x

r W----lstartpoint

‘X7 (Unih mm)


Actual X axis rate: 9600 mm/min

NOTE 3 The rapid traverse rate for each axis with the GOOcommand differs according to the individual
machine and so reference should be made to the machine specifications manual.
NOTE 4: Rapid traverse (GOO) deceleration check
Upon completion of rapid traverse (GOO), check that the remaining distances of the axes are
less than the regular values, and then execute the next block. (See Fig. 1)
The remaining distances are checked by the rapid traverse in-position width L~. “L~” is the
“ZRZ” setting on the servo parameter page.
The parameter “ZRZ setting unit is 0.001 mm or 0.0001 inch.

-24-
6. INIERPOLATION FUNCTIONS
6.1 POSITIONING {RAPID TRA VERSE: GOO)

Previous block
Next block

T,
r -
ZXTR
P

Fig. 1 GO deceleration pattern

In Fig. 1, T~ is the rapid traverse acceleration/deceleration time constant and L~ is the in-position width.
The in-position width LR is the remaining distance of the previous block when the next block is started, as
shown in Fig. 1 (shaded area in the figure).
The rapid traverse acceleration/deceleration check is designed to reduce the positioning time. If the
parameter “ZRZ” setting is increased, the reduction time will also be increased but the remaining distance
of the previous block when the next block is started will also be increased, and this may interfere with the
actual machining.
The remaining distance check is conducted at regular time intervals. As a result, the effect of the
positioning time reduction may not correspond to the “ZRZ” setting.

,,

-25-
6. INTERPOL47TON FUNCTIONS
6.2 UNI-DIRECTIONAL POSITIONING (G60]

6.2 UNI-DIRECTIONAL POSITIONING (G60)


(1) Function and objective
The G60 command can position the tool at a high degree of precision without backlash error by
locating the final tool position from a single determined direction.
(2) Command format
G60 Xx Yy Zz aa ; (“a” is optional axis)
(3) Detailed description
1 ) The creep distance for the final positioning as well as the final positioning direction is set by
parameter.
2 ) Mer the tool has moved at the rapid traverse rate to the position separated from the final
position by an amount equivalent to the creep distance, it moves to the final position in
accordance with the rapid traverse setting where its positioning is completed.

GWa Positioning position

‘ [Final advance direction]

e— Start point _@
Start point
Stop once J y ‘


h
o C60-a

- l-- [G60 creep distance]

3) The above positioning operation is performed even when Z-axis commands have been assigned
for Z-axis cancel and machine lock. (Display only)
4) When the mirror image function is ON, the tool will move in the opposite direction as far as the
intermediate position due to the mirror image function but the creep distance operation during
its final advance will not be affected by mirror image.
5) The tool moves to the end point at the dry run speed during dry run when the GO dry run
function is valid.
6) Feed during creep distance movement with final positioning can be stopped by resetting,
emergency stop, interlock, feed hold and rapid traverse override zero.
The tool moves over the creep distance at the rapid traverse setting. Rapid traverse override is
valid.
7) Uni-directional positioning is not performed for the drilling axis during drilling canned cycles.
8) Uni-directional positioning is not performed for shift amount movements during the fine boring
or back boring canned cycle.
9) Normal positioning is performed for axes whose creep distance has not been set by parameter.
10) Uni-directional positioning is always a non-interpolation type of positioning.
11) When the same position (movement amount of zero) has been commanded, the tool moves
back and forth over the creep distance and is positioned at its original position from the final
advance direction.
12) Program error “P61” results when the G60 command is assigned with an NC system which has
not been provided with this particular specification.

-26-
6. INTERPOLA170N FUNCTIONS
6.3 LINEAR INTERPOLATION (GOI)

6.3 LINEAR INTERPOLATION (GO1)


(1) Function and objective
This command is accompanied by coordinate words and a feed rate command. It makes the tool move
(interpolate) linearly from its present position to the end point specified by the coordinate words at
the speed specified by address F. In this case, the feed rate specified by address F always acts as a
linear speed in the tool center advance direction.
(2) Command format
GO1 Xx Yy Z2zaK Ff; (“a” is optional axis)
% Y,z and fJ are coordinate values and, depending on the status of G90/G91, they denote absolute or
incremental values. “i” is a number denoting the speed data.
(3) Detailed description
Once this command is issued, the mode is maintained until another G function (GOO,G02, G03, G33)
in the 01 group which changes the GO1 mode is assigned. Therefore, if the next command is also GO1
and if the feed rate is the same, all that is required is to specify the coordinate words. If no F command
is jziven in the first GO1 command block. Dromam error “P62” results.
~~ feed rate for a rotary axis is assign~ by “~min (decimal point position unit). (F300 = 300°/min)
The G functions (G72 – G89) of the 09 group are canceled (G80) by the GO1 command.
(4) Example of program
(Example 1) Cutting PI -D Pz + Pq - P4 + PI at 300 mm/min feed rate
POa PI is for tool positioning. -

P*
L x

P,,
/
Unih mm
-20
/ Input setting uni~ 0.001 mm

I
Pa

G90 GOO X20000 Y20000 ; po+pl


GO1 X20000 Y30000 F300 P 1 +P 2
X30000 ; p2+p3
x -20000 Y –30000 ; p3+p4
x -30000 ; P4+P1

-27-
6. INTERPOLATION FUNCTIONS
6.4 PLANE SELECTION (G I 7, G18, G19)

6.4 PLANE SELECTION (G 17, G18, G 19)


These commands speci~ the plane on which the tool is moved by the circular interpolation (including
helical cutting) and cutter compensation commands.
They are also used to select the rotation plane both for the pattern rotation function and programmed
coordinate rotation function.
If the parallel axes corresponding to the 3 basic axes are entered as parameters, the command can select
the plane of any 2 axes which are not parallel axes. If a rotary axis is entered as a parallel axis, the
commands can select the plane containing the rotary axis.
Under standard plane selection, the relationship between the 3 basic axes of X, Y and Z and the
corresponding parallel axes of U, V and W is fqed, and it is not possible to select the plane containing a
rotary axis (A, B or C).
These commands are used to select:
. The plane for circular interpolation (including helical cutting)
. The plane for cutter compensation
● The plane for pattern rotation
. The plane for programmed coordinate rotation
● The plane for canned cycle positioning
The command format is as below
G17 ; X — Y plane selection

I
G18 ; Z — X plane selection
G19 ; Y — Z plane selection /}
X, Y and Z denote the individual coordinate axes or the parallel axes.

6.4.1 Parameter entry

Basic axis Parallel axis 1 Parallel axis 2


I x u w
J Y
K z v B
Fig. 1 Example of plane selection parameter entry
As in the example given in Fig. 1, it is possible to enter the basic axes and the parallel axes up to the second
parallel axis.
Axes other than X, Y and Z maybe used as the basic axes.
Axes which have not been entered have no relation to plane selection.

-28-
6. INTERPOLA~ON FUNCTIONS
6.4 PLANE SELECTION (G I 7, G18, G19)

6.4.2 Plane selection system


In Fig. 1:
I is the horizontal axis of the G17 plane or the vertical axis of the G18 plane.
J is the vertical axis of the G17 plane or the horizontal axis of the G19 plane.
K is the horizontal axis of the G18 plane or the vertical axis of the G19 plane.
In other words:
G17 ... IJ plane
G18 ... KI plane
G19 ... JK plane
Axis addresses assigned in the same block as the plane selection (G17, G18, G19) command determine
which of the basic axes or parallel axes are to be in the actual plane selection.
In the case of the parameter entry example in Fig. 1:
G17X_Y_ ; XY plane
G17W.Y. ; WY plane
G18x_v_ ; VX plane
G18u_v_ ; W plane
G19Y_Z_ ; YZ plane
G19Y_V_ ; YV plane
Plane selection is not performed with blocks in which the plane selection G code (G17, G18, G19) is not
assigned.
G17X_Y_ ; XY plane
Y_z_ ; XY plane (no plane change)
When the axis addresses are omitted in the block containing the plane selection G codes (G17, G18, G19),
it is assumed that the axis addresses of the 3 basic axes have been omitted.
In the case of the parameter entry example in Fig. 1:
G17 ; XY plane
G17U- ; UY plane
G18u_ ; ZU plane
G18v_ ; VX plane
G19Y_ ; YZ plane
G19V- ; YV plane
Any axis commands not existing in the plane determined by the plane selection G code (G17, G18, G19)
have no relation to plane selection.
In the case of the parameter entry example in Fig. 1, if the following is assigned:
G17U_Z ;
then the UY plane is selected and the Z movement is unrelated to the plane.
When the basic axes or their parallel axes are duplicated and assigned in the same block as the plane
selection G code (G17, G18, G19), the plane is determined in the order of basic axes, 1st parallel axis and
then 2nd parallel axis.
In the case of the parameter entry example in Fig. 1, if the following is commanded
G17U_Y-W. – ;
then the UY plane is selected and the W movement is unrelated to the selected plane.

NOTE 1: The planes set by the parameters (initial Z – X plane, initial Y – Z pkme) are selected when
the system is reset or when the power is switched on.

-29-
6. IN?ERPOLAIYON FUNCZ?ONS
6.5 CIRCULAR INTERPOLATION (G02, G03)

6.5 CIRCULAR INTERPOLATION (G02, G03)


( 1 ) Function and objective
These commands serve to move the tool along an arc.
(2) Command format

G02 (G03) ;X X-Y ]iJj


Y, Ff;
~~
End point coordinates Arc center Feed rate
Countercloclmvise (CCW) ‘ordinates
v Clockwise (CW)

The arc commands use addresses X and Y (or Z or parallel axes ~ Y or Z) to give the coordinates
of the arc end point and addresses I and J (or K) to give the coordinates of the arc center.
Both absolute and incremental commands can be used together for the arc end point coordinates, but
incremental values must be assigned from the start point for the arc center coordinates.
The arc center coordinates are assigned with input setting units. Care is required with arc commands
for axes using different input setting units. Assign commands with a decimal point in order to avoid
confusion.
(.,3 ) Detailed description
G02 (or G03) & retained until another G command, that is GOO,GO1 or G33 in the 01 group that
changes the its mode, is assigned.
The direction of the arc rotation is differentiated by G02 and G03:
GOZ Clockwise (CW)
G(I3: Countercloctiise (CCW)

L
G03

G02
$

G17 (X–Y plane) G18 (Z–X plane) G19 (Y-Z plane)

An arc which extends for more than one quadrant can be designated by a single block command.
The following information is needed for circular interpolation.
a Plane selection : Which of the XY, ZX and YZ planes is parallel to the arc
plane?
b Rotation direction : Clockwise (G02) or countercloclmvise (G03)?
c Arc end point coordinates : Given by addresses X, Y, Z
d Arc center coordinates : Given by addresses I, J, K (incremental commands)
e Feed rate : Given by address F

-30-
6. INTERPOLA770N FUNC170NS
6.5 CIRCULAR INTERPOLATION (G02, G03)

(4) Examples of program


(Example 1) G02 J50000 F500 ; .... Full circle command

(Example 2) G91 G02 X50000 Y50000 J50000 F500 ; .... 3/4 circle command

Yaxis ]I+Y

Feed rate, Center of arc,


F = 500 mm/min ( J=50mm End point
i X50Y50mm

x axis — +x
Start point

-31-
6. INTERPOLA170N FUNCTIONS
6.5 CIRCULAR INTERPOLATION (G02, G03)

(5) Plane selection


There are 3 planes on which the arc can exist (see figures in”(3) Detailed description”) and they can
be selected by the following methods.
XY plane
Assign the G17 ; (plane selection G code) command.
ZX plane
Assign the G18 ; (plane selection G code) command.
YZ plane
Assign the G19 ; (plane selection G code) cnmmand.
( 6 ) Checkpoints for circular interpolation

NOTE 1. The terms “clockwise” (G02) and “counterclockwise” (G03) used for arc operations are
defined as a case where “the negative direction is viewed from the positive direction of the
coordinate axis, in a right-hand coordinate system, which is at right angles to the plane in
question.”
2. When all the end point coordinates are omitted or when the end point has the same position as
the start point, a 360° arc (full circle) is assigned when the center is assigned using I, J and K.
3. The following occurs when the start and end point radii do not match in an arc command:
1) Program error “P70” results at the arc start point when error A R is greater than the parameter.

(G91) G02X9.899 I 5. ;

Arc error parameter 0.100


Start point radius= 5.000
End point radius 4.899
Error A R= 0.101
/ \
Alarm stop
/ \
\
[ \
Center End point
Start point ,Y ,
I Startpoint radius End pointradius I ~ R

2) Spiral interpolation in the direction of the assigned end point results when error A R is less than
the parameter value.

0 Spiral interpolation

Are error parameter0.100


Startpoint radius=5.000
End point radius=4.900
Error AR= 0.100

Start point
Start pointradius I End pointradius
\ /

The parameter setting range is 0.001 to 1.000 (mm).

-32-
6. IN?ERPOLA7TON FWWTiONS
6.6 R -SPECIFIED CIRCULAR INTERPOLATION (G02, G03)

6.6 R-SPECIFIED CIRCULAR INTERPOLATION (G02, G03)


(1) Function and objective
Along with the conventional circular interpolation commands based on the arc center coordinates (I,
J, K), these commands can also be issued by directly assigning the arc radius R.
(2) Command format
G02 (G03) Xx Yy Rr Ff;
x X-axis end point coordinate
y Y-axis end point coordinate
~ Arc radius
f Feed rate
The arc radius is assigned with input setting units. Care is required with arc commands for axes using
different input setting units. Assign commands with a decimal point in order to avoid confusion.
(3) Detailed description
The arc center is on the bisector line which is perpendicular to the line connecting the start and end
points of the arc. The point, where the arc with the specified radius whose start point is the center
intersects the perpendicular bisector line, serves as the center coordinates of the arc command.
If the R sign of the command program is positive, the arc is smaller than a hemisphere; if it is negative,
the arc is larger than a hemisphere.

/’ \
~ Arc path when R sign is minus
f \ \
i \
I
I
\ Arc path when R sign is plus
\
\ /
\

The following condition must be met with an R-specified arc interpolation command:
L
~r
T
An error results if ~ - r > (yarameter: arc error).
Where L is the line from the start Doint to end noint
If an R specification and I, J, (K) s~ecification ~re assigned at the same time in the same block, the
arc command with the R specification is given priority. In the case of a full-circle command {where
the start and end points coincide), an R-specified arc command will be completed immediately if it
is issued and no operation will result. An I, J, (K) specification arc command should therefore be used
in such a case.
The plane selection is the same as for the I, J, K-specified arc command.

-33-
6. INIW?POLATION FUNCTIONS
6.6 R-SPECIFIED CIRCULAR INTERPOLATION (G02, G03)

(4) Examples of program


(Example 1)
G02 Xxl Yyl Rrl Ffl ; ... R-specified arc on XY plane
(Example 2)
G03 Zzl Xxl Rrl Ffl ; ... R-specified arc on 2X plane
(Example 3)
G02 Xxl Yyl Iil Jjl Rrl Ffl ; ... R-specified arc on XY plane
(When the R specification and I, J (K) specification are contained in the same blockj the R
specification has priority in processing.)
(Example 4)
G17 G02 Iil Jjl Rrl Ffl ; ... R-specified arc on XY planq immediate completion since this is
a full circle command.

‘ ,.

,!

,.,
.’34:
6. INll?RPOLAIYON FUNCTIONS
6.7 HELICAL INTERPOLATION {G17 – G19. G02. G03J

6.7 HELICAL INTERPOLATION (G17 – G 19, G02, G03)


(1) Function and objective
The G02 and G03 commands enable linear interpolation to be performed by a third axis while
circular interpolation is performed on the plane selected by the plane selection G code (G17, G18,
G19).
(2) Command format
G17 G02 Xxl Yyl Zzl Iil Jjl $@l_ Ffl ;
~ , —
(G03) Coordinates
~ of arc Coordhate of linear bxdinatcs of Pitch number Feed rate
end point axis end point arc center
Or
G17 G02 +, Yy2 2%2 Rrz Ffz ;
— ~ ~
(G03) h~lnatea of arc Coordinateof linear Arc radius Feed rate
end point axis end point

The arc center coordinates and radius are assigned with input setting units. Care is required with
helical interpolation commands for axes using different input setting units.
Assign commands with a decimal point in order to avoid confusion.
(3) Detailed description

z axis

Eik3.
r
. =p.

Y
‘. --%
L >—
2 times”
I
I
axis

1 ) Assign a linear axis (or a multiple number of axes) not including the circular axis for the arc
interpolation command.
2 ) Assign the combined speed of the X, Y and Z axis components for the feed rate F.
3 ) Pitch t is determined from the following formula

z,
k=
(2z” P,+e)/2z
ye
6’=@ e- Os=tan-’ —–
~ e
tan-t ~(0Sec2~)
Xs
Where XS,ys are the coordinates of the start point from the center of the arc
xe, ye are the coordinates of the end point from the center of the arc

4 ) Address P maybe omitted when the pitch number is O.

NOTE The command range for pitch number P is O to 99. (See *1)
The pitch number (P command) cannot be assigned using an R-specified arc.
*1: Depending on the system version, the command range for pitch number P maybe O to 9999.

-35-
6. INTERPOLA770N FVNCTIONS
6.7 HELICAL INTERPOLATION (G17 – G19, G02, G03)

5 ) Plane selection
The selection of the arc plane for helical interpolation is determined by the plane selection
mode and axis addresses, as is the case for circular interpolation. The standard method of
assigning helical interpolation is to assign a circular interpolation plane with a plane selection
G code (G17, G18, G19) and to assign two axes for circular interpolation and one axis for linear
interpolation (axis perpendicular to the arc plane).
XY plane arc, Z axis line
Assign the addresses of the 3 axes ~ Y and Z in the G02 (G03) mode and G17 (@me
selection code) mode.
ZX plane arc, Y axis line
Assign the addresses of the 3 axes Z, X and Y in the G02 (G03) mode and G18 (plane
selection code) mode.
YZ plane arc, X axis line
Assign the addresses of the 3 axes Y, Z and X in the G02 (G03) mode and G19 (plane
selection code) mode.
Pkme selection of an additional axis can also be performed, as is the case for circular
interpolation.
UY plane arc, Z axis line
Assign the addresses of the 3 axes U, Y and Z in the G02 (G03) mode and G17 (plane
selection code) mode.
Besides the basic command methods given above, there are other methods as indicated in the
examples below. Refer to Section 6.4 on pkme selection for the arc planes which can be selected
by these methods.
(4) Examples of programs
(Example 1)
.

\
G17 ; ““””..XY plane

G03 Xx, Yy, Zz, lil Jjl PO Ff, ; “-”””=XY plane arc, Z axis line
NOTE Address P maybe omitted with a O pitch number.

(Example 2)

G17; -.-... XY plane

G02 XXI YYI ZZI Rrl Ffl ; ...... XY plane arc, Z axis line

-36-
6. INTERPOLATION FUNC7TONS
6.7 HELICAL INTERPOLATION (G I 7 – G19, G02, G03)

(Example 3)
\
(
z axis
I
I
Y axis
-\
‘\
L *@- -** I
u axis ! ZI

a,
(

G17G03 u UI Yy, Zzl Iii Jjl P2 Ff, ; m.... UY plane arc,


Z axis line
(Example 4)

G18G03 Xxl Uul Zzl Iil ml Ffl ; ...... ZX plane arc, U axis line
NOTE When the same system is present, perform circular interpolation for the standard
axes and linear interpolation for the additional axis.
(Example 5)
G18G02 XXl UU, Yyl Zz, Iil Jj, Kk, Ffl ; ...... Z’ plane ~c~ I-J,y ~S ]ine
(J command ]s ignored)
NOTE Two or more linear interpolation axes can be specified.

-37-
6. INTERPOLATION FUNCTIONS
6.8 SPIRAL INTERPOLATION (G2.1, G3.1)

6.8 SPIRAL INTERPOLATION (G2.1, G3.1)


( 1 ) Function
This function provides interpolation which joins the start and end points smoothly for circular
commands which have start and end points that are not on the same arc.
/- >

(Normal circular interpolation)

(Spiral interpolation)

Start point

Center

(2) Command format

G2. 1
G17{G3.1 } ~Xx -Yyli , Jj(aa)Ff
._____~ Pp;

Arc end point Arc center


coordinates coordinates
G2. 1
‘18{ G3. ~ } ZzXx KkIi(aa)Ff Py

G2. 1
‘lg{G~.~ } YyZz JjKk(aa)FfPp;

P : pitch number, speed (can be omitted when O)


a : Any axis except circular interpolation axis (in the case of helical interpolation)
F : Speed in tool path direction
The arc center coordinates are assigned with input setting units. Care is required with spiral
interpolation commands for axes using different input setting units.
Assign commands with a decimal point in order to avoid confusion.
(3) Detailed description
1) G2.1 is the same as G2 and G3.1 as G3 inasmuch as the direction of the arc rotation is
concerned.
2) There are no R-specified arcs in spiral interpolation. (The start and end points are on the same
arc.)
3) Cylindrical cutting, tapered thread-cutting and other such machining operations can be
conducted by changing the start point and end point radii and assigning the linear axis
simultaneously.
4) The spiral interpolation is automatically enabled with the normal circular commands (G2, G3)
when the difference between the start point radius “rS>’and the endpoint radius “r~” is less than
the parameter setting.
NOTE The command range for pitch number P is O to 99. (See *1)

NOTE The helical interpolation function is required when assigning any axis (a) except a circular
interpolation axis.
*1: Depending on the system version, the command range for pitch number P maybe Oto 9999.

-38-
6. INTERPOLATION FUNCTIONS
6.8 SPIRAL INTERPOLATION (G2.1, G3.lJ

(4) Examples of programs


(Example 1) Heart-shaped cam cutting
The deviation is the difference between the radius at the start point and the radius at the end point.
This is (b – a) in the example given in the figure below. The program assigns commands which are
divided into two blocks applying to the right and left side surfaces.

Example of program with incremental command


--
G3.lY(a+b) Jb Ffl ;
/-0 \ 170. 100. 1000
/ \
\
/ \ (Right side surface)
\
/’ \ G3.lY(-a–b) J–a ;
I – 170. –70.
(Left side surfhce)
\ a = 70. (maximumarc radius)
\
\ b =100. (minimumarc radius)

Start point/end point a + b =170.[end


of ng
~P=r’na’m
t semlsphere)
—a —b = -170, (end pointcoordinatesof
leftsemk.phere)

(Example 2) Large-bore thread cutting


In the case of large-bore thread cutting, the program is divided into the cut section, the thread cutting
section and the chamfering section, and in each case helical cutting commands are assigned. Spiral
interpolation is used to assign the radial clearance amount in the cut and chamfering sections. (The
arc start point or arc end point shifts from the circumference by an amount equivalent . to the
clearance.)

Clearance amount

Y
)-0
z

Cut secti hamfering section

G3.1 X–il–i~ YO z z, I-i, JO Ffl ;(hemispherefor cut section)

G03 XO YO z Zz Ii, JO Pp, ; (fullcirclefor thread-cuttingsection)


G3.1 Xi~+is YO ZZ8 Ii, JO ; (hemispherefor chamferingsection)
NOTE Pitch number Pz for the thread-cutting section is produced by dividing stroke ~ by pitch
/. A command should be assigned so that the remainder is made zero.

-39-
6. INl_ERPOLA7TON FUNCTIONS
6.8 SPIRAL INTERPOLATION (G2.1, G3.1)

(Example 3) Tapered thread-cutting


As shown in the figure below, it is also possible to conduct helical cutting with a taper that starts at
any desired angle.

o
z
<
Y

The values of X, Y and Z at this time are incremental values x, y and ZIfrom start point “s” to end
point “e”; the values of I and J are incremental values il and j~i rom
‘ start point “s” to the center; and
the value of P is assigned by the pitch number “p” eomman .
G3.1 Xxl Yyl Zzl Iil Jjl Ppl Ffl ;
Taper t and pitch t? are determined from the following formula:

Z(re–rs)
t=
xl
But Jrs= ilz+jlz re= J(xl–il) ‘+ (Y1–jl] 2
Z1
4=
(2z”p, +o)/2z
jl –“Y1 –jl
But @=@e– Os= tan-l –t an-’ —
jl –X1 –i]
Where rs, re are the radii at the start and end points
9s, de are the angles at the start and end points.

-40-
6. INTERPOLATION FUNCTIONS
6.8 SPIRAL INTERPOLATION (G2.1, G3.lJ

(Example 4) ~lindrical cutting


Cylindrical cutting is an application of tapered thread cutting where the start or end point lies on the
center line.
The taper can be provided by increasing or reducing the radius of the arc. In this case, the pitch is
determined by zip,.

G2.1 X–XI YO ZZI I–XI PPI Ffl:


xl : Diameter at bottom
. ZI : Height
PI : Pitch number
f, : Feed rate

Precautions for using spiral interpolation


( 1 ) The feed rate assigned by spiral interpolation is the speed in the tangential direction at the start
point. When the spiral expands, the tangential speed increases; conversely, when it is
compressed, the speed is reduced.
(2) When cutter compensation has been applied in spiral interpolation, the compensation vectors
at the path in the middle cannot be guaranteed.

-41-
6. INIERPOLAITON FUNCTIONS
6.9 IMAGINARY AXIS INTERPOLATION (G07J

6.9 IMAGINARY AXIS INTERPOLATION (G07)


(1) Function
By having one of the circular interpolation axes with spiral interpolation or with helical interpolation
including the linear axis as the imaginary axis (the axis which does not actually move) and by
distributing the pulses, it is possible to provide interpolation (sine interpolation) in which the helical
or spiral interpolation is viewed horn the side (imaginary axis). G07 is the command which assigns the
imaginary axis.
(2) Command format
G07a0 ; Sets imaginary axis
: } Imaginary axis interpolation
GO~al ; Cancels imaginary axis
(3) Detailed description
1) Helical interpolation and spiral interpolation are the interpolation functions which can be used
for imaginary axis interpolation.
2) The “a” axis in the “G07a0 ; — G07al ;“ program commands is the imaginary axis.
Consequently, when the “a” axis is assigned separately between these program commands, the
dwell state is established until the pulse distribution to the imaginary axis is completed.
3) The imaginary axis is valid only with automatic operation; it is not valid with manual operation.
4) The protection functions (such as interlock and stored stroke limit) are also valid for the
imaginary axis.
5) Handle interrupt is valid for the imaginary axis as well. The axis will move by an amount
equivalent to the handle interrupt.
(4) Example of program
G07Y O ; Thissets the Y axisas the imaginaryaxis.
G 17G2. 1X OY -5. 1 0 J -10.240. P 2 F 50 ; Thk providessineinterpolationon the ~ plane.
G07Y 1 ; This returns the Y axis to the real axis status.

x axis
k
A
I
5.

-5.

---- ----
–10. - --

-42-
6. IN7ERPOLA170iV FUiVC170NS
6.10 THREAD CUTTING

6.10 THREAD CUTTING

6.10.1 Constant lead thread cutting (G33)


(1) Outline
The G33 command exercises feed control over the tool which is synchronized with the spindle
rotation and so this enables both straight and tapered thread cutting for constant leads. Multiple-start
threads can also be machined by assigning the thread-cutting start angle.
(2) Command format
G33ZzFfQq ; (normal lead thread-cutting command)
Where 22 = Thread length and address (X, Y, Z, a) of thread-cutting direction axis
Ff = Lead of long axis (axis which moves most) direction
Qq = Thread-cutting start shift angle (O – 360°)
G33ZzEeQq ; (precision lead thread-cutting command)
Where Zx = Thread length and address (X, Y, Z, a) of thread-cutting direction axis
Ee = Lead of long axis (axis which moves most) direction
Qq = Thread-cutting start shift angle (O – 360°)
(3) Detailed description
1) The E command is also used for the number of screw threads in inch thread-cutting, and
whether the thread number or precision lead is to be assigned can be selected by parameter
setting (“precision thread-cutting E“ on the parameter page).
2) The lead in the long axis direction is assigned for the tapered thread lead.

ZI
ti

Bj
Tapered thread
LZ i J
section
a
I

LX ~x
I
When a <45°, lead is LZ
When a >45”, lead is LX
When a = 45°, lead can be LX or LZ

F command lead range E command lead range


Input command unit
(6 digits) (8 digits)
A 0.01 mm 0.01 — 9999.99 mm/rev 0.0002 – 9999.9999 mmlrev
Millimeter
B 0.001 mm 0.001 – 999.999 mm/rev 0.00002 — 999.99999 mm/rev
input
c 0.0001 mm 0.0001 — 99.9999 mmirev 0+000002 — 99.999999 mm/rev
A O.OQ1inch 0.001 — 999.999 inchlrev 0.00002 — 999.99999 inchlrev
Inch input B 0.0001 inch 0.0001 — 99.9999 inchlrev 0.000002 — 99.999999 inch/rev
c 0.00001 inch 0.000o1 — 9.99999 inchfrev 0.0000002 — 9.9999999 inch/rev

NOTE k It is not possible to assign a lead where the feed rate as converted into per-minute feed exceeds
the maximum cutting feed rate.
3 ) Thread cutting is started by the single rotation synchronized signal from the encoder which is
mounted on the spindle.

-43-
6. INTERPOLA170N FUNCTIONS
6.10 THREAD CUTTING

4) The spindle speed should be kept constant throughout from rough cutting until finishing.
5) If the feed hold function is employed during thread cutting the screw thread will lose its shape.
For this reason, feed hold does not function during thread-cutting.
If the feed hold switch is pressed during thread-cuttin~ block stop will result at the end point
of the block following the block in which thread-cutting is completed (that is, ceased to be in the
G33 mode).
6) If the cutting feed rate is changed, it will be compared with the cutting feed clamp rate when
thread-cutting starts and if it is found to exceed the clamp rate, an operation error will result.
7) A cutting feed rate which has been changed in order to guarantee the lead during thread-cutting
may sometimes exceed the cutting feed clamp rate.
8) An illegal lead is normally produced at the start of the thread and at the end of the cutting
because of servo system delay and other such factors.
Therefore, it is necessary to assign a thread length which is determined by adding the illegal lead
length to the required thread length.
9) The spindle speed is subject to the following restriction:

l~R~ Maximum feed rate


Thread lead
Where R ~ Permissible speed of encoder (rPm)
R = Spindle speed (rpm)
Thread lead = mm or inches
Maximum feed rate = mm/minor inch/mm (this is subject to the restrictions imposed by the
“machine specifications)
10) The thread-cutting start angle is assigned by an integer from O to 360.
(4) Example of program

* i,

N11OG9OGOX–2OO.Y–200. S50M3;
N111Z11O. ;
N112G33Z40. F6. O ;
N113M19;
N114GOX–21O..:
N115Z110. MO:
N116X–200. :
M3 ;
N117G04X5. O :
N11BG33Z40. :

Description of operation
N11O,Nlll The spindle center is positioned at the workpiece center and the spindle rotates
in the forward direction.
N112 The first thread-cutting pass is performed; thread lead = 6.0 mm.
N113 The spindle is oriented by the M19 command.
N114 The tool is retracted in the X axis direction.
N115 The tool is returned to above the workpiece and the program is stopped by M1OO.
If nedessmy, the tool should be adjusted.
N116 Preparations are made for the second thread-cutting pass.
N117 If necessary, the dwell command is assigned and the spindle speed is stabilized.
N118 The second thread-cutting pass is performed.

-44-
6. ZN7ERPOLA770N FUNCTIONS
6.11 INCH THREAD CUTTING (G33)

6.10.2 Continuous thread cutting


Continuous thread cutting is possible by assigning thread-cutting commands continuously.
In this way, it is possible to cut special threads whose lead or shape changes.

—.— ..—.—. _____ .—. —. _._ ._. ...__ _._,, _____

\
~ -“
GSS
e 6

6.11 INCH THREAD CUTTING (G33)


(1) Outline
If the number of screw threads per inch in the length axis direction is assigned in the G33 command,
the feed of the tool synchronized with the spindle rotation will be controlled, which means that
constant lead straight thread-cutting or tapered thread-cutting can be performed.
(2) Command format
G33ZzEeQq ;
Where & = Thread length and address (X, Y, Z, a) of thread length direction axis
Ee = Number of screw threads per inch in direction of length axis (axis which moves most)
(decimal point command can also be assigned)
Qq = Thread-cutting start shift angle (O – 360°)
(3) Detailed description
1 ) The number of screw threads in the long axis direction is assigned as the number of screw
threads per inch.
2 ) The E code is also used to assign the precision lead length, and whether the screw thread
number or precision lead length is to be designated can be selected by parameter setting
(“precision thread-cutting E“ on the parameter page).
3 ) The E command value should be set within the lead value range when the lead is converted.
(4) Example of program

Thread lead ....3 screw threads/inch (= 8.46666)


When programming in millimeters with
al = 10 mm, $ = 10 mm
N21OG9OGOX-2OO. Y–200. S50M3 ;
N211Z11O. ;
N212G91G33 Z –70. E3. O ; (firstthread-cuttingpass)
N213M19 ;
I
N214G9OGOX-21O. ;
N215Z11O. MO ;
N216X –200. ;
M3 ;
N217G04X2. O ;
.
N218G91G33Z–70 , ; (second threadotting pass)

-. .—.—. —..
+x

-45-
6. 2N’Z??RPOLA710N FUNCTIONS
6.12 NORMAL LINE CONTROL FUNCTIONS (G40.1, G41.1, G42.1)

6.12 NORMAL LINE CONTROL FUNCTIONS (G40.1, G41.1, G42.1)


( 1 ) Function and objective
During programmed operation, this function controls the C (rotary) axis so that the tool is always
pointed in the normal line direction with respect to the movement directions of the X and Y axes.

U Tool nose position

When the C axis moves at the block joins, this function serves to exercise control by turning the C axis
so that it points in the normal line direction at the next block start point.

C-axis rotation

There are two types of normal line direction control, type I and type II, in accordance with the C-axis
turning system during normal line direction control.
(The type is determined by the specifications of the machine builder.)

Type of normal line Application


Turning direction Turning speed
direction control
Direction under 180°
~pe I Parameter speed Cutting
(short-cut direction)
Assigned direction,
me II Feed rate Spring tool machining
as a rule

-46-
6. INTERPOLA170N FUNCl?ONS
6.12 NORMAL. LINE CONTROL FUNCTIONS (G4Q.1, G41.1, G42.1)

(2) Command format


G40, 1
G41. 1 Xxl Yyl Ffl ;
{1G42. 1 End point F~ate
coordinates
G40. 1“”.”””.””,Normal line direction control cancel
G41, 1....””””” Normal line direction control left
G42. l“”s*.*o- Normal line direction control right

Tool nose path ‘

Y#
Programmed path
Programmed path

@
Center of rotation Center of rotation
[
\

G41.1 G42.1
C-axis normal line direction control left c-axis normal line direction control right

(3) Definition of C-axis angle


The C-axis angle is 0° when the tool is pointed in
the +X direction, and movement in the counter-
clochvise direction is positive. Tool
+X direction: 0°
+ Y direction: 90°
-X direction: 180°
-Y direction: 270° (–90°) >
The C axis is operated by the work coordinate 180e x
system which has been set in normal line direction
control.

(-90° )

-47-
6. INTE~OLATION FUNCTIONS
6.12 NORMAL LINE CONTROL FUNCTIONS (G40.1, G41.1, G42S)

( 4 ) Operations
1 ) Start-up
The C axis is first turned so that it is at right
an@es to the advance direction at the start
G41.1 command pmnt of the block containing the C-axis nor-
mal line direction control. The X and Y
Ifi axes are then moved in accordance with the
ram commands.
or both normal line direction control types
I and II, the direction in which the C axis is
turned at start-up is the direction where the
angle is less than 180° (short-cut direction).

N1 GO1 XXI YYI Ffl ;


N2 G4L 1 Xx2 YY2 ; “--- ~n~d~-
: same block
G41.1 command (x2, y2)
N3
N1 GOI Xxl YY1 Ffl ;
!
N2 G41.1: .................,~en con-
tainedin sepa-
N3 XX2 YY2; rate block
:.

(x2, y2)
No movement for N2

2 ) Cancel
When the C-axis normal line direction con-
trol command is canceled, the C axis is not
G40.1 command turned, and the X and Y axes are then
ntoved in accordance with the program
commands.
G41. 1 ;
.
:
N1 XXI YY1:
N2 G40. 1 XX2 YY2; .-” ~s;m~;t~d
:.

(x2, y2) G41. 1:


N1 Xxl YY1;
G40.1 com~and
N2 G40. 1 ; .................. ~S;a~~~~~k
N3 Xx2 YY2:
:.

(x2, y2)
No movement for N2

-48-
6. lNTERPOLATION FUNCTIONS
6.12 NORMAL LINE C’ONTR OL FUNCTIONS (G40.1, G41.1, G42.1)

3 ) In-mode operations
[Block operations]
1 ) In a line block
2 ) In an arc block
The C axis is not turned during line block interpolation.

# The C axis is turned in synchronization with the operation


of circular interpolation.
G41. 1 ;
/ N1 G02 Xxl Yyl Iil Jjl;

(il. j 1) N1

\
(x,. Y*)’

[Block joins]
1 ) Without cutter compensation
After turning movement has been inserted for the C axis so that it is at right angles to the
X-axis/Y-axis movement direction in the next block, the movement in the next block com-
mences.

Line-line Line-arc Arc-arc

2) With cutter compensation


A linear block is inserted when cutter compensation is applied to the line-line, arc-line or
arc-arc block which intersects with the acute angle. If C-axis normal line direction control is now
exercised, the C-axis turning movement will be inserted. Similarly, this is done for shapes after
interference avoidance.

Cutter
comuenaa-
tion”path
Line-1ine Line-arc Arc-arc

-49-
,,

6, INTERPOLATION FVNCl_TONS
6.12 NORMAL LINE CONTROL FUNCTIONS (G40.1, G41. 1, G42. 1)

[C-axis rotation direction at block joins]


The C-axis turning direetion at a block join differs according to whether normal line direetion control
type I or type II is being employed.
The turning angle is restricted by angle e which is set by parameter. (This is set in parameter “C_min”
on the basic specification parameter screen by the machine builder.)
1 ) Normal line direction control type I

Block ioin amle : a G41. 1 G42. 1

-50-
6. INIERPOLAITON FL?NCTTONS
6.12 NORMAL LINE CONTROL FUNCTIONS (G40. 1, G41.1, G42.1)

2 ) Normal line direction control type II

-51-
6. I’RPOLA~ON FUNC7TONS
6.12 NORMAL LINE CONTROL FUNCTIONS (G40.1, G41.1, G42.lj

(5) C-axis turning speed during C-axis normal line direction control
1 ) C-axis turning speed at a corner
1. Normal line direction control type I
The C axis is turned at a block join by the parameter-set speed. (This is set in the “C_feed”
parameter on the basic specification parameter screen by the machine builder.)
2. Normal line direction control type II
The C axis is turned at a block join by the speed (Fe) at which the feed rate at the tool nose
agrees with the F command.

/
●“

?’
Fc : Turning speed ~/min)
F,
F: Feed rate modal value (mm/min)
R: Parameter value (mm) ,/
(Value set in “C-axis turning diameter” parameter on
the machining parameter screen) R
t<

;j.tiq
F
However, if Fc should exceed the cutting feed clamp rate of the C axis, it is set to this
clamp rate instead.
The same applies for faped traverse.
Parameter R can be read and written using macro variable #1900.
2 ) C-axis turning speed during circular interpolation
1. Normal line direction control type I
The C axis turns at the circular interpolation speed during circular interpolation.
However, if the turning speed should exceed the cutting feed clamp rate of the C axis, the
feed rate (F command) for circular interpolation is clamped so that the turning speed is
set to the C-axis cutting feed clamp rate.
2. Normal line direction control type 11
The C axis turns at the circular interpolation speed during circular interpolation.
The circular interpolation speed is the speed at which the feed rate at the tool nose agrees
with the F command.
F

0
Fr : Circular interpolation speed (mm/min)
F: Feed rate modal value (mm/min)
r: Arc radius (mm)
R: Parameter value (mm)
(Value set in “C-axis turning diameter” parameter on
the machining parameter screen)

However, if the C-axis turning speed should exceed the cutting feed clamp rate of the C
axis, the feed rate (1?command) for circular interpolation is clamped so that the turning
speed is set to the C-axis cutting feed clamp rate.

-52-
6. INTERPOLATION FUNCl?ONS
6.12 NORMAL. LINE CONTROL. FUNCTIONS (G40.1, G41.1, G42.1)

(6) Automatic corner arc insertion function


This function serves to insert an arc automatically into the X/Y-axis movement corner during normal
line direction control.
It is inherent to normal line direction control type I.
The radius of the arc to be inserted is set in the “C axis insert radius” parameter on the machining
parameter screen.
This parameter can be read and written using macro variable #1901.
Normal line direction control is also performed during movement of the inserted arc.

<Supplementary notes>
@ Corner arcs cannot be inserted with line-arc, Corner R is not inserted.
arc-arc, line-no movement block or with no-
movement block-line. \
(A line shorter than the inserted arc radius is
treated as a no-movement block.)
Q During a cutter compensation modal, cutter com-
pensation is applied to the path in which a corner
arc has been inserted.
o During scaling, scaling is applied to the path in
which a corner arc has been inserted.
When cutter compensation is further assigned, it
is applied to the path after scaling.
Programmed path

Scaling

Cutter compensation

-53-
6. INl?RPOLATIONFUNCi’70NS
6.12 NORMAL LINE CONTROL FUNCTIONS (G40.1, G41.1, G42.lj

(7) Macro variables


The user macro specifications are required when using macro variables. (See section on user macros)
1) G command medals
The modal status of normal line direction control can be read using variable numbers 4215 and’
4015.
Variable number Description
Pre-read block Execution block
40.1 (G40. 1)
#4015 #4215
41.1 (G41. 1)
42. 1 (G42. 1)
2) Normal line direction control parameters
The modal status of the normal line direction control parameters can be read using variable
numbers 1900 and 1901.
Variable number Description
#1900 Machining parameter C-axis turning diameter
(data with decimal point)
#1901 Machining parameter C-axis turning diameter
(data with decimal point)
(8) Example of programming
1 ) Normal line direction control type I
Main program
0500 ;
G28XOY0 :
G28C O :
G90G92G53XOY O ;
G OG54X25. Y-10. ;
G .3G4L1X35. YO. R1O. F1O.;
# 10=10;
WHILE [#10 EQ OIDOl:
M98P 501;
#lO=#lo-l :
END1 ;

r
G 3 X25. Y1O, R1O.;
20+
G40. 1 ;
G28XOY0 :
M02 ;
Subprogram
0501 ;
G3X8. Y9. R15. ;
G 2 X-8. R1O.:
G 3 Y-9. R-15. :
G2X8. R1O.;
f33X35. YO. R15:
M99 ;

-54-
6 INTERPOLATION FUiWl?ONS
6.12 NORMAL LINE CONTROL FUNCTIONS (G40.1, G41.1, G42.1]

2 ) Normal line direction control type II


Main program
01000;
G91G2BZo ;
G28XOYO;
GaCO :
G90G92G53XOY OZ.O ;
G OGS4G49X93.Y OZ1OO.
H1;
GOZ3, ;
G 1 ZO. 1F6000 : I Start point C axis (spindle)
G42.1 ; I
Tool
M98 P 1001L 255 ;
M98P 1002L 2 ;
NY
G91G1 Ylo. 20. 05; w 0N m
G40.1 ;
-+4------ v
G90G02100. ;
G28XOYOZO;
M02: — Clearance
Subprogram
01001i 01002;
G17G91G1Y20., R1O. 2–0.004; G17GUG 1Y20., R10.;
X 70., R1O. 2-0.004: X-70.R1O.:
3’-40., R1O. Z-O.004; Y-4o.R1o. ;
X70,*RIO, Zo,004; X70,, R1o.;
Y20. z -0,004; Y20.:
MQ9: lt199:

-55-
6 INTERPOLATION FUNCHONS
6.12 NORMAL LINE CONTROL FUNCTIONS (G40.1,
. G41.1, G42.1].

( 9 ) Checkpoints
1) Operation stops at the start point of the C-axis stop point
turning movement in the case of single block stop,
cutting block start interlock and block start inter- .— . i
lock.
2) Do not rewrite C-axis work offlset or assign the
G92C ; command during C-axis normal line
directfin control (G41.1, G42.1 modal). C-axis
commands (for instance, G01C50. ;) are invalid in
a G41.1 or G42.1 modal.
3) When mirror image has been applied to the X or
the Y axis, the direction normal line direction control will be reversed.
v

Mirror image OFF

X/Y-axis mirror image


I Y-axis mirror image
4) The normal line direction control piane is always the fwsthecond axis (X axis/Y axis) plane.
Plane selection has no effect.
5) When microscopic segment, scaling, coordinate rotation or pattern rotation has been combined,
the position of the C-axis normal line direction control may not agree with the minimum unit.
This is due to processing with the minimum number of digits and does not pose any problems
for actual machining.
6) The start and end points are not on the same arc with spiral interpolation and so proper normal
line direction control will not be exercised.

Ideal normal line direction


Actual normal line direction

Programmed path

Start point End point


4 J
Spiril arc center
7) The tool cannot be decelerated and stopped by the exact stop check (G09, G61) or error detect
function at the end of a C-axis turning movement block
8) A per-revolution (G95) command will not yield the proper feed rate since the C (rotary) axis
is exercised over the spindle.
9) The accuracy of machining time calculations done during normal line direction control drops
since the turning sections are not added. Furthermore, when the graphic check function is used,
these sections are not traced.
10) During normal line direction control, the C axis is not turned with reference point check/return,
start point return (G27—G30) and uni-directional positioning (G60) commands. (This does not
apply to linear interpolation sections.)

-56-
6. INl_ERPOLATfON FUNCTIONS
6.12 NORMAL LINE CONTROL FUNCTION’S (G40.1, G41.1, G42.1)

11 ) When C-axis control is exercised over the spindle for normal line direction control, switching
from spindle + C axis (servo ON) and C axis+ spindle (servo OFF) is done by the machine
sequence. (Refer to the operating instructions issued by the machine builder for details of the
command method.)
(10 ) Parameters
1 ) Machining parameters

Item Description Setting range


C-axis turning radius This sets the length from the C-axis (spindle)
center to the tool nose. It is used with” calcula:
0.000 – 99999.999 (mm)
tions of the turning speed at block joins with
normal line direction control type II.
C axis insertion radius This sets the radius of the arc to be automatically
inserted in the corner during C-axis normal line
direction control. 0.000– 99999.999 (mm)
It is valid only with normal line direction control
tvne 1.

-57-
.,,

6. 1.TERPOLA170N FUNCTIONS
6.12 NORMAL LINE CONTROL FUNCTIONS (G40. 1, G41. 1, G42. 1)

(11 )Comparison between normal line direction control types I and II

Item Normal line direction control type I Normal line direction control type II
Direction in which angle is less than G41.1: – direction
hxis turning
180° (short-cut direction) (Cw)
Iirection at block
G42.1: + direction
oins
(Ccw)
No restrictions apply Restrictions apply
(Short-cut direction)
However le l<&
Iol<e No turning
No turning
360– E= 6 >180+ E
0 : Turning angle 0188 operation alarm
e : Parameter (“C_min” on ba- 0 : Turning angle
sic specification parameter
O-axis turning screen) e : Parameter (“C-rein” on ba-
mgle at block
oins ,800@;g ,:&,ning

270° Operation
alarm

C-axis turning Parameter (C-axis turning speed) Speed at which feed rate at tool nose
speed at block speed agrees with F command
joins
C axis turns at circular interpolation C axis turns at circular interpolation
speed. speed.
When the C-axis turning speed The circular interpolation speed is the
exceeds the C-axis cutting feed rate, speed at which the feed rate at the tool
the circular interpolation speed is nose agrees with the F command.
clamped so that the turning speed is
C-axis turning
set to the C-axis cutting feed clamp
speed during
rate.
circular
interpolation
However, when the C-axis turning
speed exceeds the C-axis cutting feed
rate, the circular interpolation speed is
clamped so that the turning speed is
set to the C-axis cutting feed clamp
rate.
Automatic Available Not available
insertion of arc
at corners

-58-
Z FEED FUNCTIONS
7.1 RAPID TRA VERSE RATE

7. FEED FUNCIK)NS

7.1 RAPID TRAVERSE RATE


The rapid traverse rate can be set independently for each axis. The available speed ranges are from 1
mm/min to 60,000 mm/min for input setting units of 1~ or 1(Iv and from 0.1 mm/min to 12,000 mm/min
for input setting units of (1.1~. The upper limit is subject to the restrictions imposed by the machine
specifications.
Refer to the specifications manual of the machine for the rapid traverse settings.
The rapid traverse rate is valid for the GOO,G27, G28, G29, G30 and G60 commands.
Two paths are available during positioning the interpolation type where the area from the start point to the
end point is linearly interpolated or the non-interpolation type where movement proceeds at the maximum
speed of each axis. The type is selected by parameter. The positioning time is the same in each case.

7.2 CUTTING FEED RATE


The cutting feed rate is assigned with address F and 8 digits (F8-digit direct designation).
The F8 digits are assigned with a decimal point for a 5-digit integer and a 3-digit fraction. The cutting feed
rate is valid for the GO1, G02, G03, G2.1 and G3.1 commands.
Example

Feed rate
G1 Xloo. Yloo. F200 ; 200.0 mm/min F200. or F200.000 gives the same rate.
G1 Xloo. Yloo. F123.4 ; 123.4 mm/min
G1 Xloo. Yloo. F56.789 ; 56.789 mm/min
Available speed ranges (with 1P or 10~ input setting unit)

Command mode F command range Feed rate range Remarks


mmimin 0.001 – 60000.000 0.001 – 60000.000 mm/min
inchlmin O.0001 – 2362.2047 0.0001 — 2362.2047 inchfmin
O/rein 0.001 – 60000.000 0.001 – 60000.000 O/rein

FJOTE 1: A program error (“P62”) results when there is no F command in the first cutting command
(GO1, G02, G03, G2.1, G3.1) after the power has been switched on.
NOTE 2 The maximum speed for both rapid traverse and cutting feed is 2362 inch/rein when a metric
system machine is used with inch commands.

-59-
Z FEED FUNCTIONS
7.3 F1-DIGIT FEED

7.3 F1-DIGIT FEED


(1) Function and objective
By setting the F1-digit feed parameter, the feed rate which has been set to correspond to the l-digit
number following the F address serves as the command value.
When NJ is assigned, the rapid traverse rate is established and the speed is the same as for GOO.(G
modal does not change.)
When F1 — F8 is assigned, the feed rate set to corres~nd to the command serves as the command
value.
Any command above F9 is a direct command.
The F1-digit command is valid only in a GO1, G02, G03, G2.1 or G3.1 modal.
The F1-digit command can also be used for canned cycles.
(2) Detailed description
The feed rate set to correspond to the F1-digit command is increased or reduced by rotating the
manual handle.
The amount by which the feed rate can be increased or reduced is determined by the following
formula.
FMn
&AF = _ x (&number of manual handle pulses)
K
Where + = increase, – = reduction
K = Arithmetic constant (number of divisions of FMn, calculation constant for increased or
decreased speed per handle scale unit)
FMn is the clamp rate which can be set as FM1 or FM2.
FMl sets the F1 — F4 maximum rate while FM2 sets the F5 — F8 maximum rate.
The F1 — F8 corresponding speed, K and FMn are set on the machining parameter page.
The increase/reduction range ix O — FMn for F1 – F8. However, operation alarm “104” results
when the feed rate is O.
(3) Operation method
1 ) Make the F1-digit command valid.
2 ) Set FMn and K
Setting range
K :1 – 32767
FMl (FM2) :0 — 60000 mm/min
3 ) Set F1 – F8.
(4) Special checkpoints
1) The F1-digit mmmand and direct commands can be used together in the ( 3 )-1 ) status.
(Example 1)
FO : Rapid traverse rate
F1 – F8 : F1-digit
F9 : Direct command
2) F1 – F8 are invalid in the GOOmode and the rapid traverse rate is established instead.
3) If FO is used in the G02, 003, G2.1 or G3.1 mode, a program error (P121) will result.
4) When F1 — F8. (with decimal point) are assigned, the 1 mm/min — 8 mm/min direct
commands are established instead of the F1-digit command.
5) When the commands are used with the millimeter or degree units, the feed rate set to
correspond to F1 — F8 serves as the assigned speed mm (“)/rein.
6) When the commands are used with inch units, one-tenth of the feed rate set to correspond to
F1 — F8 serves as the assigned speed inch/rein.
7) The number of manual handle pulses is 1 pulse per scale unit regardless of the scaling factor.
8) During a F1-digit command, the F1 digit number and F1-digit command signal are output as the
PLC signals.

-60-
% FEED FUNCTIONS
7.3 F1-.D.lGIT FEED

(5) F1-digit and G commands


1 ) 01 group G commands in same block as F1-digit commands

Executed feed rate Modal display rate G modal


GOFO
Rapid traverse rate o GO
FOGO
GOF1
Rapid traverse rate 1 GO
FIGO
GIFO
Rapid traverse rate o G1
FOG1
Gll?l
F1 contents 1 G1
FIG1
2 ) F1-digit and unmodal commands maybe assigned in the same block. In this case, the unmodal
command is executed and at the same time the F1-digit modal command is updated.
(6) Example of arithmetic constant K setting
When the handle scale unit is to be made *10 mm/min
FMl is made 15000 mm/min
Al? = 10 = 15000/K
Therefore, K is 1500.
The feed rate is made F (1 – 4) Y 10 (mm/min) by rotating the handle through one scale unit.
(7) Valid manual handle conditions
The manual handle is valid during cutting feed (Fl — F8), automatic start, F1-digit valid and manual
handle valid switch ON at the machine side as well as in the MDI mode, tape mode or memory mode
provided that the machine lock (machine lock rapid traverse) or dry run status has not been
established.
The function cannot be used when the handle specifications have not been provided.
A logical expression of the above is:
(GO1, G02, G03 mode) * (during F1 – F8) (in automatic start) (Fl valid) “
● ●

(manual handle valid switch ON at machine side)* (MDI mode + tape mode + memory mode) ●

(dry run + in-machine lock machine lock rapid traverse)


-61-
Z FEED FUNCTIONS
7.4 SYNCHRONOUS FEED (G94, G95)

7.4 SYNCHRONOUS FEED (G94, G95)


(1) Function and objective
Using the G95 command, it is possible to assign the feed amount per rotation with an F code. When
this command is used, the rotary encoder must be attached to the spindle.
The G94 command provides a return to the per-minute feed (asynchronous feed) mode in which the
feed amount per minute is assigned.
(2) Command format
G94: Per-minute feed (mm/min) (asynchronous feed) (FI = 1 mm/min)
G95: Per-revolution feed (mm/rev) (synchronous feed) (Fl = 0.01 mm/rev)
The G95 command is a modal command and so it is valid until the G94 command (per-minute feed)
is next assigned.
1 ) The F code command range is as follows.
The movement amount per spindle revolution with synchronous feed (per-revolution feed) is
assigned by the F code, and the command range is ~ shown below. ‘-

Millimeter input Inch input


Feed mode Command value Command value
Feed rate range Feed rate range
range range
Per-revolution feed FO.01 (= Fl) 0.01 FO.001 (= Fl) 0.001
( /rev) – F999.99 — 999.99 mm/rev — F39.370 — 39.370 inch/rev
(= F99999) (= F39370)
Per-minute feed FO.01 0.01 FO.001 0.001
( Imin) – F60000.00 – 60000.00 – F2362.204 – 2362.204
mm/min inchlmin
2) The effective speed (actual movement speed of machine) under per-revolution feed conditions
is given in the following formula (formula 1).
FC=FXNXOVR .... (Formula 1)
Where FC = Effective rate (mm/min, inch/rein)
F = Assigned feed rate (mm/rev, inch/rev)
N = Spindle speed (rPm)
OVR = Cutting feed override
When a multiple number of axes have been assigned at the same time, the effective rate FC in
formula 1 applies in the vector direction of the command.

NOTE 1: The effective rate (mm/minor inch/rein), which is produced by converting the assigned speed,
the spindle speed and the cutting feed override into the per-minute speed, appears as FC on the
monitor page of the setting and display unit.
NOTE 2 When the above effective rate exceeds the cutting feed clamp rate, it is clamped at that clamp
rate.
NOTE 3 If the spindle speed is zero when synchronous feed is executed, operation alarm “105” results.
NOTE ~ During machine lock high-speed processin~ the rate will be 60,000 mm/min (or 2,362 inch/rein,
60,000 ofmin) regardless of the assigned speed and spindle speed. When high-speed processing
is not undertaken, the rate will be the same as for non-machine lock conditions.
NOTES: Under d~ run conditions, asynchronous speed applies and movement results at the externally set
rate (mm/min, inch/rein or O/rein).
NOTE b Canned cycle commands G84 (tapping cycle) and G74 (reverse tapping cycle) are executed in
accordance with the feed mode which has already been assigned.
NOTE ‘Z Whether asynchronous feed (G94) or synchronous feed (G95) is to be established when the
power is switched on or when M02 or M30 is executed can be selected by means of the initial
synchronous feed setting on the parameter page.
NOTE 8 The F command assigned without a decimal point can be reduced to one-tenth or one-hundredth
by setting the “F command scaling type” parameter.

-62-
Z FEED FUNCTIONS
7.5 FEED RATE DESIGNATION AND EFFECTS ON CONTR OL
AXES

7.5 FEEI) RATE DESIGNATION AND EFFECTS ON CONTROL


AXES
It has already been mentioned that a machine has a number of control axes. These control axes can be
divided into linear axes which control linear movement and rotary axes which control rotary movement. The
feed rate is designed to assign the displacement speed of these axes, and the effect exerted by this feed rate
on the tool movement speed which affects cutting differs between the time when control is exercised over
the linear axes and when it is exercised over the rotary axes.
The displacement amount for each axis is assigned separately by a value corresponding to the respective
axis. The feed rate is not assigned for each axis but assigned as a single value. Therefore, when two or more
axes are to be controlled simultaneously, it is necessary to understand how this will work for each of the
axes invohd.
The assignment of the feed rate is described with the following related items.
(1) When controlling linear axes
Even when only one machine axis is to be controlled or there are two or more axes to be controlled
simultaneously, the feed rate which is assigned by the F code functions as a linear speed in the tool
advance direction.
(Example) When the feed rate is designated as “f” and linear axes (X and Y) are to be controlled

Y
A

P, (Tool end point)


Y - ----- -

p (’1’colstart point) x x

When only linear axes are to be controlled, it is sufficient to assign the cutting feed in the program.
The assigned rate is broken down into components corresponding to the movement amounts, and
each of these components constitutes the feed rate for each axis.
In the above example:
x
Feed rate for X axis = f x
W

Feed rate for Y axis = f x ~~

(2) When controlling rotary axes


When rotary axes are to be controlled, the assigned feed rate functions as the rotary speed of the
rotary axes or, in other words, as an angular speed.
Consequently, the cutting feed in the tool advance direction, or in other words the linear speed, varies
according to the distance between the center of rotation and the tool. This distance must be borne in
mind when assigning the feed rate in the program.

-63-
“., . .

Z FEED FUN~ONS
7.5 FEED RATE DESIGNATION AND EFFECTS ON CONTROL
AXES

(Example) When the feed rate is designated as “f” and rotary axis (C)is to be controlled
(“f’ units = O/rein) -

P, (Tool end point)


Angular speed is “f”
/
/
/
/
Linear speed is (r. r. f )/180
w
‘tati0ncenter4:ap’ ‘TOO’statpint)

In this case, in order to make the cutting feed (linear feed) in the tool advance direction “fc”:
fc=fx=r
180
Therefore, the feed rate to be designated in the program must be:

f= fcxw
7r. r
NOTE When the circular interpolation function is used and the tool is moved along the circumference bv
the linear control axis,-the rate in the tool advance clirection, or in othe~ wor&j the ta.ngenti~l
direction, will be the feed rate designated in the program.

(
1
Y

I P,

‘Izzl!r’inear
speed

@xamrde)
.,
LWhen the
using the
x i x

feed rate is designated as “f” and the linear axes (X


circular interpo~ation function
. and Y), are to be controlled
In this case, the feed rate of the X and Y axes will change along with the tool movement. However,
the composite speed will always be maintained at the constant value “f”.
(3) When linear and rotary axes are to be controlled at the same time
The NC system is operated in exactly the same way whether linear or rotary axes are to be controlled.
When a rotary axis is to be mntrolled, the numerical value assigned by the coordinate words (A, B,
C) is the angle and the numerical values assigned by the feed rate (F) are all handled as linear speeds.
In other words, 1° of the rotary axis is treated as being equivalent to 1 mm of the linear axis.
Consequently, when both linear and rotary axes are to be controlled simultaneously, the components
of the numerical value assigned by F — each component corresponding to each axis — will be the
same as for section ( 1 ) above (applying when linear axes are to be controlled). In this case, however,
although both the size and direction of the speed components based on linear axis control do not vary,
the direction of the speed components based on rotary axis control will change along with the tool
movement (their size will not change). This means, as a result, that the composite tool advance
direction feed rate will vary along with the tool movement.

-64-
7. FEED FUNCTIONS
7.5 FEED RATE DESIGNATION AND EFFECTS ON CONTR OL
AXES

(Example) When the feed rate is designated as “f” and linear axis (X) and rotary axis (C) are to be
controlled simultaneously
If the X-axis incremental command value is “x” and the C-axis incremental command value is “c”:

Size and direction are fixed for k.


Size is fwed for fc but direction varies.
Both size and direction vary for ft.

Rotation center

X-axis feed rate (linear speed) “&” and C-axis feed rate (angular speed) “a” are expressed
w c
fx=fx x ““””””o u=fx ......@
X2 +c~ x~ +C*
Linear speed “fc” based on 7r*r
C-axis control is expressed as: fc=o’ ““”””””””Q
180

If the speed in the tool advance direction at start point PI is “ft” and the component speeds in the
X-axis and Y-axis direction are “ftx” and “fly/’ respectively, then these can be expressed a%

ftX=-rsin(& e) XL ~+ f ~ .........@
180 180

fty=-rcos( 9) x~oY
~Jo .....Q
180
Where r is the distance between center of rotation and tool (in mm units)
9 is the angle between the P, point and the X axis at the center of rotation (in 0 units)

The composite speed “ft” according to formulae (l), (2), (3), (4) and (5) is:

:f t=d ftx’+fty ’

Xz –x”c”rsin( -%; +( Z”;8;V ......6.....@


180
=fx
*+C*
Consequently, feed rate “f” assigned by the program must be as follows:

4X’ +C’
f=ftx ...............0
xz –x*c*rsin( J6) :+( ‘;:o*c )’
]80

“ft” in formula (6) is the speed at the PI point and the value of 9 changes as the C axis rotates, which
means that the value of “ft” will also change. Consequently, in order to keep the cutting feed “ft” as
constant as possible, the angle of rotation which is assigned in one block must be reduced as low as
possible and the extent of the change in the 6 value must be minimized.

-65-
Z FEED FUNCTIONS
7.6 EXACT STOP CHECK (G09)

7.6 EXACT STOP CHECK (G09)


(1) Function and objective
In order for roundness to be prevented during corner cutting and for machine shock to be alleviated
when the tool feed rate changes suddenly, there are times when it is desirable to start the commands
in the following block once the in-position state has been checked after the machine has decelerated
and stopped. The exact stop check function is designed to accomplish this purpose.
The in-position width is set into parameter “ZRZ” on the servo parameter page by the machine
builder.
(2) Command format
G09 :
The exact stop check command G09 has an effect only with the cutting command (GO1 – G03) in
its particular block.
(3) Example of program

NOO1 G09 GO1 X1OO.000 F150 : .................. The commands in the following
block are started once the im-
position state has been checked
NO02 Y 100.000 ; after the machine has decelerated
and stopped.

Tool

With G09
f Assigned speed)
d
/’
I NOO1 1
I
NOO1 -J
I Without G09
I NO02
~
I /#--- 7 Time
I \
[ /1/ \
\
1/’ : NO02 I
Solid line indicates speed pattern with G09 command.
Broken line indicates speed pattern without G09 command.
Fig. 1 Exact stop check result

(4) Detailed operation

Previous block
Following block

Tc Tc
.- W *
Fig. 2 Block join with cutting feed deceleration check

-66-
Z FEED FUNCTIONS
7.7 EXACT STOP CHECK MODE (G61)

Previous block Following block

Tc

Fig. 3 Continuous cutting feed command


4
In Figs. 2 and 3:
Tc = Cutting feed acceleration/deceleration time constant
b = Lwtmsition width
As show~ in Fig. 2, the in-position width “Lc” can be set into the “ZRZ” servo parameter at the
remaining distance (shaded area in Fig. 2) of the previous block when the next block is started.
The setting unit for the “ZRZ” servo parameter is an integer of 0.001 mm or 0.0001 inch.
The in-position width is designed to reduce the roundness at the workpiece comers to below the
constant value.

‘Cur
When a deceleration check is desired at a canned cycle cutting block, the G09 command should be
inserted into the canned cycle subprogram.
To eliminate corner roundness, set the “ZRZ” servo parameter to zero and perform a deceleration
check or assign the dwell command (G04) between blocks.

7.7 EXACT STOP CHECK MODE (G61)


(1) Function and objective
Whereas the G09 exact stop check command checks the in-position status only for the block in which
the command has been assigned, the G61 command functions as a modal. This means that
deceleration will apply at the end points of each block to all the cutting commands (GO1 – G03)
subsequent to G61 and that the in-position status will be checked. G61 is released by automatic
corner override (G62), tapping mode (G63) or cutting mode (G64).
(2) Command format
G61 ;

-67-
Z FEED FUMZ!70NS
7.8 AUTOMATIC CORNER OVERRIDE (G62)

7.8 AUTOMATIC CORNER OVERRIDE (G62)


With cutter compensation, this function reduces the load during inside cutting of automatic corner R, or
during inside corner cutting, by automatically applying override to the feed rate.
Automatic corner override is valid until the cutter compensation cancel (G40), exact stop mode (G61),
tapping mode (G63), cutting mode (G64) or high-precision control mode (G61.1) command is assigned.
Command format
G62 ;

7.8.1 D ascription of function


( 1 ) With inside corners
When cutting an inside corner as in Fig. 1, the machining allowance amount increases and a greater
load is applied to the tool. To remedy this, override is applied automatically within the corner set
rarvre. the feed rate is reduced. the increase in the load is reduced and cutting is Derformed effectively.
Ho~ever, this function is valid only when finished shapes are programme~ ‘

\
Pro~ammed path
Machining allowance (fimshed shape)

Workpiece surface
shape

Tool nose center


path

9: Max. angle at inside corner

Ci: Deceleration range (IN)

Fig. 1

1 ) Operation
a. When automatic corner override is not to be amlied
When the tool moves in the order of (1) + (2)-L (3) in Fig. 1, the machining allowance
at (3) increases by an amount equivalent to the area of shaded section S and so the tool
load increases.
b. When automatic corner override is to be applied
When the inside corner angle 0 in Fig. 1 is less than the angle set in the parameter, the
override set into the parameter is automatically applied in the deceleration range Ci.

-68-
Z FEED FUNCl?ONS
7.8 AUTOMATIC CORNER OVERRIDE (G62]

2) Parameter setting
The following parameters are set into the user parameters.
a. Override :0–100[%1
b. Maximum angle 8 of inside corner :0 — 180 ~] -
c. Deceleration range Ci :0 – 99999.999 [mm] or
O – 3937.000 [inch]
For details of the settings refer to the sections in the Operating Instructions dealing with the
operation of the setting and display unit and with the parameter items.
[11] With automatic corner R

Corner R center
.-
#a

I
I Machining allowance

(1) Ot)eration
Tfie override set in the parameter is automatically applied at the deceleration range Ci and corner R
section for inside offset with automatic corner R. (There is no angle check.)

-69-
Z FEED FUNCTIONS
7.8 AUTOMATIC CORNER OVERRIDE (G62)

7.8.2 Application examples


( 1 ) Line - line comer
\
( Programmed tool path
Tool nose center
----- ~

\ /
The override set in the parameter is applied at Ci.
( 2 ) Line - arc (outside offset) corner
f Programmed 7
tool path Tool nose
center
4
/
#

\ )
The override set in the parameter is applied at Ci.
( 3 ) Arc (inside offset) - line corner

Programmed
tool path

Tool nose center

Tool Tool

The override set in the parameter is applied at Ci.


NOTE The deceleration range Ci where the override is applied is the length of the arc with an arc
command.
(4) Arc (inside offset) - arc (outside offset) corner

N1

\
--.-
Tool nose center

\
The override set in the parameter is applied at Ci.

-70-
Z FEED FUNCTIONS
7.8 A UTOMA TIC CORNER O VERRI.E (G62)

7.8.3 Relations with other functions

Function Override at corners


l?l-digit Automatic corner override is applied to F1-digit feed rate.
Automatic corner override is applied after cutting feed override has been
Cutting feed override
applied.
Override cancel Automatic corner override is not canceled by override cancel.
Extermal deceleration Valid (after automatic corner override)
Speed clamp Valid (after automatic corner override)
Dry run Automatic corner override is invalid.
Synchronous feed Automatic corner override is applied to the synchronous feed rate.
Thread-cutting Automatic corner override is invalid.
G31 Skip Program error results with G31 command during cutter compensation.
Machine lock Valid
Machine lock high speed Automatic corner override is invalid.
GOO Invalid
GO1 IValid
G02. G03 IValid

-71-
,>, ,,,,,.:, ,.. .

Z FEED FUNCTIONS
7.8 AUTOMATIC CORNER OVERRIDE (G62)

7.8.4 Checkpoints
(1) Automatic corner override is valid only in the GO1, G02 and G03 modes; it is not effective in the GOO
mode. When switching from the GOO mode to the GO1 (or G02, G03) mode at a corner (or vice
versa), automatic corner override will not be applied at that corner in the GOOblock.
(2) Even in the automatic corner override mode, automatic corner override will not be applied until the
cutter compensation mode is established.
(3) Automatic corner override will not be applied at a corner where cutter compensation starts or is
canceled.

(4) Automatic corner override will not be applied at a corner having the cutter compensation I and J (K)
vector commands.

( \
Programmed tool path

Tool nose center


------ -+
Block including I, J
vector commands
No automatic override
(G4 lX_Y_l–J–; J 0“
\ /
(5) Automatic corner override will not be applied when the intersection point cannot be calculated.
This cannot be calculated in the following case
1 ) When the movement command block is discontinuous for 4 or more times
(6) The deceleration range with an arc command is the length of the arc.
(7) The inside corner angle, as set by parameter, is the angle on the programmed path.
(8) Automatic corner override will not be applied when the maximum angle in the parameter is set to O
or 180.
(9) Automatic corner override will not be applied when the override in the parameter is set to O or 100.

,.
-72-
Z FEED FUNCTIONS
7.9 TAPPING MODE (G63j

‘7.9 TAPPING MODE (G63)


( 1 ) Function and objective
The G63 command allows the NC system to establish the cmtrol mode best suited for tapping, as
indicated below.
1) Cutting override is fried at 1(N)%.
2) Deceleration commands at joins between blocks are invalid.
3) Feed hold is invalid.
4) Single block is invalid.
5) In-tapping mode signal is output.
G63 is released by the exact stop mode (G61), automatic corner override (G62) or cutting mode
(G64) command.
(2) Command format
G63 ;

7.10 CUTTING MODE (G64)


( 1 ) Function and objective
The G64 command allows the NC system to establish the cutting mode in which smooth cutting
surfaces are obtained. Unlike the exact stop check mode (G61), the next block is executed
continuously without the machine decelerating and stopping between cutting feed blocks in this
mode.
G64 is released by the exact stop mode (G61), automatic corner override (G62) or tapping mode
(G63) command.
This cutting mode is established in the NC system’s initialized status.
(2) Command format
G64 ;

-73-
Z FEED FUNCTli3NS
7.11 HIGH-PRECISION CONTROL MODE (G61.lJ

7.11 HIGH-PRECISION CONTROL MODE (G61.1)


(1) Function and objective
The high-precision control mode is established by the G61.1 command. In this mode, “l”
acceleration/deceleration prior to interpolation, “2” active feed forward, “3” optimum corner
deceleration and “4” vector fine intemolation are valid, and machinimz which is both smooth and
extremely precise cart be undertaken. -

T .
The radial error amount Assigned tool path
during arc cutting is
reduced.

F control mode OFF


1

control mode ON
.-.

R; Assigned radius (mm)


AR; Radial error (mm)
F, Cutting feed (m/min)
\ I /

{ >
Corners are automatically High-precision High-precision
identified and the opti- control mode OFF ~ control mode ON
mum deceleration is pro-
vided before corners. This
enables sharp comers to
be machined. F+nr

& z
/
In microscopic segment
programs, the smooth sec-
tions and corner areas are Assigned tool path
automatically identified.
Interpolation with smooth Deceleration
curves is provided at the [
smooth sections and sharp
corners are machined at
the corner areas by provid-
ing optimum comer decel-
eration.

-74-
Z FEED FVNCI?ONS
7.11 HIGH-PRECISION CONTROL MODE (G61.1)

(2) Command format


G61.1 ;
The high-precision control mode is valid until an exact stop mode (G61), tapping mode (G63) or
cutting mode (GM) command is assigned.
Assign G61.I in an independent block.
(3) Detailed description
1) In the hid-precision control mode, control the feed rate (F) so that the path control error is less
than the constant value (~).
2) “d’ can be adjusted by setting the precision coefficient of the “machining parameter” (for a
14-inch CRT) or “preparatory parameter” (for a 9-inch CRT).
Precision
coefficient
e =(1-— )x&o
100
In other words, errors are reduced by 6(I7o when a precision coefficient of 60 is set.
.sOis the maximum error inherent to the machine which is determined by the machine
parameter. (It is the value expressed when zero has been set as the precision coefficient.)
E is reduced if the feed fonvard gain is increased, if the position loop gain is increased, if the
“basic parweter” GlbtL is increased or if the “basic parameter” GlbF is reduced.
e~is adjusted by the machine builder and should not be changed by the user.
3) In the high-precision control mode, corners and smooth curves are automatidly identified. (A
corner is generally taken to be an angle of 5 or more degrees.)
However, in some machining programs a curve may be taken as a polygon and corner
deceleration is provided frequently. In cases like this, the frequency of the deceleration can be
reduced by setting the corner deceleration angle in the machining parameters (14-inch CRT) or
preparatory parameters (9-inch CRT). (Normally, zero is set for automatic identification.)
4) Microscopic segment programs approximate curves and set the feed rate (F) so that the path
control error is less than “e.” ‘I’hemicrosccmic senments are identified by determining whether
they are less than the microscopic segment ~ength-setting in the machining parameters (14-inch
CRT) or preparatory parameters (9-inch CRT).
Since speed variations during machining generally impair the cutting surface, the microscopic
segment length is set to zero. This is effective for programs which have minimal curvature
changes.
(4) Example of program

NOOO1G61, 1 ; Valid from next block


Xloo;
X1 OOY-1OO;
X-1OOY-1OO;
x-loo ;
X“1OOY1OO;
X1OOYIOO;
G64 ; Cancel

NOTE 1: The feed rate applying in the high-precision control mode may be slower than the assigned
speed. This means that machining may take longer or that it may take longer than the time
calculated with the machining time calculation function.
NOTE 2 The time taken for machining may increase in direct proportion to the size of the precision
compensation coefficient.
NOTE 3 Although the precision of the control path is improved in the high-precision control mode, the
precision of the tool and machine are included in the machining precision so that the actual
machining precision drops below the control precision. Therefore, the display precision should
be considered as a reference value for the machining precision.

-75-
8. DWELL
8.1 PER-SECOND D WELL (G94/G04)

8. DWELL
The G04 command can delay the start of the next block. Whether the assignment should be as a time or
speed can be automatically selected by the feed mode (G94: per-minute feed; G95: per-revolution feed)
when the G04 command is assigned. The remaining time for dwell can also be canceled by adding the
multi-stage skip function.

8.1 PER-SECOND DWELL (G94/G04)


(1) Function and objective
When the dwell command is given in the per-minute feed mode (G94), the execution of the next block
is delayed for the assigned time.
(2) Command format
G94 G04 X_ ; or G94 G04 P.;
Command uniti 0.001 sec
Decimal point commands are invalid for address P and if such commands are assigned, everything
below the decimal point will be ignored.
However, seconds can be used as the decimal point position using the “G04 P decimal point valid”
control parameter.
(3) Detailed description
1 ) See the table below for the dwell time.

Input
Command range based on address X Command range based on address P
setting unit
0.01/0.001 mm 0.001 — 99999.999 (see) 1 — 99999999 (SW) (x 0.001 see)
0.0001 inch 0.001 — 99999.999 (see) 1 — 99999999 (see) (x 0.001 see)
2 ) When a cutting command is in the previous block, the dwell command starts calculating the
dwell time after the machine has decelerated and stopped.
If it is assigned in the same block as an M, S, T or B command, it starts simultaneously.
3 ) The dwell function during interlock is valid.
4 ) Dwell is valid even for machine lock but it can be completed immediately by the “machine lock
high speed” control parameter.
5 ) The per-second dwell can be established regardless of the G94 or G95 mode by means of the
“G04 time freed” control parameter. -

Previous block I
cutting command I
I
I Next block
1
I
Dwell command I

I
I
I Dwell time
(5 See)

(4) Examples of program


1 ) When input setting unit is 0.01 mm, 0.001 mm or 0.0001 inch
(Example 1) G04 X 500 ; .....0.5 sec. dwell time
(Example 2) G04 X 5000 ; .....5 sec. dwell time

-76-
8. DWELL
8.2 PER -REVOLUTION D WELL (G95/G04)

(Example 3) G04 X 5. ; .....5 sec. dwell time


(Example 4) G04 P 5000 ; .....5 sec. dwell time
(Example 5) G04 P 12.345 ; .....0.012 sec. dwell time
12.345 sec. with “G04 P decimal point valid” control
parameter
2 ) When time designation has been inserted prior to G04 with an input setting unit of 0.0001 inch
(Example 6) X5. G04 ; ..... 50 sec. dwell time (this is equivalent to X50000G04)’

8.2 PER-REVOLUTION DWELL (G95tWbf)


(1) Function and objective
When the G04 command is assigned in the per-revolution feed mode (G95), the spindle first rotates
by an amount equivalent to the designated speed and then the next block is executed.
(2) Command format
G95 G04 X_ ; or G95 G04 P_;
Command unit: 0.001 rev
Decimal point commands are invalid for address P and if such a command is assigned, everything
below the decimal point will be ignored.
kIowever, “rev” can be used as the decimal point position using the “G04 P decimal pint valid”
control parameter.
(3) Detailed description
1 ) See the table below for the dwell times.

Input
Command range based on address X Command range based on address P
setting unit
0.01/0.001 mm 0.001 — 99999.999 (rev) 1 — 99999999 (x 0.001 rev)
0.0001 inch 0.001 – 99999.999 (rev) 1 — 99999999 (x 0,001 rev)
2) When a cutting command is in the previous block, the dwell command starts calculating the
dwell time after the machine has decelerated. If it is assigned in the same block as an M, S, T
or B command, it starts simultaneously.
3) The dwell function during interlock is valid. (Dwell is executed even during interlock.)
4) Dwell is valid even for machine lock but it can be completed immediately by the “machine lock
high speed” control parameter.
5) Dwell also stops during spindle stop. It is resumed when the spindle starts to rotate again.
6) ‘I’he per-second dwell can be fried by means of the “G04 time fwed” control parameter.
7) This function cannot be used unless a position detection encoder has been mounted on the
spindle.

I
Previous block
cutting command !
Next block
!
I
Dwell command
I
I
1 4 w
I Dwell time
(12.345 rev)

-77-
9. MISCE~OUS FUNCTIONS
9.1 MISCELLANEOUS FUNCTIONS (M2-DIGITS BCD)

9. MISCELLANEOUS FUNCTIONS

9.1 MISCELLANEOUS FUNCTIONS (M2-DIGITS BCD)


The miscellaneous (M) functions are also known as auxiliary functions, and they include such NC machine
auxiliary functions as spindle forward and reverse rotation, spindle stop and coolant ON/OFF.
These functions are designated by a 2-digit number following the address M with this particular NC series,
and only one group can be commanded in a single block.
(Example) GOOXxl Mm, ;
When two or more commands are issued, only the last one will be valid.
When a number with more than 2 digits is assigned, the lower 2 digits will be valid.
The six commands of MOO,MO1, M02, M30, M98 and M99 are used as auxiliary commands for specific
objectives and so they cannot be used as general auxiliary commands. This leaves 94 miscellaneous
functions which can be assigned. Reference should be made to the instructions issued by the machine
builder for the actual correspondence between the functions and numericaJ values.
When the MOO,MO1, M02 and M30 functions are used, the next block is not read into the input buffer due
to pre-read prohl%iting function.
An M function can be specified together with other commands in the same block, and when such a function
is specified together with a movement command in the same block, there are two possible sequences in
which the commands are executed
( a ) The M function is executed after the movement command.
( b ) The M function is executed at the same time as the movement command.
Which of these sequences actually applies depends on the machine specifications.
Processing and completion sequences are required in each case for all M commands except M98 and M99.
The 6 M functions used for specific purposes will now be described.
(1) Program stop: MOO
When the tape reader has read this function, it stops reading the next block. As far as the NC system’s
functions are concerned, only the tape reading is stopped. Whether such machine functions as the
spindle rotation and coolant supply are stopped or not differs according to the machine in question.
Re-start is enabled by pressing the automatic start button on the machine operation board.
Whether resetting can be initiated by MOOdepends on the machine specifications.
(2) Optional stop: MO1
When the tape reader reads the MO1 command with the optional stop switch on the machine
operation board at ON, it will stop and the same effect as with the MOOfunction results.
If the optional stop switch is OFF, the MO1 command is ignored.
(Example)
\ Optional stop switch status and operation
N1O GOO X1OOO ; Stops at Nll when switch is ON
Nll MO1 ; Without stopping atN11 when switch is OFF
N12 GO1 X2000 Z3000 F600 ; Next command (N12) is executed
5

-78-
9. MISCELLANEOUS FUNCTIONS
9.1 MISCELLANEOUS FUNCTIONS (M2-DIGITS BCD)

(3) Program end: M02 or M30


This command is normally used in the final block for completing the machining, and so it is primarily
used for tape rewinding. Whether the tape is actually rewound or not depends on the machine
specifications.
Depending on the machine specifications, the NC unit is reset by the M02 or M30 command upon
completion of tape rewinding and any other commands issued in the same block.
(Although the contents of the command position display counter are not cleared by this resetting
action, the modal commands and compensation amounts are canceled.)
The NC unit stops when the rewinding operation is completed (the automatic operation lamp goes
off). To restart the unit, the automatic start button must be pressed or similar steps must be taken,
It should be noted that when restarting the unit upon completion of the M02 or M30 command, the
unit will operate in the interpolation mode at the point where the program has ended if the first
movement command is assigned by coordinate words alone. It is thus recommended that a G function
always be designated for the initial movement command.

lWYI131: MOO,MO1, M02 and M30 are also output as independent signals and these independent outputs
are reset by pressing the reset key.
NOTE 2 M02 or M30 can be assimed bv manual data immt (MDIk
At this time, commands ~an be<assigned simult~eo~sly ~th other commands just as with the
tape.
(4) Subprogram call/termination: M98, M99
These commands are used as the return instructions from branch destination subprograms and
branches to subprograms.
M98 and M99 are processed inside the NC unit and so M code signals and strobe signals are not
output.
(5) NC internal processing with MOO/MOl/M02/M30 commands
NC internal processing suspends pre-reading when the MOO,MO1, M02 or M30 command has been
read. Other tape rewinding operations and the initialization of medals by resetting differ according
the machine builder.

‘i

!!

,,

,’

-79-
9. MISCE~OUS FUNC170NS
9.2 MISCELLANEOUS FUNCTIONS t_M4-DIGITS BCDJ

~9.2 MISCELLANEOUS FUNCTIONS (M4-DIGITS BCD)


These functions are assigned with a 4-digit (O – 9999) number following address M, and up to 4 groups
can be assigned in one block.
(Example) GOOX Mml Mm, Mm, Mm. ;
When 5 or more groups of these M functions are assigned in one block, the last four will be valid.
As with the M2-digit functions, the MOO,MO1, M02, M30, M98 and M99 codes are reserved for special
applications. Processing and completion sequences are required for all M commands except for M98 and
M99.

NOTE The commands for multiple sets within a single block are regulated by the specifications of the
machine.

9.3 MISCELLANEOUS FUNCTIONS (M8-DIGITS)


These functions are assigned with an 8-digit (O – 99999999) number following address M, and only one
group can be assigned in one block. The output for M8-digit functions can be either BCD or binary, and
this can be selected by parameter. The same specifications also apply in this respect to S8-digit and T8-digit
functions.
The output signals are 8-digit BCD code and start signals or signed 32~bit binary data and start signals.
As with the M2-digit functions, the MOO,MO1, M02, M30, M98 and M99 codes are reserved for special
applications. Processing and completion sequences are required for all M commands except for M98 and
M99.

9.4 SECOND MISCELLANEOUS FUNCTIONS (B/A/C8-DIGITS)


These serve to assign the indexing table positioning and other such functions. In this particular MELDAS
series, they are assigned by an 8-digit number from O to 99999999 following address A, B or C. The
machine builder determines which codes correspond to which positions.
The output signals are command value BCD signals and start signals.
The A, B and C functions can be assigned simultaneously with any other commands but when they are in
the same block as movement commands, there are 2 sequences in which the commands are executed, as
below
a. A, B or C function is executed after the movement command.
b. A, B or C function is executed simultaneously with the movement command.
The machine specifications determine which sequence applies.
Processing and completion sequences are required for all secondary miscellaneous functions.
The table below gives the various address mmbinations. It is not possible to use an address which is the
same for the axis-name of the 4th axis and secondary miscellaneo~s function.

4th axis name


Secondary A B c
miscellaneous function
A x o 0
B o x o
c o 0 x

NOTE: When A has been assigned as the secondary miscellaneous function address, the following
commands cannot be used.
1 ) Linear, angle commands
2 ) Geometric commands

-80-
10. SPINDLE FUNGI?ONS
10.1 SPINDLE FUNCTIONS {S2-DIGITS BCD)

10. SPINDLE FUNCTIONS

10.1 SPINDLE FUNCTIONS (S2-DIGITS BCD)


The spindle functions are also known simply as S functions and they assign the spindle speed. In this
particular MELDAS series, they are assigned with a 2-digit number following address S ranging from O to
99, and 100 commands can be specified. In actual fact, however, it depends on the machine specifications
as to how many of these 100 functions are used and which numbers correspond to which functions, and thus
reference should be made to the instructions issued by the machine builder. When a number exceeding 2
digits is assigned, the last 2 digits will be valid.
The S functions can be assigned simultanausly with any other commands but when they are in the same
block as movement commands, there are 2 sequences in which the commands are executed, as below:
a. The S function is executed after the movement command.
b. The S function is executed simultaneously with the movement command.
The machine specifications determine which sequence applies.
Processing and completion sequences are required for all S commands from S00 through S99.

10.2 SPINDLE FUNCTIONS (S5-DIGITS ANALOG)


When the S5-digit functions are added, these functions can be assigned from SOthrough S99999, and the
other functions are based on the S2-digit codes.
By assigning a 5-digit number following the S code, these functions enable the appropriate gear signals,
voltages corresponding to the assigned spindle speed (rPm) and start signals to be output.
Processing and completion sequences are required for all S commands.
When a gear stage has been selected manually at any time except during the execution of an S command,
the voltage is determined from the previously assigned speed and speed setting of that gear stage, and it is
output .
The analog signal specifications are given below.
( 1) Output voltage .... 0 to 10V or -8V to + 8V
(2) Resolution .... 1/4095 (2 to the power of –12)
(3) Load cmditions .... 10kQ
(4) Output impedance ....2200
If parameters for up to 4 gear stages are set in advance, the gear stage corresponding to the S command
will be selected by the l’4C system and the gear signal will be output. The analog voltage is calculated in
accordance with the input gear signal.
( 1 ) Parameters corresponding to individual gears .... Limit speed, maximum speed, gear shift speed,
orient speed and maximum speed during
tapping
(2) Parameters corresponding to all gears .... Minimum speed

10.3 SPINDLE FUNCTIONS (S8-DIGITS)


These functions are assigned with an 8-digit (O – 99999999) number following address S, and only one
group can be assigned in one block. The output for S8-digit functions can be either BCD or binary, and this
can be selected by parameter. The same specifications also apply in this respect to M8-digit and T8-digit
functions.
The output signals are 8-digit BCD code and start signals or signed 32-bit binary data and start signals.
Processing and completion sequences are required for all S commands.

-81-
10. SPINDLE FVNCTIONS
10.4 CONSTANT PERIPHERAL SPEED CONTROL {G96, G97)

10.4 CONSTANT PERIPHERAL SPEED CONTROL (G96, G97)

10.4.1 Constant peripheral speed control


These commands automatically control the spindle speed in line with the changes in the radial coordinate
values as cutting proceeds in the radial directiou and they serve to keep the cutting point speed constant
during the cutting.

G96SS PP; Constant peripheral speed ON


~ Assignment of constant peripheral speed control axis
L Peripheral speed
G97 ; Constant peripheral speed cancel

Detailed description
1) The constant peripheral speed control axis is set by parameter (basic “G96 ax” machine
parameter)
O: Fixed at 1st axis (P command invalid)
1: 1st axis
2: 2nd axis
3: 3rd axis
2) When the above-mentioned parameter is not zero, the constant peripheral speed control axis
can be assigned by address P.
Example: With G96 ax (1)
Program Constant peripheral speed control axis
G96 S1OO; + 1st axis
G96 S1OOP3; + 3rd axis
NOTE The above operation cannot be guaranteed in the event that the rotary axis has been
assigned as the constant peripheral speed control axis. It is therefore not advisable to
assign the rotary axis as the constant peripheral speed control axis.
3 ) Example of selection program and operation

G90G96G01X50. Z1OO. S200 ; The spindle speed is controlled so that the


peripheral speed is 200 m/min.
I

J
G97G01X50. Z 100. F300S500 ; The spindle speed is controlled at 500 rpm.

1
I

M02 ; The modal returns to the initial setting.


NOTE The initial value of the modal can be selected by parameter.

10.4.2 Spindle clamp speed setting (G92) (See *1)


The maximum clamp speed of the spindle ean be assigned by address S following G92 and the minimum
clamp speed by address Q.

G92~ $&;
P Maximum clamp speed
I
~ Minimum clamp speed
To accommodate gear selection between the spindle and spindle motor, parameters can be used to set the
rotational speed range up to 4 stages in rpm units.
The lowest upper limit and highest lower limit are valid among the rotational speed ranges based on the
parameters and based on G92 Ss Qq;.
*1: This function is available for some system versions.

-82-
11. T(WL FUNCTIONS
11.1 TOOL FUNCTIONS (T2-DIGITS BCD)

11. TOOL FUNCTIONS

11.1 TOOL FUNCTIONS (T2-DIGITS BCD)


The tool functions are also known simply as T functions and they assign the tool numbers. In this particular
MELDAS series, they are assigned with a 2-digit number following address T, they range from Oto 99, and
100 commands can be specified. In actual fact, however, it depends on the machine specifications as to how
many of these 100 functions are used and which numbers correspond to which functions, and thus reference
should be made to the instructions issued by the machine builder.
One group of commands can be assigned in one block and if a multiple number of groups of commands
is assigned, only the last command will be valid. When a number exceeding 2 digits is assigned, the last 2
digits will be valid.
BCD codes and start signals are output.
The T functions can be assigned simultaneously with any other commands but when they are in the same
block as movement commands, there are 2 sequences in which the commands are executed, as below
a. The T function is executed after the movement command.
b. The T function is executed simultaneously with the movement command.
The machine specifications determine which sequence applies.
Processing and mmpletion sequences are required for all T commands.

11.2 TOOL FUNCTIONS (T8-DIGITS)


These functions are assigned with an 8-digit (O – 99999999) number following address T, and only one
group can be assigned in one block.
The output for T8-digit functions can be either BCD or binary, and this can be selected by parameter. The
same specifications also apply in this respect to M8-digit and S8-digit functions.
The output signals are 8-digit BCD code and start signals or signed 32-bit bina~ data and start signals.
Processing and completion sequences are required for all T commands.

-83-
12. TOOL OFFSET FU?WTTONS
12.1 TOOL OFFSET

12. TOOL OFFSET FUNCTIONS

12.1 TOOL OFFSET

12.1.1 Outline
There are 3 types of basic tool offset functions, as shown in the figure below: tool position offset, tool length
offset and cu~ter (tool radius) compensation. The offset amo;nts are assign~ by tool offset numbers.
These amounts are entered from the setting and display unit or from the program tape.

(. i ,;>
Tool position offset .pa .t
,%* .0
[
+: *,; “ ------ ------ - . ,G:+.> “

1! a. ---
%.’
I*
L2 L1 ‘
I
4
r r
I
L1–r ‘
L2+2r (x 2 expansion) (miuction)
Reference
+
. I

r- -*

Tool len h offset

+:~u~’en”h

(Side view)

Cutter compensation
~. ~---
-”---— —-- -------
------- -aat
0,f10
/0

4- Left compensation

-84-
12. TOOL 0FFSETFUNC170NS
12.1 TOOL OFFSET

12.1.2 Tool offset amount assignment


The offset amounts are preset into the offset memory as corresponding to the offset numbers using the
setting and display unit or paper tape reader.

Type I
If the H command and D command have
the same number, the offset amount will be
identical.

I--Q-l

The H command seleets the sum of the


wear compensation amount and shape off-
set amount relating to the tool length; the D
command seleets the sum of the wear com-
pensation amount and shape offset amount
relating to the tool radius.
(Hn) = bn + c.
(Dn) = d. + em

-85-
12. TOOL OFFSET FUNCITONS
12..1 TOOL OFFSET

12.1.3 Tool offset memory


There are two types (I and II) of tool offset memory functions for setting and selecting the tool offset
amounts. (These types are determined by the machine builder’s specifications.)
The offset amounts or compensation amounts are preset using the setting and display unit or paper tape
reader.

Length offset/cutter Shape offset/wear


Type of tool offset memory
compensation differentiation compensation differentiation
Type I No No
Type II Yes Yes

Reference point
—. —.—. — - -

Reference
1 tool
- -. . / Tool lengtl
,0~- -.
\ shape offset
I .
i
i 1
I I
I
I
-—= -
1’-
+: i —. ‘2 .—.2. ]1 -
---- ~---- *~’
Wear Shape Wear
amount Cutter
amount
cmnpemwtion-
M’ -

-’86-
12. TOOL OFFSET FMWITONS
12.1 TOOL OFFSET

Type I
As indicated by the table on the right, each offset amount
corresponds to an offset number. Therefore, the numbers
can be used without distinction between the length offset
amounts, cutter compensation amounts, shape offset
amounts and wear compensation amounts. ● ●

✎ ✎

(Dl)=al, (Hl)=al
(D2) ‘at, (H2) =at
:. :.

(Dn) ‘a., (Hn} =a.


Type H
As indicated below by the table, the shape offset amounts and wear compensation amounts relating
to the length offset amounts, and the shape offset amounts and wear compensation amountsrelating
to the cutter radius can be set independently.
The tool length offset amount is selected by H and the tool radius offset amount by D.

(Hl)=bl+cl, (Dl)=dl+el
(1-12 )= b2+c2, (D2)=d2+e2
:. :.

(Hn) ‘bn+cn. (Dn) =dn+en

Offset Tool length (H) Cutter radius (D’ /(Position offset)


number Shape offset Wear compensation Shape offset Wear compensation
1 bl cl dl el
2 b2 C2 d2 e2
3 b3 C3 d3 e3
. . ● ● .
* . ● . ●

n bn cn dn en

-87-
12. TOOL 0FRSETFiVNC170NS
12.1 TOOL OFFSET

12.1.4 Tool offset numbers (H/D)


H and D are the addresses which assign the tool offset numbers.
1) H is used for tool length offset and D for tool position offset and cutter compensation.
2) Once assigned, the tool offset numbers will not change until the H or D number is assigned
anew.
3) Only one offset number command can be specified in one block. (If 2 or more are specified, only
the last command will be valid.)
4) Number of usable offset sets:

Standard specifications 40 sets HOI – H40 (DO1 – D40)


Optional specifications 800 sets HOI — H800 (DO1 — D800) (For further details, refer
(max) to Section 12.1.5.)
5 ) Program error “P170” results when a value exceeding the above figures is set.
6 ) The table below gives the setting range for each number.
The offset amounts corresponding to the offset numbers are preset by the setting and display
unit or paper tape reader.
The least input increment is 0.001 mm or 0.0001 inch for input setting unit types A and B.

Input setting Shape offset amount Wear compensation amount


unit type Millimeter system Inch system Millimeter system Inch system
* 9999.99 * 999.999 A 9999.99 * 999.999
A
mm inch mm inch
&999.999 * 99.9999 * 999.999 * 99.9999
B
mm inch mm inch
&99.9999 * 9.99999 * 99.9999 k 9.99999
c
mm inch mm inch
The least input increment is 0.0001 mm or 0.00001 inch for input setting unit type C.

12.1.5 Number of tool offset sets


( 1 ) The number of tool offset sets is determined from the following numbers of sets. (See *1)
NOTE The CNC configuration
Tool offset memory (typ e I) Tool offset memory (typ e II) may be subject to restric-
40 sets Standard Standard tions depending on how
100 sets Optional specifications Optional specifications the tape storage capacity,
200 sets Optional specifications Optional specifications number of common vari-
400 sets Optional specifications Optional specifications able sets and number of
— tool life management
800 sets Optional specifications
sets are combined.

NOTE The figure for the optional specifications is not the additional number of sets but the total number
including the sets under the standard specifications.
*1: The maximum number of tool offset sets differs according to the system version.

-88-
12. TOOL OFFSET FUNCHONS
12.2 TOOL LENGTH OFFSET/CANCEL (G43, G44/G49)

12.2 TOOL LENGTH OFFSET/CANCEL (G43, G44/G49)


( 1 ) Function and objective
These commands enable the ~sition of the end mint of the movement command to be offset for each
axis by a value corresponding to the preset off~et amount. Programs can be made more flexible by
making use of this function which enables the operator to correct the difference in the actual tool
length from the value assumed when programming.
(2) Command format
With tool length offset + With tool length offset -

G4~Zz Hh; Tool length offset + start G4~Zz Hh; Tool length offset – start
. .
● .
G4;Z Z ; Tool length offset cancel G4~Z Z ;
.

(3) Detailed description


(3.1) Tool length offset movement
The movement is calculated using the formula below when the G43 or G44 tool length offset start
command or G49 tool length offset cancel command is assigned.
Z-axis movement
G43 Zz Hh, ; 2 + ( ~ h 1) offset in + directionby a valueequivalentto tool offset amount
G44 Zz Hh, ; Z – “(~ h I) Offset in - direction by a value equivalent to ted offset amount
G49 Zz ; z –(+) ( 1 h 1) Off=t amountcancel
Q h I ; Offset amount of offset number h,
The actual end point of the coordinates is offset from the programmed movement command end
point coordinates by an amount calculated by the above formula, regardless of whether absolute value
or incremental value commands are used.
The G49 (tool offset cancel) mode is established when the power is switched on and after the M02
command has been executed.

(Example 1)
With an absolute value command HO1=–1OOOOO !
N1 G28 20 TO1 M06 ;
N2 G90 G92 20 ; I
N 3 G43 25000 HO1 ; ~
I
N4 GO1 2–50000 F500 :
Tool length
(Example 2)
offset i
With an incremental value command HO1= – 100000 Iiol=-loo.

N1 G28 20 TO1 M06 ;


N2 G91 G92 20 ; Work-
piece
0
N 3 G43 25000 HO1 ;
.

N4 GO1 Z –55000 F500 : d .—. —

‘—–50.(MJ

1
.

-89-
12. TOOL OFFSET FWCITONS
12.2 TOOL LENGTH OFFSET/CANCEL (G43, G44/G49)

( 3.2) Offset numbers


1) The offset amounts differ according to the offset types.

I
The I R 1,
When G43 Hhl ; is assigned, offset amount
t?hl assigned by offset number hi will be
common to tool length offset, cutter com-
pensation, shape offset and wear compensa-
tion. lh,

Worlcpiece
~-
Table

Type II
When G43 Hhl ; is assigned, offset amount
thl assigned by offset number hl will be the
shape offset + wear compensation (see
NOTE).

2) The valid range of the offset numbers depends on the specifications (number of offset sets).
Standard specifications :40 sets H1 ~ H40
Optional specifications (max.) : 8@l sets H1 - H800
(For further details, refer to Section 12.1.5.)
3) Program error “P170” results when the offset number assigned exceeds the range of the
specifications.
4) The tool length offset is canceled by assigning HO.
5) An offset number assigned in the same block as G43 or G44 will subsequently remain valid as
a modal.
(Example 3)
G43 : Zzl Hhl ; .... .......... . Tool length offset is provided by hl.
G45 ; Xxl Yyl Hh6 :
G49: 222 ; ... .... ...... ......... .. Tool length offset is canceled.
G43: 222 ; .......””.”.......”.... Tool length offset is provided again by hl.
.

6) When G43 is further assigned while G43 is still modal, offset is provided by an amount
equivalent to the difference in the data of the offset number.
(Example 4)
G43 . Zzl Hhl ; ............ ... Z1 + ({hi) movement

G43 : ZZ2 Hh2 ; ..........”..”. z2+(/h2– t?hl) movement

The same applies to GM while G44 is still modal.

-90-
12. TOOL OFFSET FUNCTIONS
12.2 TOOL LENGTH OFFSET/CANCEL (G43, G44/G49)

(3.3 ) Tool length offset valid axes


1 ) When the “length offset Z fwed” control parameter is ON, tool length offset applies at all times
to the Z axis.
2 ) When the “length offset Z f~ed” control parameter is OFF, it depends on the axis address
assigned in the same block as the G43 command. The sequence of priority is as follows.
zp>Yp>x P

(Example 5)
G43 , Xxl Hhl ; .“.o”so”.””.””+ offset for X axis
G49 ‘ Xx2 ;
G44 . YY1 Hh2 ; . .... ......... . _ offset for Y axis

G49 : YY2 ;
G43: aal Hh3 ; ““”.””””.”””+ offset for additional axis
G49” aal ;
G43 : Xxi YY3 ZZ3 ; .“”.””Offset is applied to Z axis.
G49 “ ;
Additional axes are handled in accordance with the setting of the “plane selection” basic axis/parallel
axis machining parameters.
When tool length offset is to be assigned with a rotary axis, set the name of the rotary axis into any
of the parallel axes.
3) Offset will apply to the Z axis if the offset number (H) is not assigned in the same block as the
G43 command,
(Example 6)

G43 : Hhl ; 00”.”0’.””s.o”.”.o”s.-.o


Offset for Z axis and cancel
G49 “ ;

(3.4) Operations when other commands are assigned while tool length offset is modal
1) When reference point return is performed by G28 or by manual means, tool length offset is
canceled upon completion of the return.

(Example 7)
G43 : Zzl Hhl ;
G28; ZZ2 ; ............ .... .. Cancel mode established when reference point
reached. (Same as G49)
G43 : ZZ2 Hh2 ;
G49 a G28 ZZ2 ; ......... Reference point return is performed after Z-axis
cancel operation.

2) When a movement command is assigned to the G-53 machine coordinate system, movement
follows to the machine position with the tool offset amount canceled. When a return has been
made to one of the work coordinate systems (G54 — G59), the tool returns to the coordinates
which ‘have been shifted again by an amount equivalent to the tool offset.

-91-
12. TOOL Ol?l?SETFUNCHONS
12.3 TOOL POSITION OFFSET (G45 – G48J

12.3 TOOL POSITION OFFSET (G45 – G48)


( 1 ) Function and objective
Using the G45 — G46 commands, the movement distance of the axes specified in the same block can
be extended or reduced by a preset offset length. Furthermore, the offset amount can be similarly
doubled (x 2 expansion) or halved (x 2 reduction) with commands G47 and G48.
The number of sets for the offset is as follow~
Standard specifications : 40 sets, D1–D40
Optional specifications (max.) : 80Q sets, D1–D800
(For further details, refer to Section 12.1.5.)
(The numbers given are the total number of sets for tool length offset, tool position offset and cutter
compensation.)

G45 command G46 command G47 command G48 command

Expansion by offset Reduction by offset x 2 expansion by offset x 2 reduction by offset


amount only amount only amount amount

11
a
P

h=.m :~ ztw :::w“.:.,,


- =fif~;
;.’..:. 2:R
a
startpoint End point Stmipoint End &it Staripoint End point stallpoint End point

@ *0= =$
(Program command value) (Offset amount) (Movement amount after offset)

(2) Command format

Command format Function


G45 Xx Dd ; Expansion of movement amount by offset amount set in offset memory
G46 Xx Dd ; Reduction of movement amount by offset amount set in offset memory
G47 Xx Dd ; Expansion of movement amount by double the offset amount set in offset memory
G48 Xx Dd ; Reduction of movement amount by double the offset amount set in offset memory

-92-
12. TOOL OFFSET FUNCITONS
12.3 TOOL POSITION OFFSET (G45 – G48J

(.,3 ) Detailed description


.
Details for incremental values are given below.

Tape command Movementamountof Example


equivalenttape command
(aaaignedoffsetamount = t’) (when X = 1000)

d= 10 x= 1010
G45XX Dd x {X+11
1 =–lo x= 990
J?= 10 X=– lolo
G45X– X Dd x– {X+41
4 =-lo x= -990
J2= 10 x= 990
G46XX Dd x {x–l}
E =–lo x= 1010
fl = 10 x= -990
G46X– X Dd x– {x-l)
1!=–lo X=– lolo
a= 10 x= 1020
G47XX Dd x“{x+2”l}
J! =-lo x= 980
Q= 10 X=–102O
G47X-X Dd x– {X+2”4)
fl =-10 X= –980
1= 10 x= 980
G48XX Dd x {X–2*4}
Q=-10 x= 1020
Q= 10 X= –980
G48X– X Dd x– {X–2*4}
Q=–lo X=–102O

-93-
12. TOOL 0FFSETFUNC170NS
12.3 TOOL POSITION OFFSET (G45 – G48J

Checkpoints for G45 – G48 use


1) These commands should be used when operation is not in a canned cycle mode.
(They are ignored even if they are assigned during a canned cycle.)
2) AS a result of the internal arithmetic processing based on the expansion or reduction, the tool
will proceed to move in the opposite direction when the command direction is reversed.

Start point

[T] End point

.::::.
Programmed command
Offset
Tool movement
G48X20. 000;
Offset amount = +15.000
Actual movement = X–10.OOO
When a zero movement amount has been specified in the incremental value command (G91)
mode, the result is as follows.

I I I I I 1
NC command G45X ODO1 ; G45X– ODO1 ; G46X ODO1 ; G46X– ODO1 ;

Equivalent
command X1234; X–1234; X–1234; X1234;

Offset number: DO1


Offset amount corresponding to DO1: 1234
When a zero movement amount has been specified with an absolute value command, the
operation is completed immediately and the tool does not move for the offset amount.
In the case of circular interpolation, cutter compensation is possible using the G45 – G48
commands only for one quadrant, two quadrants (hemisphere) or three quadrants when the
start and end points are on the axis.
The commands are assigned as follows when the compensation direction is both outside and
inside the arc programmed path.

--,
However, in this case, offset must already be provided in the desired direction at the arc start
point. (If an offset command is assigned for the arc independently, the arc start point and end
point radii will shift by an amount equivalent to the offset amount.)

b
Programmed path ‘~, G45 G45 for compensation outside the circle
\ G46 for compensation inside the circle
1/4 circle -., \
G40 \\ \\

&&

G47 for compensation outside the circle


G48 for compensation inside the circle

L Programmed path

-94-
12. TOOL OFFSET FUNCHONS
12.3 TOOL POSITION OFFSET (G45 – G48)

3/4

G45 for compensation outside the circle


G46 for compensation inside the circle

(4) Example of program


It is assumed that offset has already been provided in the +X direction by DO1 = 200.

G91G45G03X –1OOOY1OOO
1 –1OOOF1000DO1 ;

Y
End point , Tool nose center path

Programmed
1000 path 200

H k- Tool

ti~int
Programmed arc
center

Tool position offset with 1/4 arc command

Even if the offset numbers are not assigned in the same block as the G45 – G48 command, offset
is provided with the tool position offset number previously stored in the memory.
Program error “170” results when the specified offset number has exceeded the specification range.
These G codes are unmodal and are effective only in the command block,
Even with an absolute value command, the amount of the movement is extended or reduced for each
axis with respect to the direction of movement from the end .rmint of the preceding block to the
position assi~ed by the G45 – G48 block.
In other words, even for an absolute value command, offset can be applied to movement amounts
(incremental values) in the same block.

-95-
:-.

12. TOOL OFFSET FUNCTIONS


12.3 TOOL POSITION OFFSET (G45 – G48)

When a command for “n” number of simultaneous axes is given, the same offset will apply to all axes. It
is valid even for the additional axes (but it must be within the range of the number of axes which can be
controlled simultaneously.) ‘

GO1 G45X220. Y60. D20 ;


(D20) =+50.000
Y End point after offset
5

1/
110. /
/f 50’
60.
)50.
Start point Programmed end point
x
m. no.

NOTE 1: If offset is applied to two axes, over-cutting or under-cutting will result, as shown in the figures
below. In cases like this, use the cutter compensation commands (G40 – G42).

Programmed path Tool nose center path

7F
Desired shape GO IC45 XX, Dd, ;

xx, Yy, ;
G45Y Y,. ;
B

“/”:
L offset amount setting

Programmed path 9 4 Tool nose center path


4I

GO1 ~ x, ;
Machined shape Yy , Dd,
G45 X x, :
Y Y, ;

: amount setting

-96-
12. TOOL OFFSET FUN~ONS
12.3 TOOL POSITION OFFSET (G45 – G48)

(Example 2)

N4 Tool nose center path

G46 GOO xxl Yyl Ddl ;

G45 GO1 YY2 Ff2 ;


G45 G03 Xx3 YY3 Ii3 ;

Y GO1 Xx4 ;
Ik

L
x

(Example 3)
When the G45 – G48 command is assigned, the offset amount for each pass is the amount assigned by the
offset number. and the tool does not move for the difference from the previous offset as it would do with
the tool length offset command (G43).

Programmed path Tool nose center path


\
N112
k 1 4
30
N113
11
N 103

40
IOR

N1OI N1 02
40

;tart point

-97-
12. TOOL 01?FSETFUNC170NS
12.4 CUTTER COMPENSATION

Input setting unit: O.001mm


Offset amount DO1= 10. 000 m (offset amount of tool radius)
N1OO G91 G46 GOO X40000 Y40000 DO1
N101 G45” G01 X1 OOOOO F200 :
N102 G45 G03 X1OOOO Y1OOOO J1OOOO ;
N103 G45 GO1 Y40000 ;
N104 G46 XO ;
N105 G46 G02 X-20000 Y20000 J20000
N106 G45 GO1 YO ;
N107 G47 X–30000 ;
N108 Y–30000 :
N109 G48 X–30000 ;
NIIO Y+30000 ;
Nlll G45 X-30000 ;
N112 G45 G03 X-1OOOOY–1OOOO J–1OOOO
N113 G45 GO1 Y–20000 ;
N114 Xloooo ;
N115 Y–40000 ;
N116 G46 X–40000 Y–40000 ;
N117 M02;
%

12.4 CUTTER COMPENSATION

12.4.1 Outline
(1) Function andobjective
This function serves to compensate for the tool radius (cutter compensation). A tool can be offset in
any vector direction by the tool radius amount assigned bythe Gcommand(G38 — G42) andD
command.
(2) Commandformat

Command format I Function Remarks I


G40 X_Y_ ; Cutter compensation cancel
G41 lY_ ; Cutter compensation (left)
G42 X_Y_ ; Cutter compensation (right)
G38 I_J_ ; Offsetv@orchange/retain
Canbe assignedin cutter compensation mode
G39 X-Y-: Comer selection
(3) Detailed description
The number of sets for the offset is as follows
Standard specification~ 40sets, D1-D40
Optional specifications 300 sets (max), D1 – D300 (Refer to Section 12.1.5 for details.)
(The numbers given are the total number of sets for tool length offset, tool position offset and cutter
compensation.)
In cutter compensation, Hcommands are ignored andonly D commands arevalid.
The plane for the cutter compensation is selected within the planes assigned by the plane selection G
code or by the two axis addresses. Offset cannot be performed for axes not parallel to the assigned
plane and for axes included in the assigned plane. Refer to the section on plane selection for the G
codes that select the planes.

-98-
12. TOOL OFFSET FUl?CITONS
12.4 CUTTER COMPENSATION

12.4.2 Cutter compensation operations


(1) Cutter compensation cancel mode
The cutter compensation cancel mode is established by any of the following conditions.
1) After the power has been switched on
2) After the reset button on the setting and display unit has been pressed
3) After the M02 or M30 command with reset function has been executed
4) After the cutter compensation cancel command (G40) has been executed
The offset veetors are zero in the compensation wince] mode and the tool nose center path coincides
with the programmed path.
Programs including cutter compensation must be terminated in the compensation cancel mode.
(2) Cutter compensation start (start-up)
Cutter compensation starts when all the following conditions are met in the compensation cancel
mode.
1 ) The G41 or G42 command has been assigned.
2 ) The offset number for cutter compensation is: O < D s maximum offset number.
3 ) The movement command is any command except an arc command,
When compensation starts, the movement commands are always executed after 3 blocks have been
read continuously or, if the movement commands are not contained in 3 blocks, after a maximum of
5 blocks have been read continuously, regardless of whether the operation mode is set to continuous
or single block operation.
>
~ntrol mode transition diagram

Machining
program
ahead

Pre-read buffer

Execution block

There are two wavs of starting cutter com~ensation: tvoe A and tvDe B.
The type can be s&cted or de~selected by {he control &rameter “~’tter &mpensation type B“.
This type is used in common with the compensation cancel type,
In the following explanatory figure, “S” denotes the single block stop point.

-99-
12. TOOL 0FFSETFUNCZ70NS
12.4 CUTTER COMPENSATION

(3) Start operation for cutter compensation


1 ) Machining an inside corner

Line ~ line Line -D arc

e Programmed path 9 —.—. — .—


= compensation amount
Tool nose
‘- —--—-— center path

Start point Start point i


Center of arc

2 ) Machining an outside corner (obtuse angle)


(Type A or B can be selected by parameter) [90° S 0 K 1S0”]

Line + line (type A) Line -D arc (type A)


Tool nose center path
s ————. . . . s
---
/ / ‘\
/ r = compensation amount / r \ Tool nose
G41/’
/ Programmed path ‘z’
/ /
/ /
/ /

Mart point Start point

Line ~ line (Type B) Line - arc (type B)

Point of Point of
intersection intersection
s ---—. —-. + s
Tool nose center path
j,j r Tool nose
\ center path
/ Programmed path G411~
G 4 1,# \
/’ \
/ \
I

Start point \
Start Programmed
point Center of arc
path
12. TOOL OFFSET FUW7TONS
12.4 CUTTER COMPE.N’SA TION

3 ) Machining an outside corner (obtuse angle)


me A or B can be selected by parameter) [0 < 90°]

Line + line (type A) Line ~ arc (type A)

s.. .. . ——
-- -—- ~ Center
; of arc
. 1
#
I

!
~1
,
Tool nose center path

Programmed path
.—. —

Start point

Line + line (type B)

“---– –”---
Tool nose center path

*
v, Programmed path
path
\
\
\
\
\
Start point

Start point

NOTE When, after the G41 or G42 command has been assigned, the cancel G40 command is assigned
without the movement of the axes within the offset plane yet designated, cutter compensation will
not start up and the P152 alarm (no intersection pdnt) will result.
(Example) G41X_Y_; .... P152 (no intersection point)
G40;

-101 -
12. TOOL OFFSET FUNCTIONS
12.4 CUTTER COMPENSATION

(4) Operations in compensation mode


Compensation is valid both for positioning and for interpolation commands such as circular and
linear interpolation.
Even if the same compensation command (G41/G42) is assigned in the compensation mode, the
command will be irznored.
When 4 or more b~cks not accompanying movement are assigned continuously in the compensation
mode, over-cutting or under-cutting will result.
1 ) Machining an outside corner

Line ~ line (90° 50< 180°) Line - line (0° < @ < ~)

---- —--- -
I Tool nose center path
s
x, \ g Programmed path
\
\ Programmed path
\ \
\ \
\
———- -——. \
Point ofs Tool nose center path \
\
intersection
‘\

Line ~ arc (90° ~ @ < 180°) Line + arc (0° < @ < 90°)

a---.——-—— —— --

.“
Center of arc i
d.
Center of arc
/’

Center of arc

I

Y
Progra&red path ‘%
\ /
\
\ ie \
\
\
: /i \
\
Tool nose\\ ~ ‘-- ,’
center path “1 r / Tool nose \\\ r
.“’ center path S
s
Y< ,
Point of
intersection SW

- 102-
12. TOOL OFFSET FUN’IONS
12.4 CUTTER COMPENSATION

Programmed path ~ Promammed ~ath

---%
/ \
..’ s
..
.“‘“ Point of center path “~-... center path
...
intersection + ““”””””9
Center”of arc
s-Zi Center of arc

2 ) Machining an inside corner

Line - line (180” = @ ~ 270° Line - line (270° < @ <3590,

Programmed path ~ Programmed path

-- —.. —.+ -— -- ---


Tool nose center path
path
intersection

Line ~ arc (180° ~ @ ~ 270°)

Programmed path
Programmed
path

rool nose /“
“’HH :
xmter path ~ ~
//- t Pointof’ ~fl
~ inter-
b ---D
Cente; of arc

Line - arc (180° S @ S 270°) Arc ~ line (0 > 270°)

--.---------.* Center of arc


\
Programmed path
+ ~ Tool nose center path i

Tool nose

-103-
12. TOOL OFFSET FUNCTIONS
12.4 CUTTER COMPENSATION

Point of intersection 8 Center of arc


center
/
/ -.
/
t’
Programmed ~ “~
path
Cen;er Center of arc
of arc

Programmed path

3 ) When the arc end point is not on the arc


With a spiral arc command: the area from the arc start point to the end point is interpolated as
a sDiral arc.
With a normal arc command: if’the error after compensation is within the parameter value, it
is interpolated as a spiral arc.
A ~
Imagina~ circle
./” —-—”\ Tool’nose center path
“\. I
‘“~rogrammed path ~. I End point of arc

Center of arc

4 ) When the inside intersection point does not exist


In an instance such as that shown in the figure below, the intersection point of arcs A and B may
cease to exist due to the offset amount.
In such cases, program error “P152” appears, and the tool stops at the end point of the previous
block

Program error stop


Tool nose center path “
-.—— ——- 7——--, u ,
r
__— ——-.

Programmed path *

Line intersecting arcs A, B

-104-
12. TOOL OFFSET FUNC170NS
12.4 CUTTER COMPE.NSA TION

(5) Cutter compensation cancel


If either of the following conditions is met in the cutter compensation mode, the compensation will
be canceled. However, the movement command must be a mmmand which is not an arc command.
If the compensation is canceled by an arc command, program error “P151” results.
1 ) The G40 command has been executed.
2 ) The DO(Ioffset number has been executed.
The cancel mode is established once the compensation cancel command has been read into the offset
buffer, the 5-block pre-read process is suspended, and l-bk)ek pre-read applies instead.
(6) Cutter compensation cancel operation
1 ) Machining an inside corner

Line ~ line Arc e line

Programmed path
$3 e .—. —. —.—
r = compensation amount
-———— -.

3nd point End point


Center ~f arc

2 ) Machining an outside corner (obtuse angle) (Type A or ‘5 can be selected by parameter.)

Line - line (type A) Arc -D line.—(type A)

s -. Tool nose center path


—-— ---- s
= compensation amount / Tool nose cen-
/’ r
G40, ~
,/ Programmed path
/ /’
/ /

End point Start point Programmed path


Cen;er
of arc

Line + line (type B) Arc - line (type B)

Point of intersection Point of intersection


s _____ ---- s
Tool nose center path

G40,J’
/

End point End p6int Center O; arc Programmed path

- 105-
,:. ,.. .,, ,,

12. TOOL OFFSET FWV~ONS


12.4 CUTTER COMPENSATION

3 ) Machining an outside corner (obtuse angle) (Type A or B can be selected by parameter.)

Line - line (type A)


. Center
,f
~o arc
s .-. —— ———— —- #
, /’
Tool nose center path t Tool nose ~
r \\. ! centerpath
.
7 s . ~~-
Programmed path path
—.—. —

End point

End point

Line -+ line (type B)

. Center of
-— -- —.-— —-- ; arc
,
1
Tool nose ! Tool nose
~center path
10
Programmed path
,/
s

G 4 O..N

‘\\
End point
\

End ~int
12. TOOL OFFSET FUNCITONS
12.4 CUTTER COMPENSATION

12.4.3 Other commands and operations


(\.11 Inserting a corner arc
When tfie G39 command (corner arc) is assigned, the arc with the offset amount as its radius is
inserted without the intersection point being calculated at the workpiece comer.

Inserted arc, ~ -. Pointof intemection ,-’--1 Inserted ~c<- - -\


\ Programmed path
~mon~e~e~~~h.~ j ~.3,%
, r = compensationamount \ /r= gsatioo~’ a~
‘>+-” {’S :*) L___–+_*
’41
Tool nose \ ~ ,
Programmed path \
I \ . . ~’[
center path /’ ~ ~ ~
I
a) [ Point of I
@ 1 @ intersection i
1 I
@
(With G39’command) (No G39 command) (With G39 command) (No G39 command)

With outside compensation With inside compensation

Tool nose
center path N5 C28XOY0
;
N1
N2 G91GOIG42X20.
Y20.D1F1OO
;
path N3 G39X40,;

N6 N4 N4 G39Y40.;
N5 G39X-40.;
1‘ N6 Y-40. ;
N7
N7 C40X-20.Y20. ;
N8 !402;
J D 1 =5. 000
N1

(2) Changing/retaining the offset vectors


The offset vectors can be changed or retained during cutter compensation by the G38 command.
1 ) Retaining the vectors:
When G38 is assigned in a block with a movement command, the vectors of the previous block
are retained without the intersection point being calculated at the end point of that block.
G38 Xx Yy ;
This function can be used for pick feed.
2) Changing the vectors:
The direction of the new offset vectors can be specified with I, J and & while the offset amount
can be assigned by ~.
(They can be specified in the same block as the movement command.)
G38 Ii Jj Dd ; (1, J, K depend on the selected plane.)

-107-
12. TOOL OFFSET FUN~ONS
12.4 CUTTER COMPENSATION

4 is+ja
r~=
j

0“
Tool nose center path /#--

N 11
\ /
-!!/

NIIGIXX, 1:N12G28YYI
1;N13G38XX,I;N14G36XXI
,YY14:N15G38XX,
S1iJjDd*:N16G40Xx,‘Yy,,;

Vectors retained Vectors changed

( 3 ) Changing the offset direction during cutter compensation


The offset direction is determined by the cutter compensation commands (G41, G42) and the offset
amount sign.

Offset amount sign


+
G code
G41 Left-hand compensation Right-hand compensation
G42 Right-hand compensation Left-hand compensation
The offset direction can be changed by changing the compensation command in the compensation
mode without the compensation having to be first canceled.
However, no change is possible in the compensation start block and the following block.
Refer to the checkpoints for cutter compensation in Section 12.4.6 for the operations when the sign
is changed.

Line 4 line
\

If there is no point of
intersection when the
compensation direction
path is changed
G41 G41 G42

-108-
12. TOOL OFFSET FUNCHONS
12.4 CUTTER COMPENSA TIQN

\
Line + arc

G41 G42 G41G41 642


----- y
m I
I
\ / Programmed path
\ \
\
\ \
----
Tool nose center path
d

Arc + ~c

Tool nose center path

Center of arc
0 \
0
/

G41 G42
Programmed
path
G41

m
Center of arc
G41 G41 G42

Line return

G41
Tool nose center –-------–+
---.-—- ---- --
path G42
r
1
Programmed path ~

-109-
12. TOOL 0FFSETFUNC170NS
12.4 CUTTER COMPENSATION

Are exeeeding 3fXPdue to compensation method

In the cases below, it is possible for


the arc to exceed 360°.
a. Offset direetion selection based on
G41/G42
b. I, J, K assigned in G40

\ The tool nose center passes through


$ pat~

J$’.-J
1 an area where the arc is duplicated
Tool nose ,
center path , due to compensation. An uncut area
/’ will therefore result.

G41 ~1’
G42 “x+ /
--- /
Uncut section

- 110-
12. TOOL OFFIJETFUN~ONS
12.4 CUTTER COMPENSATION

(4) Command for eliminating offset vectors temporarily


When the following command is issued in the compensation mode, the offset vectors are temporarily
eliminated and a return is then made automatically to the compensation mode.
In this case, the compensation is not canceled, and the tool goes directly from the intersection point
vector to the point without vectors, or in other words to the programmed command point. When a
return is made to the compensation mode, it goes directly to-the intersection point. -
1) Reference point return command

s
s
*
0’ \ #
\
/
/ /’ \ 0
0
0

,0 \
/

Intermediate point

r-

(G41)
N5

1
N6
m s-l-d
lS5 G91 GO1 X60. Y30. ;
Temnorarilv no offset vectors at
hJ6 t228 X500 Y–40. ; +’
interamedia~e point
N7 X30, Y-60. ; (Reference point when there is no
intermediate point)
N8 X70, Y40. ;
t

2) G33 thread-cutting command


Cutter compensation does not apply to the G33 block.
( \

G33
*’
-- —.- —-—— ..-

I?rogrammed path
\ d
3) The offset vectors are cleared temporarily with the G53 command (basic machine coordinate
system selection).

The offset vectors are not changed by the coordinate system setting command (G92).

-111-
,,, .!

12. TOOL OFFSET FUNCHONS


12.4 CUTTER COMPENSATION

(5) Blocks without movement and M commands prohibiting pre-read


The following blocks are known as blocks without movement.

a. M03 ; ............................ ........ ..... ... M command


b. S12; .... ... .... .... ..... .... .... .... ..... ....... S command
c. T45 ; ... ........ ... ..... .... ..... ... ..... ..... ... T command
d. G04X500 ; . ............. ............ ......... Dwell
Machining prohibit No movement
e. G22X200. Y150. Z1OO ; .......”..” ~ea setting
f. G1OL1OPO1R5O ; ..... .. ..... ..... ........ . Offset amount setting
g. G92X600. Y400. 2500. ; ..... ........... Coordinate system setting

Movement but not on


h. (G17) 240. ,. .......... .... ........ ...... . offset plane
i. G90 ; .... .... .... .... ............................ G code only
j. G91X O ; .. .. .... ............. ...... .... ....... Zero movement amount ............ Zero movement
amount
MOO,MO1, M02 and M30 are treated as pre-read prohibit M commands.

11 When assiged at compensation start


Offset is performed perpendicularly at the next movement block.

N2

N1 X30. Y60. ;
N2 G41 D1O ;
‘*ock ‘lthout ‘ovement N1
N3 X2O, Y –5o. ;
N4 XW. Y –2o. :

When 4 or more blocks without movement follow in succession and there is no M command
prohibiting pre-readin~ the offset vectors will not be created.

N1 X30. Y60. ; N2, 3, 4, 5, 6


N2 G41 D1O ;
N3 G4 XIOOO;
N4 F 100; Block without movement
N5 S500 ;
N6 M3 ; \
N7 X20. Y–50. ; .
N8 X50. Y–20. ;

-112-
12. TOOL OFFSET FVNCTIONS
12.4 CUTTER COMP.ENSA TION

N2-N5
NI G41 X30. Y60. DIO ;
N2 G4 X1OOO;

1
N] , (Point of intersection)
N3 Floo;
Block Mthout movement
N4 S500 ;
N5 M3 ;
N6 X20. Y–50. :
IU7 X5O. Y –20. ;

2 ) When assigned in the compensation mode


When 4 or more blocks without movement follow in succession in the eomnensation mode and
there is no M command prohibiting pre-reading, the intersection point v~tors will be created
as usual.

1
N6 G91X1OO. Y200. ; N7 N8
N7 G04X P 1000; ..s----- Block without movement
N8 X200. ; . . . ..- ----
N6

Block N7 is
exeeuted here.

When 4 or more blocks without movement follow in succession and when there is an M
command prohibiting pre-reading, the offset veetors are created perpendicularly at the end
point of the previous block.

Nll
N 6 X1OO. Y200, ;
N7 G4 X1OOO;
N8 Floo; N6
N9 S500; Block without movement
N1O M4 ;
1
Nll X1OO. ;
In this case, cutting results.

-113-
,.

12. TOOL Ol?ESETFUNCTIOA?S


12.4 CUTTER COMPENSATION

3 ) When assigned together with compensation cancel


Only the o-ffset v&tors are cancel~d when a block without movement is assigned together with
the G40 command.

N6 X1OO.Y200. ;
N7 G40 GO4P1OOO;
N8 X1OO. Y50. ;

(6) When I, J, K are assigned in G40


1 ) When the last movement command block among the the 4 blocks before the G40 block is in the
G41 or G42 mode, it is considered to be assigned in the vector I, J, K direction from the end
point of the last movement command, and compensation is canceled after interpolation up to the
intersection point with the corresponding imaginary tool nose center path. There is no change
made in the offset direction.

Imaginary tool nose


center path ,0
•~ (I,j)
N1 (G41) G 1 X_;
Tool nose center path
N2G40XaYb I iJ j ;
G41
N1
Programmed path
( J
In this case, care is required since the intersection point must be determined even when the
command vector is incorrect, as in the figure below, regardless of the offset direction.

(a, b)

Tool nose center path When the I, J signs are


incorrect in the above
G41 program example
N1
Programmed path ,.O” r
-~
,.*
.* ./-

(i, fi ‘
/-
/“ -
Imaginary tool nose
center path

-114-
12. TOOL OFFSET FUNCTIONS
12.4 CUTTER COMPENSATION

When the size of the offset vectors increases in the extreme as a result of the intersection point
calculation, a vertical vector is created in the block before G40.
K \

--—. . . . .
G41
---..-.-
(i, j) r
—.—. —.— . —- —. —. —
Imaginary tool nose center path
L J
2) Care should be taken with the G40 command after an arc command since there is a danger of
duplicated cutting when the arc exceeds 360° due to the contents of 1, J, K.

0’ Uncut section
0

f~
/
I N1 (G4Z G91) G01X200. ;
\ N2 G02 J150. ;
Programmed * Ii
N3 G40 G1X150. Y-150. I –100. J1OO. ;
path
Tool nose
center path
N3
.-.
f”1
., J Corner movement
When a multiple number of offset vectors are created at the joins between movement command
blocks, the tool will move in a straight line between those vectors.
This action is called corner movement.
When the vectors do not coincide, the tool moves in order to turn the corner althouti this movement
is part and parcel of the join block. Consequently, operation in the single block mod> will execute the
previous block + corner movement as a single block and the remaining joining movement +
following block will be executed as a single block in the following operation.

#-
\
\ N2
N
\
Tool nose center pat; ~\
Center of arc
\\
This movement and
feed rate fall under
block N2.
L Stop point with single block

- 115-
,,, ,

12. TOOL OFIWETFUN~ONS


12.4 CUTTER COMPENSATION

12.4.4 G41/G42 commands and I, J, K assignment


The compensation direction can be intentionally changed by assigning the G41 or G42 command and
I, J, Kin the same block.
( 1 ) Command format
G17 (XY plane) G41/G42 X_Y_LJ_;
G18 (ZX plane) G41/G42 X_Z_LK_;
G19 (YZ plane) G41/G42 Y_Z_J_IL;
Assign a linear command (GOO or GO1) for the movement mode,
(2) I, J type vector (G17 XY plane selection)
The new I, J type vector (G17 plane) produced by this command is described in this section. (The
same will apply for & I on the G18 plane and J, K on the G19 plane.)
As shown in the following fiWre, the I, J type vector is such that the vector of the size equivalent to
the offset amount is made to serve as the offset vector perpendicularly to the direction assigned by I
and J without the calculation of the intersection point on the programmed path. The 1, J vector can
be assigned even at the start of compensation (G40 mode for block before) or during the
compen~ation mode (G41 or G42 for bl;ck before):
1 ) When I, J has been assigned at compensation start

t
NIICI (G40)
N130
NM $
Y N140 NIXJ *
N1OO G91 G41 X1OO. Y1OO. I 150. D1 ;

L —x
Nloo NIIO
N120
G04
GO1 F1OOO;
X1OOO;

N130 S500;
- Programmed path, N 140 M03 ;
Tool now center N150 X150. ;
path
$
4

When a movement command has not been assigned at compensation start

Y (GW

1- N2
x
N3

N1
N2
G41
G91
1150. D1 ;
5

X1OO. Y1OO, ;
N3 X150. ;
\
D1 Nl
I

-116-
12. TOOL OFFSET FUNCHONS
12.4 CUTTER COMPENSATION

2 ) When I, J has been assigned in G41 or G42 mode (G17 plane)

----- -
1
NIoo (G17 G41 G91)
NIL?)
N 100 G41 GOOX150. J 50. ,
Nllo G02 1150. ;
(N120)
Y N120 GOO X–150. ;

— Programmed path @ IJ type vector


Tool nose center path @ Intersection point calculation VP
vector
------ Path with intersection point calculation

(Reference)
@ G18 plane

\
(GM G41 G91)
N 100 G41 GOO Z 150.
N11O G02 K50. ;
NL20 GOO z – 150. ;
$

. G19 plane

1
(G19 G41 G91)
N1OO G41 GOOY150. K50. ;
N11O G@ J 50. ;
N120 GOO Y-150. ;
5

- 117-
12. TOOL 01?ESETFVNC170NS
12.4 CUTTER COMPENSATION

● When I, J has been assigned in a block without movement


>

[
N3 N4

N5
N1 G41 D1 GO1 F1OOO;
N2 G91 X1OO. Y1OO. ;
N3 G41 150. ;
N4 X150. ;
N5 G40 ;

L
(3) Offset vector direction
1 ) In G41 mode
The direction assigned by I, J is the direction rotated 90° counterclockwke, with the zero point
as seen from the positive direction of the Z axis (3rd axis).
(Example 1) With I 100. (Example 2) With I -100.
(– 100 01~ direction

Direction of offset vector

D -. (100, O) IJ direction ‘q
Direction of offset vector
2 ) In G42 mode
‘ The direction assigned by I, J is the direction rotated 90° rotated clockwise with the zero point
as seen from the positive direction of the Z axis (3rd axis).
(Example 1) With I 100. (Example 2) With I -100.
, . ~ (100, O)IJ direction Direction of offset vector
t-’

Di&ction of offset vector


(. 4 ). Offset modal selection
The G41/G42 modal can be selected at any time.

Y N1 G26 XOYO ;

I N2 G41 D1 F1OOO ;
Lx N3 GO1 G91 X1OO. Y1OO. ;
N4 G42 X1OO. 1100. J – 100.
N4
N3 D2 ;
N5 X1OO. Y–1OO. ;
N2
N5 N6 G40 ;
D1
\“
N7 M02 ;
%

-118-
12. TOOL OFFSET FUNCT!TONS
124 CUTTER COMl?ENSATION

(5) Offset amount of offset vector


The offset amount is determined by the offset number (modal) of the block with the IJ assignment.

(
<Example 1>

------ -----
D] (G41 D1 G91)
$
~ NIW
N1OO G41 X150. 150. ;
NI1O N11O X1OO. Y–1OO. ;
t- x
5

Vector (A) is the offset amount registered in offset number modal D1 in the N1OOblock.
f
<Example 2>
(G41 D1 G91)
D1 5
N200 G41 X150. 150. D2 ;
Y
N21O X1OO. Y -100. ;
N21O
\
L x

Vector (B) is the offset amount registered in offset number modal D2 in the N200 block.
(6) Checkpoints
1) Assign the I, J type vector in a linear mode (GO, Gl). A program error (P151: G2,3 CMP. ERR)
occurs if it is assigned in an arc mode at the start of compensation.
An IJ assignment in an offset mode or arc mode is equivalent to an arc center assignment.
2) When an IJ type vector has been assigned, it is not erased (interference avoidance) even when
interference occurs.
In this case, therefore, over-cutting may occur.

l-- x Cutting
N1 G26
N2 G42
N3 G91
XOYO
D1
X1OO. :
F1OOO :
:

N4 G42 XMO. Y1OO. 110. ;

N5 XMO, Y -100. ;
N6 G40 :
N7 M02 ;

- 119-
12. TOOL OFFSET FUNCITONS
12.4 CUTTER COMPENSATION

(7) Supplementary notes


1 ) The vectors differ for the G38LJ_(K_) command and G41/G42LJ_K_ command.

G38 G411G42

\ $
(G41) (G41)
$ {
G38 G91 X1OO. 150. J 50. ; G41 G91 X1OO. 150. J 50. ;
$ \
zx-
ample

-y:::..,,
(@ffsetxS”J)

Vector with size of offset perpendicularly to the


Vector with size of offset amount in IJ direction
U direction
2 ) Refer to the following table for the offset methods which can be applied depending on whether
or not the G41/G42 and I, J, (K) commands are used in combination.

G411G42 I, J, (K) Offset method


No No Intersection point calculation type of vector
No Yes Intersection point calculation type of vector
Yes No Intersection point calculation type of vector
I, J type of vector
Yes Yes
No insertion block

N3 @ N1 G91 GOI G41 X200.


D1 F1OOO;
N2 X–150. Y150. :
N3 G41 X300. 150. ;
N4 X–150. Y–150. ;
N5 G40 X–200. :
N2

Nl x No (A) insertion block with


N5 I, J type of vector offset

-120-
12. TOOL OFFSET FVN~ONS
12.4 CUTTER COMPENSATION

12.4.5 Interrupt during cutter compensation


( 1 ) MDI interrupt
Cutter compensation is valid in any automatic operation mode — whether tape, memory or WI
operation.
An interrupt based on MDI will give the result as in the figure below after block stop during tape or
memory operation.
1 ) Interrupt without movement (tool path does not change)

N1G41D1 i S (Stop position with


N2X–20. Y–50, ; MDI interrupt ‘- \ single block)
s H&l
\
N3G3 x -40. -n%niinl h43 ; /’ \
\
If \
\
\
Ii \%

/’ N2 N3
/ K
“J
2) Interrupt with movement
The offset vectors are automatically re-calculated at the movement block after interrupt.

With linear interrupt /


s
N1G41D1 ;
N2X–20. Y–50. : MDI interrupt
/’
N3G3 X–4O. Y40. Z =50. Y30. : 1
X-30. Y*. ; /’
/

K
-.

With arc interrupt


N1G41 D1 ;
MDI interrupt
N2X–20. Y–5o. ,
N3G3 X–40. Y40. 70. ; G2’ X-4O. Y-
+
LGI X-4. ;

// N 3\.
/ N2 v

- 121 -
12. TOOL OFFSET FUNCTIONS
12.4 CUTTER COMPENSATION

(2) Manual interrupt

1) Interrupt with manual absolute Tool


-----path after interrupt
*— --- --

~m
-1
switch OFF ,/ r f
The tool path is shifted by an
amount equivalent to the interrupt
amount.

\v
\ /,/
/’

F
.— -—- ~
2) Interrupt with manual absolute t 0
switch ON
In the incremental value mode, the . //
/
‘)
same operation results as when the
manual absolute switch is OFF.
In the absolute value mode, how-
ever, the tool returns to its original
\
/
k’””’; “/’ /’”
path at the end point of the block
following the interrupted block, as
shown in the figure. /’
\\ J
“\
\ h
i Interrupt

Interrupt ‘
\

-122-
12. TOOL 0.FFSETFUW7’HONS
12.4 CUTTER COMPENSATION

12.4.6 General checkpoints for cutter compensation


(1) Assigning the offset amounts
The offset amount is assigned by designating the offset number using a D code. Once a D code has
been designated, it will remain valid until a separate D code is subsequently commanded. Program
error “P170” occurs when designation is made by an H code.
Besides being used to designate the offset amounts for cutter compensation, the D codes are also
used to assign the offset amounts for tool position offset.
(2) Changing the offset amounts
Offset amounts are normally changed when a different tool has been selected in the cutter
compensation cancel mode. However, when an amount is changed in a compensation mode, the
vectors at the end point of the block are calculated using the offset amount designated in that block.
(3) Offset amount sign and tool nose center path
When the offset amount is given a minus (-) sign, the resulting shape is the same as when the G41
and G42 commands have all been replaced. Therefore, the machining of an outer wall will change to
the machining of an inner wall or vice versa.
One example of this is given in the figure below. Offset amounts are usually programmed with a plus
(+) sign. When the tool nose center path has been programmed as in (a), operation as in (b) will
result when the offset amount is given a minus (-) sign. Conversely, when the tool nose center path
has been programmed as in (b), operation as in (a) will result when the offset amount is given a minus
(-) sign. This therefore makes it possible to prepare a single tape for machining both male and female
shapes and also to set the tolerance for both to any value by selecting the appropriate offset amount.
(A circle is divided into two by type at compensation start and whti cancefing)

‘~ff@~O1nOseceiCaolnosecenterpat_
G41 offset amount (-)
or G42 offset amount (-) or G42 o~~d amount ( + )
(a)

,, “

-123-
12. TOOL OFFSET FUNCTIONS
12.4 CUTTER COMPENSATION

12.4.7 Changing the offset numbers


In principle, the offset numbers should not be changed in a compensation mode. If they are changed,
operation will be as follows.
When the offset number (offset amount) has been changed

G41 GO1 ..... .... .... ........ ......... Drl ;

Cz=o, 1, 2, 3
N101 GOa Xxl YY1 ;
N102 GOa Xx2 YY2 Dr2 ; “.””””””.
”..””...”--”Offset number change
N103 XX3 Yy3 ;

1) Line + line

Offset amount Offset amount


assigned by N101

)
Tool nose .“.
center path _ z
R- \
~~~ \{ 1

Tool nose center path rl

rl
Programmed path

r2

-124-
12. TOOL OFFSET FUNCITONS
12.4 CUTTER COMPEN’SA TION

2) Line - arc

~---- -.
Tool nose center path /--
/
0 r2
+%\ /
“\

N 101

- ..
Tool nose center path ‘~ Center of arc

Programmed

of arc

3)

Tool nose center path ~-’- ‘Q- <


\
Programmed path
N 101
/
/’
/
\
4’ \
Center of arc \
/
\
\ ,’
\
\ /’
v
Center of arc

------ rl
#/
0 rl
0
0
0
/

II
Tool nose center path’
Programmed path

4 Center of arc

-125-
,. .,,,

12. TOOL OFFSET FUNCTIONS


12.4 CUTTER COMPENSATION

12.4.8 Cutter compensation start and z-axis cutting


The usual method of Z-axis cutting consists in first applying cutter compensation (normally on the XY
plane) beforehand at a position distanced from the workpiece when cutting starts. Bear in mind the
following points for programming if the Z-axis operation is to be divided into two stage~ rapid traverse and
then cutting feed after the work is approached.
When the following has been programmed:
P
N1 (391 GOO G41 X 500. Y 500. D1 ;
N2 Slooo ;
N3 M3 ;
N4 Gol Z–3OO. F1 ;
N6 Y 100. F2 :

If programmed in this way, it is possible to read Up to the N6 block at N1 compensation start, determine
the relationship between N1 and N6 and proceed with compensation properly as shown in the above figure.
Next, when the N4 block in the above program has been divided into two:

N1 G91 Gt)O G41 X 500. Y 500. D1 ;


N2 Slooo ;
N3 M3 ;
N4 Z–250. ;
N5 Go1 Z–5O. F1 ;
N6 Y 100. F2 ;

It is not possible here to read as far as the N6 block at N1 compensation start since there are four blocks
(N2–N5) without a command on the XY plane.
Compensation is therefore based on the information in N1 block only, and the NC system cannot create
offset vectors at compensation start. Over-cutting therefore results, as shown in the above figure.

-126-
12. TOOL 01WSETFUNC170NS
124 CUTTER COMPENSATION

In cases like this, by taking the calculations performed inside the NC system into prior consideration, it is
possible to safeguard against over-cutting provided that, after the Z axis has descended, the command in
the same direction at the advance direction is already assigned immediately before the Z axis cutting.

N1 G91 600 G41 X 500. Y 400. D1 ;


N2 YIOO. Slooo ;
I
N3 M3 ; 1
N4 z -250. ;
<1-.
4
N5 GOI 2-50. F1 ; I
N6 Y 100. F2 ;

The same direction as the N6 advance direction is assigned in N2 so that compensation is performed
properly.

-127-
12. TOOL 01?llSETFVNC170NS
12.4 CUTTER COMPENSATION

12.4.9 Interference check


( 1 ) Outline
A tool, whose nose radius has been compensated under the cutter compensation function by the usual
2-block pre-readin~ may sometimes cut into the workpiece. This is known as interference, and
interference check is the function which prevents this from occurring.
There are three types of interference check, as indicated below, and each can be selected for use by

Function Parameter Operation


Interference check
Interference check alarm avoidance OFF Program error results before block causing
function Interference check invalid cut is executed, and operation stops.
OFF
Interference check
Interference check avoidance ON Tool path is changed so that workpiece is
avoidance function Interference check invalid not cut into.
OFF
Interference check invalid Cutting proceeds unchanged even when it
Interference check invalid
ON occurs. Use this for microscopic segment
function
(V series only) programs.
(Example)

(G41)
N1 G90 G1 X5O. Y–1OO. ; Outer
[ 7?
N2 X7O. Y–KKL ;
N3 X 12o. YO ;

%
\
Cutting with N2

\\\
\

1) With alarm function


The alarm occurs before N1 is executed and so, using the buffer correction function, N1 can be
chamzed as below and machining can be continued:
N1 C% G1 X20. Y–40. : “
2) With avoidance function ‘
The intersection point of N1 and N3 is calculated and the interference avoidance vectors are
created.
3) With interference check invalid function (V series only)
The tool passes while cutting the N1 and N3 line.

-128-
12. TOOL OFFSET FUNCIIONS
124 CUX!’ER CCMl?ENSA~ON

Examples of interference check


Vector (l)(4)’ check ~ No interference
J
Vector (2)(3)’ check - No interference
-1.
Vector (3)(2)’ check - Interference -+ Vectors (3)(2)’ deleted
L
Vectors (4)(l)’ deleted
As a result of the above processing, vectors (l), (2), (3)’ and (4)’ remain as the valid vectors and operation
is executed with the path connecting vectors (1), (2), (3)’ and (4)’ as the interference avoidance path.

- 129-
12. TOOL OFFSET FUNCHONS
12.4 CUTTER COMPENSATION

\
(2) Detailed description
Conditions regarded as interference
Interference is regarded as occurring when the ot%et calculated vectors, which have been created at
the point of contact with movement commands, intersect in a case where there are movement
commands in 3 bloclm among the 5 pre-read blocks.

w
\- , Tool nose center path
\ / Programmed path
ilr
y
N1 - N3
Vectors intersect here.

11n

When interference check is not possible


1 ) When it is not possible to pre-read movement commands for 3 blocks
(When there are 3 or more blocks without movement among the 5 pre-read blocks)
2 ) When interference occurs at the fourth or subsequent movement command block
Y
/’ ~ ~- Tool nose center path

Programmed path

////,,,,,,
NI
No interference check possible
N2

N3

L
Operation during interference avoidance
The following operation is undertaken when the interference avoidance function is available.

[
Tool nose qmter path

w v Programmed path
b
ft’\

N1 N3

N2 ‘

-130-
12. TOOL OFFSET FUNCllONS
12.4 CUTTER COMPENSATION

Operation during interference avoidance (continued)

Solid line vecton valid


Broken line vecto~ invalid
Tool ncoe center path when
interference is avoided

m“ho”t

Tool nose center path when


interference is avoided
Linear movement Tool nose center path without’
r interference check
#
& Programmed path
i!-
1
>/O=fl/f//fl//f1818. .-
Nl r

Avoidance

Tool nose center path

Programmed path (
/1
Whenall the intetierence
avoidancelinevectom )(
have been deleted,
new avoidance vectors
are created as shown
in the figureon 4)
the rij$htand interference
is avoided.
*-

b
Programmedpath

In the figure below, the groove is left uncut.


r
Interference

5!! ~’ r

- 131 -
12. TOOL OFFSET FUN~ONS
12.4 CUTTER COMPENSATION

(3) Interference check alarm


The interference check alarm occurs under the following condition~
When the interference check alarm function has been selected
1 ) When all the vectors at the end point of its own block have been deleted
When, as shown in the figure on the +
right, vectors 1 through 4 at the end f
1 ---- e.
point of the N1 block have all been I *-”4
deleted, program error “P153” re- N1 1.z - a---
sults prior to N1 execution. I
I

N2

When the interference check avoidance function has been selected


2 ) When there are valid vectors at the end point of the following block even when all the vectors
at the end point of its own block have been deleted

a. When, in the figure on the right,


the N2 interference check is con-
ducted, the N2 end point vectors
are all deleted but the N3 end
point vectors are regarded as
valid. Alarm stop
Program error “P153” now oc-
curs at the N1 end point.
N1

b. In a case such as that shown in


the figure on the right, the tool
will move in the reverse direc-
tion at N2.
Program error “P153” now oc-
curs prior to N1 execution.

-132-
12. TOOL OEFSETFUN~ONS
124 CUTTER COMPENSA#llON

3) When the avoidance vectors cannot be created


Even when, as in the figure on the
right, the conditions for creating
the avoidance vectors are met, it
may still be impossible to create
these vectors or the interference
vectors may interfere with N3.
As a result, program error “P153”
T’”amStop
NI
b
will occur at the N1 end point when
the vector intersecting angle is
more than 90°.
N9 II
““t !zT=

NI

h12

\
\

intersection

4) When the program advance direction and the advance direction after compensation are
reversed
In the following case, interference is still regarded as occurring even when there is actual~y no
interference.
When grooves with a bottom width, or parallel grooves, which are narrower than the tool nose
diameter are programmed

Programm

- 133-
12. TOOL OFFSET FUNCTIONS
12.5 3-DIMENSIONAL CUTTER COMPENSATION

12.5 3-DIMENSIONAL CUTTER COMPENSATION


Three-dimensional cutter compensation is a function which offsets the tool in a 3-dimensional space in
accordance with the 3-dimensional vectors.

12.5.1 Function

Tool

K) Surface normal vectors

Z(K)
A
radius

ector
I)
Y(J)

As shown in the figure above, the tool is moved by the tool center coordinates (x’, y’, z’) which have been
offset by cutter radius “r” from the programmed coordinates (x, y, z) in accordance with the surface normal
vector (I, J, K). Unlike 2-dimensional cutter compensation which creates the vectors at right angles to the
(I, J, K) direction, 3-dimensional cutter compensation creates the vectors in the (I, J, K) direction. (The
vectors are created at the end noint of the block.1
The axis components for the 3~dimensional vecto~s (offset) are as follows.

I
H~= r
tiI’ +J2 +Kz ●

J.
Hy= r
~12 +J’ +Kz “
K
Hz= r
/12 +Jz +Kz ●

Therefore, the tool center coordinates (x’, y’, z’) are expressed respectively as
X’=X+HX
y’=y+Hy
Z’=Z+HZ
However, (x, y, z) are the programmed coordinates.

NOTE 1: Three-dimensional offset vectors (Hx, Hy, Hz) are surface normal vectors with cutter radius “r”
and with the same direction as surface normal vectors (I, J, K).
NOTE 2 When parameter “P3D’ has been set to any value except zero, its value is used as the value of
ti12 + J2 + K2

- 134-
12. TOOL OH?SETFVNCITON$
12.5 3-DIMENSIONAL CUTTER COMPENSATION

12.5.2 Command method


( 1 ) G codes and fimctions
h
Parameter and function
G code
Offset amount + Offset amount - Offset number DOO
3-dimensional cutter cumpensa- ~ancel
G40 Cancel
tion cancel
Compensation in (I,J,K) clirec- Compensation in opposite direc- ~m=l
G41
tion tion to (I~,K)
Compensation in opposite direc- Compensation in (l~,K) direc- ~mwl
G42
tion to (I,J,K) tion

(2) Offset amounts


D is used to assign the offset number in which is registered the amount by which tool radius “r” is to
be offset.
Number of offset sets
Standard specifications: 40 sets (D1–D40)
Optional specifications 800 sets (D1–DSOO) (max) (See Section 12.1.5 for further details)
(3) Compensation space
The compensation space is determined by the axis address commands (X, Y, Z, U, V, W) in the
3-dimensional cutter compensation start block. When U, V and W have been assigned as the
additional axes of X, Y and Z, respectively, the X (Y, Z) axis takes precedence when the X and U axes
(Y and V or Z and W) are assigned simultaneously. Coordinate axes whose addresses have not been
assigned are treated as though the X, Y and Z axes had respectively been assigned.
Example G41 Xx~YY,ZzllilJjiKk~ : XYZ space
GM Yyt Ii~JjtKkt ; XYZ space
G41 Xx3 Vv?Zzs Iia Jja Kka ; XVZ space
G41 W, li,Jj,Kk, ; XYW space

(4) 3-dimensional cutter compensation start


The offset number and surface normal vector (I, J, K) are assigned for all three mes in the same block
as the 3-dimensional cutter compensation command G41 (or G42). If the vector (I, J, K) has not been
assigned for all three axes, the normal cutter compensation mode is established (it is handled as if it
had been assigned when the I, J, K command data is zero). A program error (P154) results when the
cutter compensation specification has not been provided.

G41(G42)XX, YY1 Zzj lit Jji Kk, Ddl ;


G41 (G42) : 3-dimensional cutter compensation command
x, Y, z : Axis movement commands for determining compensation space
1, J, K : Surface normal vectors for indicating offset direction
D : Offset number
The normal cutter compensation mode is established if the surface normal vector (1, J, K) has not
been assigned for the three axes. It is treated as if it had been assigned when the 1, J, K command
value is zero.
Start 3-dimensional cutter compensation in the GOOor GO1 mode.
A program error (P151) will result if it is started in the G02 or G03 mode.

-135-
,–. ,—,– —

12. TOOL OFFSET Functions


12.5 3-DIMENSIONAL CUTTER COMPENSATION

(Example 1) When movement commands are present

G41 Xx, Yy, Zz, Ii, Jj, Kkll)d, ;

3-dimensional
Tool nose center path compensation veetor

Programmed tool path


Start point

(Example 2) When movement commands are not present

,/
Tool nose center path ,‘
z ‘3-dimensional compensation vector
/
/
/
u’
Start point

(5) During 3-dimensioned cutter compensation


The movement commands and new surface normal veetor are assigned as follows,
%3 Yy~ Z% Ii~ Jj ~ Klc~;
(Example 1) When the movement and new normal vector commands are present

Old vector ,/’


=’p- \

-
//
Programmed tool path
Start point

- 136-
12. TOOL OIV’SETFUN~ONS
12.5 3-DIMENSIONAL CUTTER COMPENSATION

(Example 2) When the new normal vector commands are not present
The new vector is the same as the old vector.
f
xx, Yy4zz4;

Tool nose ~enter path

I
Old vector ~
“1 i’
/
Programmed tool path
Start point

{
(Example 3) With arc or helical cuttin~
The vector is the same as-the old vector.

G02 Xx3Yy~(Zz~) I~JjO ; I or J (K) denote the arc center


or
G02 ~Yy~(Zz~)RrO ; (R-specified arc)

Tool nose center path

Start point

NOTE The arc is shifted by the vector amount.

-137-
12. TOOL OFFSET FUNCITONS
12.5 3-DIMENSIONAL CUTTER COMPENSATION

(Example 4) When changing the offset amount


The offset number D is assigned in the same block as the 3-dimensional cutter compensation
command G41 (or G42). Change the offset amount in the GOOor GO1 mode. A uromam a-

error (P151) res’uhs if this is do~e in an arc mode.


T

G41 XX, >- Y, ZZOI iOJjijKk,Dd, ;


t
G41 XX IYY, ZZ, I i, Jjl Kkl Dd2;

I Old vector ,1-


/
7P-’ ‘1
\
~
Start point

(Example 5) When changing the offset direction


f
G41 Xx, Yy, Zz, Ii OJj,Kk~Dd, ;
i
G42 Xx, Yy, Zzl Iil Jjl Kkl:

Tool nose center path


/
Old vector ~ Programmed tool path
I

Start point

Change the offset direction in the GOOor GO1 mode.


A program error (P151) results if this is done in an arc mode.

- 138-
12. TOOL Ol?RSETFUNCTIONS
12.5 3-DIMENSIONAL CUTTER COMPENSATION

(6) Canceling 3-dimensional cutter compensation


Assign the commands below.
G40 Xx, Yy7 ZX7 ;
Cancel 3-dimensional cutter compensation in the 000 or GO1 mode.
A program error (P151) will result if it is started in the G02 or G03 mode.
(Example 1) When the movement commands are present

G40 XX7YY72Z7;

.P--H- \
Tool nose center path
Old vector ‘t
\

--, ----
Start point
Programmed tool path End point

\
(Example 2) When the movement commands are not present

I G40 ; (or DOO ;)

*----I’ I
Old vector ~ Tool nose center path

t!’
..-J;
---- Programmed tool path

12.5.3 Relationship with other functions


(1) Cutter compensation
The normal-cutter compensation mode is established when the surface normal vectors (I,J,K) are not
assigned for the three axes in the 3-dimensional cutter compensation start block.
(2) Tool length offset
Tool length offset is conducted for the coordinate values applying after 3-dimensional cutter
compensation.
(3) Tool position offset
Tool position offset is conducted for the coordinate values applying after 3-dimensional cutter
compensation.
(4) Program error (P155) results in a canned cycle.
(5) Scaling
Three-dimensional cutter compensation is performed for the coordinates after scaling.
(6) Zero point return (G27)
The offset amount is not canceled.

- 139-
12. TOOL OFFSET FUIWTIONS
12.5 3-DIMENSIONAL CUTTER COMPENSATION

12.5.4 Other items rilating to 3-dimensional cutter compensation


( 1 ) Offset numbers are selected by the D commands although these commands are valid only with the
G41 or G42 command.
The previous D command will apply if the D command is missing.
(2) Change the compensation mode, direction or amount in the GOOor GO1 mode. Any change made in
an arc mode will result in a program error (P151).
(3) It is not possible to switch to another space and conduct 3-dimensional cutter compensation while the
3-dimensional cutter compensation mode is established in a certain space. The mode must first be
Canceled (G40 or DOO) before any attempt is made to switch.
(Example)
G41 X_Y_Z_I _J_K_ ; Compensation starts in X, Y, Z space
$
G41 U_Y_Z_ I _J._K_ ; Compensation is performed in ~ Y, Z space,
and U axis moves as per the assigned value

(4) A program error (P170) results if the offset number D commands are beyond the D1 – D40 range
for the standard specifications or beyond the D1 — D800 range (maximum) for the optional
specifications.
(5) Use only the G40 or DOOcommand to cancel 3-dimensional cutter compensation.
It will not be canceled with the NC reset button or by external resetting.
( 6 ) A pro~am error (P35) results when the size (12+J2 + K’) of the vector assigned by I, J, K overflows.

.,
.,

,.

J.

-140-
12. TOOL OFFSET FUNCHONS
12.6 Pi? OGRAMMED CUTTER COMPENSATION INPUT {GlO)

12.6 FROGRAMMED CUTTER COMPENSATION INPUT (G1O]

12.6.1 Function and objective


( 1 ) Function and objective
The tool offset and work offset can be set or changd by the G1O command from the tape. In the
absolute value (G90) mode, the assigned offset amounts serve as the new amount~ in the incremental
value (G91) mode, however, the new offset amounts are equivalent to the assigned amounts plus the
current offset amount settings.
(2) Command format
1 ) Work offset input
Format P : 0 External workpiece
G90 G1O L 2 p_XP_~P_Zp_; 1 G54
‘G91 2 G55
NO’I’E Incremental values apply for the offset 3 G56
amounts in the G91 mode and these are
accumulated every time the program is 4 G57
run. To avoid this error, wherever possible 5 G58
assign G90 or G91 before G1O and exer-
cise caution. 6 G59
Any other number is
handled as P = 1.
An omission of the P
command is handled as the
~e~vt~~fset input currently
2 ) Tool offset input
@ With tool offset memory I
Format
G1O L1O P_R_ : P : Offset number
R : Offset amount

@ With tool offset memory 11


Format
G1O L1O P_R_ : Length-eompensated shape offset
G1O Lll P_R_ : Lm@h-compensated wear compensation
G1O L 12 P_R_ ; Radial shape offset
G1O L13 P_R_ ; Radial wear compensation

(3) Detailed description


1 ) Program error (P171) results if this command is input when these specifications are not
provided.
2 ) G1O is a unmodal command and is valid only in the assigned block.
3 ) G1O is not accompanied by movement and it should not be used together with any G command
except G21, G22, G54 — G59, G90 and G91.
4 ) If an illegal L number or offset number is commanded, program error (P172) or (P170) will
result, respectively.
Program error (P35) results when the offset amount exceeds the maximum programmable
dimension.
5 ) Decimal point input is valid for offset amounts.
6 ) The distance from the basic machine coordinate system zero point is assigaed as the offset
amount for both the external work and work coordinate systems.

-141-
12. TOOL ~OFFSET FUNCTIONS
12.6 PROGRAMMED CUTTER COMPENSATION INPUT (G1O)

7 ) A work coordinate system which has been updated by the work coordinate offset input follows
the previous modal (G54 – G59) or same block modal (G54 – G59).
8 ) L2 can be omitted with work offset input.
9 ) When the “programmable dimension x1O” parameter is ON, the work offset amount is
multiplied by 10 but the tool offset amount is not multiplied by 10.
(4) Examples of programs
1 ) Entering the offset amounts from tape

.....” ; G1oL1oP1OR–12345 ; G1OL1OPO5R98765 : G10L10p30R2468 : “.-..”

H1O= –12345 H05=98765 H30=2468

2 ) Updating the offset amounts


(Example 1) It is assumed that H1O has already been set to equal -1000.
N 1 G01G90G43Z –1OOOOOH1O
; “......”. (Z=–101OOO)
N2 G28ZO;
N3 G91G1OL1OP1OR–5OO ; ........ .. ............... .. (-500 is addedbecauseof the G91mode)
N4 G01G90G43Z –1OOOOOH1O
; “.......”....;. (Z=–1015OO)

(Example 2) It is assumed that H1O has already been set to equal -1000.
Main program
N 1 GOOX1OOOO()
; ............... a
N2 # 1=–1000;
N3 M98P1111L4 ;-.,b, , b~s bs, bt

Subprogram 01111
N 1 G01G91G43Z OH1OF1OO ; .“...””..””.C 1 , CZ . C3 , C4
GO1X1OOO; ..”...”.-... dl,d~,ds.dd
#1=#1–looo;
G90GloLloPloR# 1 ;
M99 ;

NOTE Final offset amount


H1O = -5000

- 142-
12. TOOL OFFSET FVNCITONS
126 PROGRAMME D CUTTER COMPENrSA7TONLNPUT@6’)

(Example 3) ‘I’he program in Example 2 ean also be written as follows.


Main program
N 1 GOOX1OOOOO
;
N 2 M98P1111L 4 ;

Subprogram
O1lllN 1
GOi G91G43Z O H1OF1OO;
N 2 GO1X1OOO;
N3 G1OL1OP1OR-1OOO;
N4 M99;
3 ) When updating work coordinate system offset amounts
It is assumed that the previous work coordinate system offset amounts are as follows.
x= –lo. 000 Y= – 10.000

N1OO GOO G90 G54 XO Y O;


N101 G90 GIO L2 P 1 X–15.000 Y-15.000:
N102 XO YO;

M02 ;

-x -20. –lo. 1

N 100
/
Ci54 coordinate
_ ~ before change
–lo.

G54 coordinate
_ ~ after change

I -Y ‘–20.

-Y
“Y

NOTE 1: Work position display change in N101


The G54 work position display data changes before and after any work coordinate change
initiated by G1O in N101.
X=o X=+5.000
+
Y=o Y=-I-5.000
- 143-
12. TOOL 0Fl+iETFUNC170NS
12.6 PROGRAMMED CUTTER COMPENSATION INPUT (G1OI

When setting work coordinate offset amounts in G54 – G59


.G9OG1OL2 P 1 X-lo.000 Y-lo.000 ;
.G9OG1OL2 P 2 X–20. 000 Y-20.000;
.G9OG1OL2 P 3X–30.000 Y–30.000 ;
.G9OG1OL2 P 4 X–40.000 Y–40.000 :
.G9OG1OL2 P 5 X–50. Ooo Y–50.000 ;
.G90f310L2 P 6 X–60.000 Y-60.000,
4 ) When using one work coordinate system as a multiple number of work coordinate systems
:.

#1 = –50. # 2 =10. ;
M98 P200 L 5 ;
Main program

M02 ;
[ %.
N1 G90 G54 G1O L2 PI X#l Y#l;
N2 GOO XO YO;
N3 x–5. F1OO;
Subprogram N4 XO Y–5. ;
0200 N5 YO;
N6 #l=#l+#2;
N7 M99;
\ .%
- -

-x –60. -5 O.–4O .–30. –20. –lO. M Basic machine


coordinate
% system zero point
G54* * W
-1o.

5th
G54”’ t- W pass: –20.

G54” w 4th pass


* . “–30.

G54’ w 3rd pass


3 --–40.

G54 W 2nd pass


* -“-50.
1st pass –Y
*

1 . .
( 5 ) Checxpomm
1 ) Even when the commands appears on the CRT, the contents of the offset numbers and variables
will not be updated until the commands are executed.
‘N1 G9OG1OL1OP1OR-1WI;
‘N2 G43Z–1OOOOH1O
;
N3 G OX-1OOOOY-1OOOO;
‘N4 G9OG1OL1OP
LOR–200 ; .’..-...”..’ The H1O offset amount is updated by executing the N4 block

- 144-
13. PROGRAM SUPPORT FUN~OIW
13.1 CANNED CYCLES

13. PRO(3W SUPPORT mJT’’JmoNs

13.1 CANNED CYCLES

13.1.1 Standard canned cycles (G80 — G 89, G73, G74, G76)


( 1 ) Function and objective
These functions are used for predetermined sequences of machining operations such as positioning,
drilling and tapping which are specified in a block. The various sequences available using these
functions are listed in the table below.
By editing the standard canned cycle subprograms, the user can change the canned cycle sequences
and also enter and edit the canned cycle programs himself. Reference should be made to the attached
listing of the canned cycle subprograms in the Operating Instructions for further details on the
standard canned cycles.
The canned cycle functions provided with this particular MELDAS NC unit are listed below.

Operation at hole bottom Return operation


Application
Dwell Spindle (+ Z direction)
— . . Cancel
Drilling,
I G81
I Cutting feed — — Rapid traverse s Ot dril,in
cycle
Drilling,

I G82 Cutting feed Yes . Rapid traverse counter boring


cycle

I G83 Intermittent feed .


I —
I Rapid traverse
Deep hole driI1ing
cvcle
Yes Reverse rotation Cutting feed Tap cycle
— — Cutting feed Boring cycle
Yes stop Rapid traverse Boring cycle

m
— Fomard rotation Cutting feed Back boring cycle
Yes stop Rapid traverse Boring cycle
Yes — Cutting feed Boring cycle
Yes — Rapid traverse Step eycle
Yes Forward rotation Cutting feed Reverse tap cycle
Spindle stop
I G76
I
Cutting feed —
at oriented point
Rapid traverse Pine boring cycle

A canned cycle mode is canceled when the G80 or any G command in the 01 group (GOO,GOI, G02, G03,
G2.1, G3.1-or G33) is assigned. The various data will also be cleared simultaneously to zero.

-145-
13. PROGRAM SUPPORT FUiVC170NS
13.1 CANNED CYCLES

(2) Command format

G8A
(7A)X Y Z R Q p F —, L *R_ :

L Hole L Hole positioning data L Hole machining <m~e~~f <~~~onO~


“machining mode data repetitions selection
. . .
As indicated above. the command format is divided into the hole machining mode. hole rmsitionin~
data, hole machining data, the number of repetitions, and synchronous sel~ction. “ “ -
( 3 ) Detailed description
1) The hole machining modes are the canned cycle modes for drilling, counter boring, tapping and
boring. The hole positioning data is for the positioning of the X and Y axes. The hole machining
data is the actual machining data. Synchronous selection is the command for selecting
synchronous or asynchronous tapping with G84 or G74 tapping. The hole positioning data and
the number of repetitions are unmodal; the hole machining data and synchronous selection are
modal.
2) If the MOOor MO1 command is assigned in a canned cycle block or during the canned cycle
mode, the canned cycle will be ignored, and the MOOor MO1 command will be output after
positioning. The canned cycle will be executed when X, Y, Z or R is assigned.
3) There are 7 actual operations which are each described in turn below.
● Operation 1: This denotes the X and Y axis positioning, and positioning is done by GOO.The
tool moves in accordance with the present G code in the 01 group when the
“canned cycle modal” parameter on the parameter screen is ON (highlighted).
● Operation 2: This action takes place at the positioned (initial) point. When the G87 command
is assigned, the M19 command is output from the NC system to the machine. This
M command is executed and when the finish (FIN) signal arrives at the NC unit,
the next action starts. If the single block stop switch is in the ON position, the block
stop mode is established upon completion of the positioning.

Operation 2

Operation 3
R point

Operation 5

● Operation 3: The tool is positioned as far as the R point by rapid traverse.


● Operation 4 Hole machining is conducted by cutting feed.
● Operation 5: This action takes place at the hole position and it differs according to the canned
cycle mode. Possible actions include spindle stop (M05), spindle reverse rotation
(M04), spindle forward rotation (M03), dwell and tool shift.
o Operation 6: The tool is retracted as far as the R point, and depending on the canned cycle
mode, it will be retracted at the cutting feed or rapid traverse rate.
● Operation 1 The tool is returned as far as the initial point at the rapid traverse rate.
Whether action 6 or 7 is to be regarded as the completion of the canned cycle can be selected
by the G commands below.
G98: Initial level return
G99: R point level return

-146-
13. PROGRAM SUPPORT FUNCITONS
13.1 CANNED CYCLES

These G commands are modal. Once, for instance, G98 is assigned, it will remain valid until the G99
command is assigned. The G98 mode is established in the initialized state when the NC system is
ready to operate.
The hole machining data is ignored if the X, Y, Z or R command is not present.
This function is used primarily in combination with the special canned cycles.
4 ) Canned cycle addresses and meaning

5 ) Difference between absolute and incremental commands

Absolute value system Incremental value system

R point R point

-147-
13. PROGRAM SUPPORT FVNCHONS
13.1 CANNED CYCLES

(4) Positioning planes and drilling axes


The basic control elements of the positioning plane and drilling axis are contained in the canned
cycles. The positioning plane is determined by the G17, G18 or G19 plane selection command, and
the drilling axis is the axis (X, Y or Z or axis parallel to any of these axes) which is perpendicular to
the above selected plane.

Plane selection Positioning plane Drilling axis


G17 (X—Y) xp-Yp Zp
G18 (z-x) Zp-xp Yp
G19 (Y-Z) Yp-zp Xp

Xp, Yp and Zp denote the basic axes X, Y and Z or the parallel axes of these basic axes.
Any axis except the drilling axis can be assigned for the positioning.
The drilling axis is determined by the axis address of the drilling axis commanded in the same block
as G81 — G89, G73, G74 or G76. The basic axis serves as the drilling axis if the axis address is not
designated.
(Example 1) When G17 (X—Y plane) has been selected and the W axis has been made the axis
parallel to the Z axis
G81 .... Z_; Z axis is made the drilling axis.
G81 .... W_; W axis is made the drilling axis.
G81 .... ; (no Z or W) Z axis is made the drilling axis.

NOTE L The Z axis can be fixed as the drilling axis by parameter setting.
NOTE 2 The drilling axis should be selected in the canned cycle cancel mode.
In the following descriptions of the operations in the various canned cycle modes, the positioning
plane is assumed to be the XY plane and the drilling axis is assumed to be the Z axis.
It should be noted that all command values are incremental, XY is the positioning plane and that the
Z axis is the drilling axis.
(5) Canned cycles and unidirectional positioning (G60)
Using canned cycles and the unidirectional positioning (G60) command in combination enables a tool
to be positioned with a high degree of precision at the drilling point without any backlash error.

%
G91 G60 G81 X1(L YiO. R-5. 2-10. F300 L 2 ;
G60 Xlo, Ylo. L 2 ;

7 ,-
060 shift amount (axis parameter)
.x .

The function that enables the G60 command


to be valid for the second and subsequent posi-
tioning operations when this is repeatedly as-
signed may or may not be available? Depend-
ing on the name of the system version.
‘T I T-l

-148-
13. PROGRAM SUPPORT FUNCHONS
13.1 c~D CYCLES

a ) G81 (drilling, spot drilling)


Program
G81 Xx, Yyl Zzl Rr, Ff, ;

@
@ Go Xx, Yy,
@ GoZr,
@ GIZZI Ff,
@ G98mode Go Z- (z, +r,]
G99mode GO Z-Zt

The stop position during single block operation applies upon completion of the (1), (2) and (4)
commands.
b) G82 (drilling, counterboring)
Program
G82 XX, YY1 Zzl Rr, Ff, Ppl :

Where P is the dwell assignment

@ Go Xx, Yy,
@ GO!3r,
@ GIZZ, Ff,
@ G4P p , (dwell)
@ G98mode GOZ-(z, +r,
G99rnode G02–z I,

‘Ilh:Il:d- during single block operation applies upon completion of the (l), (2) and (5)
.

-149-
13. PROGRAM SVPPORTFUN~ONS
13.1 CANNED CYCLES

c ) G83 (deep hole drilling cycle)


Program
G83 Xx, YY1 Zz,
Rrl Qql Ffl ;
Q : were Q is the cut amount for each pass, which is always assigned as an incremental

ql

ql m

ql

@ Go Xx, Yy,
@ GOZr,
@ GIZq, Ff,
@ Go Z-q,
@ GOZ (q, -m)
@ GIZ(q, +m)Ff,
m GO Z–2*q,
@ GoZ (Z”q, –m)
@ GIZ(q, +m)Ff,
@ GO Z–3mct,
:
:
i G98mode GO Z- (z, +rl)
G99mode GO Z-Z,
Using the G83 command, the tool can be switched from rapid traverse to cutting feed in front
of “m” mm from the oosition machined immediately before for the second and subsequent
passes. When the tool ~eaches the hole bottom, it will ~eturn in accordance with theG980;G99
mode.
The value of “m” depends on the parameter setting. Proceed with programming so that ql> m.
The stop position during single block operation applies upon completion of the (l), (2) and (n)
commands.

- 150-
13. PROGRAM SUPPORT FUN~ONS
13.1 CANNED CYCLES

d ) G84 [tapping cycle)


Program
G84 Xx] YYI ;21 Rrl Ffl Ppl, Rr~ ;

@ Go Xx, Yy,

@ GIZZ, Ff,
@

@ M 4 (spindlereverserotatiin
@ Gl z-z, Ff,

@ M3 (spindleforwardrotation
Q@ $ $ G98rnode G02-rl
83 @
co m [ G99 mode
83 No movement

The synchronous tap mode applies when “rz” is 1; the asynchronous tap mode applies when “rz” is
o.
Override is canceled while G84 is being executed and the override is automatically set to 100%.
Dry run is also ignored. When the feed hold button is pressed while G84 is being executed, the tool
will not stop with sequences (3) to (6) but will stop immediately upon completion of (6). It will stop
immediately with sequence (l), (2) and (9) rapid traverse.
The stop position during single block operation applies upon completion of the (l), (2) and (9)
commands.
The “in-tapping” NC output signal is output while GM is modal.
The M3, M4, M5 and S codes are not output in the G84 synchronous tapping modal.
e ) G85 (boring)
Program
G35 XX, YY] Zzl Rri Ffi :

@Go Xx, Yy,


@ GOZrl
@ GIZZ, Ff,
@ GI Z-Z, Ff,
G98mode GO Z-r~
@
[ G99 mode
No movement

The stop position during single block operation applies upon completion of the (l), (2) and (4) or (5)
commands.

-151-
13. PROGRAM SUPPORT FUNCZ70NS
13.1 CANNED CYCLES

f) G86 (boring)
Program
G86 xx, Yy, Zz, Rr, Ff, Ppl ;

@
A @ GO XYC, Yyl

rl @ GOZrj
@
@ @ Glzzl Ff,
\ f
Q G4Pp1
@ M 5 (spindle stop)
@ z,
G98mode GOZ– (z, +r,
1
@,
@@*+ I G99 mode Go Z–Z,
~a
m m @ M 3 (spindle forward rotation)
33

The stop position during single block operation applies upon completion of the (1), (2) and (7) commands.

g ) G87 (back boring)


Program
G87 XXI Yyl Zzl Rri Iql Jqz Ff, ;
NOTE Take care with the ZI and rl assignment.
(The z, and r, signs are reversed.) There is no R point return.

@ GO xx, Yy,
@ M19 (spindle orient)

~~~xq’(yq’) ~~~!~~~~~~hift
@ rl @ M 3(spindle forward rotatiom
@@ @ G1 Zz, Ff,
@ M19 (spindle orient)
@
@ GO Xq, (Y’,) (shift)
@ Z1 G98modeG0Z– (r, +z,~
@
& [ G99modeGo
(!9Q Z- (r, +z,
@ Go X-q,(Y–q,) (shift)
43 M 3 (spindle forwardrotatiom

-152-
13. PROGRAM SUPPORT FUNCTIONS
13.1 CANNED CYCLES

The stop position during single block operation applies upon completion of the (l), (4), (6) and (11)
commands.
This command can be used to perform high-precision boring without leaving scratches or marks on
the machining surface.
(The tool is positioned as far as the hole bottom and is retracted (returned) after cutting in the shifted
state in the reverse direction to the tool nose.)
The shift amount is assigned as follows by addresses I, J and K

Tool used for Tool before


cutting cutting
Tool nose / .
> 1 and J with G17
Spindle orient
pchsition ~ ~ K and I with G18
J and K with G19

‘ ‘Shiftamount

The shift amount is exeeuted by linear interpolation and the feed rate accords with the F command.
I, J and K should be assigned with incremental values in the same block as the hole positioning data.
I, J and K are treated as medals during canned cycles.
NOTE When the parameter fiing ~hedrilling-axis as the Z axis has been set, the shift amount can
also be assigned by address Q and not by I and J. In a case like this, the shift direction is
set by parameter to +X, -X, + Y or -Y. The sign of the Q value is ignored and treated
as plus.
The Q value is modal during a canned cycle and care should be taken since it is also used
as the G83, G73 and G76 cut amount.

- 153-
,.,

13. PROGRAM SVPPORTNNCITONS


13.1 CANNED CYCLES

h ) G88 (boring)
Program
GM XXI Yy, Zzl Rr, Ff] PPI ;

@ Go Xx, Yy,
@ GOZr,
@ GIZZ, Ff,
@ G4Pp,
Q M5 (spindle stop)

@ Autom~ic start switch ON


G98mode GO Z–(z, +r, )
@
[ G99 mode GO Z–Z,
@ M 3 (spindle forward rotation)

The stop position during single block operation applies upon completion of the (l), (2), (6) and (9)
commands.
i ) G89 (boring)
Program
G89 Xx, Yy, Zz, Rr, Ff, PPI :
f 9

@ Go Xx, Yy,
@ GOZr,
@ GIZZ, Ff,
Q
@ G4 PP,
@ GIZ– Z, Ff,
G98mode Go Z–r,
@+f
aa @
m a G99 mode
I No movement
33

\
The stop position during single block operation applies upon completion of the (l), (2) and (5) or (6)
commands.

- 154-
13. PROGRAM SUPPORT FUNCITONS
13.1 CANNED CYCLES

j ) G73 (step cycle)


Program
G73 Xx, Yy, ZZl Qql Rrl Ffi PP1 ;

@ (.

@ Go Xx, Yy,
@ G(i Zrt
Q GIZq, Ff,
@ G4Pp,
@ GO Z-m
@ GIZ(ql+m) Ff,
.
:

~ G98mode Go Z- (z, +r,)


G99 mode Go Z–Z,

Using the G73 command, the tool can be returned by rapid traverse by an amount equivalent to “m” mm
and then switched to cutting feed for the seeond and subsequent passes. The value of return “m” depends
on the parameter setting.
The stop position during single block operation applies upon completion of the (1), (2) and(n) commands.

-155-
13. PROGRAM SUPPORT FUNCTIONS
13.1 CANNED CYCLES

k) G74 (reverse tapping cycle)


Program
G74 Xx, YY1 Zzl Rr, Pp,, Rr~ ;

@) Go Xx, Yy,
@ GOZr,
@ GIZZ, Ff,
@ G4 Pp,
@ M 3 (spindleforwardrotation)
@ GIZ– Z, Ff,
@I G4Pp,
@ M 4 (spindlereverserotation)
G98mode GO Z–r,
@@ * 4
i 3 @
m ul I G99 mode No movement
8 8

When “rz” is 1, the synchronous tapping mode is established; when it is zero, the asynchronous
tapping mode is established.
berrfie is canceled while G74 is being executed and the override is automatically set to 100%.
Dry run is also ignored. When the feed hold button is pressed while G74 is being executed, the tool
will not stop immediately with sequences (3) to (6) but will stop upon completion of (6). It will stop
immediately with sequence (l), (2) and (9) rapid traverse.
The stop position during single block operation applies upon completion of the (l), (2) and (9)
commands.
The “in-tapping” NC output signal is output while G74 and GM are modal.
The M3, M4, M5 and S codes are not output while the G74 synchronous tapping command is modal.

-156-
13. PROGRAM SUPPORT FUNC770NS
13.1 CANNED CYCLES

! ) G76 (fine boring)


E%ojjmu
G76 XXI YYi ZZI Rrl lql Jq2 FfI ;

X,, y,al @ GO XX, Yy,

@ @ GO Zr,
@ Cl “Zz, Ff,
(Q M19 (spindle orient)
@ GI Xq, (Yq,)Ff, (shift)
@
G98mode GO Z-(zl+ r,)
@
@
[ G99mode GO Z-z,
~ GO X–q, (Y–q,) (shift)
@@$+ ~ M3 (spindl~ forward rotation)

88
gm
08

The stop position during single block operation applies upon completion of the (1), (2), (7)
commands.
This command can be used to perform high-precision boring without leaving scratches or marks on
the machining surface.
(After cutting the tool is retracted (returned) as shifted in the reverse direction to the tool nose.)

Tnnl
.““.
m.~d for
-“.
Tool after
cutting 1. cutting The shift amount is assigned as follows by
addresses I, J and K.
I and J with G17
Tool nose%//2 K and I with G18
J and K with G19
Spindle The shift amount is executed by linear interpola-
orient p
position -! b. tion and the feed rate accords with the F com-
\ ,sflj mand.

% Shif~ hole -

1, J and K should be assigned with incremental values in the same block as the hole positioning data.
1, J and K are treated as modak during canned cycles.
NOTE When the parameter fiing the drilling axis as the Z axis has been set, the shift amount can
also be assigned by address Q and not by I and J. In a case like this, the shift direction is
set by parameter to +X, -X, + Y or –Y. The sign of the Q value is ignored and treated
as plus.
The Q value is modal during a canned cycle and care should be taken since it is also used
as the G83, G87 and G73 cut amount.

- 157-
13. PROGRAM SUPPORT FUNCTIONS
13.1 CANNED CYCLES

Checkpoints for using canned cycles


1) When a canned cycle command is assigned, the spindle must be rotated in the prescribed
direction beforehand by either one of the miscellaneous functions (M3 or M4).
In the case of the G87 (back boring) command, however, the spindle rotation command is
included in the canned cycle and so only the rotational speed command need be assigned in
advance.
2) If the basic axis, additional axis or R data is in the block during a canned cycle mode, hole
drilling will proceed; if the data is not contained in the block, no drilling will be performed.
However, even when the X-axis data is present, hole drilling will not proceed if the dwell (G04)
time command is assigned.
3) The hole machining data (Q, P, I, J, K) should be assigned in the block (which contains the basic
axis, additional axis or R data) for the hole drilling operation.
4) In addition to G80, a canned cycle will be canceled by the GOO-G03 and G33 commands. The
programming is as follows when such a command is assigned in the same block as the canned
cycle:
(If “m” = GOO-G03 or G33 and “n” = canned cycle code:)
Gm G n X_Y_Z_R_Q_P_L_F_;
ExecutedIgnored Exeeuted Ignored Stored

Gn Gm X_Y_Z_R_Q_P_L_F_;
Ignored Executed Ignored Stored
In the case of the G02 and G03 commands, R is treated as the arc radius.
5) When a miscellaneous function is assigned in the same block as the canned cycle command, the
M code and MF are output at the first positioning operation. A move is made to the next
operation by the finish (FIN) signal.
When the speed has been assigned, the above control is exercised for the first pass only.
6) When another control axis (for instance, rotary or additional axis) is assigned in the same block
as the canned cycle control axis, the other control axis moves first and then the canned cycle is
executed.
7) An instance where repetition number L has not been assigned is treated as L1. When LO is
assigned in the same block as the canned cycle G code, the hole machining data will be stored
but drilling will not result.
(Example)
G73x_Y_z_R_Q_P_F_L o_ ;
Recuted Codeswithaddressonlyare stored

8) A modal command assigned in a canned cycle program when a canned cycle is executed is valid
only in the canned cycle subprogram. It has no effect on the medals of the program which has
called the canned cycle.
9) It is not possible to call any other subprogram from a canned cycle subprogram.
10) The decimal points in the movement commands of a canned cycle subprogram are ignored.
11) When repetition number L is 2 or more in the incremental mode, positioning is also
incremented with each pass.
(Example) G91G81X1O.Z–5O.R–2O.F1OO.L3 ;

“—l 7\ f- Y.

-158-
13. PROGRAM SUPPORT FUNC170NS
13.1 CANNED CYCLES

13.1.2 Initial point and R point level return (G98, G99)


( 1 ) Function and objective
It is possible to select whether the return level in the last sequence of the canned cycle is to be the
reference point level or initial peint level.
(2) Command format
G98: Initial level return
G99: R point level return
(.,3 ‘J Detailed description
The following (able shows the relationship between the G98/G99 mode and the repetition number
designation.

No. of G98
hilling [when power is switched on, when
?asaes &ample of program cancelled by M@ M30 or when G99
reset button is pressed]

G81XIO0. YIOO.
he pass
mly Z -50. R25. F1OOO;
~-.--,,,,r
txeeuted ~f,,,,:

R point level return results.


Initial level return results.

G81X1OO.Y 100.
2 or Z -50. R25. L5F1ooo :
more
passes
executed

:1!3!-11.
‘-[\lrl\ 1st pass 2nd pass Last pass
~~ -
1st pass 2nd pa&s Last pass
Initial level return results in all eases.

( 4 ) Example of program
(Example 1) G82 ~ ~~ ~1 ~o~i~ ~~illed
Holeinmachining
G82 modedata is stored only (no exeeution)
1 “ ....
The number of canned cycle repetitions is assigned by address L. The canned cycle will be executed
once with the L1 or no L assignment. The assignment range is 1 through 9999,
When LO is assigned, the hole machining data is stored only.
G8A (7A) Xxl Yyl Zzl Rrl Ppl Qql Ffl Lll;

-159-
13. PROGRAM SUPPORT FUNC170NS
13.1 CANNED CYCLES

Depending on the absolute (G90) and incremental (G91) value modes, the approach to the data changes,
as shown in the following diagrams.

J------? z-axis
Q-----

3
I

5
[R absolute R
R point I
R point value zero
4 ~ point
Y
II 1’
I ,1 z
I
!

Absolute value mode (G90) Incremental value mode (G91)


Assign signed command values for X, Y and Z. R denotes the coordinate value from the zero point in the
absolute value mode and so a sign must be provided. However, signs are ignored with incremental values
and treated as the same sign as for Z.
With the G87 command, the signs are considered to be reversed.
The hole machining data is retained with canned cycles as indicated by the following example. This data is
canceled when the G80 or any G command in the 01 group (GOO, GO1, G02, G03, G2.1, G3.1 or G33)
arrives.
(Example 2)
Nool G81 X?il YY1 Zzl Rrl Ff, ;
NO02 G81 ; .................. ... ................................... .Canned cycle sequence is selected only
Positioningpoint is changedand cannedcycleis
NO03 X XZ YYZ ; ‘.......”.”””.”..-..”””---””-”. ”””.mem@”J-mem@-J
NO04 hf22 ; .----""...,. """."-----""."....-.. "."."""".-.-""-"...... Only M22 is executed
NO05 G04 Xx3 ., ............................. ............... Only dwell is executed
NO06 G92 Xxt ?’Y4 : ................................. Only coordinate system setting is executed
NO07 G28 (G30) Z O ; ....... ............................... Onlyreference(zero)point return is executed
NO08 ,. .................................. ........................... ..... No operation
NO09 G99 Z Z2 Rr~ Ff, LO ; ............ Hole machining data is stored only
Positioningpoint k,changedand Referencepoint
L 15 ; ..... ........................ return
NOlO Xx5 YYS canned~cle is executedIs times

Positioning point is changed and canned cycle is


NO1l G98 xx, Yya 226 R r 6 ; ..--. -”- executed
First, W axis is executed in accordance with 01 group
N012 Wwl ; --.-.. ).-.. o.o.o.------... ---------. ---. -..` ------ modal before NOO1and then canned cycle is executed

13.1.3 Work coordinate setting in canned cycle mode


In the work coordinate system the tool moves to the assigned axis.
The Z axis is valid from the Z-axis movement or R-point positioning upon completion of the positioning.

NOTE The Z address and R must be re-programmed even if they are the same value when the work
coordinates are changed.
(Example) GM XX, Yy, Zz] ;
G81 Xx, YY~ ZZ2 Rr~ ;
:
:
:
G55 Xx, YY, Zz, R r 2 : ‘----- Z and R must be re-programmed even if
they are the same as the previous time.
xx, YY4 ;
Xxs YYS ;
:
:
:

-160-
13. PROGN SUPPORT FUN~ONS
13.2 SPECIAL CANNED CYCLES (G34, G35, G36, G37.1)

13.2 SPECIAL CANNED CYCLES (G34, G35, G36, G37.1]


The special canned cycles are used in combination with the standard canned cycles.
Before using the special canned cycles, the hole machining data is stored by programming the canned cycle
sequence selection G command and hole machining data. (If there is no positioning dat% the canned cycle
is not executed and only the data is stored.)
Even after the special canned cycle has been executed, the standard canned cycle is retained until it is
canceled.
When a special canned cycle is assigned in a mode which is not a canned cycle mode, only the positioning
operation is performed and no holes are drilled.
( 1 ) Bolt hole circle (G34)

G34Xxt Yy,lr JdK n;


x* Y-””” Bolt hole circle center position; affected by G9WG91.
I ..... ..... . Circle radius “r”; unit is based on input setting unit and supplied as a positive
number.
J -..”””.””-- Angle d at initial drilling point; counterclockwise direction is taken to be positive.
(The decimal point denotes the degree position; O.OO1°applies as the unit for a
number without a decimal point.)
K ““””..””*”””.Number“n” of holes to be drilled. Any number from 1 to 9999 can be assigned;
O cannot be assi ed. Positioning is positive in the counterclockwise direction and
negative in the cYockwise direction. When zero has been assigned, alarm P221
(zero special canned cycle holes) results.

The circumference, with radius R and centered on the coordinates assigned by X and Y, is divided into “n”
divisions starting at the point where angle 9 is formed with the X axis and “n” number of holes are drilled
at “n.” The drilling data of the G81 or other standard canned cycle is retained for the hole drilling operation
at each hole position.
The GOO mode always applies for movement between hole positions. The data is not retained upon
completion of the G34 command.
(Example)
When input setting unit is 0.001 mm

NOOI G91 :
NO02 G81 Z –10000 R5000 L O F200 ;
N(N3 G90 G34 X200000 Y1OOOOO1100000 J 20000 K 6 ;
NO04 G80 ; .... ......... ..... (G81 cancel)
NO05 G90 G O X500000 YIOOOOO; Xl+m-kill
k *‘ n = 6 holes

W
.
T r
Yl=lmllm I =Ioomm

(k&Q, loomui)
/ +’‘“
Position prior to G34 GO command in NO05
execution block

As shown in the example, the tool position applying upon completion of the G34 command is above the
final hole. When it moves to the next position, the command is assigned as an incremental value so that
there is no need to calculate the coordinates. It is therefore more convenient to use the absolute value
mode.

- 161 -
13. PROGRAM SUPPORT FUNC170NS
13.2 SPECIAL CANNED CYCLES (G34, G35, G36, G37.1)

(2) Line at angle (G35)

G35XX, Yy, IdJ6 Kn;


x* Y“””””Start point coordinate assignment; affected by G90/G91.
“ Distance “d”; unit is based on input setting unit and when “d” is negative, drilling
I .... ........
proceeds in the symmetrical direction of the point centered on the start point.

. .... ....... Angle 4; counterclockwise direction is taken to be positive. (The decimal point
J
denotes the degree position; O.OO1°applies as the unit for a number without a
decimal point.)
Number “n” of holes including the start point. Any number from 1 to 9999 can be
K ....... ... .. assigned

“n” number of holes are drilled at distance “d” in the direction forming angle 9 with the X axis, with the
position assigned by X and Y serving as the start point. The drilling data (hole machining mode and hole
machining data) must be retained first since the hole drilling operation at each hole position is dependent
upon the standard canned cycle. The GOOmode always applies for movement between hole positions. The
data is not retained upon completion of the G35 Cornm;;d.
(Example) T
/
I When input setting unit is 0.001 mm
I
G91 ;
G81 Z–1OOOO R5000 L O F1OO : d ==lGUmn
G35 X200000 Y1OOOOOI 100000
J 30000 K 5 ; f

y l=lmm

Position =..–.
nrior to
-–- ~ x 1”1200mm

G35 execution F

NOTE 1: Program error P221 results when the K command is KO is when it is absent.
NOTE 2 The-last 4 digits are valid when the value of K is more than 4 digits.
NOTE 3 Any address except G, L, N, X, Y, I, J, ~ M, S, T or B programmed in the same block as the
G35 command will be ignored.
(Example) G35 Xxl Yyl Iil Jj, Kk, Hh, ;
~ored
NOTE 4 Any G command in group Oassigned subsequently in the same block as the G35 command takes
precedence.
(Example) G35 G28 Xxl Yyl Iil Jjl Kk, ;
G35 ~~ored and G28 Xxl Yyl is executed.
NOTE S When a G22 or G23 command is programmed in the same block as the G35 command, it will
be ignored and the G35 command will be executed.
NOTE 6: If a G72—G89 command is assigned in the same block as the G35 command, the canned cycle
will be ignored and the G35 command will be executed.

-162-
13. PROGRAM SUPPORT FUNCITONS
13.2 SPECIAL CAMV’ED CYCLES (G34, G35, G36, G37.1)

(3) &C (G36)

G36Xx, Yy,lr JOP A6Kn;


x, Y“”””’”Circle center coordinates; affected by G90/G91.
I ...... .... .. Circleradius“r”; unit is basedon inputsettingunit and suppliedas a positivenumber.
J . ... ........ Angle d at initial drilling point; counterclocbvk,e direction is taken to be positive.
(The decimal point denotes the degree position; O.OO1°applies as the unit for a
number without a decimal point.)
P ......... ... Angle distance Ad; counterclockwise when positive and clockwise when negative,
(The decimal point is the degree position. When a decimal point is not used, the
unit is O.(M)l”.)
K ““o”””*..***
Number “n” of holes to be drilled. Any number from 1 to 9999 can be assigned,

“n” number of holes are drilled at angle distance Ad starting at the point where angle Ois formed with the
X axis along a circumference with radius %“ and centered on the coordinates assigned by X and Y. AS with
the bolt hole circle canned cycle, the drilling data must be retained beforehand since the hole drilling
operation at each hole position depends on the standard canned cycle.
The GOO mode always applies for movement between hole positions. The data is not retained upon
completion of the G36 command.

(Example) When input setting unit is 0.001 mm

NOO1 G91 :
NO02 G81 Z -10000 R5000 F 100 ;
NO03 G36 X300000 Y1OOOOO
? 300000J 10000
P 15000 K 6 ;
Position prior to G36 execu-
tion
\~ Y1=lwrm -

(4) Grid (G37.1)

G37.1 Xx, Yy, IAx Pnx JAY Kny:


x, Y“””””” Start point coordinate assignment; affected by G90/G91.
I .. .... .... .. X-axis interval Ax; unit is based on input setting unit; ~sitive direction intervals
as seen from start point when Ax is positive and negatwe direction when it is neg-
fi~gber “nx” of holes to be drilled in X-axis direction. Any number from 1 to
P ............ 9999 can be assigned.
J . .........-. Y-axis interval A;; unit is based on input setting uni~ ~sitive direction intervals
as seen from start point when Ay is positive and negatwe direction when it is neg-
ative.
K . .... .... ... Number “ny” of holes to be drilled in Y-axis direction. Any number from 1 to
9999 can be assigned.
The holes are drilled at points on the “ax” grid at intervals & parallel to the X axis, with the position
assigned by X and Y as the start point. The hole drilling data (hole machining mode and hole machining
data) must be retained beforehand since the hole drilling operation at each hole position depends on the
standard canned cycle. The GOOmode always applies for movement between hole positions. The data is not
retained upon completion of the G37.1 command.

- 163-
13. PROGRAM SUPPORT FUNC?TONS
13.2 SPECIAL CANNED CYCLES (G34, G35, G36, G37.1)

(Example)
When input setting unit is 0.001 mm 1
......
G91 ;
G“81 Z -10000 R5000 F 20 ; ------ 2

G37. 1 X300000Y – 100000 150000P 10 r~


.-. -.. . ..
+ ny = 8 holes
.11000OOK8 ; Position prior to G37 , , ,4
execution ,:, :
:: .
1:
, ;’ ,9
/ :
L -. -...
YI-IOOMUI Ay=
lll!lmm
‘“- ------- x 1

v
AX.=~krn
K
x ,=Wm n x = 10 holes

NOTE 1: Promun error P221 results when the P or K command is PO or KO is when it is absent. The last
4 d~its are valid when the value of P or K is more than 4 digits.
NOTE 2 Any address except G, L, N, ~ Y, I, P, J, ~ F, M, S or B programmed in the same block as the
G37.1 command will be ignored.
(Example) G37.1 Xxl Yyl Iil Ppl Jjl Kkl Qql ;
~ Ignored
NOTE 3 Any G command in group O assigned subsequently in the same block as the G37.1 command
takes precedence.
NOTE k When a G22 or G23 command is programmed in the same block as the G37.1 command, it will
be ignored and the G37.1 command will be executed.
NOTE 5: If a G72 — G89 command is assigned in the same block as the G37.1 command, the canned cycle
will be ignored and the G37.1 command will be executed.

- 164-
13. PROGRAM SUPPORT FUNCTIONS
13.3 SUBPROGRAM CONTROL (M98, M99)

13.3 SUBPROGRAM CONTROL @f98, M99)


( 1 ) Function and objective
Fixed sequences or repeatedly used parameters can be stored in the memory as subprograms which
can then be called from the main program when required.
M98 serves to call subprograms and M99 serves to return oneration from the subnroizram to the main
program. Furthermore;, i~is possible to call other subprogr~ms from particular ;ub~rograms and the
nesting depth can include as many as 8 levels.

Main program Subprogram Subprogram Subprogram Subprogram

FKFkFu: (Levll 1)
~
(Level 2)
Nesting depth
(Level 3) (Level 8)

The table below shows the functions which can be executed by adding and combining the tape storing
and editing functions, subprogram control functions and canned cycle functions.

Case 1 Case 2 Case 3 Case 4


1. Tape storing and editing Yes Yes Yes No
2. Subprogram control No Yes Yes No
3. Canned cycles No No Yes Yes
Function
1. Memory operation o 0 0 x
2. Tape editing (main memory) o 0 Q x
3. Subprogram caIl x o 0 x
4. Subprogram variable assignment (Note 2) x o 0 x
5. Subprogram nesting level call (Note 3) x o 0 x
6. Canned cycles x x o x
7. Canned cycle subprogram editing x x o x

~~~ k “0” denotes a function which can be used and “~’ a finction which cannot be used.
NOTE 2 Variables cannot be transferred with the M98 command but variable commands in subprograms
can be used provided that the variable command option is available.
NOT’E % A maximum of 8 nesting levels form the nesting depth.

- 165-
13. PROGRAM SUPPORT FUW170NS
13.3 SUBPROGRAM CONTROL {M98. M99J

(2) Command format


Subprogram cdl

M98 P H L
TTZ; Number of subprogram repetitions (LI if omitted)
~ Sequence number in subprogram to be called (head block if omitted)
Program number of subprogram to be called (own program if omitted)
P can only be omitted during memory operation and MDI operation.

Return to main pro~am from subprogram

M99 P .
~‘ Sequence number of return destination (returned to block following
block to be called if omitted)
(3) Preparing and entering subprograms
Subprograms have the same format as machining programs for normal memory operation except that
the subprogram completion instruction M99 (P_); is entered as an independent block at the last
block. If it is removed, the format is the same as that for ordinary memory operation machining
programs.

OAAAAAAAA ; Program number as subprogram number


,...........................
........................... ‘1
;:
:
:
: Main body of subprogram
.
#........................... I
M99 ; Subprogram return mmmand
Entry completion code (% with 1S0 code and EOR with EIA code)
% (E OR) I
The above program is entered by editing operations at the setting and display unit. For further details, refer
to the section on program editing in the Control Instructions.
Only those subprograms numbers ranging from 1 through 99999999 assigned by the optional specifications
can be used. When there are no program numbers on the tape, they are entered as the setting number for
“program input.” Up to 8 nesting levels can be used for calling programs from subprograms, and program
error “P230” results if this number is exceeded.
No distinction between main programs and subprograms is made since they are entered in the sequence in
which they were read. This means that main programs and subprograms should not be given the same
numbers. (If they are, error “E1l” appears during entry.)
Example of entry
:
00000 :
........................ :
1
: Subprogram A
:

M99 ;
%
;
OAAAA ;
...... .................. ; Subprogram B
:
: I
M99 :
% J

-166-
13. PRaMAM suF!PcluTmJNmONs
13.3 SUBPROGRAM CONTROL (M9$, M99)

Olmrn ;
... .... ............ .....
.
:.
: 1
:.
: Subprogram C

M99 ;
% >
Main programs can be entered during memory, tape, MDI or BTR operation but subprograms
must be entered in the memory.
Besides the M98 command, subprogram nesting is subject to the following commands:
G65: Macro call
G66: Modal Cd
G66.1: Modal call
G code call
Miscellanems function call (M, S, T, etc.)
Macro interrupt
MDI interrupt
Automatic tool length measurement
Multi-stage skip function
Subprogram nesting is not subject to the following commands which can be called even beyond
the 8th nesting level.
Canned cycles

-167-
13. PROGRAM SUPPORT FUNCTIONS
13.3 SUBPROGRAM CONTROL (M98, M99)

( 4 ) Subprogram execution
M98: Subprogram call command
M99: Subprogram return command
Command format

M98 P P1 H h, L 1, ;
Subprogram number Sequence number No. of repetitions

Where P = Subprogram number to be called by the numerical value of pl with up to 8 digits


H = Any sequence number within the subprogram to be called by the numerical value of hl
with up to 5 digits
L = Number of repetitions from 1 to 9999 with numerical value of 11up to 4 digits; if L is
omitted, the function is executed once; with ~, there is no execution.
For instance,
M98 P1 L3 ; is equivalent to the following
M98 PI ;
M98 P1 ;
M98 P1 ;
(Example 1) When there are 3 subprogram calls (known as 3 nesting levels)

Main program Subprogram 1 Subprogram 2 Subprogram 3 ‘

M96P1 ;

~ j“ ‘> ,.,[’” > .\\” > ●

M02: MS; M99; M99;

Sequence of execution:@ + @ + @ -b @ - + @- + (j) -

For nesting, the M98 and M99 commands should always be paired off on a 1:1 basis (l)’ for (l), (2)’
for (2), etc.
Modal information can be rewritten according to the execution sequence without distinction between
main programs and subprograms. This means that after calling a subprogram, care should be taken
with the modal data status when programming.

-168-
13. PROGRAM SUPPORT FUNC?70NS
13.3 SUBPROGRAM ICONTR OL (M98, M99]

(Example 2) M98H_ ; M99P. ; assign the sequence numbers in a program with a call instruction.

With M98H.; With M99P_;

M93H3 ;

~)
N3_;

) b M99P1(!0 :
-M99:

J
:Example. 3) Main program M98 P.
01 ;
:
:
: Subprogram 1
:.
M99 ;
%
02 ;
:.
N200 ; Subprogram 2
:.
M99 ;
%
03 ;
:.

N200 ; Subprogram 3
:.

M99 ;
%
NOTE k When the 02 N200 block is searched with the memory search function, the modal data from 02
through N200 is updated.
NOTE 2 The same sequence number can be used with different subprograms.
NOTE % When the subprogram is to be repeatedly used, it will be repeatedly executed for 11 times
provided that M98 Ppl Lll ; is programmed.
( 5 ) Other cautions
1) Program error P232 results when the assigned program number (P) is not located.
2) Single block stop does not occur with M98P_; M99;. If any address except O, N, P, L or H is
used, single block stop can be executed. (With X1OO.M98 P1OO;, operation branches to 0100
after X1OO.is executed.)
3) When M99P ; is assigned by the main program, operation returns to the head. (This is same for
MIX.)
4) Operation can branch from tape or BTR operation to a subprogram by M98P_ ; but the
sequence number of the return destination cannot be assigned with M99P_;. (“P_” is ignored.)
5) Bear in mind that the search operation will take time when the sequence number is assigned by
M99P_ ;.

- 169-
13. PROG~ SUPPORT FTliWTIONS
13.4 VARIABLE COMMANDS (#n]

13.4 VARIABLE COMMANDS (#n)


(1) Function and objective
Programming can be endowed with flexibility and general-purpose capabilities by designating
variables, instead of giving direct numerical values to particular addresses in a program, and by
assigning the values of those variables as required when executing a program.
(2) Command format
#AAA= oooooooo or #AAA= [formula]
(3) Detailed description
a. Variable expressions Example
1) #m ... m: value composed of O— 9. : #loo
2) #[~ ... E one of the following in the formula : #[-#120]
Numerical value m :123
Variable : #543
Formula Operator Formula : #no+ #119
- (minus) formula : -#120
[formula] : [#119]
Function [formula] : SIN [#110]

NOTE 1: The 4 standard operators are +, –, * and/.


NOTE 2 Functions cannot be used unless the user macro specifications are available.
NOTE 3: Error P241 results when a variable number is negative.
NOTE 4 Use proper variable expressions such as the ones shown in the figure below, taking care to avoid
unnecessarily confusing or ambiguous expressions.

Example of confusing/ambiguousexpression Example of proper expression Remarks


[#6]/2 Same as #6/2
#6/2
# [6/2] Same as #3
#--5 #[- [-5]]
#- [#l] # [-#l]
b. Types of variables
The following table gives the types of variables.

Type of
No. Function Remarks
variable
100-149,500-549 Can be used in common throughout Type A 100 sets
Common
100-199,500-599 main, sub and macro programs. Type B: 200 sets
variable
10P199, 50W699 me C 300 sets
Can be used for local variables in User macro specifica-
Local variable 1—33 (See *1)
macro programs. tions required
System Application is f~ed by system. User macro specifica-
1ooo-
variable tions required
Canned cycle ~_32 Local variables in canned cycle pro- Canned cycle specifica-
variable gram tions required

NOTE 1: All common variables are retained even when the power is switched off. (See *2)
*1: Number of variables may be 1 — 32 depending on the system version. (1 — 33 for V series)
*2: Depending on the system version, it is possible to set a common variable to by power-off or resetting
in accordance with the parameter set. (This can be done with the V series.)

-170-
13. PROGRAM SUPPORT FUNCHONS
13.4 VARIABLE COMMANDS (#n)

c. Variable quotations
Variables can be used for till addresses except O, N and / (slash).
1 ) When the variable value is used directly
x#l .... Value of #l is used as the X value.
2 ) When the complement of the variable value is used
X—#2 .... Value with the #2 sign changed is used as the X value.
3 ) When defining variable~
#3 = #5 ,... Variable #3 uses the equivalent variable #5.
#1 = 1000 .... Variable #1 uses the equivalent value 1000 (which is treated as 1000.).
4 ) When defining the variable arithmetic formulae:
#1 = #3 + #2 -100 .... The value of the arithmetic result of #3 + #2 -100 is used as the
#l value.
x [#l + #3 + 1000] .... The value of the arithmetic result of #1 + #3 + 1000. is used as the
X value.

IW3TE 1: A. variable cannot be defined in the same block as an address. It must be defined in a separate
block
Incorrect Correct
x#l=#3+loo; + #l=#3+loo;
x#l;
NOTE 2 Up to five sets of square parentheses [ ] maybe used.
#543 = -[[[[[#120] /2 + 15.] *3 – #100.] /#520+ #125+ #128] *#130 + #132]
IWITE % There are no restrictions on the number of characters and number of variables for variable
definition.
NOTE 4 The variable values should be within a range from O to *99999999.
If this range is exceeded, the arithmetic calculations may not be conducted properly.
NOTE S Variable definition is valid from the following commands.
#1= 100 ‘9 ................................................................... #l= 100, valid from next command
#l=200#2=#l+200” Y...................... #1= 200, #2= 400, valid from next command
#3=#l+300 ,“ ..........................................................#3= 500, valid from next command
IWM’E t% Variable quotations are always regarded as having a decimal point at the end.
When #lOil = 10, then X#100 ; is treated as XIO.

-171 -
13. PROGRAM SUPPORT FUNCTIONS
13.5 PATTERN ROTA TION {M98)

13.5 PATTERN ROTATION (M!?$]


( 1 ) Function and objective
The pattern assigned by a subprogram can be rotated for machining by calling a subprogram and
using center coordinate commands I, J, K and word L.
(2) Command format
M98 P_ H_ I_ J_ (K_) L_; (G17 mode I, J; G18 mode: ~ I; G19 mode: J, K)
M9& Subprogram call M mode
P Program number of subprogram called
H Sequence number of subprogram called
1, J, K Incremental values of pattern rotation center coordinates (incremental values from start
point)
h Number of subprogram repetitions (when L is less than 1, this is not regarded as pattern rotation)
(3) Detailed description
1 ) Using the commands in the above format, the subprogram is executed and, by means of the
M99 subprogram return command, the angle composed of the start point, center and end point
is made to serve as the pattern rotation information upon completion of the subprogram
executed once, and the subprogram command is rotated. The rotational angle is added with
every completion if the number of repetitions is two or more. This means that, based on the
center coordinates, the pattern assigned by the subprogram can be rotated and positioned for
the assigned number of times only.
2 ) Coordinate rotation is executed at a rotational angle of 0° for the first subprogram which is
called under subprogram call, and the tool traces the assigned path. All the blocks in the
subprogram are rotated.
3 ) When the start and end points of the subprogram do not lie on the same circumference of the
circle with the pattern rotation center, interpolation follows with the subprogram end point
assigned as the start point and the end point of the first block of the movement command in the
rotated subprogram as the end point.

Broken line When start and end


oints on same circum-
i’
ference
Solid line When start and end points
not on same circumfer-
ence

4 ), Usirw absolute and incremental values together


It is fissible to use absolute and incremen~al values together in a pattern rotation subprogram.
If the basic pattern is programmed with absolute values in the absolute mode, operation can be
executed by the commands which remain unchanged for the second and subsequent times.
5 ) Subprogr~ control
Subprogram nesting is possible even during pattern rotation. However, a single pattern rotation
is completed by the M99 command of the nesting level for the pattern rotation subprogram call.

NOTE 1: Pattern rotation is conducted on the work coordinate system and so the system can be shifted by
the G92, G52 and G54 – G59 (work coordinate system shift) commands.

-172-
13. PROGRAM SUPPORT FUNC170NS
13.5 PATTERN R CITATION (.98)

NOTE 2 Pattern rotation is conducted on the work coordinate ~stem and so the functions on the
machine workpiece system (such as zero point return and uni-direction positioning) do not
rotate.
NOTE 3 Program error P251 results with pattern rotation Commmds assigned during pattern rotation.
r’wrE 4 It is not possible to assign pattern rotation and programmed coordinate rotation at the same
time. Program error P252 will result in this case.
(4) Example of program
(Example 1) Gear cutting Machining for one tooth is programmed with a subprogram and the
number of teeth is specified when calling the subprogram.

G92XOYO: 1

I
G90GOOX50000: Mainprogram
M98P 7 L 38 I -50000 ; Start point positioning and pattern rotation
call for gear cutting
GOOXOYO;
M02 ; J
07;
G03X5435BY190J50000F 100 ; 1
X54135Y4927 I –54354J –190 ;
Subprogram (07)
X4981OY435814353J -49810 ; Basic shape data of gear
1
X49240Y8682 I –49810 J –4358 ;
M99 ;
% I

-173-
13. PROGRAM SUPPORT FUNCHONS
13.5 PATTERN ROTA TION (M98)

..

.. ..
x
ii
>
0 o 0 o

x z x x x

“Z
2
/
\x

.O-eaea-f

- 174-
13. PROGRAM SUPPORT FUNG!TONS
13.5 PATTERN ROTA TTON (M98)

(Example 3) Use of canned eycle~ Machining data only with positioning data for a canned cycle is
programmed with a subprogram, and if the canned cycle hole machining data is stored
and exeeuted when the subprogram called, the positioning of the subprogram can be
rotated and utilized for such purposes as the machining of bolt hole circles.

o)

G92XOYOZO;
G91X50000 ;
G90G81Z –IOOOOR–50000F100 LO
M98P 101 I –50000L 8 ;
GOOXOYO
M02 ;
;
‘iJ Main program
Hole machining data storage and subprogram
call

% .

0101 ;
Subprogram (0101)
X35355 Y35355 ; Positioning data (absolute values)
M99 ;
% /

- 175-
13. PROGRAM SUPPORT FUNCTIONS
13.5 PATTERN ROTA TION (i&f98)

(Example 4) Application with canned cycle: Application for arc machining

v -5

G90G82X20000Z –20000R –5000P lOOF200 ;

1
Main program
M98P1021–i J–j L5 ; Start point positioning, hole
M02 ; machming pattern rotation
call
%

0102 ;
xx
M99 ;
%
YY ;

1 Subprogram (0102)
F’osltioning data

-176-
13. PROGRAM SUPPORT FUNCHOIW
13.6 COORDINATE ROTA TION

13.6 CO ORDINATE ROTATION


There are two ~es of coordinate rotation, depending on the proposed application. Programmed
coordinate rotation can be assigned even during a parameter coordinate rotation cammand.
1 ) Programmed coordinate rotation: The machining shape itself is rotated on the workpiece
(the work coordinate system is rotated).
2 ) Parameter coordinate rotation: The whole machining program is rotated in line with the
workpiece gradient (the basic machine coordinate system is
rotated).

Imcal coordinate system

-x __— —-.
–Y — — _.— — -——
———- ———- ——— .——
Basic machine coordinate system

Detail of programmed coordinate rotation

yls -1
\I

\
\

Xp
+
Coordinate
ystem zem point
rotation center)

J
Programm[ coordinate path
Ap*Bp4Cp4Dp-+Ep+Fp -+Ap
Machine coordinate path after coordinate rotation
A.maBmeCmaDm~Em~ Fm~Am

- 177-
13. PROGRAM SUPPORT FUNC770NS
13.6 COORDINATE ROTA TION

( 1 ) Relationship with other functions and checkpoints


1 ) The coordinate rotation function is valid only in the tape, memory and MDI automatic
operation modes. It is not valid in the manual inching rapid traverse and handle modes. The
reference (zero) point return function is not valid in either the automatic or manual mode.

NOTE 1: There is no rotation with creep feed during uni-direction positioning even in automatic
operation.
NOTE 2 When these modes have interrupted (coordinate rotation axis) an automatic operation mode
with the manual absolute switch at the ON position, do not allow subsequent absolute value
commands to be issued during automatic operation.
NOTE 3 Coordinate rotation applies to the intermediate point in reference point return.
( 2 ) Processing sequence in programmed coordinate rotation
1 ) Offset processing is computed last of all. In other words, the programmed coordinate rotation
is processed first, and then cutter compensation, tool length offset or tool pition offset is
conducted.
2 ) The coordinate rotation function has precedence over the mirror image function. Therefore,
when both functions have been specified, mirror image processing is conducted after coordinate
rotation processing.
3 ) The cancel mode is established when the M02, M30 or MOO (only when reset function is
provided) is assigned during programmed coordinate rotation. It is also established when a
reset signal has been input.
4 ) The present position display indicates the movements after coordinate rotation. Therefore,
when coordinate rotation is processed for a simultaneous single axis command, the display will
indicate a simultaneous 2-axis operation.
(3) Coordinate rotation amount setting and display (parameter coordinate rotation)
1 ) The coordinate rotation amounts are set and indicated by the coordinate rotation settings on the
parameter page of the setting and display unit. (Reference should be made to the operation of
the setting and display unit for further details on the operational procedures.)
2 ) The coordinate rotation amount settings are valid only in the block stop mode.
3 ) Coordinate rotation is not executed when the plane valid for the coordinate rotation has not
been set.
4 ) The movements applying after coordinate rotation are indicated except on the present position
display screen 2. Consequently, the simultaneous 2-axis display appears when coordinate
rotation is processed for simultaneous l-axis commands.

-178-
13. PROGRAM SUPPORT FUNC170NS
13.6 COORDINATE ROTA TION

13.6.1 Programmed coordinate rotation (G68, G69)


( 1 ) Command format

Gn G68 a_!l_R_;
Where n = Plane selection codw 17, 18 or 19
~, B : Coordinate values of rotation center:
these assign the two axes corresponding to the plane selected among X, Y and Z

R : Rotational angle:
+ for counterclockwise direction,
The –360.000” to 360.000° range is assigned in O.OO1°units.
This data is modal and will not change until a new angle command is assigned.

G69; (coordinate rotation cancel): This maybe assigned in the same block as other commands
even in an independent block.
The angle of rotation is set to zero when canceled.
(2) Detailed description
1) There is no need to assign the plane selection (G17, G18, G19) in the G68 block it will be valid
even if it has been assigned previously.
2) If the coordinate rotation coordinates (u, E) are omitted, the position with the G68 command
serves as the rotation center.
3) The coordinate rotation coordinates (a, p) and rotation angle (R) may be absolute or
incremental values, depending on whether the G90 or G91 command is used.
4) Coordinate rotation commands during coordinate rotation are processed as changes in the
center coordinates and rotation angle.

‘1

-179-
.,, ,: ”,,. .,,

13. PROGRAM SUPPORT FUNCTIONS


13.6 COORDINATE ROTA TION

5 ) The programmed coordinate rotation function is a function on the work coordinate system and
so the rotated coordinate system is characterized by the relationship shown in the figure below.

f Local coordinate system


1
1
I
t
I
I
iLn R
-- ---- -----
: k
I
I (a=/3=0)
1
~Work coordinate system
1

-~*;-----------
M
Basic machine coordinate system

6 ) Programmed coordinate rotation cannot be executed at the same time as pattern rotation.
Program error P2S2 results for pattern rotation commands assigned during coordinate rotation
and vice versa.
7 ) Program error Pill results when a plane selection code is assigned in the coordinate rotation
mode.
8 ) Program error P260 results when coordinate rotation is assigned when the coordinate rotation
speciilcations are not provided.
9 ) Program error P141 occurs when tool position offset is assigned in the coordinate rotation
mode.
Programmed coordinate rotation based on absolute commands

Programmed tool path after coordinate rotation

/
t N1 G69G92XOYO~;
Programmed tool path N6
without coordinate rotation N2 G90G17G68X30. Y1O. R45. :
/
N3 GOOX20.;
\ 11
I
N4 G01X40. F 1000;
N7 N5 G02X20. ;
(o. o) N6 G03YOR15. :
Y N8
N7 G69GOOXOYOM02;
N1, N2 N3
I

-180-
13. PROGRAM SUPPORT FUi’VCTIONS
13.6 CO ORDINA ?% ROTA TION

13.6.2 Parameter coordinate rotation


Coordinate rotation can be applied to a whole program by the following parameter settings made on the
setting and display unit.

Parameter Setting Example of setting


Horizontal axis Horizontal axis name x
Vertical axis Vertical axis name Y
Vector horizontal
456.000
axis com~onent
Y
e
Vector vertical axis
Q x 12.340
component
Angle –180.000 to + 180.000° 1.550
Center coordinate
Rotation center horizontal axis inordinate value -800.000
(horizontal)
Center coordinate
Rotation center vertical axis coordinate value -500.000
(vertical)

Parameter coordinate rotation is a function on the basic machine coordinate system and so the rotated
coordinate system is characterized by the relationship shown in the figure below.

-x
“.5(N. ..— —— —
1
——— ———— ———— ———— ——— ——— —.. .
I –Y ~. Basic machine coordinate system

- 181 -
13. PROGRAM SUPPORT FUNCTIONS
13.7 USER MACROS

13.7 USER MACROS

13.7.1 User macros


By combining user macros with variable commands, it is possible to use macro program call, arithmetic
operation, data input/output with PLC, control, decision, branch and many other instructions for
measurement and other such applications.

O Main program o Macro program


. ..... .* ...... .,

)
/

T \ M99:
‘ 1

Macro programs use variables, arithmetic instructions and control instructions to create subprograms
which function to provide special-purpose control.
These special-purpose control functions (macro programs) are called by the macro call instructions exactly
when required from the main program.
The following G codes are available for macro call commands.

I G code I Function i
G65 User macro simple call
G66 User macro modal call A (movement command call)
G66.1 User macro modal call B (each-block call)
I G67 IUser macro modal call cancel
Detailed description
1 ) When the G66 (or G66.1) command is entered, the specified user macro subprogram will be
called after the movement command in the block with the movement commands has been
executed (or after each-block execution) until the G67 (cancel) command is entered.
2 ) The G66 (or G66.1) and G67 commands must be paired in the same program.

-182-
13. PROGRAM SUPPORTFVNC170NS
13.7 USER MA c1? 0s

13.7.2 Macro call instructions


IncIuded among the macro call commands are the simple calls which apply only to the instructed block and
also modal calls (types A and B) which appIy to each block in the call modal.
( 1 ) Simple macro cal15

M99 is used to “terminate the user macro subprogram


-t
Format ; G65 P L_ <argument> ;

T
L No. of repetitions

~ Program no.
I

When <argument> must be transferred as a local variable to a user macro subprogram, the actual value
should be assigned after the address.
Regardless of the address, a sign and decimal point can be used in the argument. There are 2 ways in which
arguments are assigned.
a. Argument designation 1
Format: A_ B_ C. ... XL Y_ Z_
Detailed description
1) Arguments can be assigned using any address except G, L, N, O and P.
2) Except for 1, J and K, there is no need for assignment in alphabetical order.
3) 1, J and K must be assigaed in alphabetical order.
I- J– K_ ... Correct
J– I_ K_ ... Incorrect
4) Addresses which do not need to be assigned can be omitted.
5) The following table shows the correspondence between the addresses which can be assigned by
argument assignment I and the variable numbers in the user macro main body.

-183-
.

13. PROGRAM SUPPORT FUNCTIONS


13.7 USER MACROS

Address and variable number correspondence Call instructions and usable address
Argument assign-
Variable in macro G65, G66 G66.1
ment I address
A #l o 0
B #2 o 0
c #3 o 0
D #7 o 0
E #8 o 0
F #9 o 0
G #lo x x“
H #11 o 0
I #4 o 0
J #5 o 0
K #6 o 0
L #12 x x*
M #13 o 0
N #14 x x“
o #15 x x
P #16 x x*
Q #17 o 0
R #18 o 0
s #19 o 0
T #20 o 0
u #21 o 0
v #22 o 0
w #23 o 0
x #24 o 0
Y #25 o 0
z #26 o 0
0: Can be used
X Cannot be used
* : Can be used while G66.1 command is modal

-184-
13. PROGRAM SVPPORTFUN~ONS
13.7 USER’
iwlcl?os

b. Argument assignment II
Format: A_ B_ C. I._ J_ IL I_ J- K_ ,..
Detailed description
1 ) In addition to addresses A, B and C, up to 10 groups of arguments with 1, J, K serving as 1 group
can be assigned. (See *1)
2 ) When the same address is duplicated, assign the addresses in the specified order.
3 ) Addresses which do not need to be assigned can be omitted.
4 ) The following table shows the correspondence between the addresses which can be assigned by
argument assignment 11 and the vnriable numbers in the user macro main body.
Argument assignment Argument assignment
Variable within macro Variable within macro
11 address II address
A #1 J5 #17
R #2 K5 #U3
c #3 16 #19
11 #4 J6 #20
.J1 #5 K6 #21
K1 #6 17 #22
12 #7 J7 #23
J2 #8 K7 #24
K2 #9 18 #25
13 #lo J8 #26
J3 #11 K8 #27
K3 #12 19 #28
14 #13 J9 #29
J4 #14 K9 #30
K4 #15 110 #31
15 #16 J1O #32
K1O #33
NQTE 1: The subscripts 1 through 10 of I, J and K denote the sequence of the assigned groups and they
are not required for the actual instructions.
c. Using arguments assignments I and II together
If addresses corresponding to the same variable are assigned when both types I and II are used to
assign arguments, the latter address is valid.

.—r.. .,

Call instruction G65 All B- 2.2 D3.3 14.4 17.7;

Variable
#l: 1.1 --II
#2 :-2.2
#4: 4.4
#5:
#6:
#7: M ‘1
7.7

In the above example, the last 17.7 ar~ment is valid when both arguments D3.3 and 17.7 are assigned for
the #7 variable.
*1: Depending on the system, K1O (#33) of the tenth group, however, is ignored. (It is not ignored in the
V series.)

-185-
,., ,.,

13. PROGRAM SUPPORT FVNC170NS


13.7 USER MACROS

(2) Modal call A (movement command call)

Main momam .Subprogram

!
G66PP1L11 <argument>; To s.tbpmgnm

: ,.C
:
, TOmainPIO~
I
G67;
k

When the block with a movement command is assigned between G66 and G67, the movement command
is first executed and then the assigned user macr~ subprogram is executed. The number of times the
subprogram is executed is U times for each call.
<argument> is the same as simple call.

t
Format : G66P_ L— <argument> ;
L No. of repetitions

I
~ Program no.

Detailed description
1 ) When the G66 command is entered, the specified user macro subprogram will be called after
the movement command in the block with the movement commands has been executed until the
the G67 (cancel) command is entered.
2 ) The G66 and G67 commands must be paired in the same program.
A program error will result when G67 is assigned without the G66 command.

,-

!.

-186-
13. PROGRAM SUPPORT .FUNCT70NS
13.7 USER MACROS

(Example) Drilling cycle

Main program
N1 C90 G54 GO XOY020
I
N2 G91 COO X-50. Y-50. 2-200. : Subprogram
N3 G66 P9010
N4 X-50. Y-so. :
R-10. Z-3 O. F1OO;
To subprogram after axin mmnand
I
Ii& been -ted
o 9010
INIO GOO Z *18 MO;
1
I
N5 x-so. ; 1 To s.tpv~ after axis command
hasbeenexecuted

N10
‘u N30
.Argwnent R

N20 ArgumentZ

( [E
ArgumentF

NKYF131: The subprogram is executed after the axis commands in the main program have been executed.
NOIT.? 2 The subprogram is not executed after the G67 block.

-’187-
13. PROGRAM SUPPORT FUNCHONS
13.7 USER MACROS

(3) Modal call B (for each block)


The user macro subDroMam is called unconditionally for each command block which is assimwd
between G66.1 and 667: The subprogram is executed {1 times.

r
Format G66 .1 P_L_ <argument> ;

No. of repetitions
k Program no.
\
Detailed description
1 ) In the G66.1 mode, everything except the O, N and G codes in the various command blocks
which are read is handled as the argument without execution. tiy G code assigned last or any
N code assigned after anything except O and N will function as the argument.
2 ) The same applies as when G65P_ is assigned at the head of a block for all significant blocks in
the G66.1 mode.
(Example 1)
N1OOGO1 G90 X1OO.Y200. F400 R1OOO; in the G66.1 P1OOO; mode is the same a~
N1OOG65 P1OOOGO1 G90 X1OO.Y200. F400 R1OOO;.

NOTE 1: The call is performed even in the G66.1 command block in the G66.I mode, and the
correspondence between the argument address and the variable number is the same as for G65
(simple call).
3 ) The range of the G and N command values which can be used anew as variables in the G66.1
mode is subject to the restrictions applying to values as normal NC command values.
4 ) O, sequence numbers N and modal G codes are updated as modal information.
(4) G code macro call
User macro subprograms with prescribed program numbers can be called merely by assigning the G
code command.

f >
Format ~ : G x x <argument> ;

L G code for macro call


J
\

Detailed description
1) The above instruction functions in the same way as the instructions below, and parameters are
set for each G code to determine the correspondence with the instructions.
a. M98P AAAA ;
b. G65P AAAAA <argument> ;
c. G66P AMAA <argument> ;
d. G66.lP AAAAA <argument> ;
Assign the cancel command (G67) in the user macro or after the call code assignment in order
to cancel the modal call when a parameter corresponding to “c” or “d” above has been set.
2) The correspondence between the “XX’ which conducts the macro call and the program
number P AAAA of the macro to be called is set by parameter.

-188-
13. PROGRAM SU??PORTFUNCITONS
13.7 USER MACROS

3 ) Up to 10 G codes from G1OOto G255 can be used with this instruction. (GO1 to 99 can also be
used by machine parameter Gmac_P.)

NOTE 1: G1OI—G1IO and G200—G202 are user macro I codes. When thev. are set bv -,=.narameter as G
call codes, the G code calls take precedence and the codes cannot be used as user macro I codes.
4 ) These commands cannot be assigned in a user macro subprogram.- which has been called by a
G code.
/ .
Program example 09016

G16XiO0. Y1OO.Z 100. F500; —

>~~ M99;

L“
(5) Miscellaneous command macro call {for M. S. T. B code macro calll
The user macro subprogram of the specified pro~am number can b: called merely by assigning an
M (or S, T, B) code. (Entered codes are covered by M codes; all codes are covered by S, T and B.)

Format : Mm ; (or Ss ;, Tt ;, Bb ;)
~ M (or S, T, B) code for macro call

Detailed description
1) The above instruction functions in the same way as the instructions below, and parameters are
set for each M code to determine the correspondence with the instructions. (Same applies for
S. T. B codes)
a; M98P d ;
M98 and Mm are not output.
b. G65P AAAA Mm ; }
c. G66P AAAA Mm ; ‘
d. G66,1P AAAA Mm ;
Assign the cancel command (G67) in the user macro or after the call code assignment in order
to cancel the modal call when a parameter corresponding to “c” or “d” above has been set.
2) The correspondence between the “Mm” which conducts the macro call and the program
number P AAAA of the macro to be called is set by parameter. Up to 10 M codes from MOOto
M95 can be entered.
Any code except the codes basically required by the machine and the MO, Ml, M2, M30 and
M96 — M99 codes can be entered.
3) As with M98, the display appears on the CRT screen of the setting and display unit but the M
cades and MF are not output.
4) Even if the miscellaneous command entered above is assigned during a user macro subprogram
called by the M code, macro call will not result and it will be handled as an ordinary
miscellaneous command.
5) All S, T or B codes call subprograms in the program numbers specifkl by the S, T or B
function.
6) Up to 10 M codes can be set. Set the parameters as follows when all 10 codes will not be used.

[MACRO FfLE] M_PARAM


@ODR) (TVPE) (PROO&4?4 NO.)
MIO1] 20 0 socQ--
M[02] o -- -----
‘---- Setthm to call OSGO1with wOrwelw’hM20as~wment”
‘t*h~s’oca*lOmw~th type O M98 type wth M21 asslgnmeat.
M[03] X& O W&&
!4[04] 0
9999 1999999W
M[05] 9999 0 1999WM9- ----- Setthe unused parameters as on the left.
::
.
M[1O] W& O 159& J

- 189-
13. PROGRAM SUPPORT FUNCl?ONS
13.7 USER MACROS

( 6 ) Differences between M98 and G65 commands


1) The argument can be assigned for G65 but not for M98.
2) The sequence number can be assigned for M98 but not for G65, G66 and G66.1.
3) M98 executes a subprogram after all the commands except M, P, H and L in the M98 block
have been executed, but G65 branches to the subprogram without any further operation.
4) When any address except O, N, P, H or L is included in the M98 block, single block stop results.
This is not the case with G65.
5) The level of the M98 local variables is fixed but it can be varied in accordance with the nesting
depth for G65. (#1, for instance, has the same significance either before or after M98 but a
different significance in each case with G65.)
6) The M98 nesting depth extends up to 8 levels in combination with G65, G66 and G66.1. The
G65 nesting depth extends up to only 4 levels in combination with G66”and G66.1.
(7) Macro call command nesting depth
Up to 4 nesting levels are available for macro subprogram calls based on simple call or modal call.
The argument with a macro call instruction is valid only on the called macro level. Since the nesting
depth for macro calls extends up to 4 levels, the argument can be used as a local variable for the
program with each respective macro call.

NOTE 1: When a G65, G66, G66.1 G code macro call or miscellaneous command macro call is conducted,
this is regarded as nesting level 1 and the level of the local variables is also incremented by one.
NOTE 2 The assigned user macro subprogram is called every time the movement command is executed
with modal call A. However, when the G66 command has been duplicated, the next user macro
subprogram is called every time an axis is moved even with movement commands in the macro.
Us~r m-acro subprogram; are called in sequence from the subprogram assigned last.

(Exande
. ., 1)

Main program User macro operation


G66Pp, ; (pI call) Macro PI
Zzl
; After Z1 execution
G66Pp, ; (P2 Cd) Macro PI
ZZ2 ; After Z2 execution q *f ,-
4 I b I * 1
G67 ; t (p, cancel) I
! J

J
. Macro
ZZ3 ;
.After Z3 execution
) !

G67 ;) (pI cancel)


ZZ4
:)
ZZ5
‘)
I

-190-
13. PROGRAM SU+??PORTFU?J’ONS
13.7 Uiwm MACROS

(8) User macro calls with interrupt


[Outline]
By preparing a user macro for interrupt processing in advance and by assigning it in the program, it
is possible to execute that user macro when the user macro interrupt signal is input during automatic
operation. After it has been executed, operation returns to the suspended program block and can be
continued.
More details on this function are given in Appendix 7.
[Interrupt systems]
There are two kinds of interrupt: type 1 and type 2.
Parameters are. use$ to select type 1 or 2 as the interrupt system.

When the interrupt signal (UIT) is input, the movement being executed or dwell is suspended,
and the interrupt program is executed.
If there is a movement command or miscellaneous function command (MSTB) in the interrupt
program, the command in the block that was suspended will be lost, and the interrupt program
will be executed. Operation will continue from the block following the interrupt program.
If there is no movement command or miscellaneous function command (MSTB) in the
intemupt program, operation will be resumed and continue from the suspended block after
return from the interrupt program.
However, when an interrupt signal (UIT) is input while a miscellaneous function command
(M!M’B) is being executed, the NC system is set to the finish signal (FIN) status which means
that after tlm FIN input the movement or miscellaneous function command (MSTB) mmmand
will be executed.

[Ww 21
1) When the interrupt sigoal (UIT) is input, the interrupt program is executed without the
suspension of the command which is being executed.
2) If there is a movement command or miscellaneous function command (MSTB) in the interrupt
program, it will be executed afler the command in the block being executed is completed.
However, machining may be temporarily suspended if the interrupt program does not finish
even when the original block is finished.
Detailed description
1) User macro branch selection format

:
M96P_H_ ; (Branch mode ON)
:. When the user macro interrupt signal is input here,
operation is branched to the user macro sequence
:. ~m~dr~ the program number which is assigned by
.
M97 ; (Branch mode CWF) 1
.
:

2) A user macro interrupt can be processed even if the nesting level for the macro call when the
interrupt is generated is the maximum (level 4). The local variable level of the user macro used
with the interrupt will be the same as the user macro level when the interrupt was generated.
(This occurs when the “subprogram interrupt” control parameter has been selected.)
A program error results however, when the nesting exceeds 4 levels with the “subprogram
interrupt” cuntrol parameter OFF.

-191-
13. P..0GRAMSUPPORT Ft?NCTIONS
13.7 USER MACROS

Interrupt return
Interrupt branching (
/

J 02000: 1 I J 02100: I I 4 - 05100; I


“1

Ifl
/ ;6P51OO;
1
[nterrupt GI X_;
Inter- GI Y_;
5 rupt
G65P
2100;
\
M97;
Yi
M99; M99; M99;
I I B !
I I
(Level 3) (Level 4) I
I
1
I
Local variables Local variables 1
I
1
I
u o I
I L.------—----J I

3 ) When modal information has been changed in an interrupt program, the information applying
after return from the interrupt program will be as follows.
a. With M99 ; return
The modal information changed in the interrupt program is made invalid and a return is made
to the modal information existing prior to the interrupt. However, when there is a movement
command or miscellaneous function command (MSTB) in the interrupt program, a return will
not be made to the modal information existing prior to the interrupt.
b. With M99P_ ; return
When modal information has been changed in an interrupt program, that information will
continue to be valid even after return from the interrupt program. This is the same as when a
return is made by M99P_; from a program called by the M98 or other such command.
4 ) Macro interrupts can be executed only during program execution (in automatic start); they have
no effed on manual operation.

-192-


13. PROGRAM SUPPORT FUNCITONS
13.7 USER MACROS

13.7.3 Variables
Both the variable specifications and user macro specifications are required for the variables which are used
with the user macros.
‘The offset amounts of all the local, common and system variables among the variables for this MELDAS
NC system except #33 are retained even when the system’s power is switched off. (Common variables can
also be cleared by the “COM-VAR PWR CL” control parameter.)
(1) Use of multiple variables
When the user macro specifications apply, variable numbers can be turned into variables (multiple
use of variables) or replaced by <formulae>.
Only one of the four basic arithmetic rule operations can be conducted with <formulae>.
(Example 1) Multiple use of variables
# 1 =10 #10=20 #20=30; [# [#l]]= # [#10] from #1 = 10.
# [#IO]= #20 from #10=20.
#5=# [#[#111 : Therefore, #5= #20 or #5 =30.

#1=10 #10=20 #20=30 #5=1000 ; # [# [#l]]= # #10] from #1= 10.


# [#10]= #20 Irom #10=20.
#(#[# lll=#5; Therefore, #20 = #5 or #20= 1000

(ExampIe 2) Example of multiple variable assignment


#lo=5 <Formula> ##10 = 100 ; is handled in
In which case, ##10=100 ; and #5= 100 the same way as #[#IO]= 100;
(Example 3) Replacing variable numbers with <formula>
#lo=5 ;
#[#10 +1] = 1000 ; In which case, #6= 1000
#[#lO-l] = –1000 ; In which case, #4 =–1000
#[#10*3] = 100 ; In which case, #15= 100
#[#10/2] = –100 ; In which case, #2= –100
(2) Undefined variables
Variables applying with the user macro specifications such as variables which have not been used
once after the power was switched on or local variables whose argument has not been not assigned
by the G65, 666 or G66.1 commands can be used as <empty> . Aso, variab!es can forcibly be set
to <empty> . Variable #O is always used as the variable and nothing can be defined in the left-side
member.
1) Arithmetic expressions

#l=#o ; “*””””.”””””s.””..”.”#
1 = <empty>
# 2 =# o + 1 ; ““”””””””””””””#
2= 1 It should be borne in mind that in an
arithmetic expression is handled in the
# 3 = 1 +* o ; ““”””””””””””””#
3= 1
same way as O.
#4=#o *lo; ““”””””””””””””#
4= o <empty> + <empty> = O
<empty> + <constant> = Constant
#5=#o+#o ; ““””””””””””i?
5= o <constant> + <empty> = Constant

2) Variable quotation
When undefined variables only are quoted, even the addresses themselves are ignored.
When #1 = <empty>
GOX #1 Y1OOO; .... Equivalent to GO Y1OOO;
GOX #1 + 10 Y1OOO; .... Equivalent to GO X1O Y1OOO;

- 193-
13. PROGRAM SVPPORTFUNCTIONS
13.7 USER MACROS

3 ) Conditional expressions
<Empty> and O are not equivalent for EQ and NE only. (#O signifies <empty>.)

When #101 = <Empty> When #101 = O


#lOIEQ#O #lOIEQ#O
~Emp ~= &mp ty established O = ~Empty not established
#lolNEo #lolNFM
{Emp tyj # O established O # O not established
#lOIGE#O #lOIGE#O
<Empty~ ~ tEmp ty>established O Z ~Empty established
#lOIGTO #lOIGTO
<Empty >0 not established 0>0 not established
#lOILE#O #lOILE#O
<Empty~ s <Empty established O = ~Empty~ established
#lOlLTO #lOlLTO
I ~EmpP <0 not established 0<0 not established
Table of establishment/non-establishment of conditional expressions (expressions including undefined
variables)

Left side
Constant Empty Constant Empty Constant Empty Constant Empty Constant Empty constant
memk
Empty Eat. Eat. Eat. Eat. EM.
Constant Eat. Eat. Eat.

Est. = Conditional expression established


Blank = Conditional expression not established

,,-

. 194 ‘:
13. PROGRAM SUPPORT FUNC~ONS
13.7 USER MACROS

13.7.4 Types of variables


(1) Common variables (#100 to #199 and #500 to #699)
These variables are used in common from any position and variables up to #100 to #199 and #500
to #699 can be used.
For details, refer to the section on variable commands.
(2) ~cal variables (#l to #32) .—
These can be defined as an <argument> when a macro subprogram is calied or used locally within
main programs and subprograms. They can be duplicated regardless of the relationship existing
between macros (up to 4 levels).

Where pl = Program number


1, = Number of repetitions
The <argument> is assumed to be Aal 13bl Ccl ... ZZ1.

The following table shows the correspondences between the addresses assigned by <argument> and
the local variable numbers used in the user macro main bodies.
Call command Call command
Argument Local variable Argument Local variable
G65 G65
(366.1 address number G66.1 address number
G66 G66
o 0 A #1 o 0 Q #17
o 0 B #2 o 0 R #18
o Q c #3 o 0 s #19
o 0 D #7 o 0 T #20
o Q E #8 o 0 u #21
o 0 F #9 o 0 v #22
x X* G #lo o 0 w #23
o 0 H #11 o 0 x #24
o 0 I #4 o 0 Y #25
o 0 J #5 o 0 z #26
o 0 K #6 — #27
x x* L #12 . #28
o 0 M #13 — #29
x X* N #14 . #30
x x o #15 — #31
x X* P #16 — #32
— #33

“X” in the above table denotes an argument address which cannot be used. However, provided that the
G66,1 mode has been established, an argument address denoted by the asterisk can be added for use.
<d–“ denotes that a corresponding address is not available.

- 195-
13. PROGRAM SUPPORT FUNC170NS
13.7 USER MACROS

1 ) Loud variables in subprograms can be defined by means of the <argument> designation


during macro call. -

Main program Subprogram f-)


.
U5=*401O;
GSl COlXC*19XCOst*l]l
C65P9900AS0. S1OO. FsOO: y(*ls XS1N(*l]]F*9;
m

MOZ; M99;

Refertothe lcml vari-


ablesandLvntmlthe
~-------- =.ym~t~tc. - --
-1
Localvariables
set I
&jargument I A(u])= 60. 000
I
L“’ I I
I F (s9)= 800 1
Local variable 1 I
data table I I
I S(*19}=I00. 000 I
I
L ----- --—— ---- . . J I

2 ) Local variables can be used freely within their subprograms.

Main program Subprogram (1)

I I *30=FUP c#2/s 5/2) ;


G65 PI AIOO. B50. JIO. F5OO; To s.@Imgram *5=u2/# 30/2;
M96H1OOL*3O:
1<>
X*I;
M99;
Example of face milling NIOO Cl X*1 F*9:

Y*5:
~ X-ul ;
Y*5:

M99;

in
fxlcalValiabks
mbpmgmm canbe
Local variablesset by argument changed.
Localvarinbledata table
7

i A(#l) 100. 000


B (#2) 50. 000

F (*9) 500

J (*5) 10. ooo- 8. 333

(*30) . 3

-196-
13. PROGRAM SUPPORT FUNCITONS
13.7 USER MACROS

In the example of face milling given, argument J has been programmed with a milling Ditch of
10. mm but this is chrmged to 8.333 mm in order to provide in equal interval pitch. - -
In addition, the calculation results of the number of return machining passes is entered into
local variable #30.
3 ) Local variables can be used independently on each of the macro calls levels (4 levels),
Local variables are also provided independently for the main program (macro level O).
Arguments cannot be used for the level O local variables.

Main (level O) 01 (macro level 1) 010 (macro level 2) 0100 (macro level 3)
*1=0.1 $t2=o.2
#3=o.3;
5. \ {
G6S PIA1.B2.C3.; (X5P1OA1O.
B21CM.; G65P1WAKD. B200.:
$ < \
! \“
Mm M99 ; M%; MW ;

Local variables (0) Imcal variables (1) ha] variables (2) hat variables (3)
*1 0.100 A(#l)l .000 A(#l) 10.000 A(*l)loo. ooo
*2 0.200
B(*2) 2. 000 B(#2) 20. Ooo B (*2)200.000
*3 0.300
C(*3) 3. 000 C(*3) 30. 000 c (*3)
D (*7) D (#7)
/ ( !
Z (#26) Z (*26) Z (#26)
) ) ) )
*32 *32 *32 #32

The statuses of the local variables appear on the setting and display unit.
For details, refer to the Operating Instructions as well as to the sections covering the oDeration
*
of the setting and display ‘unit an~ the local variables.

- 197-
,,

13. PROGRAM SVPPORTFUNCITONS


13.7 USER MACROS

(3)
., Macro interface inrmts (#1000 – #1035)
A. ,

The status of the interface input signals can be ascertained by reading out the values of variable
numbers 1000 through 1035. A variable value which has been read out can be only one of 2 value~
1 or O (1: contact closed, O: contact open). All the input signals from #1000 through #1031 can be
read at once by reading out the value of variable number 1032. Variable numbers #1000 through
#1035 are for readout only, and nothing can be placed in the left side member of their arithmetic
formulae.

No. of No. of
System variable Interface input signal System variable Interface input signal
points points
#looo 1 Register R72 bit O #1016 1 Register R73 bit O
#lool 1 Register R72 bit 1 #lo17 1 Register R73 bit 1
#loo2 1 Register R72 bit 2 #1018 1 Register R73 bit 2
#loo3 1 Register R72 bit 3 #lo19 1 Register R73 bit 3
#loo4 1 Register R72 bit 4 #lo20 1 Register R73 bit 4
#loo5 1 Register R72 bit 5 #lo21 1 Register R73 bit 5
#1006 1 Register R72 bit 6 #lo22 1 Register R73 bit 6
#loo7 1 Register R72 bit 7 #1023 1 Register R73 bit 7
#1008 1 Register R72 bit 8 #1024 1 Register R73 bit 8
#loo9 1 Register R72 bit 9 #1025 1 Register R73 bit 9
#lolo 1 Register R72 bit 10 #1026 1 Register R73 bit 10
#loll 1 Register R72 bit 11 #1027 1 Register R73 bit 11
#lo12 1 Register R72 bit 12 #1028 1 Register R73 bit 12
#lo13 1 Register R72 bit 13 #1029 1 Register R73 bit 13
#lo14 1 Register R72 bit 14 #lo30 1 Register R73 bit 14
#lo15 1 Register R72 bit 15 #lo31 1 Register R73 bit 15

No. of
System variable Interface input signal
points

~
(. 4 ). Macro interface outuuts (#1100 – #1135’)
The interface outpu~ signals can be sent by substituting values in variable numbers 1100 through
1135. The output signals are O or 1.
All the output signals from #1100 through #1131 can be sent at once by substituting a value in
variable number 1132. (2° — 231)
The status of the writing and output signals can be read in order to offset the #1100 through #1135
output signals. “Output” in this context refers to output from the NC system.

- 198-
13. PROGRAM SUPPORT FUNCTIONS
13.7 USER MACROS

No. of No. of
$ystem variable Interfaee input signal lystem variable Interfaee input signal
points points
#lloo 1 Register R172 bit O #1116 1 Register R173 bit O
#llol 1 Register R172 bit 1 #1117 1 Register R173 bit 1
#llo2 1 Register IU72 bit 2 #1118 1 ‘Register R173 bit 2
#llo3 1 Register IU72 bit 3 #1119 1 Register R173 bit 3
#llo4 1 Register R172 bit 4 #l120 1 Register R173 bit 4
#llo5 1 Register IU72 bit 5 #1121 1 Register R173 bit 5
#llo6 1 Register R172 bit 6 #1122 1 Register R173 bit 6
#llo7 1 Register IU72 bit 7 #1123 1 Register R173 bit 7
#1108 1 Register R172 bit 8 #1124 1 Register R173 bit 8
#llo9 1 Register R172 bit 9 #1125 1 Register R173 bit 9
#lllo 1 Register R172 bit 10 #1126 1 Register R173 bit 10
#lIll 1 Register R172 bit 11 #1127 1 Register R173 bit 11
#1112 1 Register R172 bit 12 #1128 1 Register R173 bit 12
#1113 1 Register R172 bit 13 #1129 1 Register R173 bit 13
#1114 1 Register R172 bit 14 #l130 1 Register R173 bit 14
#1115 1 Register R172 bit 15 #1131 1 Register R173 bit 15

Interface input signal


Register R172, R173
#1133 32 Register R174, R175
#1134 32 Register R176, R177
#1135 32 Retister R178. R179

NOTE L The last value of the system variables #1100 through #1135 sent is retained as 1 or O.
(N is not cleared even when the Dower is switched on and off or reset.)
FUME 2: The following applies when any ~umber except 1 or Ois substituted into’ #1100 through #1131.
<Empty> is treated as O.
Any number except <Empty> and O is treated as 1.
Any value less than 0.00000001 is indefinite.

-199-
13. PROGRAM SUPPORT FUNCTIONS
13.7 USER MACROS

Input signal Output signal


~~ +t--

+1-

-11-

-lt--
o 9
* e

--lgt--
--it-
---H--
---il--

S2 bi 32 bit

D-c 2K3

WC ala

ala

-200-
13. PROGRAM SU.PORTFUNCTIONS
13.7 USER MACROS

(5) Tool offset


Standard
specifications: 40 sets Variable number range Type I Type 11
Optional 0
#10001 – #10000+n ] #2001 – #2000+ n o
specifications: 800 sets
#11001 – #11000+n #2201 – #2200+ n x o
(max)
#16001 – #16000+n #2401 – #2400+ n x o
Refer to Section 12.1.5 o
#17001 – #17000 +n #2601 – #2600+ n x
[ for further details. !

Tool data can be read and values substituted using the variable numbers.
The numbers in either the #10000 order or #2000 order can be used.
‘The last 3 digits of the variable numbers correspond to the tool offset number.
The tool offset data is configured as data with a decimal point in the same way as for other variables.
Consequently, this decimal point must be assigned when data below the decimal point is to be
entered.
Programming example Common variables Tool offset data

(Example 1) Example of tool offset data measuring

G28ZOT01: Zero point return ‘


IW06; Tool change (spindle TO1) I
GOO
#l=*5r) 03; Start point storage I HI
Rapid traverse to safe G
GOO Z-500. :
position
G31 Z-1 OO. FIOO: Skip measuring
#10001 =#5063 -*l; Measurement distance calculation
! and tool offset data setting

NOTE In this exam~le. no consideration is tiven to the delav in the skip sensor simud.
#5003 is th~ 2-axis start point pos~ion whereas #~063 is the’ Z-axis ski; coordinates, and it
indicates the position at which the skip signal is input while G31 is being executed.

-201 -
., ,

13. PROGRAM SUPPORT FUNCTIONS


13.7 USER MACROS

( 6 ) Work coordinate system offset


Using variable numbers 5201 through 5326, it is possible to read out the work coordinate svstem
offset data or substitute values. (The-number of ax;s which can be controlled differs according ~o the
NC specifications.)

Axis no.
Axis 1 Axis 2 Axis 3 AxiS 6 Remarks
Coordinates name \
External External work offset specifications
#5201 #5202 #5203 #5206
work offset )) are required.
G54 #5221 #5222 #5223 // #5226
G55 #5241 #5242 #5243 #5246
G56 #5261 #5262 #5263 1) #5266
G57 #5281 #5282 #5283 #5286
G58 #5301 #5302 #5303 {( #5306
G59 #5321 #5322 #5323 #5326

(Example 1)
N1 GZS XOYOZO:
N2 a5z 21=-20. s5222=-20. ;
N3 G90 COO G54 XO YO;
-10.
-20.
5
NIO *S221=- 90. *5222 =-1O. ;
1

El
Nll C90 COO G.54 XOYO:
G54 work coor-
f dinate system
defined by N1O
M
M02: , defined by N2 ,

-—--—- .----— ---——— —--- .-


1
3mrnple 2) i Basic machine coordinate system I
I
I External work offset
I I
i

5
_..m----&’ ~
I
Coordinate I / I
W2 (G5S) 1
.!ystem be- )+
fore change ~ WI (GS4) I
I
N1OO #5221 =*5221 +#S 201:
I I
*S2’22= *S222+U5202; L ———— -——- ---—- t -—— —--- . J

4F5241= u524] +*5201:


————- ————- ---- ---- --
u5242=s5242+*5202; F Basic machine coordinate system
I
*SZO1=O B5zoz=o: I
I .@&-””
Coordinate 1 - /~
~tem after
change I W2 (G55)
5 i
I
[ I
‘+ 1- —-——— ---— .——

This is an example where the external work offset values are added to the work coordinate (G54,
G55) system offset values without changing the position of the work coordinate system.

-202-
13. PROGRAM SUPPQRT.FUNC7TONS
13.7 USER M’/iCl? 0s

(7) NC alarm (#3000)


‘I’he NC system can be forcibly set to the alarm state by using variable number 3000.
~mmand format

#3 Qoo=70 (c AL L#PRo GRAMMER#TEL#530) ;

L Alarm number L Alarm message

Any alarm number from 1 to 9999 can be specified.


The alarm message must be less than 31 characters long.
The P277 MACRO ALM MESG appears in the column <NC ALARM> on the diagnosis screen
while the alarm number and alarm message “CALL #PROGRAMMER #TEL#530” is indicated
in the <CIPERA’N3R IW%SSA(3E3>. -
*

Example of program (alarm when #1 = O)

\
IF [*l NE Olco’ro 100:
‘,,.,,.,,=
#~=70(cALL*PRoG RAMMER *TEL*wi ;
Nloo

$ ‘=

IWJTE 1: Alarm number O is not displayed and any number exceeding 9999 cannot be indicated.
NOTE 2 The characters following the first alphanumeric in the right member is treated as the alarm
message. Therefore, a number cannot be assigaed as the first character of an alarm message. It
is recommended that the akwrn messages be enclosed in round ( ) parentheses.

-203-
13. PROGRAM SUPPORT FUNCTIONS
13.7 USER MACROS

(./ 8 ) Intertratimz run time (#3001. #3002)


The%te&atin~ run t~me can be read duriruz automatic start or values can be substituted by using
variable ~umb~rs 3001 and 3002.

Variable Contents when power is


Type Unit Initialization of contents ~yd;t;:n
number switched on
At all times
[integrating while power
3001
run time 1
Same as when power is Value substituted for is ON
1 ms
switched off variable In auto-
Integrating matic start
3002
run time 2

The integrating run time returns to zero in about 2.44x 1011 seconds (approximately 7.7 years).

09010

#3001=o;
\ wH1LE[#3 00 1LE*20]DOI ;
G65P90 1 OT(W*~~e)msec; f
\ D
To subprogmm
J
\
END] ;

M99;

I Local variable
lEntered in local ~ Allowable time oortion: DO1-ENDI is repeated

+’*’O — I
and when allow~ble time is =ched, oper&ions
jumps to M99.

( 9 ) Suppression of single block stop and miscellaneous function finish signal waiting
By substituting the values below in variable number 3003, it is possible to suppress single block stop
in the subsequent blocks or to advance to the next block without waiting for the miscellaneous
function (M, S, T, B) finish (FIN) signal.

#3003 Single block stop Miscellaneous function finish signal


o Not suppressed Awaited
1 Suppressed Awaited
2 Not suppressed Not awaited
3 Suppressed Not awaited

NOTE k #3003 is cleared to zero by resetting.

-204-
13. PROGRAM SUPPORT FUNCTIONS
13.7 USER MACROS

(10 )Feed hold, feed rate override G09 vrdid/invalid


By substituting the values below in variable number 3004, it is possible to make the feed hold, feed
rate override and G09 functions either valid or invalid in the subsequent blocks.

NOTE 1: Variable number #3004 is set to zero by resetting.


NOTE 2 The functions are valid when the above bits are O and invalid when they are 1.
(11 ) Message display& stop
By using variable number 3006, the message display is stopped after the previous block has been
executed and, if the message display data have been assigned, then the corresponding message will be
indicated.
Command format

#3006 =1 (TAKE FIVE) ;

L_ Message
I

The message should not be longer than 31 characters and it should be enclosed within round
( ) parentheses.
(12 )Mirror image
By reading variable number 3007, it is possible to ascerttin the status of mirror image at a particular
point in time for each axis.
The axes correspond to the bits of #3007.
When the bits are O, it means that the mirror image function is not va[id
when they are 1, it means that it is valid.
#3007

Bit 15 14 13 12 11 10 9 8 7 (j 5 4 3 2 1 ()
nth axis 6 5 4 3 2 1

-205-
., ,,

13. PROGRAM SUPPORT FUNC170NS


13.7 USER MACROS

(13 ) G command medals


Using variable numbers 4001 through 4021, it is possible to read the G command modal statuses in
the pre-read blocks.
Similarly, it is possible to read the medals in the block being executed with variable numbers #4201
through #4221.

Variable number
Function
Pre-read block Execution block
Interpolation mode: GOCkO, GOl: 1, G02: 1, G03: 3, G33: 33
#4001 #4201
G2.1: 2.1, G3.1: 3.1
#40i)2 #4202 Plane selection: G17: 17, Gl& 18, G19: 19
#4003 #4203 Absolute/incremental: G90: 90, G91: 91
#4004 #4204 Program soft limit: G22: 22, G23: 23
#4005 #4205 Feed assignment: G94 94, G95: 95
#4006 #4206 Inch/metric conversion: G20: 20, G21: 21
#4007 #4207 Cutter compensation: G40: 40, G41: 41, G42: 42
#4008 #4208 Tool length offset: G43: 43, G44: 44, G49: 49
Canned cycle: G80 80, G73 – 74:73 – 74, G76 76,
#4009 #4209
G81 – G89: 81 – 89
#4010 #4210 Return level: G9tk 98, G99 99
#401 1 #4211 Scaling G50: 50, G51: 51
#4012 #4212 Work coordinate system: G54 – G59: 54 – 59
#4013 #4213 Acceleration/deceleration: G61 – G64 61 – 64
#4014 #4214 Macro modal call: G66 66, G66.1: 66.1, G67: 67
#4015 #4215 Normal line control: G40.1: 40.1, G41.1: 41.1, G42.1: 42.1
#4016 #4216 Coordinate rotation: G68 68, G69 69
#4017 #4217 Constant peripheral speed control: G96: 96, G97: 97
#4018 #4218
#4019 #4219 Mirror image: G50.1: 50.1, G51.1: 51.1
#4020 #4220
#4021 #4221
(Example)

G28XOYOZO;
G90G 1 X1OO.F1OOO;
G91 G65P 3OOX1OO.
Y1OO. ;
M02 ;

0300 ;
#l=#4003; .- Group 3 G modal (pre-read) #1 = 91.O
# 2 =#4203 ; ~ Group 3 G modal (now being executed) #2 =90.0
G#l X#24Y#25;
M!39;
%

-206-
13. PROGRAM SIJPPORTFUNCTIONS
13.7 USER MACROS

(14 ) Other modals


Using variable numbers 4101 through 4120, it is possible to read commands assigned as far as the
Mock immediately before.
Similarly, it is possible to read the medals in the block being executed with variable numbers #4301
throwzh #4320.
Variable number Variable number
Modal information Modal information
Pre-read Ehecution Pre-read Execution
#4101 #4301 Tool length offset
#4111 #431 1
#4102 #4302 number H
#4103 #4303 #41 12 #4312
#4104 #4304 #41 13 #4313 Miscellaneous function M
#4105 #4305 #41 14 #4314 Sequence number N
#4106 #4306 #41 15 #43 15 Program number O
Cutter compensation #41 16 #4316
#4107 #4307
I I number l’1 I #41 17 #4317
#4108 #4308 #4118 #4318
#4109 I #4309 IFeed rate F #41 19 #4319 Spindle fimction S
I #4110 1 #4310 I , #4120 #4320 Tool finction T

(15 ) I%sition information


l.lsingvariable numbers 5001 through 5106, it is possible to read the end point coordinates in the block
immediately before, machine coordinates, work coordinates, skip coordinates, tool position offset
coordinates, and servo deviation amounts.

position End point


servo
information coordinate of Machine Work skip Tool position
deviation
bIock immedi- coordinate coordinate coordinate offset position
amount
Axis no. ately before
1 #5001 #5021 #5041 #5061 #5081 #5101
2 #5002 #5022 #5042 #5062 #5082 #5102
3 #5003 #5023 #5043 #S063 #5083 #5103
~ ~ ~ ~
6 #5006 #5Q26 #5046 #5066 #5086 #5106
Remarks
(read during Yes No No Yes No Yes
movement)

I!?QTE 1: The number of axes which can be controlled differs according to the NC system specifications.
NOTE A The value equivalent to the G45 – G48 position offset amount only serves for the tool position
offset position.

-207-
,,

13. PROGRAM SUPPORT FUNCHONS


13.7 USER MACROS

1 ) The positions of the end point coordi-


Basic machine coordinate system M

====)Ft
nates and skip coordinates are the po-
sitions in the work coordinate system.
2 ) The end point coordinates, skip coordi-
nates and servo deviation amounts can
Q be read even during movement. How-
GQ ever, it must first be checked that
movement has stopped before reading
GO1
the machine coordinates, work coordi-
nates, and the tool position offset posi-
tion.

d’”
cEnd point
coordinates ,
I 1

i $X1 Work
“coordinates Read
: command Gauge, etc.
Work coordi-
nate system
- q -\
Machine 4 ‘io I
Machine coordi- M coordinate Skip coordinates
nate system d’
3 ) The position where the skip signal is turned ON in the G31 block is indicated for the skip
coordinates. The end point position is indicated when the skip signal has not been turned ON.
(For further details, refer to the section on tool length measurement.)
4 ) The tool nose msition
. where the tool offset and other such factors are not considered is
‘ indicated as the end point position. The tool reference point position with consideration given
to tool offset is indicated for the machine coordinates, work coordinates and skip coordinates.

Skip signal
\
7 \

Input coordinates of skip signal


M
d Machine coordinate system

e: Check stop and then


proceed to read.
I
O: Reading is possible
even during movem-
.“ ent

The position of the skip signal input coordinates is the position in the work coordinate system.
The coordinates in variable numbers #5061 through #5066 memorize the moments when the
skip input signal during movement was input and so they can be read at any subsequent time.
For further details, reference should be made to the section on the skip function.

-208-
13. PROGRAM SUPPORT FUNCTIONS
13.7 USER MACR 0s

(Example 1) Example of work position measurement


In this example, the distance from the measurement reference point to the end of the workpiece is
measured.

Argument <local variables> o g os ~

Nl *1ao=*4003;
x(#24)loo.000 !JZ #30se5001 *31=*5002:
Main program
Y(*25)100. OOO ?43 G91 GOl z@2S P@9:
Z(*26)-10. OOO N4 c21 X*Z4 Y#ZS F#9:
N5 C90 COO XS30 YIr31:

c65p90a Ix Ioo, YIoo. z- ]o. Faoo: To subprogram N6 *101=*$)-*WI fOl~m$#31-*@:


N7 *]~=SQR[alOl**lOl+*lm**l~] ;
<Commonvariable+ N6 G91 GOIZ-*~6;
N9 lF[*l~O EO91]COT011:

Skip input
m :::::::
I
Start point N4 *102
N3 *Iiui
z ~s \
LA
Y -25-87.7
L x
m

#101 ~-axismeasurementamount N 1 GWGglrn~alSStOraw


#102 ~-axismeasurementamounthJ2 XYstartpoh& storage
#103 Measurementlinesegment N3 Z-sxisadvmce
amount
N4 ~Ymeasurement( stopswithskips@alinput)
#5001 $% ‘eamrement ‘tati N 5 Return to ~ Y start points
#5002 y-axismeasurement.qta~ N 6 k Y measurementincrementalvaluecalculation
point
N 7 Measurementlineaegtnentcakxdation
#5061 x-axisskip input point N 8 z-axisescape
#5062 Y-sxisskipinputpoint N 9, N 10 G9WG91
modal return
N 11 Subprogram return
(Example 2) Skip input coordinate reading
>

-x - 15) -7s I -35


. -..*
1
r
14tG91G28XOYO: I
I
N2G90COOXOY0: I
N3XOY-1OO.: I - -s0
N4G31x-150 .Y-50 .F80 :
N5#111-#5061 #112= #5062: -75
N6GOOY0: +
N7G31XO: - lCO
N8#121=#5061 #t22=#5062:
N9M02: -Y

#ni=-75. + & # 112= –75. + &


#121=–25. + e #122= -75. + &

-209-
,, >, .4. , ::,.,.,.,

13. PROGRAM SUPPORT FUW170NS


13.7 USER MACROS

“d’ is the error caused by the response delay. (For further details, refer to the section on the skip
function.)
#122 is the N4 skip signal input coordinates since there is no Y command in N7.
(16 ) Variable name setting and quotation
Any name (variable name) can be given to common variables from #500 to #519. It must be
composed of not more than 7 alphanumerics and it must begin with a letter.
Command format

( 7
SE TVNn [NAME1 ,NAME2 ,“”””””] ;

“Zz:i::;i:

Variable names are separated by a comma (,).


Detailed description
1 ) Once variable names have been set, they will not be cleared even when the power is switched
off.
2 ) Variables in programs can be quoted by their variable names. In cases like this, the variables
should be enclosed in square [ ] parentheses.
(Example 1) GOIX [#POINTl];
[ #KAISUU 1 =25;
3 ) The
. . .variable numbers, data-and variable names appear on the CRT screen of the setting and
display unit.
(Example 2)
Program ... SETVN500 [A234567, KYORI, TOOL25];

[COM-VAR] .
*500 –12345.678 A 234567
*501 5670.000 KYORI
X502 –156.500 TOOL 25

COM-VAR #(502)~ATA(-153,5)NAM@TOOL25)
~

(17 ) Parameters

Variable no. Description


#1900 Machining parameter, C axis turning diameter (data with decimal po int
#1901 Machining parameter, C axis insert diameter (data with decimal po int

-210-
13. PROGRAM SUPPORT FUNCTIONS
13.7 USER MACROS

13.7.5 Arithmetic commands


A variety of arithmetic operations can be performed between variables.
#i = <formula>
<fomula> is a combination of constants, variables, functions and operators.
Constants can be used instead of #j and #k below.

1) Definition and substi-


#i= #j Definition, substitution
tution of variables
2) Addition arithmetic #i=#j+#k Addition
#i=#j-#lz Subtraction
#i= #j OR#k Logical sum (at every bit of 32 bits)
#i= #j XOR#k Exclusive OR (at every bit of 32 bits)
:3) Multiplication #i=#j*#k Multiplication
arithmetic #i= #j/#k Division
#i= #j MOD#k Remainder
#i= #j AND#k Logical product (at every bit of 32 bits)
:4) Functions #i= SIN [#k] Sine
#i= COS [#k] Cosine
#i =TAN [#k] Tangent (sin @/cos9 used for tan 0)
#i =ATAN [#j] Arctangent (ATAN or ATN may be used)
#i =ACOS [#j] Arc-cosine
#i= SQRT [#k] Square root (SQRT or SQR may be used)
#i =A.lM [#k] Absolute value
#i= BIN [#k] Conversion from BCD to BINARY
#i= BCD [#k] Conversion from BINARY to BCD
#i= ROUND [#k] Rounding off (ROUND or RND may be used)
#i =FIX [#k] Discard fractions less than 1
#i= FIJP [#k] Round up for fractions less than 1
#i =LN [#k] Natural logarithm
#i= EXP [#k] Exponent with e (=2.718 ,...) as base

NCM’E 1: A value without a decimal Doint


. is basicallv treated as a value with a decimal ooint at the e! I
(1 = 1.000).
l’WT’E 2: ~ffset amo~nts from #lOQOl and work coordinate system offset values from #5201 are handled
as data with a decimal point. Consequently, data with a decimal point will be produced even
when data without a decimal point has been defined in the variable numbers.
(Example)
r \

*101 =1000 ; *101 1000.000


*1 OOO1=*IOI : aflerexecution #lo2 1000. 000
#xo2 =#loool;

% d
NOTE 3: The <formula> after a function must be enclosed in square [ ] parentheses.

-211 -
13. PROGRAM SUPPORT FUNC1l’ONS
13.7 USER MACROS

( 1 ) Sequence of arithmetic operations


The sequence of the arithmetic operations (1) through (3) is, respectively, the functions followed by
multiplication followed in turn by addition.

#101= #lll+#112*Sl N[#l 131


_ @ Function
@ Multiplication
/ @ Addition

( 2 ) Assignment of arithmetic operation sequence


The part to be given priority in the operation sequence should be enclosed in square [ ] parentheses.
Up to 5 pairs of such parentheses including those for the functions maybe used.

#l Ol=SQRT [[#111 –.#l121 xSIN[#ll3]+# 114)x# 15) ;


~
Second pair of parentheses
Third pair of parentheses

,.. .

-212-
13. PROGRAM 5’UPPORTFUNCT?ONS
13.7 USERM-A(X? 0s

( 3 ) Examples of arithmetic commands

[1) Main program and G65 PIOO A1O 1320. ; #l 10.000


argument #lol = 100.OOO#lo2 =200.000 ; #2 20.000
assignment #lol 100.000
#lo2 200.000
[2) Definition and #1= 1000 #1 1000.OOO
substitution #2= 1000. #2 lm.000 From common
= #3= #lol #3 100.OOO variables
#4= #lo2 #4 200.000 From offset amount
#5= #5wl #5 -10.OOO
[3) Addition and #11=#1-t-looo #11 2000.000
subtraction #12= #2-50. #12 950.000
+,- #13 = #lol +#1 #13 1100.000
#14 = #5041 – 3. #14 –13.000
#15 = #5041+ #lo2 #15 190.000
[4) ~gic~ sum #3=N10 #3=ollooloo
OR #4= #30R14 14= OOOO111O
#4=ollolllo=llo
[5) Exclusive OR #3= 100 #3=ollMlloo
XOR #4= #3xoR14 14= OOOOI.11O
#4= 01101010= 106
(6) Multiplication and #21 = 100*1OO #21 1000O.OOO
division #22 = 100.*1OO #22 1000O.OOO
*, f #23 = 100*1OO. #23 1000OJMO
#24 = IOO.*1OO. #24 1000O.OOO
#25 = 100/100 #25 1.000
#26 = 100./100 #26 1.000
#27 = 100/100. #27 1.000
#28 = 100./100. #28 1.000
#29 = #5041 *#101 #29 -1000.000
#30 = #5041/# 102 #30 -0.050
Remainder #31 = #19MOD#20
MOD #19/#20 = 48/9 =5 with 3 over
(7) Logical product #9= 100 #9=ollooloo
#10= #9AND15 15=00001111
#lo=oooooloo=4

-213-
13. PROGRAM SUPPORT FUNCTIONS
13.7 USER MACROS

:8) Sine #501 = SIN [60] #501 0.860


SIN #502 = SIN [60.] #502 0.860
#503 = 1000* SIN [60] #503 866.025
#504= 100Q*SIN [60.] #504 866.025
#505 = 1000. *SIN [60] #505 866.025
#506= 1000. *SIN [60. ] #506 866.025
NOTE SIN [60] is equivalent to SIN
[60. ].

:9) Cosine #541 = Cos [45] #541 0.707


Cos #542 = COS [45. ] #542 0.707
#543 = 1000*COS [45] #543 707.107
#544 = 1000*COS [45. ] #544 707.107
#545 = 1000. *COS [45] #545 707.107
#546 = 1000. *COS [45. ] #546 707.107
NOTE COS [45] is equivalent to COS
[45. ].

:10) Tangent #551 = TAN [60] #551 1.732


TAN #552 = TAN [60. ] #552 1.732
#553 = 1000*TAN [60] #553 1732.051
#554 = 1000* TAN [60. ] #554 1732.051
#555 = 1000. *TAN [60] #555 1732.051
#556= N300. *TAN [60. ] #556 1732.051
NOTE TAN [60] is equivalent to TAN
[60. ].

(11) Arctangent #561 = ATAN [173205/100000] #561 60.000


ATN #562 = ATAN [173205/100. ] #562 60.000
or #563 = ATAN [173.205 /100000] #563 60.000
ATAN #564 = ATAN [173.205 /100. ] #564 60.000
#565 = ATAN [1.732] #565 59.999
(12) Arc-cosine #521 =ACOS [100./141.421] #521 45.000
ACOS #522 = ACOS [100./141.421] #522 45.000
#523 = ACOS [1000. /1414.213] #523 45.000
#524 =ACOS [10. /14.142] #524 44.999
#525 =ACOS [0.707] #525 45.009
(13) Square root #571 = SQRT [1000] #571 31.623
SQR #572 = SQRT [1000.] #572 31.623
or #573 = SQRT [1O.*1O.+ 20.*20.] #573 22.361
SQRT #574 = SQRT [#14* #14 + #15*#15] #574 190.444
NOTE In order to increase the aecu-
raey, proceed with the opera-
tion inside parentheses.

-214-
13. PROGRAM SV?!PORTFUNC7TONS
13.7 USER MAC%! $9$

14) Absolute value #576 = 1000 #576 -1000.000


ABs #577 = AIM [#576] #577 1000.000
#3= 70. #4 =-50.
#580 =ABS [#4 - #3] #580 120.000
15) BIN, BCD #l= 100
#11 =BIN [#l] #11 64
#12 =BCD [#l] #12 256
16) Rounding off #21 =ROUND [14/3] #21 5
RND #22 =ROUND [14. /3] #22 5
or #23 =ROUND [14/3. ] #23 5
ROUND #24 =ROUND [14. /3. ] #24 5
#25 =ROUND [-14/3] #25 -5
#26 =ROUND [-14. /3] #26 -5
#27 =R.QUND [-14/3. ] #27 -5
#28 =120UND [-14. /3. ] #28 -5
:17) Discarding #21 = FIX [14/3] #21 4.000
fractions less #22 = FIX [14. /3] #22 4.000
than 1 #23 = FIX [14/3. ] #23 4.000
FIx #24 = FIX [14. /3. ] #24 4.000
#25 = FIX [-14/3] #25 -4.000
#26 = FIX [-14. /3] #26 -4.000
#27 = FIX [-14/3. ] #27 -4.000
#28 = FIX [-14. /3.1 #28 -4.000
[18) Adding #21 = FUF [14/3] #21 5.000
fractions less #22 =FUP [14. /3] #22 5.000
than 1 #23 =FUP [14/3. ] #23 5.000
FUP #24 =FUP [14. /3. ] #24 5.000
#25 =FUP [-14/3] #25 -5.000
#26 =Ful? [-14. /3] #26 -5.000
#27 = FUF [-14/3. ] #27 -5.000
#28 = FIJP [-14. /3.1 #28 -5.000
(19) Natural #101 = LN [5] #lol 1.609
logarithms #lo2=LN [0.5] #lo2 -0,693
LN #103 = LN [-5] Error “p~82,3
(20) Exponents #lo4 = Em [2] #lo4 7.389
EXP #105 = EXP [1] #lo5 2.718
#106 = EXP [-2] #lo6 0.135

-215 -
13. PROGRAM SUPPORTIWN~ONS
13.7 USER MACROS

(4) Arithmetic accuracy


Errors as shown in the following table will be generated when performing arithmetic operations once
and these errors will accumulate by repeating the operations.

Arithmetic format Average error Maximum error Type of error


a=b+c
2.33 X 10-10 5.32 X 10-’0 Min. 1~/bl,I&/cl
a=b–c
a=b*c 1.55 x 10-10 4.66 X 10-10
Relative error
a = blc 4.66 X 10-10 1.86 x 10-9
lefal
a.~ 1.24 X 10-9 3.73 x 10-9
a= SIN ~]
5.0 x 10-9 1.0 x 10-8 Absolute error
a= COS ~1
ICI0
a= ATAN @/c] 1.8 X 10-6 3.6 X 10-6

NOTE SIN/COS is calculated for the function TAN.


(5) Notes on reduced accuracy
1) Addition and subtraction
It should be noted that when absolute values are used subtractively in addition or subtraction,
the relative error cannot be held under 10-8.
For instance, if the real values produced as the arithmetic calculation result of #10 and #20 are
as follows (these values cannot be substituted directly):
#10 = 2345678988888.888
#20 = 2345678901234.567
Then, performing #10 – #20 arithmetic calculation will not produce #10 - #20 = 87654.321.
There are 8 significant decimal digits in the variables and so the values of the aforementioned
#10 and #20 will be approximately as follows:
#10 = 2345679000000.000
#20 = 2345678900000.000
(Strictly speaking, the internal values will differ somewhat from the above values because they
are binary numbers.) Consequently, a large error as indicated below will be generated:
#lo - #20 = 1000OO.OOO
2) Logical operations
Calculations similar to addition and subtraction are performed also for EQ, NE, GT, LT, GE
and LE. Consequently, care should be taken with errors. For instance, to determine whether or
not #10 and #20 are equal in the above example:
IF [#10EQ#20]
Correct evaluation cannot be made because of the above-mentioned error. Therefore, consider
#10 and #20 to be equal if the difference between #10 and #20 is within the specified error
range as expressed below
IF [ABS [#10 - #20] LT200000]
3) Trigonometric functions
There is a guarantee re arding absolute errors in trigonometric functions but since relative
errors are not under 10-,F care should be taken when dividing or multiplying after having used
a trigonometric function.

-216-
13. PROGRAM StlPPO.RTFUNCITONS
13.7 USER MACROS

13.7.6 Control commands


The flow of programs can be controlled by IF – GOTO – and WHILE – DO –.
(1) Branching
Format IF [conditional expression] GOTO n; (where “n” indicates the sequence number in the
program)
When the condition is satisfied, control branches to “n” and when it is not satisfied, the next block is
executed.
IF [conditional expression] can be omitted and, when it is, control passes to “n” unconditionally.
The following types of [conditional expressions] are available.

#i EQ #j = When #i and #j are equal


#i NE #j # When #i and #j are not equal
#i GT #j > When #i is higher than #j
#i LT #j < When #i is lower than #j
#i GE #j 2 When #i is #j or more
#i LE #j S When #i is #j or less
“n” of “GOTO n“ must always be in the same program. Progr~ alarm “P231” till result if it is not.
A formula or variable can be used instead of #i, #j and “n.”
In the block with sequence number “n” which will be executed after a “GOTO n“ command, the
sequence number “Nn” must always be at the head of the block. Otherwise, program alarm “P231”
will result.
If “/” is at the head of the block followed by “Nn,” control can be branched to the sequence number.

,.. ------,
!

N1O

IFC*2
1
#22=*20

EQ1IGOTO1OO;
*23=*21:

Branching to N1OO
u: I
#
1

1
$$22=*20-*3: when contents of #2 is 1 Branch Brancl
t
*
-h senrch 8
*23=*21-*4; 1
1
( Wtlh 1
10 N1O 1
N1OO X*22 Y# 23:
I
*1=*1+1:
TO 1
head 1
1
I
1
1
‘[ [: I
%-.. -..’

NOTE When the sequence number of the branch destination is searched, the search will be conducted
from the block following IF .... ; as far as the program end (% code). If the number cannot be
found, then the head of the program to the block before IF ... . will be searched. Therefore, branch
searches in the opposite direction to the program flow will take longer to execute compared with
branch searches in the forward direction.

-217-
13. PROGRAM SUPPORT FUNCHONS
13.7 USER MACROS

(2) Repeat

END m;
\ I

While the conditional expression is satisfied, the next block to ENDm block is repeatedly executed;
when it is not satisfied, the block after ENDm is executed. DOm may come before WHILE.
WHILE [ecmditional expression] DOm and ENDm must be used as a pair. If WHILE [conditional
expression] is omitted, these blocks will be repeated as infinitum. The repeat identification numbers
range from 1 through 127. (DO1, D02, D03, .... D0127) Up to 27 nesting levels can be used.

~ S$~m~fntifi&tion number can be used any number


@ $%~~~~n’%m~er”=d ‘or ‘he WILE – Dom

WHILE-DO 1 ; m
1
Possible ~WHILE-D03 ; 1
1
I 1
t I
END1 ; ~ENDs ;
u ----- --- J
Possible I
~ WHILE-D02 ; 1
1/ I
WHILE-DO1 ; 1
~END2
----- ; --- ~
Possible i
~ WHILE-DO1 ; a
END 1 ; t i I
u ~ENDI ; J
----- ---

~ Up-to 27 nesting levels for WNILE ~ DOm- @Thcl%~mJer of WNILE – DOm nesting levels cannot
“m” is any number from 1 to 127 for the nesting depth.

— WHILE-DO 1 ; ‘--- DO I — WHILE-DO 1 ; —.


z
WHILE-D02 : ‘1-- ,
wHiLE-Do2 - ---- DO2
. .
. . WHILE-DO 3 ; 1. 1 -
: . --l ,
. 1
WHILE-D02 7 -----
D027 ~WHILE-D02 8:1- + 1 --
‘&sible I
I I II ! Not
Ii I 111 1 possible
EN D27; I
u ----- LEND28. ~
. -.--A- -- #f-
.
. 1
1
END 3:
U END2”; --- ) ; - : : ; -j-’~-L
END2 ; II
___p-
END1 ; --- t
END1 : I
N(Y1’E
: With nesting “m” which has been used once ---- L
cannot be used.

-218-
13. PROGRAM SVPPORTFVNCTIONS
L?. 7 USER MACR 0s

~ ~ILE – DOm must be assigned first and ENDm @ WHILE – DGm and ENDm must Correspxid on a M
(@ring) basis in the sameprogram,

r- WHI}E-DO1 : --n
I !
~-END 1 ;----T i t
t I
\
Not pcsaible ~- WHILE-DO 1 ; ‘-~
I I
I \
t~ ENK)lj ---- ;
------

b TWOWWIfLE – DOm’s must not overlap. %!)Branching externally is pcssible from the WHfLE – DOm
range.

WifILE-DO I ;

r WHILE-DO I ;

H
\ 1

p-elm
Not pcsible WHILE-.DO2 : ,
I
I
\ I
END1
----,--- . -_!

I
\ I
END2 : L-Nn

~ No branching is possible inside WHILE – DOm. ms can be called by M98, G65 or G66 between
0 %&%%?– DOm’s.

lF--GOTO n Main program Subprogram


—- —
WHILE-DO I ,

Lw
WHILE--DOD 2:
~ WHILE--DO:
Possible C65
I Ploo.
I \
m“~m III END2 ;
[ No
!IOt
ENO I ;
~ssible ~ \
M02: M99;

~ Macro calls can be initiated by G65 or G66 between DA pro~m error results with M99 unless WHILE and END
WHILE – DOm’s and commands can be issued are paned within the subprograms (including macm subpro-
again from 1. IJp to 27 nesting levels are possible for grams).
the main program and subprograms.

Main program Subprogram


Main program
~~1——
Subprogram
\ I \
\
WHILE
WHILE-DO 1 : WlilLE-DO I : M99 I -DO I ;

h%
(
Ploo; ti
Possible G63 To mJL&ogram
Ploo: \ \
\ ‘r. subpl’ogra
!2~D1 : END 1 : M02; I
I
!
! \
1.- Don~ndn co&ti~tes
M02 M99: illegal usage.

NQ’I’Ik Canned cycles G73 and G83 as well as special canned cycle G34 use WHILE, and so are not added
to the nesting levels.

-219-
13. PROGRAM SUPPORT FVNC’HONS
13.7 USER MACROS

13.7.7 External output commands


(1) Outline
Besides the standard user macro commands, the following macro instructions are also available as
external output commands. They are designed to output the variable values or characters via the
RS-232C interface.
1 ) Types
POPEN For opening the processing of data outputs
PCLOS For closing the processing of data outputs
BPRNT For character output and variable value binary output
DPRNT For character output and digit-by-digit variable value numerical output
2 ) Command sequence

e >

PO PEN . ......... . Open command

I
I I
BPRNT K)PRNT .... ..... Data output
commands
I I
[
....... ..... Close command

(2) Open command: POPEN


Command forma~ POPEN ;
Detailed description
1 ) The command is assimed before the series of data outmt commands.
2 ) The DC2 control cod~and fZO code are output from the NC system to the external output device.
3 ) Once POPEN ; has been assigned, it will remain valid until PCLOS ; is assigned.
(3) Close command: PCLOS
Command format: PCLOS ;
Detailed description
1 ) This command is assigned when all the data outputs are completed.
2 ) The DC4 cmtrol code and YO code are output from the NC system to the external output device.
3 ) This command is used together with the open command and it should not be assigned unless the
open mode has been established.
4 ) Assign the close command at the end of the program even when operation has been suspended
by resetting or some other operation during data output.

-220-
13. PROGRAM SUPPORT FUiVCITONS
13.7 USER MACROS

(4) Data output command: BPRNT


Command format
BPRNT [~l#vl [cl] J12#v2 tc2] ““..”-””+)

~ch~acterstring
I ! Variable number
Necessary number of digits ) Variable v~ue x 10C1
below decimal point
Detailed description
1 ) This provides the character output and binary output of the variable values.
2 ) The assigned character string is output as is by the 1S0 code.
Alphanumerics (A – Z, O – 9) and special characters (+, -, *,/) can be used.”x” is output
as the space code.
3 ) All variables are stored with decimal points and so the number of digits required below the
decimal point is assigned inside square [ ] parentheses. The variable values are handled as
4-byte (32-bit) data and they are output as binary data from the high-order bits. Minus (–) data
is handled as the complement.
(Example 1) If 3 digits are specified for 12.3456, the fourth decimal place will be rounded up and the
following will be output as binary data
[12.346 X Id] = 12346 (OOO0303A)
(Example 2) If O digits are specified with -100.0, the following will be output as binary data:
-1oo (FFFFFF9C)
4 ) After the specified data has been output, the EOB code is output as 1S0 code.
5 ) M <empty> variable is treated as zero.
(5) Data output command: DPRNT
Command format

DPRNT [J?l#vl [dl cl] 12#v2 [d2c21 ~-.-l

‘-;%;:,,, C-t-dSifl
decimal point
Detailed description
1 ) The character output and variable value decimal output are conducted by 1S0 codes.
2 ) The assigned character strings are output as they are by 1S0 codes.
Alphanumerics (A – Z, O – 9) and special characters (+, -, *,/) can be used.
3 ) The required digits above and below the decimal point in the variable values are assigned within
square [ ] parentheses. As a result, the variable values in digits equivalent to the number of
digits assigned in decimal notation from the high-order digits including the decimal point are
output in 1S0 code. Trailing zeros are not omitted.
4 ) Leading zeros are omitted.
Spaces can be output instead of the omitted leading zeros by setting the “mparaml” basic
machine parameter. The last line of the data output to the printer can be aligned.

-221 -
13. PROGRAM SUPPORT FUN~ONS
13.7 USER MACROS

13.7.8 Checkpoints
(1) When the user macro commands are employed, it is possible to use the MST and other NC control
. .
commands together with the arithmetic, dwision, branching and other macro commands ror
preparing the machining programs. When the former commands are made into NC executable
statements and the latter commands into macro statements, the macro statement processing should
be accomplished as soon as possible in order to minimize the machining time, because such
processing is not directly related to machine control.
As a result, the parameter (“macro single” on the parameter screen) can be decided upon and the
macro statements can be processed in parallel with the execution of the NC executable statement.
(The parameter can be set OFF during normal machining to process all the macro statements
together or set ON during a program check to execute the macro statements block by block. This
enables the setting to be made iri accordance with the intended objective in mind.)
/ \
Example of program

N1 C91G28XOYOZO;
t42 C92XOYOZO;
N3 COOX-1OO.Y- IOO.:
N4 slo]=lOO. XCOS(21 O.];
- Macro statement
N5 *102= 100. XSINC210,);
J
N6 GO1XSIOIYS1O2F8OO:

L J
Macro statements are
1. Arithmetic commands (blocks including =)
2. Control commands (blocks including GOTO, DO – END, etc.)
3. Macro call commands (including macro calls based on G codes and cancel commands (G65.
G66. G66.1, G67))
NC statements are all the statements which are not macro statements.
Flow of processing

Program analysis
Nlm N2 t&~&&
&
Macro statement pmeessing t 8 I
t i t N4 NS 1 I
a
NC statement processing it I 1 i
! ! N2 , IN ~ I N6 I N7
, J I
Next command block II I
; N1 !N2; N3 I N6
Blodk being exeeuted i

Program analysi8
N1 N2 ~x3 N4 N5 N6 N7
,
Macro statement processing ; i 1 I I I
I 1 eN4 I ~N5 ; I
II
II # 8 t II
NC statement processing I N2 1N3 I N6 b I t N7
Next command block . 4
8 tN2:
I I
I
N1 N3 A NG
Block being execyted ! , i

-222 -
13. PROGRAM SUPPORT FVNCTJ?ONS “
13.7 USER MACROS

Machining program display

N4, N5 and N6 are recessed in parallel


r----------% with the control of t[ e NC executable
statement of N3. N6 is an NC executable
@mltindM3
G** x-loo. Y-1oo. :1 statement and so it is displayed as the
N6 GO1 X$$IOIY*I02 next command.
If the N4, N5 and N6 analysis is in time
during N3 Contrql, the machine control
will operate continuously.

---------- N4 is recessed in parallel with the con-


trol o f the NC executable statement of
N3, and it is displayed as the next com-
mand.
1[Next N4
command]
*1 OI=1OO.
*ccts [210. 1 :
N5 and N6 are executed after N3 has fin-
ished, and so the machine control is held
on standby during the N5 and N6 analysis
time.

-223-
13. PROGRAM SUPPORT FUNCITONS
13.7 USER MACROS

13.7.9 Examples using user macros


Three examples using user macros will be given below.
(Example 1) SIN curve
(Example 2) Bolt hole circle
(Example 3) Grid
(Example 1) SIN curve

SIN#) ,

C65PP1 Aal Bbl Ccl Ffl :

a 1 : kitia] value @
b I ; Final value 360°

C 1; Rof R* SINr9
f 1: Feedrate

Main program 09910 (submomam)

*E *1=0
WHILE C*1LE*2]D01:
*101=*2* SlNC*ll

G90Gol X#l

*1=*1 +1O. ;
Y#10F#9:
:

}
NOTE

ENDI;
Mal variable *2=360. 000
M99;
*3=100. 000

LuLLJ NOTE 1 The commands can be assigned in 1


block with the following configuration:
G90GOlX#lY [#3* SIN[#l]] F#9 ;.

-224-
13. PROGRAM SUPPORT FUNC7TONS
13.7 USER MACROS

(Example 2) Bolt hole circle


The macro command is assigned as the hole position command after the hole data has been defined
with the canned cycle (G72 — (389).

a.
h
-x x1

1 w
Main program a 1 ; Start angle
b 1 : No.Of holes
I

Fs
r I ; RadiW I al
x 1 ; X-axis center – !-7- ‘- ‘1
position
y 1 ; y~s @nt~t.
position -Y

w
~lol=o; o+ #loi # 101 = Hole number count
tl.f12=#4003; G90,G91mode
*103= *5 OO1; NOTE 1 Read .+* I 02 #] 0z=G900r G91
kt104=*5002: Leadingof coordinate
mnediatetybefore
KI1l=*I; x -*103 # 103 = X-axis pnxsent position
1 Y +$$ 104 # 104 = Y-axis present position
WHILE f*101LT*2)D01: hart angle - #11 1 * 1 11 = Start angle

*122=*120 *123= #121;


IF(#102EQ90] GOTO100:

#122= t$120-*103;
NOTE 1 Radius *SIN [#ill] * 12 I =Hole position Y
$!123=$$12 I-*104; \ + cmrtercoordinateY coordinate
I + #121 I
$t103=$$120 #120 4*122 $$122 = X-axis absolute value
NOTE 1 #121 -*123 # I 23 = Y-axis abaolute value
*104=*121 }
1

Vloo x#122Y #123: G90, G91 mode identification


@=- 1
klol=ttlol+l; NOYE 1
} *120 -*103 -@t 122 * 122= X-axisincrement.atvrdue
wlIl=#I +360. X#l Ol/*2 ;
*]21-$$104~* 123 * 123= Y-axiaincrementalvalue
END1 : $$120 + *103 X+wis present pition update
M99: *121 + *104 Y-axis present paition qdate

N! OOX*122Y*123 Drilling command


NO~ 1: The processing time can be I
shortened by single-block *1 01 +1+$101 Hole no. count-up
reduction in programming. 360’# 101/ Hole no.
+$$1
+# 111 # I I 1 = Hole position angle
1

-225-
13. PROGRAM SUPPORT FUNC?70NS
13.7 USER MACROS

G28 XO YO ZO
T] M06; -x -500.
G90 (243 Z.1OO. HOI; I
!

G54 COO XQ YO:


G81 Z-1 OO. R3. F1OO LO M03;
G05P89mx-wI. Y-WI AO B8RNXI.
C65P6W0X-St13. Y-SW. A O B8 RZX1.
G65P9820X-5C0. Y-500. AO B 8 R3C0.

5
-J

I -Y
i

(Example 3) Grid
The macro call is assigned as the hole position command after the hole data has been defined with the
canned cycle (G72 — G89).
?

G61 Zzl Rrl Ffl;


Cfipjr 1 XXI yyl M Jjl Aal Bb1 ;
x I : X-axis hole position ;,
‘z
y i: Y-axis hole position ~’
i 1: X-axis internal
j 1: Y-axis internal @++&’
a 1 : X direction hole no.
b 1: Y direction hole no. O+?@+ -Y

G28 XO YO .ZO:
TI M06;
G90 G43 ZICKr.HOI;
GS4 Gal Xo Yo;
G81Z-1OO.
( R3. Fl@I LO M03;
G65P8930 XO YO I -100. J -75. A5B3;
,9
(
subprogram
G64 Z-9J. it3. F250 MCG;
G65P8830 XO 1-100. J-75. A5B3 ;
.-
(
subprogram

1 1-

-226-
13. PROGRAM SUPPORT FUNCITONS
13.7 USER MACROS

09930
g ~ 30 (subprogram) r 1
start point x
caerdinate X,-41OI #lol==x-*st~Po~t
#101 -=#24: stall intY y,-9#lo2 #l 02-Y-axise.faItpoint
cm J’”mate
#lo2-#25; X-axkiatewal iI+*l~3 #1 03=xd~iOn~te~a
#1 ot=yd~lon~ter+’a
#1 0t3-YdireciiOnhdeno,
#lo3-#4: NOTE 1

5#loft=#5:

#lo6-#2:
Yd@ctiondrilling
finish check

WIIILE[# i06GTO]DOl: Y

05 GTfl? D02:

;90 x#lol Y#lo2: X direction hole


number check

#l ol=J#lol+#lo3:
NOTE 1 Positionin& drilling
#lo5=-#lo5-1: 1

X coordinate update
E!’JD2 :

1
X direction hole
1 #io5-l+#lo5 I number -1
#l ol=#lol-#lo3:
#102=#102+#104:
NOTE 1
#lo3--#lll3:
#lo6==#lo’6-1:

ENDI :

M99:

KYI’EkTh
e processing time canbe
shortened by. single-block
reduction in the programming. I

-227-
,, .,,

13. PROGRAM SUl?PORTFVN~ONS


13.8 USER MACROS I (G101 – G11O, G200 – G202]

13.8 USER MACROS I (G101 – G11O, G200 – G202)


Arithmetic operations and decision branching can be undertaken for variables or between variables using
the macro instructions (arithmetic instructions, control instructions).
( 1 ) Arithmetic instructions
Various arithmetic operations can be performed between variables using the arithmetic G codes
~~~~at– G11O).
..

<Arithmetic G code> A <argument 1> B <argument 2> (C<argument 3>)


A, B and C are address words which identi~ the arguments.
Argument 1 must be assigned and it must be a variable.
A program error (P297) results when it is not assigned or if it not a variable.
Arguments 2 and 3 may be variables or constants, and a sign maybe added if they are constants. They
can be omitted when they are not required, in which case they are processed as zero.

. ,,.. .,
... ,.

-228-
13. PROGRAM SUPPORT FUNCiVONS
13.8 USER MACROS I (G1OI – G11O, G200 – G2112)

-229-
13. PROGRAM SUPPORT IWNCl?ONS
13.8 USER MACROS I (GlOl – GllO, G200 – G202j

(Example 1)

GIOIA# 1 B–1OOO ; (# 1 =–lOOO. )


G102A#3B#3 Cl; (X3= X3+1.)
G103A#2B7 C#l ; (#2=7 .–#l)
G104A$t6B#5 C#4; (#6=#5 *#41
G105A#4B#2 C1O; (#4=# 2/10.)
Glo6A#3B#l c#2; (*3= X12+X22)
Glo7A#7Bloooo c#2 ; (# 7=10000. “sin (#2) )
G108A# 1 B# 3 C30.000; (# 1 =X3 “ Cos [30.0001 )
G109A#4B#5 C#6; (#4=tan-’ ($15/#6) )
GlloA#3B#l c#2; (#3= #l’–# 2’)
NOTE: 1. Assign arithmetic instructions in an independent block.
2. Addresses A, B and C can be arranged in any order.
3. Deeimal points are provided in each case with address A, B and C arguments.
4. Always assign codes G101 – G110 ahead of addresses A, B and C.
5. When codes G101 – G11O are used, the subprogram nesting count and number of local
variable nesting levels increase.
6. Addresses A, B and C can be assigned even when axis addresses A, B and C are used.
7. The units used for the angle are O.OO1°with sine (G107), cosine (G108) and tan-’ (G109)
operations.
8. The value of tan-l (G109) is the amplitude (-180° ~ a < 180°) coordinates are provided by
(C, b).
9. Variable arithmetic expressions maybe used in place of the addition and subtraction (G101,
G102, G103) instructions.
10. Program error P282 results when B* – C2 is less than zero in G11O.
(Example 2)
The following programming:
G102A#3B#lC1000 ; (#3 = #1 + 1000.)
G103A#3B#3C#2 ; (#3 = #3 - #2)
GOOX#3
is equivalent to:
GOOX#l + 1000 -#2 ;

!:
. ,’

,., .,

.,,.
. ,,. ,

-230-
13. PROGRAM SUPPORT FU!NCWONS
13.8 USER MACR 0s I (Glol – Gllo. G200 – G2t72)

(2) Decision branching instructions


The flow of the processing of identical program numbers can be controlled using the decision
branching G codes (G200 – G202).
Format:
<Decision branching G ~de> A <argument 1> ( B <~gument 2>) (C <mgument 3>)
A, B and C are address words which identify the arguments.
Use these instructions in the M131 or memory mode.
If they are used in any other mode, a program error (P298) will result.
Argument 1 must be assigaed and it maybe a variable or constant. A program error (P296) results
when it is not assigned.
Arguments 2 and 3 may be variables or constants, and a sign maybe added if they are constants.
Argument 3 can be omitted in which case it is processed as zero.
Example
G200 A1OO ; (Branching to BTIOO)
G201 A200 B#l c#2 ; (If #1= #2, branching to IN200)
G202 A#ll B#2 C50000 ; (If #2< 5000, branching to IQnumber with #11 contents)

NfYlT2 1. ‘I’he sequence numbers must be in the subprogram of the same program number. A program
error (R231) will result wlmn branching occurs when the assignment of a sequence number not
included in the subprogram of the same program number.
2. Assign decision branching instructions in an independent block.
3. Addresses A, R and C can be arranged in any order.
4. Ikeimal paints are provided in each case with address A, B and C arguments.
5. Always assign codes G200 – G202 ahead of addresses A, B and C.
6. When codes G200 – G202 are used, the subprogram nesting count and number of local
variable nesting levels iricrease.

-231 -
13. PROGRAM SUPPORT NNCTIONS
13.8 USER MACROS I (GlOl – G11O, G200 – G202)

0 o

-232-
13. PROGRAM SUPPORT FUNCTIONS
13.9 SCALING @50, G51)

13.9 SCAUNG (G50, G51]


The shapes assigned by the machining programs can be expanded or reduced. The range of this expansion
or reduction is from x 0.000001 to x 99.999999.
The G51 command is used to assign the scaling axes, scaling center and the scaling magnification.
The G50 command cancels scaling.

13.9.1 Command format


G51Xx YyZz Fp; Scaling ON (this assigns the scaling axes and center (incremental/absolute),
and magnification)
G50 ; Scaling cancel

13.9.2 Detailed description


( 1 ) Assigning the scaling axes, scaling center and the magnification
‘I’he scaling mode is subsequently established once the G51 command is assigned. G51 serves to
speci~ the scaling axes, center and magnification only it does not provide movement.
The scaling mode is established by the G51 command but the axes actually valid for scaling are only
those axes for which the scaling center has been assigned.
1 ) Scaling center
The scaling center is assigned by the axis addresses of the axes concerned in accordance with the
absolute or incremental value mode (G90 or G91). The commands must be assigned even when
the present position is to serve as the center. As already mentioned, the axes valid for scaling
are only those axes for which the center has been assigned.
2 ) Scaling magnification
The scaling magnification is assigned by address P.
Minimum command unit: x 0.000001 Both ranges are valid but
Command range: x 1 – 99999999(x 0.000001 – x 99.999999) the decimal point COm-
Or x 0.000001 – x 99.999999 mands can be assigmd only
for the commands after
G51.

,,,

-233-
13. PROGRAM SUPPORT FUN~ONS
13.9 SCALING (G50, G51)

Scaling magnification: ~

Programmed shape

I
Scaling center

When the magnification has not been assigned in the same block as G51, the magnification set by the
parameter is used. However, this will not be valid in the scaling mode even if the parameter setting
is changed.
Only the value set when G51 was assigned is valid. When the magnification has not been assigned for
both the program and parameter, it is calculated as x 1.
A program error will result in the following cases.
o P350 when scaling has been assigned even though the scaling specifications are not available
e P35 when the upper limit of the magnification command range has been exceeded in the same
block as G51
(This is calculated as x 1 when it is less than 0.000001.)
(2) Scaling cancel
The scaling cancel mode is subsequently established when the G50 command is assigned.
(3) Checkpoints
1 ) Scaling does not apply to the cutter compensation, tool length offset, tool position offset and
other such offset amounts. (Offset is provided and calculated for shapes after scaling.)
2 ) Scaling is valid only for movement commands in the automatic operation mode (tape, memory
or MDI). It is not valid for manual movements.
3 ) The position display indicates the coordinates after scaling has been applied.
4 ) Scaling applies to all movements in the automatic operation mode undertaken by the scaling
valid axes (axes for which the center has been assigned by the G51 command).
5 ) Scaling applies with arc commands for the two axes configuring the arc plane even when only
one axis is a scaling valid axis.
6 ) The cancel mode i~established when the M02, M30 or MOOcommand (only with MO resetting)
is assigned in the scaling mode.
It is also canceled by the reset button (including external reset) when reset initial is selected.
7 ) The decimal points are valid only after the scaling command (G51) for the scaling magnification
P data.
G51 pO.5 ; ............... X 0.5
PO.5 G51 ; ............... x 1 (P is treated as O)
P500000G51 ; ........ X 0.5
G51 p500000 ; ........ X 0.5
8) The scaling center also shifts by the difference amount when the coordinate system is shifted
(G92, G52 commands) during waling.
9) When operation is manually interrupted during scaling, the manual ABS switch selection is
ignored and the same movement results as when the manual ABS switch is at the OPF position.

-234-
13. PROGRAM SUPPORT FUNCTIONS
13.9 SCALING (G50, G51)

13.9.3 Programming examples


( 1 ) Basic operation [ I ]

NO1 G92 XOYOZO;


N02 G90 G51 X–looooo Y-looooo PO.5 ;
N03 GOOG43 Z -200000 H02 ;
N04 G41 X-50000 Y-50000 DO1;
N05 GO1 Z-250000 F1OOO ;
N06 Y–150000 F200;
N07 x -150000;
N08 G02 Y-50000 J 50000;
N09 GO1 x -50000;
N10 GOOG49 Zo ;
Nll G40 G50 XOYO ;
N 12 M02 ;

~ Tool path after 1/2 scaling


DO 1 =25.003 L Programmed path afler U2 scaling
~ Tool path without sealing
Programmed path without sealing

-235-
,,. ,

13. PROGRAM SUPPORT FUNCITONS


13.9 SCALING (G50, G51J

(2) Baaic operation [ II ]

NOI G92 XO YO ;
N02 G90 G51 - See (1) through (4) below.
Po. 5 ; ““””””””””””
N03 GOO X–50000 Y–50000 ;
N04 GOI X – 150000 F 1000;
N05 Y–150000 ;
N06 X–50000 ;
N07 Y –50000 :
N08 GOO G50 ;
N09 M02 ;

(1) Without scaling N02 G90 G51 PO.5 ;


(2) Scaling for X, Y N02 G90 G51 X –100000 Y – 100000 PO.5 ;
(3) Scaling for X only N02 G90 G51 X–1000N PO.5 ;
(4) Scaling for Y only N02 G90 G51 Y–1OOOOOPO.5 ;

Y
b

-236-
13. PROGRAM SUPPORT FUNCIYONS
13.9 SCALING [G5’0. G51j

(3) Basic operation [ III]

NO1 G92 XO YO;


N02 G90 G51 PO.5 ; ------ See (1) through (4) below.
N03 GOO X -50000 Y -50000 ;
N04 GO1 X -150000 F 1000 ;
N05 G02 X -100400 1-25000 ;
NOO GO1 X –150000 ;
N07 G02 X -200000 I -25000 ;
N08 GO1 X -250000 Y –100000 ;
N09 Y –50000 :
NIO X-50000 ;
Nll GOQ G50 ;
N12 M02 ;

(1) Without sealing N02 G90 G51 PO.5 ;


(2) Scaling for X, Y N02 G90 G51 X-125000 Y–1OOOOOPO.5 ;
(3) Scaling for X only N02 G90 G51 X-125000 PO.5 ;
(4) Scaling for Y only N02 G90 G51 Y -1OQOOOPO.5 ;

Y
-250. - m. -150. -125. -100. – 50.

Q --150.

-237-
13. PROGRAM SUPPORT FViVCTIONS
13.9 SCALING (G50, G51)

(4) G27 referenee (zero) point cheek command during scaling


When the G27 command is assigned during sealing the sealing will be canceled upon completion of
the command.

NO1 G28 XO YO;


N02 G92 XO YO;
N03 G90 G51 X–1OOOOOY-1OOOOOPO,5 ;
N04 GOO X -50000 Y –50000 ;
N05 GO1 X – 150000 F –1000 :
N06 G27 XO YO;
\

- lW. - lm. -m. ..


A
I

--
—-+”” r i 50.

-— . .- —-—

--

Scaling center

If the program calls for reference point arrival when sealing is not applied, the tool will arrive at the
reference point even if scaling is applied.

-238-
13. PROGRAM SUPPORT FUN’’ONS
13.9 SCALING (G50. G51 )

(5) Reference (zero) point return commands (G28, G29, G30) during scaling
When the G28 or G30 command for reference point return is assigned during scaling, scaling will be
canceled at the intermediate point and reference point return will be performed. Reference point
return will still be performed with’ the point where scaling is canceled serving as the intermediate
point even when there is no intermediate tmint.
men the G29 command is assigned dur(ng scaling, scaling is applied to the movements after the
intermediate point.

NO1 G28 XO YO;


N02 G92 XO YO;
N03 G90 G51 X-100000 Y -150000 P500000;
N04 GOOX-50000 Y–1OOOOO ; 0.5
N05 GO1 X–150000 F -1000 ;
N06 G28 X- 100000 Y –50000;
N07 G29 X-50000 Y-100000;

Sealing center I

-239-
,,. ,,:,

13. PROGRAM SUPPORT F?lNCITONS


13.9 SCALING (G50, G51)

(6) G60 (uni-direction positioning) command during sealing


When the G60 command is assigned during sealing sealing applies to the final positioning point but
not to the creep amount (parameter setting). In other words, the creep amount will be retained
regardless of the sealing.
NOI G92 XO YO;
N02 G91 G51 X–1OOOOO Y–150000 PO.5 ;
N03 G60 X-50000 Y–50000;
N04 G60 X–150000 Y-1OOOOO;

Y
A
–150. –loo. -50.

Creep amount.

In sealing

Scaling center I

-240-
13. PROGRAM SUPPORT FUNC7TONS
13.9 SCALING (G50, G51)

(7) Work coordinate system selection during scaling


When a work coordinate system is selected during scaling the scaling center will shift by an amount
equivalent to the difference between the offset amounts of the new and old work coordinate systems.
Subprogram
NO1 (W3 G54 GOO XO YO ; 0100 ;
N02 G51 X–1OOOOO Y–1OOOOO PO.5 ; GOO X–50000 Y–50000 ;
N03 G65 P1OO; GO1 X–150000 F1OOO;
N04 G90 G55 GOO XO YO ; Y–150000 ;
N05 G65 P1OO; X–50000 ;
Y–50000 ;
M99 ;
%

(i

d/ I
c’
I
W2

-241-
13. PROGRAM SUPPORT FUNCTIONS
13.9 SCALING (G50, G51)

(8) Pattern rotation command during sealing


When the pattern rotation command is assigned during sealing, the sealing will be applied to both the
pattern rotation center and radius of rotation.
Subprogram
NO1 G92 XO YO; 0200:
N02 G90 G51 XO YO PO.5 ; G91 GO1 X–14645 Y35355 F1OOO;
N03 GOO X–1OOOOOY–1OOOOO ; M99 ;
N04 M9S P200 1 –50000 L 8 ; %
t

-242-
13. PROGRAM S17PPORTFUNCT10NS
13.9 SCALING (_G50, G51]

(9) Scaling command in pattern rotation subprogram


When the scaling eomnmnd is assigned in a pattern rotation subprogram, the scaling can be applied
only to the shape specified by the subprogram without it being applied to the pattern rotation radius.
Subprogram
G92 XO YO; 0300:
G90 GOO X1OOOOO ; G91 G51 XO YO PO.5;
M98 P300 1-100000 L4 ; GOO X -40000 ;
G90 GOO XO YO: GO1 Y -40000 F 1000 ;
M02 ; x 40000 ;
G03 Y80000 J 40000 ;
GO1 X -40000 ;
Y -40000:
GOO X40000 :
G50 ;
x -100000 Ylooooo ;
M99;
%

Machining
program

r scaIing

-243-
,.

13. PROGRAM SVPPORTFUNC1701VS


13.9 SCALING (G50, G51j

(10 )Scaling command during coordinate rotation


When the command sealing is assigned during coordinate rotation, the sealing center rotates. Scaling
is executed at the rotated sealing center.

NOI G92”XO YO;


N02 MOO; (Coordinate rotation data setting)
N03 G90 G51 X–150000 Y–75000 PO.5 :
N04 GOO X–10WIO Y–50000 ;
N05 GO1 X –200000 Flm ;
NOO Y–1OOOOO ;
N07 x -100000 ;
N08 Y–50000 ;
N09 GOO G50 XO YO;
\

Y
-2.)0. -150. - la). –50.
x

Machining program

- -w.

I
I
I

- - 1(N).

Shift in sealing”
center due to
coordinate
rotation - –150.
Coordinate rotation

-244-
13. PROGRAM SVPPORTFUNC170NS
13.9 SCALING (G50. G51J

(11 ) G51 command during scaling


When the G51 command is assigned in the scaling mode, the axes for which the center has been newly
assigned will also serve as the scaling valid axes. Furthermore, the magnification based on the new
G51 command will be valid.

NO1 G92 XO YO;


N02 G90 G51 X–150000 Po.75 ; Scaling axis X ; P= 0.75
N03 GOO X –50000 Y-25000 ;
N04 GO1 X-250000 F –1000 ;
N05 Y -225000 :
N06 x-5o000 ;
N07 Y-25000 ;
N08 G51 Y–125000 PO.5 ; Scaling axes X, Y ; P= 0.5
N09 GOOX–1OOOOO Y–75000;
N1o GO1 X-200000;
Nll Y– 175000;
N12 x -100000;
N13 Y–75000;
N14 GOOG50 XO YO; Cancel

-250. -m. – 150. -100. -50. x

- -50.

- - Km.
Machining
program
I
I - -150.
I
I
I
1
1
I 1 - -m.
I 1
——— ———— —

-245-
.,, ,,

13. PROGRAM SUPPORT FLJNC170NS


13.10 G COMMAND MIRROR IMAGE [G50.L G51.1 J

13.10 G COMMAND MIRROR IMAGE (G50.1, G51.1)


(1) Outline
When cutting a left/right symmetrical shape, programming time can be saved by using a program for
the left or right side only and by using a function which can machine the other side without further
programming. This function is known as mirror image.
An example is shown in the figure where a program has been run to machine the left side of a shape.
By applying the mirror image function, it is possible to machine the right side symmetrically to the left
side by running the same program.
Mirror image functions include external switch mirror image, parameter mirror image and G
command mirror image. This section describes the G command mirror image functions. These
functions are assigned by G codes, and it is possible to assign the mirror axis by programming.

Original shape (programmed shape)


command when
left-side machining program is mn

I
L .-.
< ,
‘\
.
x
Mirror image axis

(2) Command format


G51.1 XX, Yyl ZZ1 .... . (mirror image ON)
G50.1 Xxz Yyz Zzz .... ; (mirror image OFF)
(3) Detailed description
1 ) The coordinate word in G51.1 is assigned for the mirror image command axes while the
coordinate values are assigned for the mirror image center coordinates in either absolute or
incremental values.
2 ) The coordinate word in G50.1 denotes the axes for which mirror image will not be applied and
the coordinate values are ignored.

-246-
13. PROGRAM SUPPORT FWCTIONS
13.10 G COMMAND MIRROR IMAGE (G50.1, G5LI)

3) When mirror image is applied to only one axis in the ~signed plane, the rotation direction or
offset direetion is reversed for arc or cutter compensation and coordinate rotation.
4) These functions are processed on the local coordinate system and so the mirror image center
will be moved by counter presetting or by any change in the work coordinates.
5) Zero point return during mirror image
‘when a zero point return command (G28 or G30) has been executed during mirror image, the
mirror image is valid for operations up to the intermediate point but not for operations from the
intermediate point to the ‘zero point.

Intermediate point when mirror


image is apphed

Path with mirror image applied Programmed path

Mirror image center


6) eturn from zero mint during mirror image
When a return co~mand (G2~) has been ~ssigned from the zero point during mirror image,
mirror image applies to the intermediate point.
7), Mirror image is not applied to the G53 command.
(4) Checkpoints
When mirror image is cancded anywhere except at the mirror image center, the machine position will
shift from the absolute value, as shown in the figure below. (This state continues until an absolute
vahe command ~sitioning in G90 mode] is assigned in the program or a G28 or G30 command is
assimmd for zero mint return.) The mirror image center is set with an absolute value and so if
ano~her mirror im~go center is assigned in this sta~e, the center maybe set at an unforeseen position.
Cancel mirror image either above the mirror image center and, after cancellation, assign a positioning
command using absolute values.

Absolute value Machine position


(position assigned in
program) x,.
~~ When moved by incremental command
,“ / after mirror image cancel
f
I Mirror image cancel command
1 assigned here
“1
h
/’
d:’.wwm
---

1 ~ Mhror image axis command assigned here


Mirror image center

-247-
.,,

13. PROGRAM SUPPORT FUNC170NS


13.10 G COMMAND MIRROR IMAGE {G50.1, G51.1)

( 5 ) Combination with other functions


1 ) Combination with cutter compensation
Mirror imaging (G51.1) is prdcessed after a cutter compensation command (G41 or G42) has
been applied, and cutting proceeds as follows.

fi;~~en5atio
Lwhe:=:
only is applied
Mirror axis
When mirror image only is applied

compensation are applied

2 ) Mirror image and scaling


Mirror image applies to a shape after scaling so that cutting proceeds as follows.

#
~ Original shape ~ When scaling and mirror image
Mirror image center are aPplid
/
L men ding is applied

The same path is traced as that when mirror image has been applied to the scaling center as

-248-
13. PROGRAM SUPPORT FUNCTIONS
13.11 CORNER CHAMFERING, CORNER RI

13.11 CORNER CHAMFERING, CORNER RI


Chamfering or corner rounding at any angle is performed automatically by addiug C or R at the end of
the block to be assigned first among those command blocks which shape the corner m~h stra~ght lines only.

13.11.1 Corner chamfering (, C_)


(1) Function
The corner is chamfered in such away that the points, which are distanced by the lengths assigned by
C_ from the imaginary starting and final corners which would apply if no chamfering were to be
performed, are connected.
(2) Command format
N1OOGO1X _Y_, C_; Chamfering is rformed at the point where
N1OOand N20 r intersect.
~200GOlX _Y_ ;T
“~ Length up to chamfering starting point or end point
(3) Example of program from imaginary corner
Q)G91GO1X1OO., Clo. ;
@xloo. Yloo. ;

‘1 ,maghaw intersection point

Chamferingstart point
1Iw. u

Xaxis
6 *
Xloo.o

(4) Detailed description


1) The start point of the block followingthe corner chamfering serves as the imaginary corner
intersection point.
2) When the comma in ,C is not present, the command is treated as a C command.
3) When both C_ and R_ are assigned in the same block the latter command is valid.
4) Tool offset is calculated for the shape which has already been subjected to corner chamfering.
5) When scaling is assigned, it is applied even to the corner chamfering amount.
6) Program error P381 results when the bIock folIowingthe command with corner chamfering
contains an arc command.
7) Program error P382 results when the block folIowingthe command with corner chamfering
does not contain a linear.
8) Program error P383 results when the movement amount in the block assigning corner
chamfering is less than the chamfering amount.
9) Program error P384 results when the movement amount in the block following the block
assigning corner chamfering is less than the chamfering amount.

-249-
13. PROGRAM SUPPORT FUNCTIONS
13.11 CORNER CHAMFERING, CORNER RI

13.11.2 Corner rounding (, R_)


(1) Function
At a corner composed only of straight Hues, the imaginary corner which would exist if the corner were
not to be rounded is rounded with an arc having the radius which is assigned by R_.
(2) Command format
N1OOGO1X _Y_ R ; Rounding is performed at the point
) where N1OOand N200 intersect.
N200G01X _Y_ :
T
~ Arc radius of corner rounding

(3) Example of program

OG91GO1X1OO., R1O. ;
@xloo.
— Yloo. :

b
Yaxis
Corner rounding
end point
Corner rounding T
start point Ylcn.o

@ v

A\ ~xaxis
< +
Xloo.o x 100.0

(4) Detailed description


1) The start point of the block following the corner rounding serves as the imaginary corner
intersection point.
2) When the comma in ,R is not present, the command is treated as an R command.
3) When both C_ and R_ are assigned in the same block, the latter command is valid.
4) Tool offset is calculated for the shape which has already been subjected to corner rounding.
5) When scaling is assigned, it is applied even to the corner rounding amount.
6) Program error P381 results when the block following the command with corner rounding
contains an arc command.
7) Program error P382 results when the block followingthe command with corner rounding does
not contain a linear.
8) Program error P383 results when the movement amount in the block assigning corner rounding
is less than the radius.
9) Program error P384 results when the movement amount in the block following the block
assigning corner rounding is less than the radius.

-250 -
,
13. PROGRAM StJPPORTFUNC170NS
13.12 LINEAR ANGLE COMMAND

13.12 LINEAR AI14G!LE COMMAND


( 1 ) Function
The end point coordinates are calculated automatically by assigning the linear angle and one of the
end point coordinate axes.
(2) Command format

G17; This selects the assigned plane (G17 – G19).


NIGCllAa, Xxl (YYI} ; This assigns theangleand the X or Z axis coordinates.
N2GOlA–a~Xx~ (YY~) ; (A -a, or Aa, is the same.)

Xj
(x,. y,)
xl

N1

X9
(X1, Y:)
L
-Y

( 3 ) Detailed description
1) ‘I’he angti is from the first axis (horizontal axis) + direction in the selected plane. The
counterclockwise (CCW) direction is considered to be + and the clockwise direction (CW) -.
2) Either of the axes in the selected plane is assigned for the end point.
3) ‘I’he angle is ignored when the angle and the coordinates of both axes are assigned.
4) when only the angle has been assigned, this is treated as a geometric command.
5) The angle can be used as either the start or end point arigle.
6) The function cannot be used when address A is used for the axis name or as the second
miscellaneous function.
7) This function is valid only for the GOl command; it is invalid for other interpolation and
positioning commands.

,,

-251-
13. PROGRAM SUPPORT FUNCHONS
13.13 GEOMETRIC COMMAND

13.13 GEOMETRIC COMMAND

13.13.1 Geometric command I


( 1 ) Function
When it is difficult to determine the point at which the two straight lines intersect with a continuous
linear interpolation command, the end point of the first straight line will be automatically calculated
and the movement command will be controlled provided that the slope of the first straight line as well
as the end point coordinates and slope of the second straight line are assigned.
(2) Command format

G17; This selects the assigned plane (G17 – G19).


NIGOIAal Ff, ; This assigns the angle and feed rate.
This assigns the nefi block end point coordinates,
N2XX, YY, Aa,(a’JFfz ;
angle and feed rate.
f >
?

N1

Present position (Selected plane


End int axis 1)
(Xc, T e)

(.,3 ) Detailed description


1) Program ~rror P396 results when the geometric command is not on the selected plane.
2) The slope is expressed as the angle that forms with the first axis (horizontal axis) + direction
in the selected plane. The counterclockwise (CCW) direction is considered to be + and the
clockwise direction (CW) –.
3) Slope “a” ranges from –360.000 ~ a 5 +360.000.
4) The slope of the second block can be assigned on the start or end point side. The start or end
point side is identified automatically inside the NC system.
5) The end point coordinates of the second block should be assigned with absolute values. When
incremental values are used, program error P393 will result.
6) The feed rate can be assigned for each block.
7) When the angle where the two straight lines intersect is less than 1°, program error P392 will
result.
8) Program error P396 results when the plane selection for the first block is performed in the
second block.
9) This function is ignored when address A is used for the axis name or as the second
miscellaneous function.
10) Single block stop is possible at the end point of the first block.
11) Program error P394 results when the first or second block does not contain a linear command
(GOl or G33).

-252-
13. PROGRAM SU.l?PORTFUNC170N$
13.13 GEOMETRIC COMMAND

( 4 ) Relationship with other functions


1 ) Comer chamfering and comer rounding can be assigned after the angle command in the first
block.

(Example 1) (x:.Y,)

L
NI Aal, Cc I ;
N2Xx~YY~A a:; N2
al

(Example 2)
.-. .
CL
NIA aI, Krt; N2

N2Xxt YY~Aa:;

(x,.Y,)

2) The geometric command I can be assigned after the corner chamfering or corner rounding
cnmmand.
(Example 3)

‘x’-
NlXx2YY~. Cc, :
N2Aa, ;
N3Xxa YY, Aaz: N2
al
‘P-

L
c,

(xt.Yt) ~, ‘1
(X,:YJ

3) The geometric command I can be assigned after the linear angle command.
(Example 4) (
NIXxaA a,;
lN2Aa~:
N3Xx~YY,Aax;

-253-
,,, ,. !,. ,,, ...

13. PROGRAM SUPPORT FUNCl?ONS


13.14 G COMMAND COORDINATE ROTATION INPUT (G1(9)

13.14 G COMMAND COORDINATE ROTATION INPUT (G1O)


( 1 ) Function
This function enables the parameters required for coordinate rotation to be input by the program.
( 2 ) Command format

G 17 G1O Ii~ Jjl;


G18
[1[G 19 G1O Kk, ;
il: Horizontal axis component vector
jt: Vertical axis component vector
k,: Rotation angle

3* Yp
\
\
\
\ @
\ /’
\ /
\ /
,/
\
\ /
0
\ 0
\ / jl
- Xp
/t F

,/ () \ il
Zero point ~ Basic machine coordinate system
\
\

G command coordinate rotation input function

..

-254-
13. PROGRAM SUPPORT FUNC170NS
13.14 G COMMAND COORDINATE ROTATION INPUT (GM)

(3) Command value ranges and command units

Command method Valid command range Minimum command unit


(i) Axis component vector (il, jl ) 0– * 9999.999 0.001
(ii) Coordinate rotation angle (kl ) o– ? 359.999° 0.OO1°
Command units for coordinate rotation
(4) Detailed description
1) There are two ways of assigning the function command: (i) axis component vectors (il, jl) and
(ii) coordinate rotation angle (k,). Assigo method (i) when only the axis vector components are
kmown about the slope of the coordinate system assign method (ii) when the angle of the
coordinate system slope is not known.
If both methods are assigned simultaneously, the coordinate rotation angle method takes
precedence.
2) When this command is assigaed, the parameter for coordinate rotation is rewritten in the
command value. This applies coordinate rotation to subsequent movement commands.
3) Commands (317, G18 or G19 may be assigned in the same block. When a plane selection
command is not present, the already selected plane serves as the rotation plane.
4) A program error (P35: CMD-VALUE OVER) results when the value of the axis component
vectors (il, j ~) or coordinate rotation angle (kl ) exceeds its valid command range.

,,

-255-
,,, ..,,

13. PROGRAM SUPPORT FUNC1710NS


13.14 G COMMAND COORDINATE .ROTA TION INPUT (G1O)

(5) Example of programs


(Example 1) Input based on vector component assignment

@ G28 XO YO;
@ G92 XO YO;
@ G17 GIO I 100. J50. ;
@ G90 GOO X1OO. Y1OO.;
@ Go1 X200. F500 ;
@ Y200. ;
CD Xloo. ;
@ Yloo. :
@I GOOXO YO;
I@ M02;
(Description)
Due to (3), the coordinates are rotated counterclockwise by # which
is equivalent to tan-l 50/100 = 26.565°.

YR
,A
0 \. Programmed path after
q@ / coordinate rotation
/ \
‘\ i /
\ 200. .\ \
\ \ A Programmed path
\ \ ,,J without eoordmate
1 \ rotation
\ /“ *+
/
\ k 0’
0
\ /
/ /
\ 100.“ f
\
\ I

- Xp
/0/ ‘ 100 200
,0 \
\
,0’ \,
/

-256-
13. PROGRAM SUPPORT FUN~ONS
13.14 G COMMAND COORDINATE R OTA T..ON INPUT (GlO)

(Example 2) Input based on angle assignment

(D G28X0 YO;
@ G17 G1O KO; Subprogram
@ h198 P 100; @ 0100;
@ G1o K80. ; @ G90 GOOX1OO.Y1OO.;
@ M98 P 100: @ GOI X200. F500 ;
@ G1O K180. : @ Xloo. Y200. ;
@ M98 P 100; @ Yloo. ;
@ G 10 K240. : @ M99 ;
@ lv198 P 100; (Description) Due to (4), (6) and (8), the
@ GOO XO YO; coordinates are respectively
rotated counterclockwise
@ M02 : by 60°,180° and 240°.

-257-
13. PROGRAM SVl?PORTl%JNCHONS
13.14 G COMMAND COORDINATE ROTATION INPUT (G1O)

(6) Checkpoints
1 ) When a rotation angle of zero is assigned in the coordinate rotation status, the next movement
command on the rotation plane will caned the inordinate rotation, regardless of tmmmands
G90 or G91, and the tool will move to a position where the coordinates are not rotated.
(Example 1)
a ) Incremental cnmmands
@ G28 XO YO;
@ G17 G1O K20. ;
@ G91 GO1 Y50. F1OOO;
@ Xloo. ;
@ KO, . . .... .... ..... ........ ..... Zero rotation angle command
GIO
@l Y–50. ., ................ ..... ......... ... Movement to A (100, O)
@ x–loo. ;
@ M02 ;
b ) Absolute commands
@ G28 XO YO;
@ G17 G1O K20. ;
@ G90 “GO1 Y50. F 1000;
@ Xloo. ;
“@ G1O KO ; .. ..... .... ........ ........ Zero rotation angle command
@lYo, . .......... ...................... ....... Movement to A (100, O)

QIXo;
@ M02 ;

Y a
/4
>/” ~ pro~mmd path
eoor mate rotation
after
/4 \
/0 *
\
#
\: Programmed path without
\
~ coordinate rotation
a’, \
\
\
x
A (100. O)
@@

-258-
13. PROGRAM SUPPORTFUIWTHONS
13.14 G COMMAND COORDINATE ROTATION INPUT ifGIO)

(Example 2)

@ G28 Xo Yo;
@ G17 G 10 K30. ;
Q G91 GO1 X30. Y60. F1OO ;
@ Xlooq Y–60. ;
@ Glo Ko;
@ Xo Yo;
a X-130. ;
@ M02 ;

[
i
1
‘1 Programmed path without
coordinate rotation

-259-
!,. .

13. PROGRAM SUPPORT FUNC170NS


13.14 G COMMAND COORDINATE ROTATION INPUT (G1O)

2 ) Assign the initial movement command after the coordinate rotation input command in the GOO
or G~l mode.
When, as shown in the figure, an arc command is assigned, the arc start point A will not rotate
although arc end point B will rotate to be positioned at B and a difference will arise between
the radii of the start and end points (P70 ARC ERROR).
(Example 1)

~ G28 XO YO;
@l G91 GO1 X50. F1OOO;
@ G17 G1O K20. ;
@ G02 X40. Y40. 140. ;
@ M02 :

Y
B’

/’
# Programmed path without
coordinate rotation

4/

R e (end point radius)

(0$ 0) (D(Z)

,
3 ) Assign this command in the G40 mode.

-260 -
13. PROGRAM SUPPORT FUNCTIONS
13.15 ‘CIRCLE CUTTING (G12, G13)

13.15 CIRCLE CUTTING (G 12, G 13)


(1) Function and objective
Circle cutting is a function which performs a series of operation the tool is made to depart from the
center of the circle and while cutting the inner circumference of the circle, it describes a complete
circle, and then it is returned to the center of the circle.
(2) Command format
G12 ((313) Iil Ddl Ffl ;
The rotation direction for circle cutting is differentiated as follows by G12 and G13.
G12 : Clockwise direction
G13 : Counterclockwise direction
I : Circle radius (incremental), siga is ignored
D : Offset number (offset number and offset data are not displayed on the setting and display
unit)
(3) Detailed description
1 ) A program error (P170) results when offset number “D” is not assigned or when an illegal
number is assigned.
2 ) A program error (P223: G12 G13 R ERR) occurs when [radius (I) - offset amount] is zero or
a negative value.
3 ) The “+” offset amount sign denotes reduction and the “-” sign expansion.
4 ) Circle cutting is performed on the plane currently selected by G17, G18 and G19.

I
#0=- -’
/$’”
Circleradius
5 -- -— - Offset amount sign +
\\ —-—-- Offset amount sign -
‘- ‘
.4

..
#
-.. -.-W
3
With G12 command (tool nose center path)
dl offset
amount + \ g/ * i)+I--D.2*a-Dl~s~6*7~O
*
With G13 command (tool nose center path)
0~7+6*5*4+3*2@l-O
dl offset amount - I

-261-
! .,,,:..,.

13. PROGRAM SUPPORT FUNCZ70NS


13.15 CIRCLE CUTTING {G12, G13)

(4) Example of program


(Example 1)

G12 15000 DO1 F 100 ; With offse~ amount of + 10.00 mm


(0.01 mm mrmt settinz unit)

-262-
14. COORDINATE tlWfUEM SETTING FUNCITONS
14.1 COORDINA T%? WORDS AND CON-TV? O’L AXES

14.COOmINA~ sYsmM sEmNG FmaoNs

‘Three axes which can be controlle$ under the standard specifications but Up to six axes ean be ecmtrolled
by adding the additional axes and speeial additional axes. The machining directions are specified
accordingly and pre-determined alphabet coordinate words are used for this purpose.

With X-Y table

With X-Y table

With X-Y table and rota~ table

+Z
+ H? +C
k?
+x
Table movement dirwc
Table Programmed coordinates
rotation
direetion

-263-
.,: ,,..,..,,.,.:.,.

14. COORDINATE SYSTEM SETITNG FUNCITONS


14.2 BASIC MA CHINE/WORKPIECE/L OCAL COORDINATE
SYSTEMS

14.2 BASIC MACHINE/WORKPIECE/LOCAL COORDINATE


SYSTEMS
The basic machine coordinate system is fixed in the machine and it denotes that position which is
determined inherently by the machine. The work coordinate systems are used for programming, and in
these systems the reference point on the workpiece is set as the coordinate zero point. The local coordinate
system is created on the work coordinate system and it is designed to facilitate the programming for parts
machining.

R*1
w ‘Reference point

JEd!ii! Local emrdinate system


m4)

M“ W 1 (workcoordinatesystemI)
+ ‘Q ml
,- . ,. ,. .
* ~Daslc macnme coordinate system)

R*1
WI ,W2 +.

-264-
14. COORDINATE SYSTEM SE?TING FUNCITONS
14.3 MACHINE 225A?O POINT AND 2ND/3RD/4TH REFERENCE
{ZERO)POINTS

14.3 NfACX311W ZEIRCI POINT AND 2ND/3RD/4TH REFERENCE


[ZERO) PCll@lTi?$
The machine zero point serves as the reference for the basic machine coordinate system. It is inherent to
the machine and k determined by reference (zero) point return.
The second, third and fourth reference (zero) points relate to the positions of the coordinates which have
been set beforehand by parameter from the zero point of the basic machine coordinate system.

Basic machine coordinate system


2nd reference point r
w.ohina
. ... . .... ?~mmint
...” -, .

lfi-
x

1st reference point


(X** y,)
Y
(x,, Y,)

x
4th reference point
T
, d%
W Work coordinate systems (G54 – G59)
x

-265-
14. COORDINATE SYSTEM SE1’’lTNG FUNC170NS
14.4 BASIC MACHINE COORDINATE SYSTEM

14.4 BASIC MACHINE COORDINATE SYSTEM


( 1 ) Function and objective
1 ) The basic machine coordinate system denotes the positions (tool change position, stroke end
position, etc.) determined inherently by the machine.
2 ) The tool is moved to the assigned position on the basic machine coordinate system by the G53
command and the coordinate command which follows.
(2) Command format
Basic machine coordinate system selection
(G90) G53 Xz Yy Zz aa ; (where a is the additional axis)
(.,3 ) Detailed description
1) When th~ power is switched on, the basic machine coordinate system is automatically set as
referenced to the reference (zero) point return position, which is determined by automatic or
manual reference (zero) point return.
2) The basic machine coordinate system is not changed by the G92 command.
3) The G53 command is valid only in the block in which it has been assigned.
4) In the incremental value command mode (G91), the G53 command provides movement with
the incremental value in the coordinate system currently selected.
5) The cutter compensation amounts for the assigned axis are not canceled even when the G53
command has been assigned.
6) The first reference point coordinates denote the distance from the basic machine coordinate
system zero point to the reference (zero) point return position.
7) All G53 command yield movement at rapid traverse. (See* l.)
8) When the G53 and G28 (zero point return) commands are assigned in the same block, the
subsequent commands are made valid.

(500,SGQ)

--’:’”7 Basic machme coordinate system zero point

1st reference point coordinates X = +500


Y = +500

–Y

*1 Depending on the system version, movement may proceed at the cutting feed or rapid traverse
depending on the G command modal.

-266-
14. COORDINATE SYSTEM SEITING FUNCTIONS
14.5 COORDINA T.. SYSTEM SETTING (G92J

14.5 C001111KNAT15 fYYWWl$4 SIITTKNG (Ci92)


{., 1 ) Function and obiective
When the G92 ~ommand is assigned, the absolute coordinate system and present position display
values can be preset anew as the assigned values without the machine having to be moved,
(2) Command format
G92 Xxl Yyl Zzl a al ; (where a is the additional axis)
(3) Detailed description

(1) After the power has been switched on, the dog-type referenm point return is performed first and, upon
completion, the coordinate systems are set automatically. (Automatic coordinate system setting)
Reference
pointre-
R tumfinish tic machine omxiinate system R. M

Position when power [’ Position when power is


is switched on
The basic ma-
---- Q;/ chine cxxmdinate b
I Reference point system and work ,.~~. .
I return coordinate sys- Y O.tra
1 terns are created ./
at the preset po-
sitions.

WGS4 100. m.
(2) The absolute (work) coordinate systems and present position display values can be preset to the as-
signed values without the machine needing to move by assigning the G92 command.

; has been as-


signed, the work ; peel
coordinate syw position]
tern is created -1.00
anew. I

NOTE 1: A return can be made to the proper work coordinate system as follows if the svstem has shtited
when tha manual absolute sfiitch is set OFF and the &is has been moved m&tually.
1 ) Proceed with reference point return with the coordinate system still shifted.
2 ) Then assign the G92G53XOYOZ0 ; commands. These commands will preset both the
work coordinates and present value display to the work coordinate system offset values.
NOTE 2: When an S command has been assigned in the same block as the G92 command, it will be treated
as the clamp speed for the spindle which is subject to constant peripheral speed control (G96),
and the normal S command will not be output. (For details, refer to Section 10.4.2 on setting the
spindle clamp speed.)
14. COORDINATE SYSTEM SETTING FUNCTIONS
14.6 A UTOMA TIC COORDINATE SYSTEM SETTING

14.6 AUTOMATIC COORDINATE SYSTEM SETTING


When the tool arrives at the reference point by means of the first manual reference point return or the
dog-type reference point return after the NC system’s power has been switched on, this function creates the
various coordinate systems in accordance with the parameter values entered beforehand from the setting
and display unit.
The actual machining program will be programmed on the coordinate systems which have been set above.

Wlc machine cootilnate


system. Machine zero point
N9
xl

Ya Y: Y1
1 t

L Work coordi-
nate system 3
(G56)
Work coordi-
~:f5~;m

Xs
2
Work coordi-
nate system 1
.1st reference point

Detailed description
(1) The coordinate systems created by this function areas follows:
1 ) Basic machine coordinate system
2 ) Work coordinate svstems (G54 – G59)
(2) The parameters set in th~ NC sys~em all provide the distance from the zero point of the basic machine
coordinate system. Therefore, it is decided at which position in the basic machine coordinate system
the first reference point should be set and then the zero point positions of the work coordinate
systems are set.

-268-
14. COORDINATE SYSTEM SElllNG FUNCTIONS
14.7 REFERENCE POINT (%?ER O POINT] RETURN {G28, cG29]

14.7 REFERENCE POINT (ZERO POINT) RETURN (G28, G29)


( 1 ) Function and obiective
.7

1 ) After the ~signed axes have been positioned by GO, they are returned respectively at rapid
traverse to the first reference (zero) point when G28 is assigned.
2 ) By assigning G29, the axes are first positioned independently at high speed to the G28 or G30
intermediate point and then positioned by GO at the assigned position.

A
2nd reference point

v
.$/ (x$, Ya, Z*, as)
..=0
.0
,*’/
GwP 2
G 28 ..’)]
G% ~.... .*”/ G 29
. ..
.. . ●’/
... ,,”/
-..
‘h “.. .“”>{xl, y,, 21, al)
Start point
. “-- “’~ Intermediate
G30 , point
0
/ G30P3
G3i)P 4
(xi, y:, z,, as)~~” ~\~
G 29°
3rd reference point
4th reference point
1“

(2) Command format


1 ) G28 XxI Yyl Zzl a al ; (where a = additional axis) (Automatic reference point return)
2 ) G29 Xxz Yyz Zzz a az ; (where a = additional axis) (Start position return)
(3) Detailed description
1) The G28 ‘mmmand is equivalent to the following
GMl Xxl Yyl ~1 a al ;
GOOXxs Yyj ~~ a ct~ ;
In this case, X3,y~, z~ and as are the reference point coordinates and they are set by parameter
as the distance from the zero point of the basic machine coordinate system.
2) After the power has been switched on, the axes which have not been subject to manual
reference (zero) point are returned by the dog type of return just as with the manual type. In
this case, the return direction is regarded as the command sign direction. When the straight type
of return system is used, the return direction is not checked. For the second and subsequent
returns, the return is made at high speed to the stored reference (zero) point and the direction
is not checked.
3) When reference (zero) point return is completed, the zero point arrival output signal is output
and also #l appears at the axis name row on the setting and display unit screen.
4) The G29 command is equivalent to the following:
GOOXxl Yyl Zzl a al ; .... The tool is positioned from the reference point to the intermediate
GOOXxz Yyz Zzz a az; point by rapid traverse (non-interpolation type) independently for
each axis involved.

In this case, xl, yl, ZI and al are the coordinates of the G28 or G30 intermediate point.

-269-
,;., ,,,

14. Coordinate SYSIEM SEll_lNG FUNCHONS


14.7 REFERENCE POINT (ZER O POINT) RETURN (G28, G29)

5) Program error P430 results when G29 is executed without performing automatic reference
(zero) point return (G28) after the power has been switched on.
6) The operation up to the intermediate point is ignored for the Z axis in Z-axis cancel and the
position display is updated for the subsequent positioning only. (The machine itself does not
move.)
7) The intermediate point coordinates (xl, yl, Zl, al) of the positioning point depend on the
position command modal (G90 or G91).
8) G29 is valid for either G28 or G30 but the assigned axes are positioned after a return has been
made to the latest intermediate Doint.
9) The tool offset will be canceled ~uring reference point return unless it is already canceled, and
the offset amounts will also be cleared.
(4) Examples of programs
(Example 1) G28 Xxl Zzl ;

R
Reference (zero)
mint position (#1)
1st operation after power -
has been switched on
./ GOXX*ZZ* ;
2nd and subsequent >
operations
f (x,, z,)
Intermediate point
#/
GOXX, ZZ, ;
Y
Return start position
Ist operation after power
has been switched on
2nd and subsequent

Rapid traverse rate


: .\,
I

Near-point dog point position (#1)

-270-
14. COORDINATE SYSTEM SET17NG FUNCI?ONS
14.7 REFERENCE POINT (ZERO POINT) RETURN (G28, G29)

(Example 2) G29 Xxz Zzz ;

(Go) xx, Zz, ;

G28, G30 intermediate point

GO XX, Zz, ;

(x:, 2s)

Example3)GW Xx, Zz, ;


{ From point A to reference
: [ zero) point)
Gm xx% ZZ* ;
: (From point E to 2rtd ref-
~erence (zero) point)
Reference(zero)pointposition(#1)
G2$J Xx$ Zz% ; R,
(FrompointC to point D) ~ ‘mwnt ‘ition , New intermediate point
(x*, z,)”
‘----.., Gw
G% ‘.
B (x,:%,)
~$
Old intermediate point ~~, ~ ,~2g .- ~,
; 2nd reference zero)
c ‘-”- point position [ #2)

-271-
14. COORDINATE SYSTEM SETTING FUN~ONS
14.8 2ND/3RD/4TH REFERENCE (ZER 0) POINT RETURN (G30)

14.8 2ND/3RD/4TH REFERENCE (ZERO) POINT RETURN (G30)


(1) Function and objective
A return can be made to the second, third or fourth reference (zero) point by assigning G30 P2 (P3
or P4).

2nd reference point


preference point

+- .4/
,“”;’
.’/
G30P 2 .,”;/
\ t-
G28a.. G~;;G29
....
.. . ..;>
. . ---\ I
. ..
..-..\ .“”/’ I a,)
Start point 0 * ““”’
.“ (xl, )’1,z,,
G30 ~, ~ Intermediate
/’ point
0
0 G30P3
#
G30P 4
OH” /\J
G29
4
I 3rd refere~ce point
4th reference point
I

(2) Command format


G30 P2 (P3, P4) Xxl Yyl Zzl a al ; (where a is the additional axis)
(3) Detailed description
1) The seco~d, third or fourth reference (zero) point return is assigned by P2, P3 or P4. No P
command or PO, P1 and P5 or above are ignored, and second reference (zero) point return
results.
2) As with the first reference (zero) point return, the second, third or fourth reference (zero) point
return functions to return the tool via the intermediate point assigned by G30 to the second,
third or fourth reference (zero) point position.
3) The second, third or fourth reference (zero) pint position coordinates refer to positions
inherent to the machine and these can be checked on the setting and display unit.
4) When G29 is assigned after executing second, third or fourth reference (zero) point return, the
intermediate position applying during the G29 return serves as the intermediate point of the
reference (zero) point return executed last.

-272-
14. Coordinate SYSTEM SEITi!NG FUNCITONS
1=4.82ND/3RD/4TH REFERENCE (ZERO) POINT RETURN (G30)

–x R#l
L

Intermediate point ( x,,, y 1) (zero) point


G30P3XICl Yy, ;

R#3
(%2, Y*)
–Y
3rd reference
(zero) point

5 ) Reference (zero) point return on a plane in cutter compensation causes the tool to move from
the intermediate point without cutter compensation (zero compensation). With a subsequent
G29 command, cutter compensation is performed from the intermediate point as far as the G29
command.

Tool nose center path 3rd reference


(zero) point
Programmed path

(xl, Y!)
\
\
\
\ -Y
G29Xx, Yy, :\% /
(X*: Y:)

6 ) The tool length offset amount for the axis involved is canceled after sewnd, third or fourth
reference (z;ro) point return.
7 ) With second, third or fourth reference (zero) point return in the machine lock status, control
from the intermediate point to the reference (zero) point will be ignored. When the assigned
axis reaches as far as the intermediate point, the next block will be executed.
8 ) With second, third or fourth reference (zero) point return in the mirror image mode, mirror
image will be valid from the start point to the intermediate point and movement will be in the
opposite direction to that of the command. However, mirror image is ignored from the
intermediate point to the reference (zero) point during the movement toward the reference
(zero) point.

-273-
,,.,

14. COORDINATE SYSTEM SETZ7NG FUNC170NS


14.9 REFERENCE POINT CHECK (G27)

t’ F

-x
r ---
/
/
0

x-axis —\
<’”
\
mirror image \

G30P3XX, YY, ;
No mirror image
\ /

14.9 REFERENCE POINT CHECK (G27)


(1) Function
This command first places the tool at the position assigned by the program and then, if that
positioning point is the first reference point, it outputs the reference point arrival signal to the
machine in the same way as for the G28 command. Therefore, when a machining program is prepared
so that the tool will depart from the first reference point and return to the first reference point, it is
possible to check whether the tool has returned to the reference point after the program has been run.
(2) ‘~mmand format
.
(
G27 xx, Yy, Zz, Pp, ;

Check command

Return control axis

Check number
Pl: 1st reference point check
P2: 2nd reference point check
P3: 3rd reference point check
P4: 4th reference point check
I

(3) Detailed description


1) If the P command has been omitted, the first reference point will be checked.
2) The number of axes whose reference points can be ch~ked simultaneously depends on the
number of axes which can be controlled simultaneously.
One rds is displayed at a time starting from the last axis.
3) An alarm results unless positioning has been made at the reference point upon completion of
the command.

-274-
14. COORDINATE SYSTEM SEll_?NG lTJiVCITC)NS
14.10 WORK CO QRDINA TE SYSTEM SETTING AN.. OFFSET
(G54 – G59)

14.10 WORK COORDINATE SYSTEM SETTING AND OFFSET


(G54 – G59]
( 1 ) Function and objective
1) The work coordinate systems are for facilitating the programming of workpiece machining in
which the reference point of the workpiece to be machined is to serve as the zero point,
2) These commands enable movement to the positions in the work coordinate system. There are
6 work coordinate systems which are used for programming. (G54 – G59)
3) Among the work coordinate systems currently selected by these commands, any work
inordinate system with coordinates which have been assigned by the present position of the tool
is reset. (The “present position of the tool” includes the offset amounts for tool radius, tool
length and tool position offset.]
4) An imaginary machine coordinate system with coordinates which have been assigned by the
nresent Wsition of the tool is set bv this command. (The “~resent Nsition of the tool” includes
~he offs~t amounts for tool radiu~ tool length and ~ool fisition ~ffset.) (G54, G92)
(2) Command format
1 ) Work coordinate system selection (G54 – G59)
(690) G54 Xxl Yyl Zzl a U1 ; (where u is an additional axis)
2 ) Work coordinate system setting (G54 – G59)
(G54) G92 Xxl Yyl Zzl a al ; (where a is an additional axis)
(3) Detailed description
1 ) With any of the G54 through G59 commands, the cutter compensation amounts for the
assigned axes will not be canceled even if work coordinate system selection is assigned.
2 ) ‘I’he G54 work coordinate system is selected when the power is switched on.
3 ) Commands G54 through G59 are modal (group 12).
4 ) The coordinate system will move with G92 in a work coordinate system,
5 ) The offset setting in a work coordinate system indicates the distance from the zero point of the
basic machine $ordinate system. -

(# 1 ) Reference (zero)
“x M point return position
Basic machine coordinate
-x (G54) (-500,

-x (G55) (–2000,
– 1000)
W2

-3! (G55) N G55 reference


(zero) point
654 YC=-5041
=—
Ysoo
-Y
G55 X = “m
Y =“1000

-275-
. ~.,
,... ...-,,.,
., -. ,.,;,.,

14. COORDINATE SYSTEM SETTING FUNCl?ONS


14.10 WORK COORDINATE SYSTEM SETTING AND OFFSET
(G54 – G59)

6) The offset settings of work coordinate systems can be changed any number of times. (They can
also be changed by G1O L2 Ppl Xxl Zzl.)
7) A new work coordinate system 1 is set by assigning the G92 command in the G54 (work
coordinate system 1) mode. At the same time, the other work coordinate systems 2 through 6
(G55 – G59) will move in parallel and new work coordinates 2 through 6 will be set.
8) An imaginary machine coordinate system is formed at the position which deviates from the new
work reference (zero) point by an amount equivalent to the work coordinate system offset
amount.

Reference~?ero) point
-x
Basicmachinecoordmte

–x [Ml -—-— --——


Imaginary~cldne ~rdmte
“-- %:m-rd’na’epmt ‘=’ ‘n
--—. -- Old work 1 (G54) coordinate
system
–X(G-55) ---- ---- -- Old work 2 (G55) rmordinste
~tem
–X(G54’) ——— . -—— -- .--— — -- Newwork 1 (GM) coordinate
-x(G~’) cwl_ ____, system
:Z L.!SL zzL@?l . -- Newwork 2 (G55) coordinate
[W2] system
-Y
-~~ –Y(G54”)
-Y(G5S’)
–Y

After the power has been switched on, the imaginary machine coordinate system is matched with
the basic machine coordinate system by the first automatic (G28) or manual reference (zero) point
return.

By setting the imagina~ basic machine coordinate system, the new work coordinate system will
))
be set at a position which deviates from that imaginaxy basic machine coordinate system by an
amount equivalent to the work coordinate svstem offset amount.
10) When the krst automatic (G28) or manual r~ference (zero) point return is completed after the
power has been switched on, the basic machine coordinate system and work coordinate systems
are set automatically in accordance with the parameter settings.
11) A program error (P62) results when G54zY_ ; is assign~- subsequent to reference point
return (automatic or manual) after the power is switched on. (A speed command is required
since the speed is controlled by GO1.)
(4) Examples of programs

‘(Exsmple 1) @G~ XOYO ; >

@G53 X–1OOO Y-5(x);


@G58 XOYO;

(#1) Reference (zero)


Present position point return position

\ /

-276-
14. COORDINATE? SYSTEM SEllTNG FUNCITONS
14.10 WORK COORDINATE SYSTEM SETTING AND OFFSET
(G54 – G59)

When the first reference point coordinate is zero, the basic machine coordinate system zero point and
reference (zero) point return position (#1) will coincide.

(Exam@ 2) @G28XOY0 ;
(#1) Reference (zero)
@G90GooG53xoYo ; point return *sition .
@G54X- 500Y-500 ;
@GOlG91X–5ooF 100; Prwentposition
@Y–5oo ;
@x-t500 ;
@Y+500 : -x( GM)
@G!30GooG%XOY0 ;
@lGOIX-500 F200 ;
@xoY-5oo ;
-Y
@G90G28XOY0 ; (G55) (6A)

(Example 3) When work coordinate system G54 has deviated (-500, -500) in example 2
(It is assumed that steps (3) through (10) in example 2 have been entered in subprogram
01111.)

@G28X OY O ;
@G90GOOG53X OY O : .....ss..... (Not required when there is no G53 offset.)
@G54X–500Y–500 : O..”.OSSOOSC Amountbywhichworkcoordinate ayatem deviates
@G92X OY O ; “’.”...”oco””””OQ”OQ....
Newwork coordinate system is set.
@M98Pllll ;

(#1) Reference (zero) point


return position
o
–x
Old G54 coordinate
Old G55coordinatesystem _ ~ (G ~,
----- -
New G54 coordinate
–X (G55) ‘~G54’)
NewG55coordinatesystem
–X (G55’)

-Y
( G55) :Gy~’ )

–Y(G55’)

–Y

I?KYl%kThe work coordinate system will shift each time steps (3) through (5) are repeated. The reference
point return (G28) command should therefore be assigned upon completion of the program.

-277-
,,, .:,:,,

14. COORDINATE SYSTEM SEl17NG FUNiX!70NS


14.10 WORK COORDINATE SYSTEM SETTING AND OFFSET
(G54 – G59)

(Example 4)
It is assumed that 6 identical workpieees have been placed on the G54 — G59 work coordinate systems and
that each will be machined identically.
1 ) WorkPiece offset data setting
Workpieee I x=–1oo. 000 Y=–100. 000.----”””G54
2 X=–1OO. 000 Y=–5N.NO””””S....-..G55
3 X=–500. 000 Y=–lM. MO---.-.”G56-”
G56
4 X=–5OO. 000 Y=–500. M04...........G57
5 X= –900. 000 Y= –100. 000””-.”.-.;G58
6 X= –900. 000 Y =–5N. 000------G59
2 ) Machining program (subprogram)
0100 ;
N 1 G90G OG43X –50. Y –50. Z -100. H1O : Positioning
N 2 GOIX–200. F50 ;
Y –200. ; End face.cutting
x– 50. :
Y– 50. ; I

N3G28XOYOZO;
\
N 4 G98G81X–125. Y–75. Z–150. R–1OO. F40 ; Drilling 1

175. Y –125. ;
X – 2
X–125. Y–175. ; 3
x– 75. Y–125. : 1 4
G80 ;
N5G28XOYOZO;
\
N 6 G98G84X–125. Y–75. Z–150. R–1OO. F40 ; Tapping 1
X –175. Y – 125. ; 2
X–125. Y – 175. ; 3
X– 75. Y–125. ; 1 4
G80 ;
M99;
3) Positioning program (main)
G28XOYOZO;
When power is switched on
N 1 G9OG54M98P1OO ; 1
N2 G55M98P 100 ;
N3 G57M98P 100 ;
N4 G56M98P 100 ;
N5 G58M98P 100 ;
N6 G59M98P 100 ;
N7G28XOYOZO;
N8M02;
%

-278-
14. COORDINATE SYSI15M SETl17iVGFUNCTIONS
14.10 WORK CO ORDINA T! SYSTEM SETTING AN’ OFFSET
i(G54 – G59’

I
n

x
I

x
I

-279-
v

14. COORDINATE SYSTEM SEITING FVNCl?ONS


14.11 LOCAL COORDINATE SYSTEM SETTING

14.11 LOCAL COORDINATE SYSTEM SETTING


(1) Function and objective
The local coordinate system can be set on the work coordinate system using the G52 command so that
the assigned position serves as the programmed zero point.
The G52 command cart also be used instead of the G92 command to change the deviation between
the zero point in the machining program and the machining workpiece zero point.
(2) Command format
G54 (G54–G59) G52 Xxl Yyl Zzl a M~ ; (where a = additional axis)
(3) Detailed description
1 ) The G52 command is valid until a new G52 command is assigned and there is no movement.
This command comes in handy for employing another coordinate system without changing the
zero point positions of the work coordinate systems (G54 — G59).
2 ) The local coordinate system offset will be cleared by dog-type manual reference (zero) point
return or reference (zero) point return performed when the power is switched on.
3 ) The command for canceling the local coordinate system is (G54 – G59) G52 XO YO ZO aO ;.
4 ) Coordinate commands in the absolute mode (G90) move the tool to the local coordinate system
position.
>
t (G91) G52X_Y— ;
I Incremental value
I
I Ln
I .Local coordinate
I Absolute value system
I
I Absolute value
I ~ ~1
(G90)
G52X_Y ;
-@------------- -- - Work coord~ate system
t“Wn(n= l-6)
I
Reference point
~ W’orkmrdinatesystemot%et (CRTsettin&GIOL’ZP_ X_Y-;)
R /
Externafwork coordinate system
*._ / Q offset (PC input, CRT setting)
Machine coordinate
system
M

(Example 1) Local coordinate system in absolute value mode (the local coordinate system offset is
not accumulated)

~ G28XOY0 ;
~
@ GooG90XL Y1.; m
1’ I
@ G92XOY0 ; I @

@ GooX500Y500 ; cal coordinate system


@ G52X1. Yi. ; lm ““
@ GooXOYO ;
la)o ““
@ Go1X5OOF1OO;
@ Y500; 500“’ Coincides with local coordinate
system formed by (9)
@ G52XOY0 ;
@
@ GooXOYO ; Scc)lmlsoommm
R#l

The local coordinate system is formed by (5), is canceled by (9) and coincides with the
(3) coordinate system.

-280-
14. COORDINATE SYSTEM SEllTNG FUNCTIONS
14.11 LOCAL COORDINATE SYSTEM SETTING

(lbmple 2) J-acid coordinate system in incremental value mode (the


. local coordinate system offset
is accumulated)

@ G28XOY0 ;
Y“!

1%00
~
Y ‘“
@ G92XOY0 ; Y I
I *
@ G91G52X500W500: I
I
(Q M98P 100; I I
@ G52XL Y1. :
@ M98P1oo ; I
I
Q G52X-1. 5 Y-1. 5; IWO“ I -—-~x”
I Lmal coordinatesystem
@ GooG90XOY0 ; I
M02 ; 1000. I
I
@ 0100:
@ G90GOOXOY0; 500-.
@
Q G01X500 ;
Q Y500;
lm 1500 ‘‘m250030W
@ G91 ;
R* I
@ M99 ; WI Present position localcoordinatesystem formed by (7)

Description)
L3c al coordinate system X’Y’ is formed at the XY comdinate Wstem (500, 5CN))position by (3),
I..mal coofllnate system X“Y” is formed at the X’Y’ ccmrdinate system (1OCO,1000 position by (.5
The local coordinate qstem is formed at the X“Y’ comtfinate system (-1500, -15 J ) position by ~’ ), In other
wotd~ the local ccmrdmate ~tem and the XY coordinate system coincide, which is the same as w en the local
coordinate system is canceled.

-281 -
14. COORDINATE SYSTEM SEITING FUNCITONS
14.11 LOCAL COORDINATE SYSTEM SETTING

(Example 3) When used together with work coordinate systems


>
@ G28XOY0 ; GM G!55
@ GooGioG54XOY0 : X 1000 1000 work ~ordinate system offset
@ G52X500Y500; Y 500 2000} (parameter setting)
Q M98P200 ;
@ GOOG90G55XOY0;
@ M98P200 ; Y30M
a GOOG90G54XOY0; I ~
)
‘o
Mo? ;
@
@ 0200; ZcOO.
~ G55
@ GOOXOYO
; @ W2
@ GOIX5OOF1OO
; 1500 .
@
o Y500 ;
@
@ M99; Im .
%
m“

@
looo1500m2500m
R* I

(Description)
The local coordinate system is created at the position of the G54 coordinate system (500, 500) by (3)
but not at the G55 coordinate system.
The tool returns to the G54 local coordinate system reference (zero) point in movement (7).
The command to cancel the local coordinate system is G90G54G52XOY0 ;.

-282-
14. COORDINATE SYS127MSE?173JGFUN~ONS
14.11 LOCAL CO ORDJNA 1%?SYSTEM SETTING

(Example 4) Combination of work coordinate system G54 and multiple local coordinate systems

Q G28XOY0 ;
@ GooG90G!MXOY0; X 500 Work ~ordinate system offset

@
Q M98P300 ; Y 5001 (parweter setting)
@ G52X1, YL ;
@ M98P300 ;
@ G52X2, Y2. ;
I
@ M98P300 ;

4!I$$
@ G52XOY0 ;
i 2500 .
@ Local coordinate system

M02 ;
CW1JL2 formedby(6)
@0300 ; moo,
@moxoYo ;
5
t3G01X500FuJ0 ; 1500..
Localcoordinate
system
QY!joo ; [W1]L1 formedby (4]
@xoYo ; lm %
,
03M99 :
% G54

H!OMJOIW 02W 25038000


R*1

(Description)
A local coordinate system is created at the position of the G54 coordinate system (1000, 1000) by (4).
A local coordinate system is created at the position of the G54 coordinate system (2000, 2000) by (6).
The load coordinate systems coincide with the G54 coordinate system by means of (8).
15. PRO’TECCION FUNCZIONS
15.1 STROKE CHECK BEFORE MOVEMENT (G22, G23)

15. P120XHXION FUNCTIONS

15.1 STROKE CHECK BEFORE MOVEMENT (G22, G23)


Whereas the stored stroke limit function sets the machining inhibit area on the outside, this function sets
it on the inside (shaded area). Alarm P452 results prior to the start of movement with movement
commands which make contact with or pass through this area which is shaded in the figure below.

Stored stroke limit I


upper limit
Stored stroke limit II
upper limit

Stroke check before


movement upper limit

Stored stroke limit I lower limit

Command format
G22x_Y_z_I_J_K_’
~— > (These assign the inside machining inhibit area.)
Upperlimit l.mverlimit
a.wgnment assignment
G23 ; (Cancel)
Detailed description
1 ) The values on the machine coordinate system are used for the upper and lower limits.
2 ) The upper limit of the inhibit area is assigned by X, Y and Z and-~he lower limit by I, J and K.
However, when ~ Y, Z <I, J, ~ X, Y and Z assign the lower limit and I, J and K the upper
limit.
3 ) Stroke check is not performed for axes having the same setting.

G22X200. Y250. Z 100, 1200. J –200. K O;


No stroke check for X axis.

4 ) When G23 ; or G22; is assigned, the stroke check before movement function will be canceled.
5 ) When G23 X_ Y_ 2; is assigned, this will be treated as G23 ; 1 Y_;. Therefore, execute X
and Y with the previous movement medals after having canceled the stroke check before
movement function.

NOTE Whenever the G22 command is to be assigned, the machine should first be moved outside the
inhibit range and then the command should be assigned.

-284-
16 iW4CHINING MODES
16.1 HIGH-SPEED MACHINING MODE (G05]

16. M.ACHINUW3 MODES

16.1 HIGH-SPEED MACHINING MODE (G05)


( 1 ) Functionand objective
This function runs at high speed those machining programs which approximate free surfawx with
microscopic lines. It is effective in increasing the speed of free surface die machining.
There are three types of high-speed machining modes: 1, IB and H. The 1 mm microscopic segment
capability for a 3-axis simultaneous system is 4.2 m/min, 8.4 m/min and 33.7 m/min, respectively.
Workpieces can be machined with a high precisionwhen this function is used in combination with the
high-precision control function.
ISQ~ Optical corner deceleration is providedwith the high-precision control function which means that
m~chining takes longer than ~hen the mode of t~ finction is not established.
Microscopic segment capability
No cutter
Cutter compensation
compensation Restrictions in programming
(Incremental 001
‘we (Incremental GO1
mode, simultaneous
mode, simultaneous
2 axes, 1 mm)
3 axes, 1 mm)
I 4.2 m/min 4.2 m/min None
8.4 m/min
IB 8.4 m/min (when interference None
check is invalid)
Possible only for axis names, movement
amounts and F commands in incremental
II 33.7 m/min Not possible
GO1mode
(Error occurs at any other time)

-285-
16, MACHINING MODES
16.1 HIGH-SPEED MACHINING MODE (G05)

(2) High-speed machining mode I


1 ) Command format

G5P1; ; High-speed-machining mode I ON


G5Po;
; High-speed machining mode I OFF

2 ) 13ample of program

G28XOYOZO;
G91G OX-1OO. Y-1OO.;
G43Z-5. H03 ;
GO1F 3000;
G05P 1 ; High-speed machining mode
I ON
Xo. 1;
X().lYO. 001;
Xo. lYO. 002;

XO.1 F200;
G05P0 ; High-speed machining mode
I OFF
G49Z O ;
M02 ;

NOTE 1: The high-speed machining mode I can be used in computer link tape or memory operation.
(The speed will fall below the limit of the communication rate for computer link and tape
operation.)
NOTE 2 The performance of the high-speed machining mode I cannot be guaranteed when it is used
under conditions other than no cutter compensation provided (incremental 001 mode,
simultaneous 3 axes, 1 mm) and compensation provided (incremental 001 mode, simultaneous
2 axes, 1 mm).

. ‘2&5 .
16 MAC~NING MODES
16.1 HIGH-SPEED MACHINING MODE (“05)

(2) High-speed machining mode 113


1 ) Command format

G5P1; ; High-speed machining mode IB ON


G5 PO; ; High-speed machining mode IB OFF

2 ) Example of program

G28XOYOZO;
G91G OX-1OO, Y-1OO.;
G43Z-5. H03 ;
G01F3000 ;
G05P 1 ; High-speed machining
Xo. 1; mode IB ON
Xo. lYO. 001;
XO.IYO.002;
*

.
XO.IF200;
G05P O ; High-speed machining
G49Z O ; mode 113OFF

M02 ;

NOTE 1: The high-speed machining mode IB can be used in computer link, tape or memory operation.
(The speed will fall below the limit of the communication rate for computer link and tape
operation.)
NCYI’E2 The performance of the high-speed machining mode IB cannot be guaranteed when it is used
under conditions other than no cutter compensation movided (incremental GO1 mode,
simultaneous 3 axes, 1 mm) and compensation provided (i~crementa~ GOI mode, simultaneous
2 axes, 1 mm, in case of interference check invalid).
Program the blocks with axis names and incremental movement amounts only (example: X1O.
YO.1 ;). Although an error will not occur when a G command is contained, the analysis speed
may be reduced.
3 ) Relationship between interference check invalid parameter setting and interference avoidance
mrameter
#
Interference avoidance
#
Item OFF ON
This performs interference checking for cutter compensation.
When cutter compensation causes the
A program error results when cutter workpiece to be cut into, the tool can be
(IFF
compensationcauses the workpiece to be moved to the machine the workpiece
Interference cut into. along a path which does not cause the
44
check invalid cut.
This performs interference checkingfor cutter compensation.
Evenwhen cutter compensation causesthe workpiece to be cut into, a program error
ON
does not result, and the tool is moved along the path which results in the cutting.

-287-
16. MACHINING MODES
16.1 HIGH-SPEED MACHINING MODE (G05)

(4) High-speed machining mode II


1 ) Command format

G5P2; ; High-speed machining mode II ON


G5PO; ; High-speed machining mode II OFF

2 ) Example of program
I
G28XOYOZO;
G91G o x-loo. Y-loo. ;
G43Z-5. H03 ;
GO1F3000 ;
G05P 2 ; High-speed machining
+ mode II ON
Xo. 1;
Xo. lYO. 001;
Xo. lYO. 002;
. GO1 Incremental
movement

.
XO. 1F200; v

G05P O ; High-speed machining


mode II OFF
G49Z O ;
M02 ;

NOTE 1: Only axis names, movement amounts (not variables, arithmetic operations) using incremental
commands, and F commands can be assigned while the high-speed machining mode II is
established.
NOTE 2 The high-speed machining mode II can be used in computer link, tape or memory operation.
(The speed will fall below the limit of the communication rate for computer link and tape
operation.)
NOTE 3 Even while the high-speed machining mode 11 is modal, the override, maximum cutting rate
clamp, single block operation, dry run, manual interrupt, graphic trace and high-precision
control modes are valid.

-288-
16 MACHINING MODES
16-.1HIGH-SPEED
MACHINING MODE {4305)

3 ) Restrictions
1 ) While the high-speed machining mode II is modal, all movements are based on the
G91G01 commands regardless of the incremental/absolute. linehrc or other medals.
When G05P2 is assi~ed, cancel the cutter compensation, ~rror image, scaling,
coordinate rotation, imaginary axis interpolation and 3-dimensional cutter compensation
first.
If these functions are not canceled, all the medals will be stored even while the high-speed
machining mode 11 is modal. Ml the medals are valid again after the high-speed
machining mode 11 is set OFF. (Example 1)
2 ) A program error results while the high-speed machining mode H is modal if any command
other than axis names, incremental movement amounts, F commands and G05P0 are
assigned. Switch to the standard mode and assign such commands. (Example 1)
(Example 1)
(MAIN-PROGRAM)
G28XOYOZO;
G90G92XOY OZIOO.:
GOOX-lOO.Y-100.; Movement by G90, GOO,G43
G43Z-10.HOO1;
M98HO01;
G49Z O ; Movement by G90, GOO
G28XOY”OZ0 ;
M02;

(SUB-PROGRAM)
NoolF3000;
G05P 2 ; High-speed machining
mode 11 ON
Xo.1 ; T
x-o. lY-O. 001;
x-o. IY-O.002 ;
. Movement by G91, GOI

Xo. 1 ;
G5 PO; High-speed machining
mode 11 OFF
M99;
3) Automatic operation processing is given priority while the high-speed machining mode 11
is modal, and this means that the CRT response mav be slower.
4) Since the tool will decelerate in the G05fi or G05~ block, the high-speed machining
mode 11 should be set ON and OFF where the tool is distanced from the workpiece.

Command ; ““”;G05P2; X-577;Y-577;2-577; ●


*”G05PO;

Speed

5) If computer link or tape operation is used during the high-speed machining mode 11, the
machining speed may be kept low due to the restrictions on the program transmission
rate.

-289-
16. MACHIN1..G MODES
16.1 HIGH-SPEED MACHINING MODE (G05)

6 ) Cutting feed clamp rate


@ The cutting feed clamp rate while the
high-speed machining mode II is modal YJ
is the minimum such rate among the
movement axes.
Y-axis
clamp
rate

X-axis clamp rate


Cutting feed clamp rate = min [cutting feed clamp rate of movement axes]

e The cutting feed clamp rate while high- I


speed machining mode 11is not modal is YA !
the rate at which the feed rate of the
movement axes does not exceed the cut- +–..
ting feed clamp rate of the axes. I
:
Y-axis I
clamp I
rate I
I
lx
X-axis clamp rate

Cutting feed clamp rate = min [cutting feed clamp rate of movement axes * movement amount/
movement amount of movement axes]
Consequently, the cutting feed clamp rate while the high-speed machining mode 11is modal maybe
dower than when the high-speed machining mode II is not modal.
(4) Checkpoints
1 ) PO,PI and P2 are the only valid address P commands.
A program error will result with any other P command.
2 ) Do not assign any addresses except N and P to the G05 blocks.
Otherwise, a program error (P32 ADDRESS ERROR) will result.
3 ) Decimal points are not valid with P addresses.

-290-
1% MEASUREMEW SVl?PORTFUNC170NS
17.1 A tJTOMA TIC TOOL LENGTH MEASUREMENT (“37)

17. -ummm SIJPFORTW


FuNmoNs
17.1 AUTOMATIC TOOL LENGTH MEASUREMENT (G37)
( 1 ) Outline of function
This function assigns commands from the measuring start position to the measurement position, moves the
tool to the measurement position, stops the machine once the tool has arrived at the sensor, causes the NC
system to calculate automatically the difference between the coordinate values at that time and the
coordinate values of the measurement position, and provides this difference as the tool offset amount.
When offset is already being applied to a tool, it moves the tool toward the measurement position with the
offset still applied, and if a further offset amount is generated as a result of the measurement and
calculation, it provides further compensation of the present offset amount.
If there is only one type of offset amount, this is automatically compensated for; if there is a division
between a tool length offset amount rmd wear offset amount, the wear amount is automatically
compensated for,
(2) Command format
G37z_IU. D_ F.;
Z Measuring axis address and coordinates of measurement position .... X, Y, Z, a (where a is
additional axis)
k This assigas the distance between the measurement position and point where the movement is to
start at the measuring speed.
D: This assigns the range within which the tool is to stop.
R This commands the measuring feed rate.
When IL, D_ or F_ is omitted, the value set in the parameter is used instead.
<Parameter> (“TLM” on machining parameter page)
@ Measuring feed rate (Fp): O – 60000 (mm/rnin)
o Deceleration range c O — 99999.999 (mm)
@ Measurement ranged: O – 99999.999 (mm)
(3) Example of execution

With new measurement o @

-100 ~!

HOI=o
t
‘.rO1 ; 1
M06 T02 ;
G90 GOO G43 ZO HO1 ;
G37 Z –400 R200 D150 F 1 :
Cxmrdinate value when measurement position is reached = -3(!O
-300- (-400) = 100
0 + 10U = 100 HO1=1OO

-291-
1Z MEASUREMENT SUPPORT FUNCTIONS
17.1 A UTOMA TIC TOOL LENGTH MEASUREMENT (G37)

(3) Detailed description


1 ) Operation with G37 command

tapid “traverse rate


speed
/ \
\
I

Operation1 ~ ~
Iii Normal completion
‘6A”: Measuring
position --------- &---L ---L–T~–—

“A”:Stop point Operation2 ; ~ ~ ‘r- Alarm stop (P607)


------- *-- T--- ~ ___y __
“~” : sensoroutput ~_
-:
A,i:
i ij Alarm stop (P607)
Operation3

2) The sensor signal (measuring position arrival signal) is used in common with the skip signal.
3) The feed rate will be 1 mm/min if the F command and parameter measurement speed are O.
4) An updated offset amount is valid from the Z axis (mea&rement axis) command f~llowingthe
G37 command.
5) 13xcludingthe values applying at the PLC side, the delay or fluctuations in the sensor signal
processing range from O to 0.2ms at the NC system side only.
Therefore, a measuring error will arise as follows:
0.2(msecl
Maximum measuring error (mm) = Measuring speed [inm/mi n) o&”
1000

6 ) The machine position coordinates are read by sensor signal detection, and the machine will
overtravel and stop at a position equivalent to the servo droop.
1
Maximum overtravel (mm) = Measuring speed [mm/mi n] ~ ● ●

Position loop gain (sec.-*)


The standard position loop gain is 33 (sec.-l).
. . Checkpoints
(4)
1 ) I%ogramerror P604 results when the G37 block is not assigned or when two or more axes have
been assigned.
2) Program error P605 results when the H code is assigned in the G37 block.
3) Program error P606 results when G43H_ is not assigned prior to the G37 block
4) Program error P607 results when the sensor signal was input outside the allowable measuring
range or when the sensor signal was not detected even when the tool arrived at the end point.
5) When manual interrupt has been applied during movement at the measuring speed, a return
must be made to the position prior to interrupt and then operation must be resumed.
6) The data assigned in G37 or the parameter setting data must meet the followingconditions:
lMeasurement point-start point I>R command or parameter r ED command or parameter d
7) When the D command and parameter d in 6 ) above are zero, operation will be completed
normally onlywhen the assigned measurement point and sensor signal detection point coincide.
Otherwise, program error P607 will result.
8) When the R and D commands as well as parameters r and d in 6 ) above are all zero, program
error P607 will result regardless of whether the sensor signal is present or not after positioning
at the assigned measurement point.
9) Assign the automatic length measurement command (G37) as a pair with G43H_ whichassigns
the offset number.
G43H_ ;
G37ZRDF;
--- -

-292-
lZ MEASUREMENT SUPPORT FUNCITONS ‘“
17.2 SKIP FUNCTION (G31]

17.2 SKIP !FI.JNCTION (G31)

17.2.1 Function
(1) Command format
G31 Xx Yy Zz a. I?f; (where a is the additional axis)
L Y,Z, a: tis coordinates; they are assigned as absolute or incremental values in accordance with the
G90 or G91 modal.
fi Feed rate (mm/min)
Linear interpolation can be executed using this function. If any of the skip signals (skip 1 through 3)
is input externally while this command is being executed, the machine will stop, the remaining
commands will be canceled and operation will be executed from the next block.
(2) Detailed description
1) If l?f is as~igned as the feed rate, command feed f will app~, if it not assigned, the “G31, G31.1
skip” set in the parameter will serve as the feed rate. In either case, the F modal will not be
updated.
2) Automatic acceleration and deceleration do not apply to the G31 block. The maximum speed
of G31 is determined by the machine specifications.
3) Override is invalid with the G31 command and it is fwed at 100.
I%y run is also invalid. The stop conditions (feed hold, interlock, override zero and stroke end)
are valid. External deceleration is also valid.
4) The G31 command is unmodal and so it needs to be assigned each time.
5) If any of the skip commands (skip 1 through 3) is input during G31 command start, the G31
command will be completed immediately.
When a skip signal has not been input until the G31 block completion, the G31 command will
also be completed upon completion of the movement commands.
6) When the G31 command is assigned during cutter compensation, program error P608 will
result.
7) When there is no F command in the G31 command and the parameter speed is also zero,
program error P603 will result.
8) With machine lock or with the Z-axis only command when the Z axis cancel switch is ON, the
skip signal will be ignored and execution-will continue as far as the end of the block.
(3) Parameter settings
The “G31, G31.1 skip conditions” are set on the parameter screen.
The “G31 or G31.1 skip speed” is set on the machine builder parameter screen.
For details, reference should be made to the section on parameters and cantrol instructions for the
setting and display unit in the Operating Instructions Manual.

-293-
1% MEASUREMENT SUPPORT FUNCITONS
17.2 SKIP FUNCTION {G31)

( 4 ) Example of G31 execution

G90 GOO X–looooo Y o ;


G31 X –500000 F 100;
GO1 Y – 1000OO;
( .
G31 Xo ;
Y –200000 –500cmo G 31 –1OOOCO o y
x
G31 x –500000 w
I +
Y –300000 I
---- G 31

4
I -- -1-
Xo;
t G01
1-
1 -–~
G 31
1 --- –200000

1.lLL- –300000

t

17.2.2 Skip
The coordinate positions at which the skip signals are entered are stored in system variables #5061 (axis
1) through #5066 (axis 6). They can therefore be used with the user macros.

$
G90 GOO X–1OO. ;

=4
G31 X–200. F60 ; Skip command
# 101= # 5061 The skip command input coordinates (work coordinate
system) are read out m #101.

-294-
lZ MEASUREMENT SUPPORT FUN~ONS
17.2 SKIP FUNCTION (G31)

17.2.3 (331 coasting


The amount of coasting from the time when the skip signal is input during the G31 command until the time
when the machine stops differs according to the “G31 skip speed” and 1?command in G31.
It takes only a short time to start responding to the skip signal until the machine decelerates and stops. As
a result, this enables the machine to stop with a high degree of precision and with minimal coasting.
The coasting amount is determined by the followirtg formula.

60 =:x’ J’P+:x (tikta)

60 : Coasting amount (mm)


F: G31 skip speed (mm/min)
TP : Position loop time constant (see) = (position loop gain)
t! :, Responw delay time (see) = (time from when skipsignal is detected until it reaches NC unit)

t, :. Response error time 0.001 (see)


When the G31 command is used for rneasurin~. & in the above formula compensates
. for the measurement
value but dz serves as the measuring error. “ ‘

F’

Area inside shaded section denotes


coasting amount 60

Time (S)
tiktfl ‘1-p
Stop pattern with skip signal input

The relationship between the coasting amount and speed when Tp is 30ms and tl is 5ms is shown in the
following figure.
f
7
TP=O.03
~o.m. t 1 =0.00s Max.value
g
~ 0.040,
z
s
g o.~.
ba

“i O.WM.
8
0.010 “

o 10 m 30 # 50 @ ‘?0
Feed rate F (mm/min)
Relationship between coasting amount and feed rate (example)

-295-
1% MEASUREMENT SUl?PORTFUNCl?ONS
17.2 SKIP FUNCTION {G31J

17.2.4 Skip coordinate readout error


(1) Skip signal input coordinate readout
The coasting amount based on the position loop time constant Tp and cutting feed time constant Ts
is not included in the ski~ simml immt coordinate values.
Therefore, these work co~rdkate v~lues applying when the skip signal is input can be read out across
the error range in the following formula as the skip signal input coordinate values. However, coasting
based on response delay time tl results in a measurement error and so compensation must be
provided.

6 : Readout error (mm)


e=*~x tz F: Feed rate (mm/min)
60
t , : Response error time 0.001 (see)
w
0
g
%+1
$
so
)
e—l
z
.
Readout error of skip input coordinates

Readout error of skip input coordinates


Readout error with a 60 mm/min feed rate is:
e = & (60/60) X 0.001 = &0.001 (mm)
Measurement value is within readout error range of * 1~.

(2) Readout of other coordinates


The readout coordinate values include the coasting amount. When coordinate values are required
with skip signal input, reference should therefore be made to the section on the G31 coasting amount
and compensation provided. As in the case of (l), the coasting amount based on the delay error time
tz cannot be calculated, and this generates a measuring error.

-296-
1% MEASUREMENT SUPPORT FLZWJ!70NS
17.2 SKIP .FU..CTION (G31)

(3) Examples of compensating for coasting


1 ) Compensating for skip signal input coordinates

I
G31 X1OO.F 100 ; Skip command
#110 = Skip feed rate; G04 ; ~ Machinestop check
Skip signalinput coordinate
#ill = Response delay #lol=#5061 readout
time tl ; Coaatingbawd on response
#lo2=#llo* #111/60; delay time
# 105= # 101- # 102 ; Skip signal input
coordinates
5
I
7 1

2 ) Compensating for work coordinates

#no = Skip feed rate; G31 X 100.F 100 ; ! Skip command


#ill = Response delay
time t, ; G04 ; 1 Machine stop chwk
Skipsignalinput coordimde
readout
(Misting based on response delay
time
#103= #110* #112/60; I basting based on positionloop
I time constant

I #lo5=#lol - #lo2- *103 :+ Skipsignalinput coordinates

\
I

-297-
1% MEASUREMENT SUPPORT FUiWITONS
17.3 MULTI-STAGE SKIP FUNCTION {G31.n, G04)

17.3 MULTI-STAGE SKIP FUNCTION (G31.n, G04)

17.3.1 Function
The settingof combinations of skip signals to be input enables skipping under various conditions. The
actual skip operation is the same as for G31.
The G commands which can assign skipping are G31.1, G31.2, G31.3 and G04, and the correspondence
between the G commands and skip signals can be set by parameter.
(1) Command format

G31. 1X x Yy Z z a a F f : (Same for G31.2 and G31.3; Ff is not required with 004)

~-F”dmte(mm’rnin) Command format axis coordinate word and target coordinates

As with the G31 command, this command executes linear interpolation and when the preset skip
signal conditions have been met, the machine is stopped, the remaining commands are canceled and
the next block is executed.
(2) Detailed description.
1 ) The “G31, G31.1 skip speed” parameter corresponds to the G31.1 feed rate, “G31.2 skip
speed” to G31.2 and “G31.3 skip rate” to G31.3.
2 ) The various commands in question are skipped when the skip signal conditions have been met.
3 ) Apart from 1) and 2) above, the commands are the same in all other respects to G31.
(3) Parameter setting
1 ) The feed rates corresponding to the G31.1, G31.2 and G31.3 commands can be set by
parameter.
2 ) The skip conditions (logical sum of skip signals which have been set) corresponding to the
G31.1, G31.2 and G31.3 commands can be set by parameter.
Operation is the same as for G31 when parameter setting = 7.

Valid skip signal


Parameter setting
1 2 3
1 0
2 0
3 0 0
4 0
5 0 0
6 0 0
7 0 0 0

-298-
1% MEASUREMENT SUPPORT FUNC’IIONS
17..3 MULTI-STAGE SKIP FUNCTION (G3Ln9 G(.I4)

17.3.2 Operation
( 1 ) The multi-skip function enables control to be exercised as follows and, while enhaneing the measuring
precision, it also allows the measuring time to be redueed.

Wheh pdrameter, settings areas below


Skip condition Skip speed
au, 1 :7 20.0 mm/min (fl)
G3L 2 :3 5.0 mm/min (fz)
G31. 3 :1 1.0 mm/min (fg)
Program example
N1OG3L 1X200. O :
N20G31. 2x40. O ;
N30G3L3XL0 ;
f~
I (f,)------
~--. Operation
N 10

z? -
Measurement
distance
1
I
I
I
i
!
I
IN20
–“----~l
(f,) l! N30

Skip signal 3 input ---


I
A
I I
t

Skip signal 2 input -------


Skip signal 1 input ------ -_
‘1 ---

NOTE When, in the above operation, skip signal 1 is input before skip signal 2, N20 will be skipped at that
point and N30 will also be ignored.
( 2 ) Theremaining dwelltime will be canceled and the following block exeeuted unless the skip signal for
the eonditicm set in G04 (dwell) is input.

-299-
,,. .

18. AXIS CONTROL FUNCTIONS


18.1 CHOPPING FUNCTION

18. AXIS CONTROL FUN(XIONS

18.1 CHOPPING FUNCTION


(1) Outline of function
The chopping function serves to keep the chopping axis in a reciprocating motion at all times
independently from program operation while a contour program is being executed.
It can be used for cutting on machining centers.
Chopping is also effective in improving the surface roughness compared with the same roughness of
the abrasive grain.

(2) Command format


Chopping is a PLC function and it does not have a specific command format. Since it will differ for
each machine builder, reference should be made to the operating instructions issued by the machine
builder.
[Example of command format]

G200 Z_Q_R_ ; Chopping start


(chopping command ON)
Z : Top dead point position
Q : Bottom dead point position
R : Cycle count
G201 ; Chopping stop
(chopping command OFF)

-300-
18.AXIS CONTROL FUNCTIONS
18.1 C.O.FWNG FUNCTION

(3) Detailed description


1 ) Chopping operation start

Start
Reference position

(1) Rapid traverse

Top dead point ---

(2) (3)
Bottom dead point tic ---

1 ) When the chopping axis has stoppd, the chopping operation is started immediately.
*

X, Y axes

Chopping (3) \
axis (21
(1)

:;~;$ ~

2 ) When the chopping axis has been moved automatically, the chopping operation is started after
the completion of the movement.

3 ) An operation alarm results when the chopping axis has been moved manually, and the chopping
operation does not start.
t 3

.hoppingaxis~

Chopping command
Operation ahirm

k J

-301 -
18.AXIS CONTROL NNG?70NS
18.1 CHOPPING FUNCTION

2) Chopping operation stop stop


The chopping axis first performs the chopping
as far as the top dead point and then it is Reference
? position
moved by rapid traverse to the reference
position. Even when it is moving from the top (3)
Chopping Top dead
to bottom dead point, the axis will move as far

~
control OFF point
as the bottom dead point. ? !

u)
(1) (2)
Movement as far as Bottom
bottom dead point dead point

Chopping
axis
Chopping operation
d

The chopping operation is completed upon return to the reference position.

.,

-302-
18. AXE CONTROL FUNC?TUNS
18.1 CHOPPING FUNCTION

(4) Operations resulting from reset error occurring during chopping


1 ) Operations resulting from reset, etc.

Item
Feed hold

M02, M30 command


at rapid traverse to the
Reset reference po sition. Canceled
The axis does not stop
Single block stop
but continues. Retained
Interlock servo OFF Axis decelerates and
Stored stroke end StODS.

Axis is stopped immedi- Cancekxl


Emergency stop
ately.

=Example of operfilionresultingfrom reset, feed hold, M02or M30 command> *

~ Reference position

Top dead point

d q—~ Feed hold, reset, M02


or M30 command
M02 M30

Bottom dead point i

-303-
18. AXIS CONTROL FUNiXIONS
18.1 CHOPPING FUNCTION

2 ) Operations resulting from operation alarms

Operation alarm Operation Chopping mode


0101: No operation mode
0102: Zero cutting override Axis does not stop
0103: Zero external feed rate but continues.
Retained
0104: Zero F1-digit feed rate
0004 External interlock axis present
0005: Internal interlock axis present Axis decelerates and
0006 Hardware stroke end axis present stops.
Canceled
0001 Software stroke end axis present
Axis is immediately
moved to top dead
Other operation alarms
Retained
(Excluding alarms relating to chopping) :;: tr:v:r:fi: r:{
erence position.
— <Example of operation resulting from other opwation alarma> Y

Reference position

Top dead point

Bottom dead point [“N


A Other operation alarm

3) Operation resulting from program error

Program error Operation Chopping mode


Axis is immediately
moved to top dead
All program errors point and then by Retained
rapid traverse to ref-
erence position.

-304-
18. A.XIS CONTROL FUNCTIONS
18.1 CHOPPING FUNCTION

(S) Parameter changes during chopping start


If a parameter or parameters have been changed during chopping, the chopping operation is
conducted according to the changed parameter(s) after the axis hasbeen moved as far as the top or
bottom dead point applying prior to the parameter change.
-.—.--—.-...—.
. .. .. . .
IJururg movemem mom top
to bottom dead point

~~~:p~;,ad ;:,i;;:ad

Deceleration
point after
change

Duringmovement from
bottom to top dead point

Parameter
change

:p:d ~:”~~d

Bottom dead
point

-305-
18. AXIS CONTROL FUNC170NS
18.1 CHOPPING FUNCTION

(6) List of alarms


Listed below are the alarms which occur when the chopping function is used. (Only the operation
alarm is generated.)

tiOl Operation alarm


Error No. Description Remedy
Chopping axis not returned to zero point
The chopping axis has not returned to zero
0050 Reset and return to zero point.
point when chopping was assigned.
(Interlock status applies to all axes.)
0150 Zero choppinv override Check the chopping override (R135).
Command axis = chopping axis
A movement command for the chopping Reset
0151
axis was assigned in the chopping mode.
(Interlock status applies to all axes.)
Zero bottom dead point position
Assign the bottom dead point position
153 The bottom dead point has been assigned to
properly.
the same position as the top dead point.
Chopping axis = handle select axis
Assign the handle axis to any axis except the
154 The chopping axis has been selected as the
chopping axis.
handle axis.

-306-
APPENDIX 1. LIST OF FUNCTION CODES

APPENDIX I.LIST OF m~mo~ CODES

Function code NC Subjec4 to S-Ming and ~tomd ~ Punch-out output


CRT
contmtter parity v display unit Intenurl NC system function
EL4 1s0 display memory EIA 1s0
recognition count key-in
o-9 0-9 Yes Ckmnled D~layed Key-in stored o-9 o–9 Numericatdata
A–Z A–Z “ . . . . A-Z A-Z Addrewea
+ + “ w . . . + + si~ variableoperator(+)
“ . # # “ Sigo,variabteoperator (-)
“ . “ . “ Decimal point
“ . “ “ “
Block delete
“ . . “ (O@OMl block 6kip)
[ [ “ I I
Varkdrleoperator(+)
No key-in End of read
EOR % “ “ (automati- “ (tape storageend)
“ (%) EOR %
cattyin- Rewindstart & stop duringtape
serted) search
. Key-in “
EOBfCR LWNL “ “ (;) EOB LF End of block
; iEOB
2+4+5 ( “ “ “ “ “ 2+4+5 ( Cxmtrolout (comment start)
2+4+7 t 1 . . “ “ . 2+4+7 [ ) Control in (comment end}

* . “ . No key-in “ *
Program number addrma
(instead of O, 1S0 ordy)
* # “ “ , Key-in “ * Variable number
#
* * “ “ , . * * * Variable operator (x)
* . “ “ “ “ # * . Variable definition
‘h r . “ . “ . * 1 Variable ooerator
* 1 “ “ “ “ “ ‘k 1 Variable operalor
BS Bs .No “ Blank No key-in “
TAB H-r “ . “ . “

SF SP SPSstarting
witirROBand end.
“ 1! (T-Vauto- (T-Vauto- iogwhenfmt characteror num-
SP SP m Keyin “
nmtic ad- nmticad- ber codeappearsare not subject
juslmen!) justment) to parity V count.
CR “ . “ No key-ii “
Not Not .
DEL DEL No Not stored
counted displayed
An . * “ . #
space -L

M:k (DEL) “ “ “ “ “

‘@’
other I dhm I
Any
No
I Ciwnted
I (No!e 3) No key-in
I ‘tored
I /’1/l

IWY1’E1: The black asterisks (*) indicate that tlm corresponding code pattern can be set by paramettir.
NOTE 2: Codes not listed above are stored on tape but an error will result during operation if they are not
ccmments.
IWYTE 3 This denotes characters (including blanks) which are stored inside the CNC system and which
correspond to the command codes. @ is not displayed.

-307-
APPENDIX 2. LIST OF COMMD VALUE RANGES

APPENDIX 2. LIST OF COMl!WWD VALUE


RANGES
Linear axis Rotary axis
Input unit (mm) Input unit (inch) Degree ~) 1
Minimum input setting unit o.oool/o.ool/o.ol o.000ol/o.oool/o.ool 0.001/0.01
kfaximum stroke &9999.9999 mm *999.99999 inch
:value in machine coordi- *99999.999 mm ~ 9999.9999 inch &99999.999°
late system) &99999.99 mm *9999.999 inch &99999.99°
? 9999.9999 mm &999.99999 inch
Uaximum programmable
*99999.999 mm ? 9999.9999 inch t 99999.999°
~imension
*99999.99 mm *9999.999 inch * 99999.9Y
1 — 12000 mm/min 1 — 1200 inch/rein
Rapid traverse rate (24000 for V series) (2400 for V series) 1 — 60U00°/min
1 — 60000 mm/min 1 — 6000 inch/rein
1 — 12000 mm/min 1 — 1200 inch/rein
~utting feed rate 1 — 60000 °/rein
1 — 60000 mm/min 1 — 6000 inch/rein
~nd-4th zero point offset *9999.9999 mm *999.99999 inch * 9999.9999°
[value in machine coordi- * 99999.999 mm *9999.9999 inch * 99999.999°
mate system) 399999.99 mm *9999.999 inch * 99999.99°
*99.9999 mm *9.99999 inch
rOOl offset amount
* 999.999 mm *99.9999 inch
(shape)
&999.99 mm *99.999 inch
k 9.9999 mm A 0.99999 inch
rOOl offset amount
&99.999 mm *9.9999 inch
[wear)
k 99.99 mm k 9.999 inch
0.00001 inch/P
[incremental feed amount 0.001 mmlf?, 0.001 mm/P o Oml inchp o.OO1°/P
0.00001 inch/P
Handle feed amount o.oolOiP
O“M1 ‘mm’ O“ml ‘mff 0.0001 inch/P
–9999.9999 mm – –999.99999 inch –
Soft limit range
+999.99999 inch 1 — 359.9999°
(value in machine coordi- _9999999:9’:”:99$’ ‘m
. -9999.9999 inch – 1 – 359.999°
nate system)
+99999.999 mm + 9999.9999 inch
O — 9999.9999 sec o – 9999.9999 Sec o – 9999.9999 see
O – 9999.999 sec O – 99999.999 sec o – 99999.999 see
Dwell time
o – 9999.99 Sec o – 99999.99 see o – 99999.99 SW
O – 99999 rev O – 99999 rev O — 99999 rev
Backlash compensation o
— *511 pulses O — *511 pulses O — &511 pulses
amount
Pitch error compensation
O — *127 pulses O — * 127 pulses O — A 127 pulses
amount
Dry run rate O — 3600 mm/min O — 360 inch/rein O — 3600°/min
Manual jog rapid traverse O — 60000 mm/min O — 6000 inch/rein o — 60000°/min
0.0001 – 99.999999 mm 0.00001 – 9.9999999 inch
Thread lead
0.001 – 999.99999 mm 0.0001 – 99.999999 inch
0.001 — 99.999 mm/rev 0.0001 – 9.9999 inch/rev
Synchronous feed
0.01 — 999.99 mm/rev 0.001 — 99.999 inchlrev

-308-
APPENDIX 3. LIST OF DATA RETENTION STATUSES AND OUTPUT
S’GN~S W_illYlNC SHUTDOWN

r-d

-309-
,i\:; f,,-j!

APPENDIX3. LIST OF DATA REIENTION STATUSES AND OUTPUT


SIGN~ WllH NC SHUTDOWN

0 x 0

— — —

0 0 0

— — —

0 0 0

— — —

0 0 0

0 x 0

0 0 0

0 0 0

— — —

x x

— — —

x 0

— —

-310-
Al?PENDIX3. LIST OF DATA RETEN~ON STATUSES AiYD OUTPUT
SIGN~ WIIH NC SHU7’DO W

0 x

0 o 0

0 0 0

snpm nom qv

-311-
,,,

APPENDIX3. LIST OF DATA RETENTION STATUSES AND OUTPUT


SIGN~ WXIH NC SHUTDOWN

k
IA
o

L
k
o

k
k
o

o x


-t

IA
Lu
o

114

-t-

I &

Snmls Ionuccl

-312-
APPENDIX 4. SEQUENCE OF PRIORITY AMONG G FUNCI?TON
COMMANDS

-313-
APPENDIX 4. SEQUENCE OF PRIORITY AMONG G FUNCITON
COA4MAN.DS
APPENDIX 4. SEQUENCE OF PRIORITY MMOiVG G FUNCHON

-315-
APPENDIX 4. SEQUENCE OF PRIORITY AMONG G FUNC170N
COM~S

-316-
APPENDIX 4. SEQUENCE OF PRIORITY AMONG G FUNCZION
COM&fANDS
AI?PENDIX 4. SEQUENCE OF PRIORITY AMONG G FUNCTION
COM~S
APPEmIX 4. SEQUENCE OF PRIORITY AMONG G FUNCITON
C’0MM4NDS

-319-
APPENDIX 4. SEQUENCE OF PRIORITY AMONG G FUNCITON
C’OMlkMNDS

-320-
APPENDIX 4. SEQUENCE OF PRIORITY AMONG G FUNCITON
COMM41VDS

00 00

00 00 00 00 00 00

00 00

00 00 00 00 00

0 o o Q

00 00 00 00 00 00 00

00 00 00 00 00 00

-321-
APPENDIX 4. SEQUENCE OF PRIORITY AMONG G FUNCTION
coM’kL4NDs

00 00 00 00 00

.5
“w- 00 00 00 00 00 00
3

00 00 00 00 00

00 00 00 00 00 00

00 00 00

00 00 00 00 00

00 00 00

-322-
ARPENDIX5. ARC CUTTING RADIUS ERRORS

When arc cutting is performed, the follow-up delay in the smoothing circuit and servo system cause an error
between the assigned coordinates and traced coordinates, and the arc is cut with a smaller radius than that
assigned.
F

A; Assigned coordinate
B; Traced coordinate
R; Assigned radius (mm)
AR ; Radius error (mm)
Ae; Angle error (rad)
F; Cutting rate (m/min)

Thp_Iad~sM.mror AR ~nd angle error Ad are calculated from the following formulae.

Fxlfj; 2

‘I-J
Exponential lAR _ I . ~ 1 1
High-precision accelersliord ~TsZ+ —Tpl) . (— (mm)
control rnede OFF I deceleration R 2 60
acceleration
$ecelerationafter LineLar ‘ 1 1 1 FX103 Z
interpolation) I amleratiOn/ ~~=—. (— T,’+ —TP2) * (~1 (mm)
, dewleration , R 24 2
Higfr-precision
controlmodeON 1 FX103 *
(aaxleraliorr/deceleration
before lAR=~* (O+L Tpa (1-K f’)) ● {~) (mm)
interrrofalion) g

AO= tan-’ (Tso ~) +t an-’ (TP “~ (r ad)

T P : Time constant setting (SW) of smoothing circuit


T P : Position loop tima constant
K f : Feed forward gain (tfvd_g/lM))
T P :0.03 s e c Semi-closed loop system
T P :0.04 s e c CIOSCCI loop system
NOTE 1: When radius error AR in arc cutting is not within the permissible value, either reduce cutting
feed For set Ts to a lower value or, alternatively, re-program.
NOTE 2 In the steady state, AR is constant. However, it is not constant at transient moments under
command start or stop conditions. ‘I’he traced coordinates under these conditions will be as
shown in the figure below.
Start/stop
i

Assigned Traced

-323-
APPENDIX 6. ST~ARD CANNED CYCLE SUBPROGRAMS

APPENDIX 6.STANDARD CANNED CYCLE SUB-


PROGRAMS
G81(0810 ) Drilling spot drilling
I

G.1 ; Canned cycle 1st block movement command


IF [#30] GOTO1
; Canned cycle invalid check
Z#2G!16 H#7;
#2=##5
#3003=b’8 OR1; Single block stop inhibit
c1 z#3;
#3003=t18;
GOZ-#3–#2 ; Return
N1 M99%

G82(0820) Drilling, ccmnterboring

G,l : Canned cycle Ist block movement command


IF [#30]COTO1
; Canned cycle invalid check
2!+2G#6H#7;
#2=ti#5
#3003=#8OR1: Single block stop inhibit
G1Z#3;
G4P#4; Dwell
#3003=#8:
GOZ-#3–#2 ; Return
N1 M99%

G83 (0830 ) Deep hole drilling cycle


I
G.1 ; Canned cycle 1st block movement command
IF [#301GOT02
; Canned cycle invalid check
1129=/111 Cutting amount setting
828=0 ; Return amount (= overall cutting amount)
initialization
z#2 G#6HU7;
#2=tl#5
OR1;
IBO03=!J8 Single block stop inhibit
Do 1;
#28=#28-#11 Next block return amount setting
#26= –#28–#29 Feed amount calculation
Z#26 ; Feed
Ia overall cutting amount (return amount) greater than cut
IF [ABS[#231GE[ABS[#31 ] ] GOTO1 ; amount?
GI Z#29 ; Cutting feed
Go z#28 ; Return

-324-
APPENDIX 6. STANDARD C4NNED CYC~ SUBPROGRAMS

#29=#ll+tl14; Cutting amount setting for 2nd and subsequent


END1; blocks
!!1 Cl Z#3-#26; Cutting feed
#3003=#8;
CO2-#3-#2 ; Return
N2 ti99%
r
GM (0640) Tap cycle

G.1 : Canned cycle Ist block movement command


IF [#30] GOTO1
: Canned cycle invalid check
2#2(JJ6li#7;
#2=#K5
#3003=#8OR1 ; Single block stop inhibit
#3004=#9OR3: Feed hold/override invalid
G1Z83;
G4P#4; Dwell
M; Spindle reverse rotation
#3300=l;
G1Z–#3;
#3004=#9:
G4Plt4; Dwell
w; Spindle forward rotation
i13003=#8 ;
GOZ-#2 ; Return
N1 M99%

G85 (0850) Boring 1

G.1 ; Canned cycle 1st block movement command


[F [11301GOTO1
; Canned cycle invalid check
MZGl16H#7;
l12=ti!15
#3003=#8OR1; Single block stop inhibit
G1Z#3;
!43003=!?8;
Z-U3 ;
Goz–#2 ; Return
N1 M99X

G86 (0860) Boring 2

G.1 ; Canned cycle Ist block movement command


1P [Ml] GOTO1
: Canned cycle invalid check
z#2 G#6H#7;

-325-
,.

APPENDIX 6. STANDARD CANNED CYCLE SUBPROGRAMS

#2=##5
!13003=t18
OK1; Single block stop inhibit
G1 Zi13;
C4 Pti4 ; Dwell
!45; Spindle stop
COZ-#3–#2 ; Return
#3003=#8 ;
M3; Spindle forward rotation
N1 M88X

G87 (0870) Backboring

G.1 ; Canned cycle 1st block movement command


IF [?1301GOTO1
; Canned cycle invalid check
#3003=#8OR1 ; Single block stop inhibit
M19; Spindle orient
x#12Y#13 :
#3003=lt8: Single block stop inhibit release
7#2G#6Ht17;
#3003=#8OR1 ; Single block stop inhibit
G1X-112 Y–t13 ;
#3003=#8: Single block stop inhibit release
!43; Spindle forward rotation
113003=#8 OR1 ; Single block stop inhibit
Z13;
M19; Spindle orient
GOX#12Y#13; Shift
Z-t12-#3 : G87 is not affected by G98, G99 commands.
iB003=!J8; Single block stop inhibit release
X–U12Y-U13; Shift
M3; Spindle forward rotation
N1 M99%

G88(0880) Boring 3

G.1 ; Canned cycle 1st block movement command


IF [#30]GOTO1; Canned cycle invalid check
Z#2G#6H#7;
t12=##5
K3003=#8 OR1 ; Single block stop inhibit
G1Z#3;
G4P#4; Dwell
#3003=#8 ; Single block stop inhibit release
M5; Spindle stop
#3003=#8OR1; Single block stop inhibit

-326-
APPENDIX 6. ST~ARD CMViYED CYCLE SUBPROGRAMS

GO2-#3-#2 ; Return
#3003=#8; Single block stop inhibit release
m; Spindle forward rotation
N1 KM%

G89 (0890) Boring 4

G.1 ; Canned cycle 1st block movement command


IF [#301GOTOI
; Canned cycle invalid check
Z#2M6H#7;
#2=11#5
#3003=#8OR1; Single block stop inhibit
GIZ#3;
G4P#4: Dwell
#iXI03=#8:
z–#3 ;
GOZ-#2; Return
N1 M99%

G73(0331) Step cycle

G,l ; Canned cycle 1st block movement command


W [KWlGOT02; Canned cycle invalid check
U29=0 Total cutting amount initialization
#28=#11: Cutting amount setting
Z#2G#6tN7;
$12=##5
l!3003=
#8OR1; Single block stop inhibit
DO1;
#29=#29-I-#11 ; Total cutting amount count
IF [AIM[129] GE [ABS13] ] ] GOTO1 ; Is overall cutting amount greater thancut amount Z?
m %m8; Cutting feed
G4 P#4 ; Dwell
Go zf-#14 ; Return
#28=#11+#14 ; Cutting amount setting for 2nd and subsequent blocks
END1;
N1 Cl Z#3-#29+#28 : Cutting feed
G4 P#4 ; Dwell
#3003=#8 ;
GOZ-#3-#2 ; Return
N2 M99H

-327-
APPENDIX 6. ST~ARD C~ED CYCLE SUBPROGRAMS

G74 (0841) Reverse tap cycle

G.1 ; Canned cycle Ist block movement command


IF [#301GOTOI; Canned cycle invalid check
z#2 ctJ6w?;
#2=##5
#3003=t8 OR1 ; Single block stop inhibit
#3004=#9OR3 ; Feed hold/override invalid
G1‘M3;
G4P#4; Dwell
B; Spindle forward rotation
#3900=l ;
z–#3 ;
#3c04=#9;
G4P#4; Dwell
w; Spindle reverse rotation
f13003=t18;
GOZ-#2; Return
I’ll M99% ;

G76 (0861) Fine boring

G.1 ; Canned cycle 1st block movement command


1P [#301 GOTO1
; Canned cycle invalid check
z#2 G#6 H#7;
#2=#U5
U3003=U8 OR 1 ; Single block stop inhibit
c1 Z13 ;
M19; Spindle orient
x/112Y#13 ; Shift
GOZ-#3–#2 ; Return
#3003=#8 ;
x-#12 Y–#13 ; Shift
M3; Spindle forward rotation
N1 M99%

-328-
APPENDIX 7. DETAII.S OF USER MACRO INTERRUPT FUNCITON

MPEmIx ‘7*DETNM OF’ USER


Rm FuNmoN
Outline
During program execution the user macro interrupt function serves to give priority to the program
currently being run and call another program by supplying the user macro interrupt signal (IJIT) from the
machine.
13yusing this function, it is possible to run the program which fits the changing circumstances.
Refer to the Operating Instructions for details on how the parameters relating to this function are set.
Detailed description
(1) Command format

M96PH; ...... User macro interrupt valid


Interrupt sequence number
\* Interrupt program number
M97 ; ...... User macro interrupt invalid

The user macro interrupt function is established by the M96 and M97 commands in the program
which set the interrupt signal (WIT) to valid and invalid, respectively. It is started when the interrupt
signal (UIT) is supplied from the machine while the user macro interrupt is valid, that is, during the
period from the time M96 is assigned until the M97 command or until NC resetting, and it interrupts
the program, which was assigned by P_ and which is currently being run.
While the user macro interrupt function is valid or, alternatively, while it is invalid after the Ivf97
command or after NC resetting, the interrupt signal (UIT) is ignored until the M96 command.
If the user macro interrupt option is selected, M96 and M97 are processed internally as the user
macro interrupt control M codes. However, when they are not selected, they are handled as ordinary
M codes and output externally.
(2) Valid conditions
User macro interrupt can be executed only while a program is being run.
It is therefore valid only under the following conditions.
1 ) When the memory or tape automatic operation mode or MDI has been selected.
2 ) During automatic start
3 ) When user macro interrupt is not being processed.
4 ) When the “user macro interrupt valid” parameter is selected.
Macro interrupt is invalid during manual operation (jog, step or handle, etc.).
APPENDIX Z DETMZS OF USER M4CR0 IN133RRUPTFUNCT10N

(3) Outline of operation


When the user macro interrupt signal (UI’I’) is input after the M96 Ppl ; command in the currently
run program, interrupt program Opl is executed, and operation is returned to the original program
by the M99 ; command in the interrupt program.
When the M99Pp2 ; command is assigned or when it is searched from the block following the
interrupted block until the program end and is not found, it is searched from the head block of the
program until the block prior to the interrupted block and operation returns to the block where
sequence number Np2 ; first appeared.

Currently run program


I
I Interrupt program

M96PPI : P Opl;
Interrupt signal (UIT) cannot
User macro be acknowledged since it is in
interrupt signal
5
/

,,Wfih Pp2 assignment)


NP2;
+

>
d;
M97

(4) Interrupt types


There are two interrupt types, type 1 and type 2, and these are selected by parameter.
[Type 11
When the interrupt signal (UIT) is supplied, the movement undertaken at that time or the dwell
status is suspended, and the interrupt program is executed.
If a movement command or miscellaneous function command (MSTB) exists in the interrupt
program, the commands of the suspended block will be ignored and the interrupt program will
be executed. Upon completion of the interrupt program, operation continues from the block
following the suspended block.
If no movement command or miscellaneous function command (MSTB) exists in the interrupt
program, operation is resumed and continues from the point where the block was suspended
after a return is made from the interrupt program.
However, when the interrupt signal (UIT) is supplied while a miscellaneous function command
(MSTB) is being executed, the NC system is set to the finish (PIN) signal wait status, and so the
movement command or miscellaneous function command (MSTB) in the interrupt program is
executed.
[me 2]
When the interrupt signal (UIT) is supplied, the interrupt program is executed without the
suspension of the command being executed at the time of interrupt.
If a movement command or miscellaneous function command (MSTB) exists in the interrupt
program, the command of the block being executed is first completed, and then the movement
or miscellaneous function (MSTB) command is executed.
Machining may be temporarily stopped if the interrupt program is not completed even when the
original block is completed.

-330-
APPENDIX Z DET~LS OF USER MACRO INTERRUPTRV7WTICJN

[Type 1]
ordinary program ~ 1
block@ ! block(lll ~ block@

I
i i ~
Zzz
1
II
.
I I If a movemerttcommandor miscellaneous
I I fanctioncommandexistsinthe interrupt pro-
1 I I ~~ the remainder of block(2) willbe ig-
I

Interrupt program ~,
1
~ User placre int~pt I
; signall ~ If no movement command or miscellaneous func-
[ I tion command exists in the interrupt pqram,
I I
~ o ~tion continues fromwhatfollowsinbkk
II 1 I
I ($ (All the remaining commands are executed.)
block@ ~blo’ck@&l F Ck’@ block@

Intern

User’ macro interrupt signal ~ Now being


[Type executed
Qrdinary program.
blockQJ block@ block($
/’

1 t
i
I
I
~ i
I

Interm

or miscellaneous furrc-
terrupt program is exe-
of theblockbeingexe-

Interrup

User macro interrupt sigmal If no movementcommandor mkcellaneaus


functioncommandexistsh the kmmraptpro-
gram,the btterraptprogramk executedh par-
allelwithall programsnowbeingexecuted.

-331-
APPENDIX Z DET&LS OF USER iW4CR0 INTERRUPT FUNCTION

(5) Call system


There are two types of user macro interrupts depending on how the interrupt program is called.
a. Subprogram type
b. Macro type
The type can be selected by parameter.
[Subprogram interrupt]
The user macro interrupt program is called as a subprogram (in the same way as for G98 call).
In other words, the local variable level does not change before and after the interrupt.
[Macro interrupt]
The user macro interrupt program is called as a user macro (in the same way as for G65 call).
In other words, the local variable level changes before and after the interrupt.
Arguments are not transferred from the execution program to the interrupt program.
IrI either case, call nesting is incremented. Nesting is respectively incremented for user macro
calls and subprograms executed in the interrupt program.
(6) Acknowledgement of user macro interrupt signal (UIT)
There are two ways in which the interrupt signal (UIT) is acknowledged.
a. Status trigger type
b. Edge trigger type
The type can be selected by parameter.
[Status trigger type]
When the user macro interrupt signal (UIT) is ON, the signal is acknowledged as valid.
The interrupt program is executed if the interrupt signal (UIT) is ON at the time when the user
macro interrupt is made valid by the M96 command.
The interrupt program can be repeatedly executed by keeping the interrupt signal (UIT) ON.
[Edge trigger]
The signal is acknowledged as valid when the user macro interrupt signal (UIT) rises from OFF
to ON.
This type can be used when the interrupt program is to be executed once only.
User macro interrupt signal (UIT)

ON

OFF
I
I I
I I
i 1
I
/
(Status trigger type)

1
I User macro interrupt I
I I
I
(Edge trigger type) I

Acknowledgement of user macro interrupt signal (UIT)

-332-
APPENDIX Z DETMLS OF USER MACRO INl13RRU.FUNCTTON

(7) Return from user macro interrupt


M99 (P_) ;
M99 is assigned in the interrupt program to execute return from user macro interrupt to the original
program.
It is possible to assign sequence numbers in the program to be returned by address F.
In this case, the IvW9commamclis searched from the block following the interrupted block until the
last block in the program, and if it is not found, it is searched from the head block of the program until
the block prior to the interrupted block, and operation returns to the block where sequence number
BIp2; first appeared,
(Same as M99F_ for M98 call)
(8) Modal information in user macro interrupt . .
When any change has been made to modal information in art interrupt program, the information
existing after return from the interrupt program wili be as foilows.
[Return with M99 ;]
The modal information changed in the interrupt program is invalid and a return is made to the
information existing prior to the interrupt.
In the case of interrupt type 1, a return is not made to the information existing prior to the interrupt
if there is a movement command or miscellaneous function command (MSTB) in the interrupt
program.
[Return with M99P_;]
When any change has been made to the modal information in the interrupt program, the information
which was changed in the program is retained even after return from the interrupt program. This is
the same as if return had been made with M99P_; from a program catled by M98, etc.

Program Interrupt program


being executed

h496PP 1 ;

User macro
interrupt signal
(u I 1“) 5

Regeneration
of medals
prior to inter-
nlpt
.1

/-
,/
,/
,Z (With Pp2 assignment)
ND2 : K’

J
Retention of
medals
changed
in interrupt
program
[

Modal information in user macro interrupt

-333-
.,.

APPENDIX Z DETAILS OF USER MACRO 1N7ERRUPTFt?NCT10N

(9) Modal information variables (#4401 -#4520)


The modal information existing when control passes to the user macro interrupt program can be
identified by reading the values in variables #4401 to #4520.
The units applying when the commands were assigned are used.

System variable Modal information


#4401 G code (group 01)
Some groups are not used.
#4421 G code (grOup 21) }
#4507 D code
#4509 F code
#4511 H code
#4513 M code
#4514 Sequence number
#4515 Program number
#4519 S code
#4520 T code

These variables can be used only in user macro interrupt programs.


An error (P241) results if they are used for any other application.
(10 )M codes for user macro interrupt control
User macro interrupts are controlled by M96 and M97 although when these are already being used
for other applications, they can be replaced by other M codes
(in which case compatibility between programs is lost).
User macro interrupt can be controlled by the substitute M codes by setting the codes in parameters
and selecting the parameters for making the codes valid.
(The M code setting range extends from 03 to 97 but excludes 30.)
When the parameter for making the substitute M codes valid is not selected, M96 and M97 serve as
the M codes for user macro interrupt control.
In either case, the M codes for user macro interrupt control are processed internally and not output
externally.

-334-
A.PPE~IX Z DETAILS OF USER MACRO INTERRUPT FUNC770N

(11 )Types of parameters


Refer to the Operating Instructions for details on the setting method.
1 ) User parameters (control parameters)
a. User macro interrupt valid [MACRO DW’ERRUPT VNJD]
1: User macro interrupt signal (UIT) valid
~ User macro interrupt signal (UIT) invalid
In this case, M96 is assigned and the user macro interrupt function is not executed even if the
interrupt signal (UIT) is input.
b. Subprogram call valid [SUBPRO INTERRUPT]
1: Stibprogram type-of user macro interrupt -
0 Macro type of user macro interrupt
2 ) Machine parameters (basic specification parameters)
a. Status trigger type valid [S—’I’RG]
1: Status trigger type
O Edge trigger type
b. Interrupt type 2 valid ~NT–2]
1: NC statements in interrupt program are executed after waiting for completion of block
execution (type 2)
Q NC statements in interrupt program are executed without waiting for completion of block
execution (type 1)
c. User macro interrupt control substitute M code valid [subs—M]
1: Valid; O invalid
d. User macro interrupt control substitute M codes
Interrupt valid M code (equivalent to M96) [M96–M]
Interrupt invalid M code (equivalent to M97) ~97–M]
Any number from 03 to 97 except 30 is set.
(12 ) Restrictions
1) The user macro interrupt function is part of the user macro function, and as such it cannot be
used unless the user macro specifications are available.
2) If system variables #50Ql to (position information) are used to read the coordinates in a user
macro interrupt program, the coordinates will be those read out in the pre-read buffers.
3) TO interrupt the function below during its execution, be sure to assign the sequence number
(M99P_;) in the command for return from the user macro interrupt program. If this number
is not assigned, return will not be made properly to the original program.
a) Cutter compensation
4) List of error codes

Code Message Description


P271 NO MACRO DJ’I’, No user macro interrupt specifications.
P241 No VARI IWJMBER System variables for macro interrupt cannot
be assigned except in interrupt programs.

-335-
APPENDIX 8. LIST OF ALARMS

APPENDIX 8. LIST OF ALARMS


Program errors
(The characters in bold appear on the screen as the actual messages.)
These alarms occur during automatic operation and they are mainly caused by program errors which
occur, for instance, when mistakes have been made in the preparation of the machining programs or
when programs which conform to the NC specifications h-av~not been prepared. -- -

Error No. Details Remedy


Plo EXCS. AXIS NO. e Divide the commands in the alarm block
The number of axis addresses assigned in into two blocks.
the same block exceeds the specification. e Check the specifications.
Pll AXIS ADR. ERROR e Revise the axis name in the program.
The axis address assigned by the program
and the axis address set by the parameter do
not match.
P20 DIVISION ERROR e Reconsider the program.
An axis command which cannot be divided
by the command unit has been assigned.
P30 PARITY H e Check the paper tape.
The number of holes per character on the . Chwk the tape puncher and tape reader.
paper tape works out to be even for the EIA
code and odd for the ISO code.
P31 PARITY V e Make the number of characters per block
The number of character per block on the on the paper tape even.
paper tape is odd. . Set the p~ameter parity V selection
OFF.
P32 ADDRESS. ERROR e Check and revise the program address.
An address not listed in the specifications e Check the specifications.
has been used.
P33 FORMAT ERROR o Reconsider the program.
The command format in the program is not
correct.
P34 G-CODE ERROR ~ Chwk and correct the G code address in
A G code not listed in the specifications has the program.
been used.
P35 CMD-VALUE OVER e Reconsider the program.
The setting range for the addresses has
been exceeded.
P36 PROGRAM END ERR e The M02 or M3(I command has not been
“EOR” has been read during tape and entered at the end of the program.
memory operation. e The M99 command (G23 or G68 com-
mand for M2/MO format) has not been
entered at the end of the subprogram.

-336-
APPENDIX 8. LIST OF ALM?MS

Error No. Details Remedy


F’37 FROG. No. ZERO e The program numbers are assigned
Zero has been assigned for a program or across a range from 1 to 99999999.
sequence number. o The sequence numbers are assigned
across a range from 1 to 99999.
P40 PREREAD BL. ERR * Reconsider the program.
There is an error in the pre-read block
when cutter compensation is executed and
so the interference check is disabled.
P50 No INcH/MM SPEC o Chink the s~ifications.
A command has been assigned with a G
code for inchimm conversion even though
such a G code specification does not exist.
Pfio OVER CMP. LENG. o The setting range for the axis addresses is
The assigned movement distance is too wide.
great (it exceeds 2 to the power 31).
I?61 No S-DIR SPEC o Check the specifications.
The G60 command has been assigned even e Change the G60 program command to
though the uni-directional positioning spec- GOO.
ification does not exist,
$?62 F-cMD. NOTHING e This alarm ocwrs because the movement
The feed rate command has not been en- modal command is set to GO1 when the
tered. power was switched on, and so movement
is based on the GI command, provided
that a movement command is present,
even when GO1 is not assigned in the
program.
P63 NO G(I5 SPEC a Check the specifications.
The high-speed mode has been assigned
even though such a specification does not
exist.
P64 NO G05P2 SI?13C e Check the sp~ifications.
The high-speed mode 2 has been assigned
even though such a specification does no t
exist.
P70 ARC ERRQR a Chwk the address values assigned for the
There is an error in the arc start point, end programmed start point, end point or arc
point or arc center. center.
s Chwk the plUS and minus directions foI
the address values.
P71 ARC CENTER ~ Chwk the numerical values of the pro-
‘I’he arc center is not calculated durin g grammed addresses.
R-specified circular interpolation.
P72 NO HELICAL SPEC o Check the helicalspecifications.
A helical command was assigned even ~ Three axis commands are assigned with
though such a specification does not exist. circular interpolation commands. Unles$
these are helical commands, move the
linear command axis to the next block.

-337-
.:;

APPE~IX 8. LIST OF ALARMS

.Ml=ccarr. I
..””.”~”
nptn;lc
- “.”...
I R
. ..
emdv
—--

P73 NO SPIRAL SPEC e The G02.I and G03.1 commands are


A spiral command was assigned even assigned for circular interpolation.
though no such command exists in the ~ Check the spiral specifications.
specifications.
P80 NO G07 SPEC e Chwk the imaginary axis specifications.
An imaginmy axis command (G07) was e Change the G07 immmand.
assigned even though no such command
exists in the specifications.
P90 NO THREAD SPEC s Chwk the specifications.
A thread-cutting command was assigned
even though no such command exists in the
specifications.
P93 SCREW PITCH ERR e Assign the thread-cutting command and
The screw pitch has not been set correctly then set the screw pitch command prop-
when the thread-cutting command was as- erly.
signed.
Ploo NO CYLIND SPEC o ch~k thespecifications.
A cylindrical interpolation command was
assigned even though no such command
exists in the specifications.
Pllo PLANE CHG (PR) e Delete the plane selection command
A plane selection command (G17, G18, (G17, G18, G19) from the pattern rota-
G19) was assigned in a coordinate rotation tion subprogram.
command.
Pill PLANE CHG (CR) e Upon Wmpletion of the G68 command,
A plane selection command (G17, G18, the plane selection command must be
G19) was assigned in a coordinate rotation assigned following the G69 (coordinate
command (G68). rotation cancel) command. (In the case of
the M2/MO format, the pattern rotation
command is G68.1 and the pattern rota-
tion cancel command is G69.1.)
P112 PLANE CHG (CC) e Assign the plane sel~tion command af-
A plane selection command (G17, G18, ter the cutter compensation command
G19) was assigned when a cutter compen- has been issued (assign the G40 cancel
sation command (G41, G42) was assigned. command).
P120 NO SYNC. FEED e Chwk the synchronous feed command
A synchronous feed command was assigned specifications.
even though no such command exists in the o change the synchronous feed command
specifications. (G95) to a per-minute feed command
(G94). (The F command value must alsc
be changed.)
P121 FO ARC MODAL e Rapid traverse cannot be assigned and x
The FO command (F1-digit rapid travers e any F1-digit command except FO shoulc
command) was assigned when the circula r be assigned for the circular interpolation
interpolation command (G02, G03) was command.
assigned in a F1-digit feed command. e Assign the GO or G1 command unless tht
block which caused the alarm is the cir
cular command block.

-338-
APPENDIX 8. LIST OF ALARMS

Error No. Details Remedy


P122 NO AUTO C-OVR a Check the specifications.
An automatic override cmnmand (G62) * Delete the &i2 command from the pro-
was assigned even though no such com- gram.
mand exists in the specifications.
??123 No H-PRCSIW SPl?c * Check the specifications.
A G61S command has been assigned even ~ Delete the ~rjl.1 command from the
though the high-precision control function machining program.
specification [G61.1) does not exist,
P130 %MI AUX. ADDR o Check and cxmrect the second miscella-
The second miscellaneous function address neous function address in the program.
assigned in the program and the address set
by the parameter do not match.
P131 No G96 SPEC a Check the specifications.
The constant peripheral speed command e Change from the constant peripheral
(G96) was assigned even though no such speed command (G96) to a speed com-
command exists in the specifications. mand (rp mhnin).
P132 SPINDLE s = o @Reconsider the program.
The spindle speed command has not been
input.
P14Q No ‘1’-POS OFST’. o Check the specifications.
There are no position compensation com-
mamd (G45—G48) specifications. (Usually,
these are standard specifications.)
P141 PAT-ROT ERROR @Recxmsider the program.
Position compensation has been assigned in
a pattern rotation or coordinate rotation
command.
P142 T-OFI?S G2 ERR o Reconsider the program.
An arc command has been assigned for a
circle incapable of position compensation.
P150 No C-CMI? SPEC e ChWk the cutter Wmpensation specifica-
A cutter compensation (G41, G42) has tions.
been assigned even though no such com-
mand exists in the specifications.
P151 G2,3 chill?. ERR ~ Assign the linear command (GOI) or
A compensation command (G40, G41, rapid traverse command (GOO) in the
G42, G43, G44) has been assigned in the compensation command Mock or cancel
arc mode (G02, G03). block. (Set the modal to linear interpola-
tion.)
i?152 ILS.P NOTHING @Reconsider the program.
The machine does not stop at the intersec-
tion point when one block is skipped during
the processing of an interference block
when cutter compensation (G41, G42) is
executed.

!,

-339-
,,, i’

APPE~IX 8. LIST OF ALARMS

Error No. I Details


—-. —--- I Remedv

P153-- I.F ERROR e Reconsider the program.


An interference error has arisen while a
cutter compensation command (G41, G42)
was executed.
P154 NO 3D-CMP SPEC e Check the specifications.
A 3-dimensional compensation command
was assigned even though no such com-
mand exists in the specifications.
P155 F-CYC ERR (CC) e Since the cutter compensation is not es-
A canned cycle command was assigned in tablished when a canned cycle command
the cutter compensation mode. is executed, assign the cutter compensa-
tion cancel command (G40).
P170 NO CORR. No. e Add the compensation number com-
The compensation number (DOO) com- mand to the compensation command
mand was not assigned when the cutter block.
compensation command (G41, G42, G43) e Chwk the number of ~mpensation num-
was assigned. Alternatively, the compensa- ber sets and correct the number to a
tion number is higher than the number of compensation number command within
sets in the specifications. the permitted number of sets.
P171 NO G1O SPEC o Check the specifications.
A G1O command has been assigned even
though no such command exists in the
specifications.
P172 G1O L-No. ERR e Check the address L number of the G1O
The address command is not correct when command and correct the number.
the G1O command is assigned.
P173 G1O P-No. ERR . First ch~k the number of compensation
When the G1O command was assigned, a sets, and then set the address P assign-
compensation number outside the permit- ment to within the permitted number of
ted number of sets in the specifications was sets.
assigned for the compensation number
command.
P174 NO Gll SPEC e Check the specifications.
A Gll command was assigned even though
no program tool compensation input (Gil)
command exists in the specifications.
P180 NO BORING CYC. o Check the specifications.
A canned cycle command was assigned . Revise the program.
even though no such commands (G72-G89)
exist in the specifications.
P181 NO S-CMD (TAP) e Assign the spindle speed command (S)
The spindle speed command was not as- when the boring canned cycle command
signed when the boring canned cycle was (G84, G74) is assigned.
assigned.
P182 SYN TAP ERROR a Check the connections with the spindle
Connection with the spindle unit is no t unit.
possible. ● Chwk whether the spindle encoder is
present.

-340-
APPE~IX 8. LIST OF ALARMS

Error No. Details Remedy


P183 PTWI’HD No. e Use the F or E commaud to assign the
The pitch or thread number command has pitch and thread number.
not been assigned in the tap cycle of a
boring canned cycle command.
P184 No PTc/THD CMD o Check the pitch or thread number.
The pitch or thread command is not corred.
in the tap cycle of a boring canned cycle
command.
P22Q NO SPECIAL ClfC e ch~k the specifications,
The special canned cycle specifications do
not exist.
F221 No MOLE (s_cYc) * Re~nsider the program.
Zero has been assigned as the hole number
in a special canned cycle.
P222 G36 ANGLE ERR o Reconsider the program.
Zero has been assigned as the angle interval
with G36.
P223 G12 G13 R ERR e Reconsider the program.
The radial value is less than the compensa-
tion amount with the G12 or G13 com-
mand.
P224 No G12, G13 SPc s Check the specifications.
Circle cutting specifications do not exist.
F230 NESTING OVER @Check the number of subprogram calls
A subprogram has been called 8 or more and correct the program so that it does
times in succession from a subprogram. not exceed 8 times.
P231 No N-NUMBER e Assign the sequence numbers in the
There were no sequence numbers when th e proper block.
subprogram was called or when a return
was made from the subprogram. Alterna -
tively, the sequence numbers assigned by
G(3TO were not set.
P232 No PROGRAM NO. @ Register the subprogram.
When the subprogram is called, it is no t e Set the M2 format parameters (machine
registered or it has been registered in a parameters, basic specification parame-
canned cycle. ters) to OFF.
The M2 format applies.
I?240 No VARBL. SPEC e Check the specifications.
A variable command was assigned even
though no variable commands (#00) exist
in the specifications.
P241 NO VA.RI NUMBER @Check the specifications.
The variable number assigned is highe r e Check the program variable numbers.
than the numbers as stipulated by the spec -
ifications.

-341-
APPE~IX 8. LIST 0FALi4RMS

Error No. Details Remedy


P242 EQL. SYM. MSSG. e Assign the “=” sign in the variable defi-
The” =” sign was not assigned when defin- nition of the program.
ing a variable.
P243 VARIABLE ERR. e Revise the program.
A variable has been assigned which cannot
be used in the left-side or right-side mem-
ber of an arithmetic expression.
P250 NO PAT-ROT SPC e Check the specifications.
A pattern rotation command has been as-
signed even though no such command exists
in the specifications.
P251 DUPL. PAT-ROT e Check the program.
A pattern rotation command was assigned
during another pattern rotation command.
P252 PAT. k CO OD-ROT o Check the program.
A pattern rotation command and graphic
rotation command have been assigned si-
multaneously.
P260 NO COOD-RT SPC e Check the specifications.
A coordinate rotation command was as-
signed even though no such command exists
in the specifications.
P270 NO MACRO SPEC e Check the specifications.
A macro specification was assigned even
though no such command exists in the
specifications.
P271 NO MACRO INT. e Check the specifications.
A macro interrupt command was assigned
even though no such command exists in the
specifications.
P272 NC/MACRO ILL. e Revise the program, and place the NC
An NC statement and macro statement and macro statements in separate blocks.
exist together in the same block.
P273 MACRO OVERCALL e Revise the program, and correct it so that
The macro call nesting level has exceeded the macro calls do not exceed the nesting
the limit. limit regulated by the specifications.
P275 MACRO ARG. EX. e Reconsider the program.
The number of macro call argument type II
sets has exceeded the limit.
P276 CALL CANCEL ● Re~nsider the program.
A G67 command was assigned even though . Since the G67 is the call cancel com-
it was not during the G66 command modal. mand, the G66 command must be as-
signed first.

-342-
APPENDIX 8. LIST OF ALARMS

Error No. Details Remedy


P277 MACRO ALM MESG o Refer to the operator messages appear-
An alarm command was assigned in #3000. ing on the diagnosis screen.
P280 Exe. [, ] * Revise the program, and mrrect it so that
More than five pairs of parentheses [, ] the number of pairs does not exceed five.
have been assigned in a single Mock.
P281 [, ] ILLEGAL @ I&vise the program, and correct it so that
The numbers of “~ and “]” parentheses the number of “~’ and “]” parentheses
assigned in a single block do not match. are paired up properly.
P282 CALC. IMIPOSS. @Revise the program, ~d Wrrect the for-
‘I’he arithmetic formula is incorrect. mula.
F283 DJrVmlE BY ZERO a Revise the program, and ~rrect it so that
The denominator of the division is zero. the denominator for division in the for-
mula is not zero.
I?284 INTEGER OVER o Revise the arithmetic formula in the pro-
In the process of the ctdculation, the gram, and correct it so that the value of
integral number has exceeded -2 to the the integer after calculation does not ex-
power 31 (2 to the power 3’ -1). teed -2 to the power 31.
P285 OVERFLOW VALUE @l?e~nsider the variable data in the pro-
‘I’hevariable data has overflowed. gram.
P2!W IF SNT. ERROR * Rewnsider the program.
‘I’here is an error in the IF [<conditional
expression>] GOTOU statement.
F291 WHILE SNT. ERR o Rewnsider the program.
There is an error in the WHILE
[<conditional expression>] DOn-ENDU
statement.
lP292 SE’’TVN SNT. ElItIi? @ Rewnsider the program.
There is an error in the SETVND state- o Set the number of the characters in the
merit when the variable name was set. variable name of the SE’I’VN statement
to 7 or less.
P293 DO-END EXCESS o Revise the program so that the number of
The number of DOO-ENDIJ’s in the DO-END statements does not exceed 27.
WHILE [<wnditional expression>]
DOO-ENDCl statement has exceeded 27.
P294 DO-END MMC. $ Revise the program and correct it so that
‘I’he DOS and END’s are not paired up the DO’S and END’s are paired up prop-
properly. erly.

.’

-343-
.,,,,,.,

APPENDIX 8. LIST OF ALARMS

Error No. Details Remedy


P295 WHILE/GOTO TPE . Duringtapeoperation, a program which
There is a WHILE or GOTO statement on includes a WHILE or GOTO statement
the tape during tape operation. cannot be executed and so the memory
operation mode is established instead.
P296 NO ADR (MACRO) e Reconsider theprogram.
The usermacroaddresshas not been as-
signed although it is required.
P297 ADR-A ERR. ● Reconsider the program.
No variable has been assigned for address
A in a user macro.
P298 PTR OP (MACRO) ● Reconsider the program.
One of the user macro G200-G202 com-
mands has been assigned with tape or MDI
operation.
P300 VER. NAME ERROR e I@& the program so that the variable
The variable names have not been assigned names are correct.
properly. . Revise the vaiable names in the program
so that they are corrected.
P301 VAR NAME DUPLI . Corrwtthe program so that the name is
The name of a variable has been duplicated. not duplicated.
P350 NO SCALING SPC ● Check the specifications.
A scaling command (G50, G51) has been
assigned even though no such command
exists in the specifications.
P360 NO PROG. MIRR. ● Check the specifications.
A mirror image command (G50.1, G51.1)
was assigned even though no such com-
mand exists in the specifications.
P380 NO CORNER R/C o Check the specifications.
A command was assigned for cumer round- . Remove the corner rounding or chamfer-
inglchamfering I or 11 even though no such ing command from the program.
command exists in the specifications.
P381 NO ARC R/C SPC c+Check the specifications.
A corner rounding or chamfering command
11 was assigned in a circular interpolation
block even though no such command exists
in the specifications.
P382 CONER NO MOVE e Assign a Gol ~mmand to the block
The block following the corner round- following the corner rounding/chamfer-
ing/chamfering did not contain a movement ing.
command.

-344-
w

APPE~IX 8. LIST OF ALARMS

Error No. Details Remedy


I?383 CORNER SHORT @Make the comer rounding/chamfering
In the corner rounding/chamfering com- less than the movement distance since
mand, the movement distance was shorter this distance is shorter than the corner
than the value in the corresponding com- pounding or chamfering.
mand.
P384 CORNER SHORT e Make the corner rounding/chamfering
In the corner rrmnding/chamfering com- less than the movement distance since
mand, the movement distance in the follow- this distance in the following block is
ing block was less than the corner round- shorter than the corner rounding or
ing/chamfering. chamfering.
P385 CORNER IN Go/G33 o Rewnsider theprogram.
A corner RfC command was assigned in a
(.300 or G33 modal.
P390 NO GEOMETRIC e Check the specifications.
A geometric command was assigned even
though no such command exists in the
specifications.
I?391 NO GEOMETRIC 2 e Check the specifications.
There are no geometric specifications IB or
H.
P392 LES AGL [GEOMT) o Correctthe geometric angle.
The difference in the angle between a geo-
metric line and line is less than 1°.
F’393 INC ERR {GEOMT) @ Assignthe 2nd geometric Mock using an
The 2nd geometric block has been assigned absolute value.
using an incremental value.
P394 No Gf)l (GECIMT) a Assign the (301 command.
There is no linear command in the 2nd
gemmetric block.
P395 NO A.DRS (GEOMT) @Re~nsider the program.
The geometric format is incorrect.
P396 PL CHG. (GEOMT) * Switch the plane before the geometric
A plane selection command has been as- command.
signed in a geometric command.
I?410 NO ADDRS. CHG. e Check the specifications.
There are no absolute/incremental addres s
conversion specifications.
,., , ;: .-

APPE~IX 8. LIST OF ALARMS

—----- Nn.
Error .-. I nl+ailc
- -.-... I R mmA.f
. ..um.u,
P420 NO PARM. IN SPC e Check the specifications.
A parameter input command was assigned
even though no such command exists in the
specifications.
P421 PARM. IN ERROR o Enter the correct parameter input data.
The parameter input data is illegal.
P430 AXIS NOT RET. O Perfom reference point return manually,
A command was assigned to move an axis,
which had not been returned to the refer-
ence POint, away from that reference POint.
P431 NO 2nd REF. SPC o Check the specifications.
A command for the second, third or fourth
reference point return was assigned even
though no such command exists in the
specifications.
P432 NO G29 SPEC ● Check the specifications.
A start position return command (G29) was
assigned even though no such command
exists in the specifications.
P433 NO G27 SPEC e Check the specifications.
A zero point collate command (G27) was
assigned even though no such command
exists in the specifications.
P434 COLLATION ERR o Reconsider the program.
One of the axes did not return to the start
position when the zero point collate com-
mand (G27) was assigned.
P435 G27/M ERROR e A independent M command cannot be
An independent M command was assigned assigned in a G27 command block, and so
simultaneously in a G27 command block. the G27 command and M independent
command must be placed in separate
blocks.
P436 G29/M ERROR ● h independent M command cannot be
An independent M command was assigned assigned in a G29 command block, and so
simultaneously in the G29 command block. the G29 command and M independent
command must be placed in separate
blocks.
P451 NO PROG. LIMIT o Check the specifications.
The stroke check function (G22) prior to
movement was assigned even though no
such command exists in the specifications.

-346-
APPENDIX 8. LIST OF ALARMS

Error No. Details Remedy


P452 MOVEMENT LIMIT @Reconsider the tis address coordinates
An alarm arises prior to the execution of in the program.
the movement block in question when the
end point of an axis movement is entered
into a prohibited area assigned by the
stroke check function (G22) prior to move-
ment.
(G22.1 command applies for M2/MO for-
mat.)
P’460 TAPE 1/0 ERROR
An error has arisen in the tape reader or in
the printer during macro printing.
P461 FILE 1/0 ERROR
A file of the machining program cannot be
read.
P462 DNC ERROR +SProceed with re-start by resetting.
A communication error has arisen during
BTR operation.
?P6W) NO AUTO TLM. e Cheek the specifications.
An automatic tool length measurement
command (G37) was assigned even though
no such command exists in the specifica-
tions.
P601 No SKIP SPEC. e Check the specifications.
A skip command (G31) was assigned even
though no such command exists in the
specifications.
F602 No MULTI SKIP o Check the specifications.
A multiple skipping command (G31.1,
G31.2, G31.3) was assigned even though no
such command exists in the specifications.
1?603 SKIP SPEED o e Assign the skip speed.
The skip speed is zero.
P604 G37 ILL. AXIS a Assign only one axis.
The axis has not been assigned in the auto-
matic tool measurement block or two or
more axes have been assigned.
P605 H-CMD IN BLOCK e Assi~ the H command before the auto-
The H code is in the same block as the matic tool measurement command block,
automatic tool measurement command.

-347-
,., . ,{>,,,

APPENDIX 8. LIST OF ALARMS

Error No. I Details


-. —..- I Remedv
P606-- NO H-CMD BEFOR . The H Wmmand must be assigned before
The H code has not yet been assigned the automatic tool measurement com-
during an automatic tool measurement. mand block.
P607 G37 ILL. SIGNL . Reconsider the program.
The measurement position arrival signal
has been set ON before the area assigned
by the parameter deceleration area “d” or
D command. Alternatively, the signal was
not set ON until the end.
P608 SKIP ERROR (CC) . Assign the cutter compensation cancel
The skip command was assigned during a command (G40) or delete the skip com-
cutter compensation command. mand.
P900 NO TANZ. SPEC ● Check the specifications.
A normal line direction control command
(G40.1, G41.1, G42.1) has been assigned
even though no such command exists in the
specifications.
P901 TAN. AXIS G92 e Delete the G92 command.
G92 was assigned during normal line direc-
tion control.
P902 TAN. AX LINE o change the parameter.
A linear axis has been assigned as the “
normal line control axis.

.,

-.

-348-
IIISTORY OF PAST REVISIONS

suffix Date of revision Description


A March 1990 1. “Nf300/300-V”denoting both the M300 and 300-V series is
indicated on the front cover and in the introduction.
2. A note on the significance of the symbols and abbreviations
used has been added to Section 3.2 covering programming
formats.
3. Errors and inconsistencies have been corrected.
B September 28.1990 1. Addition of I%ample 3 to Section 3.6 on parity H/V
2. Supplementary explanation in Section 6.12 on the normal
control function
3. Addition of notes to Section 10.4.1 on constant peripheral
speed control
4. Addition of supplementary explanation and notes to Section
12.4 on cutter compensation
5. Addition of description concerning the combination of canned
cyclesand unidirectional positioning command in Section 13.1
on canned cycles
6. Addition of Note 2 in Section 14.5 on coordinate system
settings
7. Correction of other errors

-349-

You might also like