TOEC8431331B

Download as pdf or txt
Download as pdf or txt
You are on page 1of 411

CNC SYSTEM FOR MACHINING CENTERS

YASNAC J300M
PROGRAMMING MANUAL

Upon receipt of the product and prior to initial operation, read these
instructions thoroughly, and retain for future reference.

REFERENCE
YASNAC J300M OPERATING MANUAL TOE-C843-I 3.3013

Y
YASKAWA MANUAL NO. 1-OE-C843-1 3.31 [3
FOREWORD

This manual gives the information necessary for creating a program using the YASNAC
.T300M (with basic NC operation panel, 9-inch CRT).

Some information is given in tables in the Appendix so that readers can easily find the neces-
sary information. In the G code table, section numbers are given for each G code to allow
quick access to a detailed explanation if necessary.

The YASNAC J300M comes with an operation manual in addition 10 this programming
manual. Use these manuals in conjunction with each other to ensure productive operation.

CAUTIONS

This manual describes all the option functions (identified by the “*” symbol) but some of
these may not be available with your YASNAC J300M. To determine the option functions
installed in your NC, refer to the specification document or manuals published by the ma-
chine tool builder.

Unless otherwise specified, the following conditions apply in programming explanations


and programming examples.

● Metric system for input and metric system for outputimovement



+ : Zero point in the base coordinate system

e : Reference point

Yaskawahas made every effort to describe individual functions and their relationships to oth-
er functions as accurately as possible. However, there are many things that cannot or must
not be performed and it is not possible to describe all of these. Accordingly, readers are re-
quested to understand that unless it is specifically stated that something can be pertormed,
it should be assumed that it cannot be performed,

Also bear in mind that the performance and functions of an NC machine tool are not deter-
mined solely by the NC unit. The entire control system consists of the mechanical system,
the machine operation panel and other machine related equipment in addition to the NC.
Therefore, read the manuals published by the machine tool builder for detailed information
relating to the machine.
General Precautions
. somedrawings
inthisrnmwlmeshown with the protective cover or shields removed,
in order to describe the detail with more clarity, Make sure all covers and shields are
replaced before operating this product, and operate it in accordance with the directions
in the manual,
@ The figuresand photographsin this manual show a representative product for refer-
ence purposes and may differ from the product actually delivered to you.
● This manual maybe modified when necessary because of improvement of the product,
modification, or changes in specifications.
Such modification is made as a revision by renewing the manual No.
. TO order a copy of this manual, if your copy has been damaged or lost, contact your
Yaskawa representative listed on the last page stating the manual No. on the front
page.
. If any of the nameplates
affixed to the product become damaged or illegible, please
send these nameplates to your Yaskawa representative.
. Yaskawa is not responsible for any modification of the product made by the user since
that will void our guarantee.
NOTES FOR SAFE OPERATION

Read this operator’s manual thoroughly before installaticm, operation , maintenance or in-
spection of the YASNAC J300M. In this manual, the NOTES FOR SAFE OPERATION are
classified as “WARNING” or “CAUTION”.

Indicates a potentially hazardous situation which, if


not avoided, could result in death or serious injury to
personnel.

Indicates a potentially hazardous situation which, if


not avoided, may result in minor or moderate injury
to personnel and damage to equipment.
It may also be used to alert against unsafe practice.

Even items described in A CAUTION ] may result in alvital accident in some situations.
In either case, follow these important items.

Ill
KEY TO WARNING LABELS

The following warning labels are used with the YASNAC J300M.

Electric shock hazard


Do not touch the terminals while the power is
on, and for 5 minutes after switching off the
<g power supply!

Location of label
NC unit

. Warning label
*:;;;;@ Grounding wires must be connected to the unit’s
~ CAUTION

L]Useproper
grounding
techniques.

grounding terminals.

Warning label
Et

O
! WARN NG m
Il@l
! Biia
WARNING

Maycauseelectricshock.
n

sliaumtiab). P4rmlzkiaa!
Electric shock hazard
Do not tou ch inside.

Don’ttouchtheinside. II

Location of label

NC operation panel with 9 inch CRT

I L]—
Rear face
Warning li~bel
CONTENTS

FOREWORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i
NOTES FOR SAFE OPERATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
KEY TO WARNING MBEL.S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv

1. PROGRAMMING BASICS
1.1 FUNDAMENTALS OF PROGRAMMING TERMINOLOGY . . ...1-2
1.1.1 Numerically Controlled Axes and the Number of Simultaneously
ControllableAxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
1.1.2 Least lnputlncrementand Least Output Increment . . . . . . . . . . . . . . . . . 1-7
1.1.3 Maximum ProgrammableValues forAxis Movement . . . . . . . . . . . . . . . . 1-9
1.1.4 Tape Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
1.1.5 Program Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
1.1.6 OptionalBlockSkip(/1),(/2to/9)* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24
1.1.7 BufferRegisterand Multi-active Register . . . . . . . . . . . . . . . . . . . . . . . . . 1-25

1.2 BASICS OF FEED FUNCTION ...,... . . . . . . . . . . . . . . . . . ...1-26


1.2.1 Rapid Traverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-26
1.2.2 Cutting Feed (FCommand) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27
1.2.3 F1-Digit Feed* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
1.2.4 Feed per Minute Function (G94) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-32
1.2.5 Solid Tap Mode (G93, G94) *.... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33
1.2.6 AutomaticAcceleratio nandDeceieration . . . . . . . . . . . . . . . . . . . . . . . . . 1-34

2. COMMANDS CALLING AXIS MOVEMENTS


2.1 INTERPOLATION COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
2.1.1 Positioning (GOO, G06, G60) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
2.1.2 Linear lnterpolation(GOl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
2.1.3 Circular interpolation (G02. G03) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
2.1.4 Helical interpolation (G02, G03)*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14

2.2 REFERENCE POINT RETLJR N........ . . . . . . . . . . . . . . . . ...2-16


2.2.1 Automatic Return to f3eference Point (G28) . . . . . . . . . . . . . . . . . . . . . . . 2-16
2.2.2 ReferencePoint Return Check (G27) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
2.2.3 Return from Reference Point Return (G29) . . . . . . . . . . . . . . . . . . . . . . . . 2-24
2.2.4 Second to Fourth Reference Point Return (G30) . . . . . . . . . . . . . . . . . . . 2-28
3. MOVEMENT CONTROL COMMANDS
3.1 SEITING THE COORDINATE SYSTEM . . . . . . . . . . . . . . . . . ...3-3
3.1.1 Selecting the Coordinate System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
3.1.2 Base Coordinate System (G92) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
3.1.3 Workpiece Coordinate System (G54to G59)” . . . . . . . . . . . . . . . . . . . . . . 3-5
3.1.4 Local Coordinate System (G52Q2)*, . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
3.1.5 Machine Coordinate System (G53) . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-15
3.1.6 Rotation of Coordinate System (G68, G69)* . . . . . . . . . , . . . . . . . . . . . . 3-18
3.1.7 Plane Selection (G17. G18. G19) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..3.2l

3.2 DETERMINING THE COORDINATE VALUE INPUT


MODES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-22
3.2.1 Absolute/Incremental Designation (G90, G91 ) . . . . . . . . . . . . . . . . . . . 3-22
3.2.2 inch/Metric input Designation (G20, G21) . . . . . . . . . . . . . . . . . . . . . . . . 3-24
3.2.3 Scaling (G50, G51)* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-26

3.3 TIME-CONTROLLING COMMANDS . . . . ~~


. . . . . . . . . . . . . . ...3-3-1
3.3.1 Dwell (G04) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-31
3.3.2 Exact Stop (G09) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..3-3l
3.3.3 Exact Stop Mode (G61, G64) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32

3.4 TOOL OFFSET FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . ...3-33


3.4.1 Tool Offset Data Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
3.4.2 Tool Length Offset (G43, G44, G49) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34
3.4.3 Tool Position Offset (G45to G48) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-38
3.4.4 "Tool Radius Offset CFunction (G40, G41, G4:!) . . . . . . . . . . . . . . . . . . . 3-48
3.4.5 3-Dimensional Tool Offset Function (G40, G41, G42)* . . . . . . . . . . . . . . 3-90

3.5 S, T, M, AND BFUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-98


3.5.1 Spindle Function (S Function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-98
3.5.2 Tool Function (T Function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..3-99
3.5.3 Miscellaneous Function (M Function) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1oo
3.5.4 Second Miscellaneous Function (B Function)” . . . . . . . . . . . . . . . . . . 3-102
4. ENHANCED LEVEL COMMANDS
4.1 PROGRAM SUPPORI FUNCTIONS(I) . . . . . ...0...........4-3
4.1.1 Canned Cycles (G73to G89, G181to G189) * . . . . . . . . . . . . . . . . . . . . . 4-3
4.1.2 Hole Machining Pattern Cycles (G70, G71, G72) * . . . . . . . . . . . . . . . . . 4-34
4.1.3 Solid Tap Function (G84, G74)* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-39
4.1.4 Deep-hole Solid Tap Function (G184, G174)* . . . . . . . . . . . . . . . . . . . . . 4-50
4.1.5 Circle Cutting (G12, G13) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - . . . . ...4-64
4.1.6 Mirror image ON/OFF (M94, M95)* . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-70
4.1.7 Programmable Data lnput(GIO) *.... . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-76
4.1.8 Subprogram Call Up Function (M98, M99) . . . . . . . . . . . . . . . . . . . . . . . . 4-79
4.1.9 Polar Coordinate Interpolation (G126, G127)* . . . . . . . . . . . . . . . . . . . . . 4-81
4.1.10 Cylindrical interpolation (G128, G129)* . . . . . . . . . . . . . . . . . . . . . . . . . . 4-91

4.2 PROGRAM SUPPOR”r FUNCTIONS (2) . . . . . . . . . . . . . . . ...4- 101


4.2.1 Program Copy (G25)* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-101
4.2.2 Automatic Corner Override (G106) *... . . . . . . . . . . . . . . . . . . . . . . ...4-104
4.2.3 Stored Stroke Limit Eland C(G22, G23) * . . . . . . . . . . . . . . . . . . . . ...4-109
4.2.4 Comment Output Function (M191) *... . . . . . . . . . . . . . . . . . . . . . . ...4-115
4.2,5 Break Point Functiori . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..4’- 116
4.2.6 High-speed Cutting’’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...-4-116
4.2.7 Chamfering and Corner Rounding Commands . . . . . . . . . . . . . . . . . . . 4-121
4.2.8 Corner Feedrate Designation (Gl 07, G108)* . . . . . . . . . . . . . . . . . . . . . 4-126

4.3 AUTOMATING SUPPORT FUNCTIONS . . . . . . . . . . . . . . . ...4- 138


4.3.1 Skip Function (G31) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-138
4.3.2 Program interrupt Fllnction (M90, M91) . . . . . . . . . . . . . . . . . . . . . . . . . 4-141
4.3.3 Tool Life Control Furlction* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..4-144

4,4 MICROPROGRAMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-154


4.4.1 Differences from Subprograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-154
4.4.2 Microprogram Call (G65, G66, G67). . . . . . . . . . . . . . . . . . . . . . . . . ...4-156
4.4.3 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4- 169
4.4.4 Operation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-201
4.4.5 Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-203
4.4.6 Registering the Microprogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-209
4.4.7 RS-232C Data Output 2( BPRNT, DPRNT) . . . . . . . . . . . . . . . . . . . . . . . 4-210
4.4.8 Microprogram Alarm Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . ...-.4-214
4.4.9 Examples of Microprograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4 -215
APPENDIX 1 G CODE TABLE
APPENDIX1. I GCODE TABLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. A1-2

APPENDIX 2 INDEX
1 u
PROGRAMMING BASICS

Chapter 1 describes the basic termls used in programming


and the feed functions.

1.1 FUNDAMENTALS OF PROGRAMMING


TERMINOLOGY . . . . . . . . . . . . . . . . . . . . 1-2
1.1.1 Numerically Controlled Axes and the Number
of Simultaneously Controllable Axes . . . ~~.. . . 1 -2

1.1.2 Least Input Increment and Least Output


Increment .............................. 1-7

1.1.3 Maximum Programmable Values for Axis


Movement ............................. 1-9

1.1.4 Tape Format . . . . . . . . . . . . . . . . . . . . . . . ...1-10


1.1.5 Program Format . . . . . . . . . . . . . . . . . . . . . . 1-13

1.1.6 Optional Block Skip (/1 ), (/2 to /9) * . . . . ~~... 1-24

1.1.7 Buffer Register and Multi-active Register . . . 1-25

1.2 BASICS OF FEED FUNC”TION . . . . . . . 1-26


1.2.1 Rapid Traverse . . . . . . . . . . . . . . . . . . . . . ...1-26
1.2.2 Cutting F:eed (F Command) . . . . . . . . . . ~~... 1-27

1.2.3 Fl-Digit Feed* . .................. .. .. 1-31

1.2.4 Feed per Minute Function (G94) . . . . . . ~~... 1-32

1.2.5 Solid Tap Mode (G93, G!34) . . . . . . . . . . . . . 1-33

1.2.6 Automatic Acceleration and Deceleration. . . 1-34

1-1
1.1 FUNDAMENTALS OF PFIOGRAMMING TERMINOLOGY

This section describes the “basic terms used in programming.

1.1.1 Numerically Controlled Axes and the Number of Simultaneously Controllable


Axes

(1) Numerically Controlled Axes and Axes Names

The numerically controlled axes and the axis names are indicated in Table 1.1.

Table 1.1 Numerically Controlled Axes

Controlled Axis I Axis Name Description I


Represents the coordinate position or distance in or along an axis
Basic axes x, Y,z indicated by X, Y, and Z.
I I
Represents the commands of the fourth and fifth axes. For rotary

& motion, address characters A, B, and C are used and for parallel (lin-
ear) motion, address characters U, V, and W are used.

(2) Number of Simultaneously Controllable Axes

With the standard specification, up to three axes can be controlled simultaneously. This
number can be increased optionally to four and five axes.

(a) Number of simultaneously controllable axes with the 3-axis control func-
tion

The number of simulta.neously controllable axes is indicated in Table 1.2.

Table 1.2 The Number of Simultaneously Controllable Axes with 3-axis


Control Function

I Number of Simultaneously Controllable Axes

Positioning (COO) [3 axes (X-, Y-, and Z-axis)

Linear interpolation (GO1) 3 axes (X-, Y-, and Z-axis)

Circular interpolation (G02, G03)


+ 2 axes (X- and Y-axis, Y- and Z-axis, or Z- and X-axis)

*Circle cutting (G12, G13) 2 axes (X- and Y-axis)

2 axes (circular interpolation in XY plane) Simultaneous


‘Helical interpolation (G02, G03) 1 axis (linear interpolation, Z-axis) 1 3-axis control
* See 2.1.4, “Helical Interpolation (G02, G03)”.

Manual operation I :3axes (X-, Y-, and Z-axis)

Note 1: The plane in which circular interpolation is executed is determined by the plane selection G code (G 17 to G 19)
which is presently valid. FOIdetails, see 2.1.3, “Circular Interpolation (G02, G03)”.

2: Whh a manual pulse generator, simultaneous control is possible in either one or three axes.

1-2

-—.
1.1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

(b) Number of simultaneously controllable axes with the 4-axis control func-
tion’

The fourth axis can be selected optionally. In this manual, the fourth axis is referred
to as “a-axis” and represents any of six axes – A, B, C, U, V, and W. Which address M
characters should be used for the fourth axis is set for parameterspm1109,pm1110,
and pmll 11, and pml151, pml 152, and pml153. The number of simultaneously
controllable axes is indicated in Table 1.3.

Table 1.3 The Number of Simultaneously Controllable Axes with 4-axis


Control Function

I I Number of Simultaneously Controllable Axes I

I Positioning (GOO) I 4 axes (X-. Y-, Z-, and a-axis) I


\ Linear irrterpolation (GOI) I 4 axes (X-. Y-, Z-, and a-axis) I
2 axes (X- and Y-axis, Y- and Z-axis, or Z- anti X axis)
Circular interpolation (G02, G03)
2 axes (X- and a-axis, Y- and a-axis, or Z- ancla-axis)

*Circle cutting (Gl2,G13) 2 axes (X- and Y-axis)


— —A
2 axes (circular interpolation in XY plane) Simultaneous
*Helical interpolation (G02, G03) 1 axis (linear interpolation, Z-axis) } 3-axis control
See 2.1.4, ‘Helical Interpolation (G02, G03)”.

I Manual operation I 4axes (X- Y-, Z-, anda-axis) I

Note 1: If “’a”is included in circular interpolation. it must be a linear axis (U, V,or W). The plane in which circular inter-
polation is executed is determined by the plane selection G code (G 17 to G 19) which is presently valid. For
details, see 2.1.3, “Circular Interpolation (G02, G03)”.
2: With a manual pulse generator, simultaneous control is possible in either one or three axes.

For the a-axis, either a rotary axis or a linear axis can be selected.

● A rotary axis (A-, B-, or C-axis) is defined. as indicated in Table 1.4.

Table 1.4 Rotary Axes

I Rotary Axis I Definition I


A-axis Rotary axis around an axis which is parallel to X-?.xis

B-axis Rotary axis around an axis which is parallel to Y-axis i


I C-axis I Rotary axis around an axis which is parallel to Z-axis ]

Note 1: The unit of output increment (motion increment) andinput increment for a rotary axis is “degrees” instead of
‘“mm”which is used for a linear axis (X-, Y-,Z-axis). Whh the exception of the unit, a rotaryaxis can be treated
in the same manner as a linear axis. (Metric system) (The NC circulates fecdrate assuming 0.001 deg. as 0.001
mm.)
2: Even if the dimensions are changed to inches by using the inch/mm selection functian, the unit system for a
rotary axis remains unchanged (degrees).

1-3

—.. - ----------------- .. .. .._—.. -—. -.. _,_______


b-l
L
t
A
‘( S!XSJ-Z pm ‘-A ‘-x) Sam J’apo q)~M w saqm!
JO squn u! ]ndu! aq ]snw suopmunp ‘uo~]xsnj uoqxqas susu~wq %qsn ,iq paI:o[as s! UHs,fs qxt a~ ua~ z
:[ aloN
S!XV-z 01 [a[[md S!X!2 .IWXH[ v S!XV-m
uoyu!jaa I S!xv .033U!7 \
I
1.1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

(c) Number of simultaneously controllable axes with the 5-axis control func-
tion’

The fifth axis can be selected optionally. In this manual, the fifth axis is referred
to as “~-axis” and represents any of six axes – A, B, C, U, V, and W. Which address m
characters should be used for the fifth axis is set for parameterspm1112,pm1113,
and pml 114, and pm 1154, pml 155, and pml 156. The number of simultaneously
controllable axes is indicated in Table 1.6.

Table 1.6 The Number of Simultaneously Controllable Ax(?s with 5-axis Corl-
trol Function
— —
Number of Simultaneously Contrc)llable Axes 1
Positioning (GOO) 5 axes (X-, Y-, Z-, a-, and (3-axis)

k
Linear interpolation (GOI) 5 axes (X-, Y-, Z-, a-, and ~-axis)
— —
2 axes (X- and Y-axis, Y- and Z-axis, or Z- and X-axis)
Circular interpolation ((302, G03) 2 axes (X- and a-axis, Y- and a-axis, or Z- and a-:~xis)
2 axes (X- and ~-axis, Y- and (}-axis, or Z- and p-axis)

I *circle cutting (G12, G13) 2 axes (X- and Y-axis)
.
2 axes (circular interpolation in XY plane) Simultaneous
*Helical interpolation (G02, G03) 1 axis (linear interpolation, Z-axis) } 3-axis control
See 2.1.4, ‘“HelicalInterpolaticm (G02, 003)”.

I Manual operation 5 axes (X-, Y-, Z-, a-, and ~-axis) 1

Note 1: Circular interpolation is possible only when a- and j3-axisare linrxeraxes. The plane in which circular interpola-
tion is executed is determined by the plane selection G code (G1’7to G 19) which is presently valid. For details,
see 2.1.3, “Circular hrterpolation (G02, G03)”.
2: With a manual pulse generator, simultaneous control is possible in either one or three axes.

For the ~-axis, either a rotary axis or a linear axis can be selected.

● A rotary axis (A-, B-, or C-axis) is defined as indicated in Table 1.7.

Table 1.7 Rotary Axes

Definition

* Rotary axis around an axis which is parallel to X-axis


---i
I B-axis \ Rotary axis around an axis which is parallel to Y-axis I

I C-axis I Rotary axis around an axis which is parallel to Z-axis I

Note 1: Ile unit of output increment (motion increment) and input increment for a rotary axis is “degrees” instead of
“mm” which is used for a linear axis (X-, Y-,Z-axis). With the exception of the unit, a rotary axis can be treated
in the same manner as a linear axis. (Metric system) (The NC calculates feedrate assuming 0.001 deg. as 0.001
mm.)
2; Even if rhe dimensions are changed to inches by using the inch/mm selection function, the unit system for a
rotary axis remains unchanged (degrees).
● A linear axis (U-, V-, or W-axis) is defined as indicated in Table 1.8.

Table 1.8 Linear Axes

kQd--
I U-axis
Definition

IA lirtear axis parallel to X-axis I


I V-axis IA lirtearaxis parallel tol’-axis I
I W-axis IA linear axis parallel to Z-axis I
Note I: The unit of output increment (motion increment) and input increment of a linear axis is the same as other linear
axes (X-, Y-, andZ-axis). Tht linear axes indicated above can be treated in exactly the same manner as other
linear axes,
2: When the inch system is selected by using irtchhnm selection function, dimensions must be input in units of
inches as with other axes (X-, Y-, and Z-axis).

‘t

!’
Ifthis linear axis is designated as the fifth axis,
this axis is regarded as the &axis.

B([1
~u

*X
F/
.

r \
If this rotary axis is designated as the fifth axis,
this axis is regarded as the @-axis.
w
z

Fig. 1.2 Fifth Axis (&axis) in the Right-hand Coordinate System

‘l-6
.—...——..
—._. . . ...... .... ._.... ........ ,—-------.---.—-.---,....
L-1
I saxv ARIOH. I saxv Jeau!7 I I
saxv r(Jt2~O~ * saxv Jeau!7
I I I I
VH.LB.mq ]ndul FW37 (L)
—-—
ACJO1ONMJEH1 9NlPJWVU50Eld 40 SlVlN3WV(JNf14 1“1
(2) Least Output Increment

The least output increment indicates the “minimum unit” of axis movement that is de-
termined by the mechanical system. By selecting the option, it is possible to select the
output unit system between “mm” and “inches”.

Table 1.12 Least Outpul Unit (Standard)


q
r T Linear Axes * Rotary Axes :

I Metric Output I 0.001 mm I 0.001 deg. I


I Inch Output I ().0001 inch I 0.001 deg. I

Table 1.13 Least Outpul Increment (Sub Microns)

* Rotary Axes

+:::: 0.001 deg.

~ Inch Output I ().000 1 inch I 0.001 deg.

Table 1.14 Least Outpu~[ Increment (Sub Sub-microns)

I=A-H.E::
* Rotary Axes ~

0.001 deg. 1
Inch Output 0.00001 inch 0.001 deg.
I

1-8
1,1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

1.1.3 Maximum Programmable Values for Axis Movement

The maximum programmable values that can be designated for a move command are indi-
cated in Tables 1.15, 1.16, and 1.17. The maximum programmable values indicated in these
tables are applicable to addresses I, J, K, R, and Q which are used for designating “distance”
in addition to the move command addresses X, Y, Z, a, and ~.

Table 1.15 Maximum Programmable Values for Axis Movement (Standard)

Linear Axes * Rotary Axes

z-l

Metric Input + 999999.999 mm :E9!)9999.999 deg.
Metric Output
Inch Input + 39370.0787 inch :E999999.999 deg.

Metric Input * 999999.999 mm :E999999.999 deg.


Inch Output
Inch Input + 999999.999 inch :E999999.999 deg.

Table 1.16 Maximum Programmable Values for Axis Movement


(Sub Microns)

‘1

E:
~ LinearAxe~T~~otavAxes
Metric Input I +99999.9999 mm \ +999999.999 deg. ]
Metric Output
Inch Input I +3937.00787 inch I +999999.999 deg. /

Table 1.17 Maximum Programmable Values for Axis Movement


(Sub Sub-microns)

rT ~ ~ne@xe~T=GAxes ‘1
Metric Input * 9999.99999 mm + 999999.999 deg.
Metric Output
Inch Input + 393.700787 inch+ :k 999999.999 deg. +

1-9

-—..-.
In incremental programming, the values to be designated must not exceed the maximum pro-
grammable values indicated above. In absolute programming, the move distance of each
axis must not exceed the maximum programmable values indicated above. In addition to
the notes indicated above, it must also be taken into consideration that the cumulative values
of move command must not exceed the values indicted in Tables 1.18, 1.19, and 1.20.

Table 1.18 Maximum Cumulative Values (Standard)

~:mm
Inch Input
I *99999.9999 inch
* Rotary Axes

+ 999999.999 deg.

+ 999999.999 deg.

Table 1.19 Maximum Cumulative Values (Sub Microns)

I Linear Axes I * Rotary Axes I

Metric Input i 99999.9999 mm *999999.999 deg.

Table 1.20 Maximum Cumulative Values (Sub Sub-microns)

* Rotary Axes

&::mm + 999999.999 deg.

Note: The values indicated above do not depend on the “least output increment”.

1.1.4 Tape Format

The following describes the important items concerning the tape format.

(1) Label and Label Skip

By entering “label” at the beginning of a punched tape, classification and handling of


tape can be facilitated.

The label skip function disregards the data appearing before the fwst EOB code. With
this feature, label can contain address characters and function codes which are not sup-
ported by the NC. A code that does not match the selected parity scheme can also be
used. The label skip function becomes enabled when the power is turned ON or when
the NC is reset. While the label skip function is enabled, “LSK” message is displayed
on the screen.

1-1o

_ .... —-.
1.1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

(2) Tape Start and Tape End

At the start and end of a tape, the same code (see Table 1.21) should be punched.

Table 1.21 Tape Start and Tape End

EZE:::P:3

● The ER code (rewind stop code) entered fol lowing the tape start label indicates
the rewind stop when the tape is rewound by the tape rewind command.

● The ER code, expressing the tape end, indicates the stop point when several
part programs are stored in NC memory.

WpqG$c-

Program start
(Called as “EOB or “End of Block code)
Tape start
(Called as”% or “Rewind Stop” code)

‘/3 0 ~L’l% 7
L-FCI
1
Program parf Program
end
-qTI
Tape end

Note: As the end of program code, M02 or M99 can be used insteadof M30. Whether or not the M codes indicated above
are used as the program end M code is determined according to the setting for parameter pm3005 D3.

Fig. 1.3 Single Main Program Punched on Tape (ISO Code)

1-11

..—--.— ..-. — ------ ...-... --- ——...—.- ..-. —— .——--. —-. ———..—.——.
70 LF/NL (,, )

* Label _ — ~ ————
Program part+ — Comment _ -
part
f +
Tape start Program start

===D3 Program part _


end
0‘
Program — Tape end

t- r

M 3 0 {L’ 0/0

_ Program —
Program part —
end
\
;ape end

Note: The settirrgfor parameter pm3005 D3 (An M code is used/not used for a program end code) is disregarded An
M code is not regarded as the program end code.

Fig. 1.4 Multiple Programs Punched on Tape (ISO Code)

(3) Program Start and Program End

(a) Program start

When punching a program on a tape, the following code should be punched to de-
clare the beginning of a program. This code cancels the label skip function.

Table 1.22 Program Start

Description

F:::, Program start

1-12
1.1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

(b) Program end

Any of the following codes indicated in Table 1.23 should be punched at the end
of a program to declare the program end.

Table 1.23 Program End

EIA
‘sO L ‘escrip’ion ---1

Note 1: When “M02CR’ or “M30LF/NL” is executed, the equipment may or may not be reset or rewound depending
on equipment specifications.
Refer to the manual published by the machine tool builder.
2: when multiple part programs are started in the NC memory, control may move to the next part program after
reading the progrmrrend code shown above.
This occurs when part programs are entered by total input.
3: If ER or LF/NL code is executed for a program in which neither M02 nor M30is enteredat the end of the pro-
gram; the NC is reset.

1.1.5 Program Format

(1) Program Part

The section beginning with the program start code i~nd ending with the program end
code is called the program part. The program part consists of blocks, and each block
consists of words.

c E
R ;

-Word
or
Block
Word

- 4
Block
Program parl

Block

— —
‘- -=

Note: In this manual, the “EOB” code is expressed by a semi-colon (;).

Fia.
. 1.5 Construction of Proaram

1-13

..-— .——-.—.—— ..—._ ..-. ——..—— -——————-————


(a) Program number

By entering a program number immediately after the program start code, it is pos-
sible to distinguish a specific program from other programs. A program number
consists of address O and a maximum of 5-digit number that follows address O.
The NC memory has a capacity to store a maximum of 99 programs; this capacity
can be optionally increased to store up to 299 or 999 programs.

(b) Sequence number

A sequence number, consisting of address N and a maximum of 5-digit integer that


follows address N, can be entered at the beginning of a block. Sequence numbers
are used only for reference numbers of blocks and do not influence the contents and
execution order of machining processes. Therefore, sequential or non-sequential
numbers may be used for sequence numbers. It is also allowed to leave blocks
without assigning sequence numbers. In addition, the same sequence number may
be assigned to different blocks. Although there are no restrictions on using se-
quence numbers, it is recommended to assign sequence numbers in a sequential
order. Before executing the sequence number search, it is necessary to execute the
program number search to determine the program in which sequence tmmber
search should be executed.
.——.— . . . ..—..— ...— -.

(3
SUPPLE-
MENT
1.

2.
If a sequence number cc,nsisting of 6 of more digits is designated, 5 digits from
the least insignificant digit are regarded as a sequence number.

If address search is executed for a sequence number which is assigned to more


than one block, the block searched first is read and search processing is completed
at that block.

3. For blocks for which a sequence number is not assigned, search is possible by
the address search operation if address data in the block to be searched are desig-
nated as the object of address search operation.

4. When designating a sequence number following G25 or M99, designate a 4-digit


number.
.———

“1-14
1.1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

(c) Word

A word consists of an address character included in the function characters and a


numeral of several digits that follow the address character. For example, word
“G02” consists of address character “G” and numeral “2”. m
The function character means a character that can be used in the significant data
area. For details of address character and function character codes, refer to Tables
1.24 and 1.25.

1-15

.-——— ._-. —.,.


——. -. ——. —.-—..--..— .——. ———-—.. .
Table 1.24 Table of Address Characters

Ca~O:gory
Address Description

A Rotary axis around the axis parallel to X-axis o


I
B Rotary axis around the axis parallel to Y-axis Iol
c Rotary axis around the axis parallel to Z-axis o
D Tool radius offset number + B, O
E User macro character, Feed in canned cycle o
F Feedrate B

G Preparatory function I B,O I


H Tool offset number B
I
X-coordinate of center of arc B~
I
Radius for circle cutting o’
Y-coordinate of center of arc B, O
J
Depth of cut for circle cutting

K Z-coordinate of center of arc B

L Number of repetitions B, O

M Miscellaneous function B

N Sequence number IBI


o Program number B

Dwell time B
P
Designation of a program number and sequence number in subprogram o
I
Q- Depth of cut and shift distance in a canned cycle Iol

‘~
R Point R in a canned cycle, Radius of an arc

s Spindle function

T Tool function

u Additional linear axis parallel to X-axis o
v Additional linear axis parallel to Y-axis o
i
w Additional linear axis parallel to Z-axis lo~
X-coordinate
x Dwell time
B I
I
Y Y-coordinate B!

z Z-coordinate B

Note: B: Basic, O Option

116
1.1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

Table 1.25 Table of Function Characters

EIA code ISO code Description Remarks


— —
EIA: Error if designated in the significant in.
Blank NUL formation area
ISO: Disregarded

BS BS Disregarded
.
Tab HT Disregarded

CR LF/NL End of block (EOF)
CR - Disregarded

SP SP Space
ER % Rewind stop

Uc Upper case
— —
LC Lower case
2-4-5 bits ( Control out (Comment start) EIA:
——
2-4-7 bits ) Control in [Comment end) Special code

+ + Disregarded, User macro operator

— — Minus sign, User macro operator
— —
o-9 0-9 Numerals
A-Z A-Z Address characters
Optional block skip
I I
User macro operator
——
Del DEL Disregarded (includes all punched holes)

Decimal point

Parameter setting # Symbol of sharp (Variable)
——
* * Asterisk (Multiplication operator)
. — Equal symbol
——
[ [ Left bracket
——
1 1 Right bracket EIA:
——
0 For comment in macro program Special code

$ $ For comment in macro program

@ @ For comment in macro program


? ? For comment in macro program
For comment in macro program
— —

Note I: [f a code not indicated above is designated in the significant information area, it causes an error.
2: Information designated between the control out and control in codes is regarded as insignificant information.
3: Input code (EIA/lSO) is automatically recognized, and output code is detemlined by the setting for parameter
pmOO04DO.

1-17

—..-..—
(d) Block

● A block consists of words to define a single step of operation. One block ends
with the EOB (end of block) code. The EOB code is expressed by “CR” in
the EIA code system and “LF/NL” in the ISO code system.
In this manual, it is expressed by a semicolon “;” to make the explanation sim-
ple.

“ Characters not indicated in Tables 1.24 “Table of Address Characters” and


1.25 “Table of Function Characters” must not be used.

● One block can contain up to 128 characters. Note that invalid characters such
as “Del” are not counted.

=:,:...,
(=even number)
_.._!L
(a) Adding a character for TV check (an error occurs if an even number of characters is contained in a block.)

~A L______ L== ‘ban’29


{““’”’””’””;
characters in a block
——————J
(b) Number of valid characters allowed in a block

Fig. 1.6 Block

(2) Comment Part

A comment can be displayed by using the control out and control in codes.

(a) Entering a comment in a program

It is possible to display a required comment on the screen by enclosing it with the


control out and control. in codes in a part program. The information enclosed by
these codes is regardecl as insignificant information.

1-18

.——.
_______
. ___
1.1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

(b) Entering the control out and control in codes

The control out and control in codes can be entered in the same manner as entering
ordinary characters.

● “(’’:Press the [U] key after pressing the [SHIFT] key.

● “)’’:Press the [V] key after pressing the [SHIFT] key.

Characters that can be entered between


“(” (control out) and “)” (control in) codes
(Operation panel with 9-inch CRT) I
+-

.-
A. .—.
7 —

Fig. 1.7 Characters that can be Entered between Control Out and Control
In Codes (Keys Enclosed by Dark. Line)

Note 1: The characters that can be entered between the control out and control in codes are those that are entered by
using the keys enclosed by dark line in Fig. 1.7.
2: It is not allowed to use the control out and control in codes in the area which are already enclosed by the control
out and control in codes.

1-19

-——...--——.,_.,, ——. —._-— .———.. — ——, =.—. — ,.-- ....— —— ..-—l, —-..——— ---- ....~l..—.’ -—-.-—-—- —-
OZ-1
aql ‘pasn s! p-qod
Es+x
(&)
[EIEEmBmlm#l J
\
N3d0 lsdsa +
;+5 EiElmi@l FEl .
nsl dlS W3W
6W
OW) os : wa80 oj : az=~
1Z9 0s : lW 0001 : ON”l
*69
L9’3 WI
ZS9 06$) 10000 z 0000 z
869 Ll$l 1000”0 A 0000 A
08!3 00!3 1000’0 x 000”0 x
3a03 wm lN3W3t13Nl lVSE13AlNn
:90W 101
:OA 0XOS3
:L6W 020S5163
Ezlo
0000ON Z.. **O Nn14 E)NINNnH
1.1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

Table 1.26 Input Format (Standard)

‘– Address

Program number
=s3E~:l I
Metric Input

05
Inch Input

I
Metric Input

05
Inch Input

IBI
Sequence number

G function

=:::~ ~~ ; ; = :::::: ::i-


Feed per minute (mm/min) function F 60 F 41 F 60 F51 B

Feed per minute (mm/min)
F61 F 42 F61 F 52 B
1/1O function
E ~
S function 55 55 B
T2 T2 B
T function
T4 T4 o
M function M3 M3 B

Tool offset number H4 or D4 H4 or D4 B



B function B3 B3 o

Dwell P 63 P 63 B

Program number designation P5 P5 B

Sequence number designation P4 P4 B

Number of repetitions L9 L9 B
Table 1.27 Input Format (Sub Microns)

Address

I Program number I 05 IB I
I Sequence number I N5 IBI
I G function I G3 IBI

-=Feed per minute (mm/min) function


Feed per minute (mm/min)
F 52 F 33 B
I 1/10 function 1 I I I
I S function I S5 IBI
T2 B
T function
T4 o
I M function I M3 IBI
I Tool offset number I H4 or D4 IBI
I B function I B3 101
I Dwell I P 63 IBI

I Number of repetitions I L9 IB!

-1-22
1.1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

Table 1.28 Input Format (Sub Sub-microns)

Metric Output B: Basic


Address

Metric”=: 0: OptiOn-
Program number 05 B
Sequence number N5 B
G function G3 B

Linear axis a+45 a+36 B
Coordinate words
Rotary axis b+45 b+45 o

Feed per minute (mrdmin) function F 42 F 23 B

Feed per minute (mm/min) F 43 F 24 B
1/10 function
E —.
S function S5 B
—.
T2 B
T function —.
T4 o
M function M3 B

Tool offset number H4 or D4 B


—.
B function B3 o

Dwell P 63 B
—.
Program number designation P5 B

Sequence number designation P4 B

Number of repetitions L9 B
k-” —.

1-23
1.1.6 C)ptional Block Skip (/1), (/2 to /9) *

If a block containing the slash code “/n (n=l to 9)” is executed with the external optional
block skip switch corresponding to the designated number set ON, the commands in the
block following the slash code to the end of block code are disregarded. The slash code “/n”
can be designated at any position in a block.

Example:

/ 2 N 1234 GO1X1OO / 3 Y200;


If the .’/2” switch is ON, the entire block is disregarded, and
if ‘./3” switch is ON, this block indicates the following.
N 1234 GOIX1OO;

——~—-—.—, --———

0
suPPt.ti.
MENT
1,

2.
“ 1” can be omitted for”/ 1”.

The optional block skip function is processed when a part program is read to the
buffer register from either the tape or memory. If the switch is set ON after the
block containing the optional block skip code is read, the block is not skipped.

3. The optional block skip function is disregarded for program reading (input) and
punch out (output) operation.

1-24
1.1 FUNDAMENTALSOF PROGRAMMINGTERMINOLOGY

1.1.7 Buffer Register and Multi-active Register

By using the buffer register and multi-active register, the NC ensures smooth control of the
machine by reading the blocks of data into the buffer register.
u

(1) Buffer Register

In normal operation, two blocks of data are buffered to calculate the offset and other
data that are necessary for the succeeding operation.

In the tool radius offset C mode (option), two blocks of data (a maximum of four blocks
of data, if necessary) are buffered to calculate the offset data that are necessary for the
succeeding operation. In both of the normal operation mode and tool radius offset C
mode, the data capacity of one block is a maximum of 128 characters, including the
EOB code.

(2) Multi-active Registers *

With a part program enclosed by M93 and M92, a maximum of seven blocks of data
are buffered. If the time required for automatic operat ion of these seven buffered blocks
is longer than the time required for the buffering ancl calculation of the offset data for
the next seven blocks, the program can be executed continuously without a stop be-
tween blocks.

Table 1.29 M92 and M93 Codes

Function

~ - registers OFF
Multi-active ‘---<

L~. Multi-active registers ON


—J

1-25

—.—-—. —...—.-.-.——..—....—. _-. ——.—..... .———--—-—..---..——.-—— —-


1.2 BASICS OF FEED FUNCTION

This section describes the feed function that specifies feedrate (distance per minute, distance
per revolution) of a cutting tool.

1.2.1 Rapid Traverse

Rapid traverse is used for positioning (GOO) and manual rapid traverse (RAPID) operation.
In the rapid traverse mode, each axis moves at the rapid traverse rate set for the individual
axes; the rapid traverse rate is determined by the machine tool builder and set for the individ-
ual axes by using parameters. Since the axes move independently of each other, the axes
reach the target point at different time. Therefore, the resultant tool paths are not a straight
line generally.

The rapid traverse override function can adjust the set rapid traverse rate to Fo, 25%, 5070,
and 100% where F. indicates a fixed feedrate set for parameter pm2447.

(3
SUPPLE*
MENT
1. Rapid traverse rate is set in the following units for the individual axes.

Setting units of rapid traverse rate 1 mm/min


0.1 inch/rein
1 deg./rein

2. The upper limit of the rapid traverse rate is 240,000 mm/min. Since the most ap-
propriate value is set conforming to the machine capability, refer to the manuals
published by the machine tool builder for the rapid traverse rate of your machine.
.——... ———

“1-26
1.2 BASICS OF FEED FUNCTION

1.2.2 Cutting Feed (F Command)

The feedrate at which a cutting tool should be moved in the linear interpolation (GO1) mode
or circular interpolation (G02, G03) mode is designated using address character F.
m
● With a 6-digit numeral specified following address character F, feedrate of a
cutting tool can be designated in units of “mm/min”.

● The feedrate specified using an F code can be multiplied by 1/10 by changing


the setting for parameter pm2004 DO. The programmable feedrate range is
indicated in Table 1.30.

Table 1.30 Programmable Range of F Code

I I Normal Mode (pm2004 DO=O) I F-command 1/10 Function (pm2004 DO=l) I


Input System Programmable Range
m (Feed per Minute) ‘-m-?~~%$$:?e”
I Microns \ F60 I F 1.O-F 240000 mrdmin I F61 I F 0.1-F 240000.0 mm/min I
1 Sub Microns F51 F 0.1-F 24000.0 mm/min
~
F 0.01-F 24OC1O.OO
-—
mm/min
-A
Sub Sub-microns F 42 F 0.01-F 2400.00 mnv’min F 0.001-F 2400.000 mm/min
u- ‘— d
I Inches I F41 I F 0.1-F 9448.8 inchlmin I F42 ] F O.01-F 9443.81 mrdmin I

1-27

—...—.——— —.—.——-. ..——.. -.—. ”— ..-. ...— _...


.--—. ——..———. .— —..,.-., —._ —.———._—.
I

l-l -I-I
(E” G“

-A

-n
II

I
+
—.
NJ 3
m

+
<
ry
r
t
+
——. ___ ?J
—.
I
x m x
+
/
/
Iv
/
$/
-.
(n

~!
i_
1.2 BASICS OF FEED FUNCTION

cates the tangential feedrate.


Example of Programming

With the following program:


/—-
—.
__
In the simultaneous 3-axis control linear interpolation,

+Y
an F command indi-

L
End
GOIX. ”” Y.. .F400;4OO; poin ‘ 1
-——_ ---
[-’ #‘;
F = 400 = jFx2 + Fy2 + FZ2 I 1,
(mmlmin) 1

i -++00 mm/min
I /
l!
! Starl point 1
–1#--- +x
I
1
--—— —_ .._ J’
/
+Z

Fig. 1.11 F Command in Simultaneous 3-axis Control Linear Interpolation

. In the simultaneous 4-axis control* linear interpolation, an F command indi-


cates the tangential feedrate.
F (mm/min) = @2 + Fy2 + FZ2 + Fa2

* In the simultaneous 5-axis control* linear interpolation, an F command indi-


cates the tangential feedrate.
F (mm/min) = &C2 + Fy2 + FZ2 + Fa2 + F~2

1-29

—-——.———. —.-.-—_,...—— .—.. —.- .—.—-—— ..—.


.—-—— ——--..— —.
a)
Supplem-
ent
1,

2.
The F-command 1/10 function does not influence the feedrate called by an
F1-digit. command.

After changing the setting for parameter pm2004 DO, the new setting becomes
valid when the NC is reset.

3. During solid tapping, the F-command 1/10 function does not influence the fee-
drate called by an F command.

4. The feedrate specified by an E code in a canned cycle is influenced by the F-com-


mand 1/10 function. The command format of an E command is the same as with
an F command.

5. When the F-command 1./10 function is used, the minimum unit of the system
variables used for E and F commands is made one decimal place smaller. In met-
ric input, if the least increment of the F command system variable is 1 mrn/min,
for example, it becomes 0.1 mm/min when the F-command 1/ 10 function is used.

6. When the F-command 1/10 function is used, designation of the macro system
variables of E and F commands and the arguments (E, F) used for calling a macro
program requires entry of a decimal fraction increased by one digit. In metric
input, the command c)f “G65 PI F1234”, for example, is expressed as
“#9=123.4”.

7. If “FO” is specified, alarm “0370” occurs.

8. For an F command, a minus value must not be specified. If a minus value is speci-
fied for an F command, correct operation cannot be guaranteed.

1-30
1,2 BASICS OF FEED FUNCTION
——

1.2.3 F1-Digit Feed*

It is possible to select a feedrate by specifying a l-digit numeral ( 1 to 9) following address


F. With this manner of designation of an F command, the feedrate preset for the specified
numeral is selected. The feedrate to be selected in response to the designation of F1 to F9
should be set for the parameters indicated in Table 1.31.

Table 1.31 Parameter Numbers Used for Presetting F1-digit Feedrates


-nand Parameter Numbers ‘1
I F1 I pm0820 I
Iml pm0821 I
L—IL—L———— ‘m0822 - J
I F4 I pm0823 I
L._.__E~ ‘m”’” J
I F6 ~ pm0825 I

L.&l pm0826
— J
1~1 pm0827 I
L--El pm0828
J
Note: Value1= 0.1 mm/min,or 0.01 inch/rein

When using the FI -digit feed function, it is possible to optimize the selected feedrate by tur-
ningthe manual pulse generator while the F 1-DIGIT switch is ON. Increase or decrease of
increments per pulse (F I -digit multiply) should be set for the parameters indicated in Table
1.32.

Table 1.32 Parameter Numbers Used for Setting F1-digit Multiply


F Command Parameter Numbers

Fl pm2111
F2 pm21 12 4
F3 pm2113

E I
F’ pm2114

F5 pm2115
F6 pm2116
F7 pm2117

I% pm2118
F9 pm2119

Note: Value c’1“= 0.1 mru/min per pulse

1-31

.———----!. - -—-., ---- ---—.-—- ..,.-,,,— .-—-.-l— .—-


If increase/decrease increments per pulse is set for these parameters, the value set for the pa-
rameters in Table 1.31 is updatecl in response to the manual pulse generator operation.

Parameters indicated in Table 1.33 are used to set the upper limits of the feedrate for F1 -digit
feedrate selection. If a value larger than the allowable maximum feedrate set for parameter
pm2800 is set, it is disregarded and replaced with the value set for pm2800.

Table 1.33 Parameters pm2865 and pm2866


Parameter Number Description

Allowable maximum feedrate for F 1 to F4


Allowable maximum feedrate for F5 to F9
~

cl)
;tJPJLE-
1. If this function is selected, it is not possible to designate a feedrate of 1 to 9 mm/
min by using the normal F function. (Feedrate greater than 10 mrn/min can be
specified by using an F command.)

2. If “FO>’is specified, alarm “0370” occurs.

3. When the DRY RUN switch is ON, feed commands are all executed at the fee-
drate set for the dry run operation.

4. The feed override function is invalid for the feedrate selected by the F1 -digit
command.

5. The feedrate set for the parameter is retained in memory if the power is turned
OFF.

6. It is possible to designate an F1 -digit command by specifying a variable in a mac-


ro program.

7. Whh the inch specification, feedrates are set in units of inch/rein. However, the
allowable maximum feeclrates can be set only in units of mm/min.

1.2.4 Feed per Minute Function (G94)

When G94 is designated, a feedrate specified following address F is executed in units of “mm
(inch)/min”.

1-32
1.2 BASICS OF FEED FUNCTION

1.2.5 Solid Tap Mode (G93, G94) *

The folIowing G codes are used to indicate that tapping shcmld be executed by using the solid
tap function.

Table 1.34 Solid Tap Mode G Codes

~– ~~q

G93 and G94 are modal G codes. When the power is turned ON or when the NC is reset,
the G94 mode is automatically set.

(1) Solid Tap Mode (G93)

In the G93 solid tap mode, solid tapping is executed for the tapping cycles called by
G84 or G74. Axis feed is controlled in the “feed per revolution” mode. In the solid
tap mode, only solid tapping is allowed and no other operation is possible.

(2) Solid Tap Mode Cancel (G94)

When G94 is executed, the solid tap mode is canceled. After the cancellation of the solid
tap mode, conventional type tapping is executed in which axis feed is controlled in the
“feed per minute” mode.

1-33

-— ——-. .— . ———....——
..--.. ..—..— ——-—
...--—.——-
. ————— --—-
.——-— ——— ——— ——
1.2.6 Automatic Acceleration and Deceleration

Automatic acceleratiorddeceleration control is provided for rapid traverse and cutting feed
operation, respectively.

(1) Acceleration and Deceleration for Rapid Traverse and Manual Axis Feed Op-
eration

For positioning (GOO), manual rapid traverse (RAPID), manual continuous feed (JOG),
and manual handle feed (HANDLE), linear pattern automatic acceleration/deceleration
is applied. Rapid traverse rate and acceleration/deceleration time constant for rapid tra-
verse are set for following parameters.

Table 1.35 Parameters Used for Setting Rapid Traverse Rate and Accelera-
tion/Deceleriation Time Constant

r I
1
X-axis I
1
Y-axis ~ Z-axis
1
I 4th-axis
[
I 5th-axis
1

Rapid traverse rate pm2801 pm2802 pm2803 pm2804 pm2805

I Acceleratiotideceleration time constant / pm2461 I pm2462 I prn2463 I pm2464 I pm2465

v GO(I
.—— - -

f
Feedrate
4

/i

Fig. 1.12 Automatic Acceleration/Deceleration in Linear Pattern


1,2 BASICS CIFFEED FUNCTICIN

(2) Acceleration and Deceleration in S-curve Pattern *

For positioning operation (GOOmocle positioning), S-curve pattern can be selected for
the acceleratiorddeceleration pattern instead of the linear pattern. By using the S-curve
pattern, positioning is possible at a high acceleration/deceleration rate without applying
shock to the machine. The S-curve pattern for rapid traverse is defined by the following
parameters.
m
Table 1.36 S-curve Pattern Deiining Parameters (for Rapid Traverse)

Parameter lDescription ~~=a

pm2591 I For rapid traverse of X-axis I o to 20 I


pm2592 \ For rapid traverse of Y-axis I oto 20 I
pm2593 For rapid traverse of Z-axis

pm2594 For rapid traverse of the 4th-axis +:=+

pm2595 For rapid traverse of 5th-axis


L– I:=d

v --------- Acceleration/deceleration in linear pattern


—— Acceleration/deceleration in Scutve pattern
t
Feedrate
\
f’ ‘\ \
/’ \\
‘, <
\
\,
‘.
‘,
‘. \
\
‘1 t

Time +

Fig. 1.13 Acceleration/Deceleration in S-curve Pattern

1-35

——.— —... . . .. —. —.-... -— —!. -—.- —.-.. ”.-...- .—-.-—--—.


For the S-curve pattern acceleration/deceleration, time constant is provided for the indi-
vidual axes and setting is possible in the range from O to 20.

Table 1.37 Time Constant for S-curve Pattern Control

m:,n.a,.tt..
Explanation
Fcedrate IScontrolled in the same pattern as acceleratiotideceleration in

1 to 20 (N) The S-curve pattern having the time constant of”4 x N“ is obtained.
1 (Maximum time constant 60 msec) I
Less then O I Regarded as “O”. I
I Greater than 20 I Regarded as “20”. I

(3) Acceleration and Deceleration for Cutting Feed

For cutting feed (GO1 to G03 mode), feedrate is controlled by the automatic accelera-
tionldeceleration in the exponential pattern.

v
t
F1
————

K“L.
t
Feedrate

Time -

Fig. 1.14 Acceleration/Deceleration in Exponential Pattern

136
1.2 BASICS OF FEED FUNCTION
——-

Time constant for cutting feed and feedrate bias are set for parameters. For tapping,
time constant and feedrate bias can be set independently.

Table 1.38 Parameters for Tapping

Feedrate time constant

Feedrate bias :::W*:+ :::<

(3
SUPPLE-
MENT
For the parameters indicated above, the most optimum values are set for respective
machines. Do not attempt to change the setting unless necessary.

1-37

_ -. .-——-— .—... —
2
COMMANDS CALLING AXIS
MOVEMENTS

Chapter 2 describes Ihe interpolation commands and the ref-


erence point return commands.

2.1 INTERPOLATION COMMANDS . . ~~


. . . . 2-2
2.1.1 Positioning (GOO, G06, G60) . . . . . . . . . . . . . . 2-2

2.1.2 Linear lnterpolation(GOl) . . . . . . . . . . . . . . . . . 2-5

2.1.3 Circular Interpolation (G02, G03) . . . . . . . . . . . 2-7

2.1.4 Helical Interpolation (G02, G03)* . . . . . . . . . . 2-14

2.2 REFERENCE POINT RETURN . . u. . . 2-16


2.2.1 Automatic Return to Reference Point
(G28) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...2-16

2.2.2 Reference Point Return Check (G27) . . . . . . 2-22

2.2.3 Return from Reference Point Return


(G29) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...2-24

2.2.4 Second to Fourth Reference Point Return


(G30) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...2-28

2-1

—.-— — —-— .—..— --. --— .—. ?..


-.7o— “.—..—!———–
2.1 INTERPOLATION COMMANDS

This section describes the positioning commands and the interpolation commands that con-
trol the tool path along the specified functions such as straight line and arc.

2.1.1 Positioning (GOO, G06, G60)

In the absolute programming mc,de (G90), the axes are moved to the specified
point in a
workpiece coordinate system, and in the incremental programming mode (G91 ), the axes
move by the specified distance from the present position at a rapid traverse rate.

For calling the positioning, the fc)llowing G codes can be used,

Table 2.1 G Codes for Positioning

G Code Function Group

GOO Positioning in the error detect ON mode 01


G06 Positioning in the error detect OFF mode *

G60 ~Unidirectional positioning 01

2-2
2,1 INTERPOLATIONCOMMANDS

(1) Positioning in the Error Detect ON Mode (GOO)

When’’GOOX. ”” Y.”” Z-”.;”” Mdesignated, positioning is executed in the “error


detect ON” mode, in which the program advances to the next block only when the num-
ber of lag pulses due to servo lag are checked after the completion of pulse distribution
has reduced to the permissible value.

In the GOOmode, positioning is made at a rapid traverse rate in the simultaneous 3-axis
(*5-axis) control mode. The axes not designated in the GOOblock do not move. In posi-
tioning operation, the individual axes move independently of each other at a rapid tra-
verse rate that is set for each axis. The rapid traverse rates set for the individual axes
differ depending on the machine. For the rapid traverse rates of your machine, refer to
the manuals published by the machine tool builder.
Example of Programming Y-axis

Goo X4’(I. Y40. Z40.;


40.

—~ X-axis
40.
p ‘;1
Rapid traverse rate

X-axis:8 m/min
/ Y-axis: 8 m/mir~
Z-axis Z-axis: 4 m/min

Fig. 2.1 Positioning in Simultaneous 3-axis Control Mode

\\ I/,
In the GOOpositioning mode, since the axes move at a rapid traverse rate set for the
POINT
individual axes independent y, the tool paths are not always a straight line. Therefore,
positioning must be programmed carefully so that a cutting tool will not interfere with
Q a workpiece or fixture during positioning.

2-3

—.———-.-—— ,—-..-—— -—. ——-..-— -—. ... ..-”— ————


.— -—-
(2) Positioning in the Error Detect OFF Mode (G06)

When’’G06X ”.. YZ ”.””.”


(*a””’ b “ “ o);” is specified, positioning is executed
in the “error detect OFF” mode. The G06 command is valid only in the designated
block.

In the G06 mode, program advances to the next block immediately after the completion
of pulse distribution. The tool paths at a corner are therefore rounded.

(3) Unidirectional Positioning (G60) *

With the commands of “G60 X “ “ s Y “ “ “ Z . . “ (*a.””~”” “);”, movement is


made to the designated position.

If positioning is made in the direction set by parameter pm4014, the axes overtravel the
specified end point once and then return to be positioned at the end point specified in
the G60 block. The overtravel distance is set for parameterspm4461 to pm4465 for the
individual axes (X-axis to 5th-axis). The unidirectional positioning mode is provided
to execute accurate positioning.
— .—— — ~ Direction set for the parameter

k;

Start point

o
Start point

End point

Fig. 2.2 Unidirectioni~l Positioning (G60)

2-4

—.
2.1 INTERPOLATIONCOMMANDS

2.1.2 Linear Interpolation (GO1)

Whh the commands of “GO1 X . “ “ Y “ “ “ Z “ “ “ (*cx “ “ “ ~ “ “ “) F c “ “;“,linearinterpola-


tion is executed in the simultaneous 3-axis (*5-axis) control mode. The axes not designated
in the GO1 block do not move. For the execution of the linear interpolation, the following
commands must be specified.

(1) Command Format

To execute the linear interpolation, the commands indicated below must be specified.

(a) Feedrate

Feedrate is designated by an F code. The axes are controlled so that vector sum
(tangential velocity in reference to the tool moving direction) of feedrate of the des-
ignated axes will be the specified feedrate.
F (mm/min) = {-’ + FZ2 + ( Fa2 + F~2 )

(Fx: feedrate in the X-axis direction)

CD
suPPLE-
tilEM
If no F code is designated in the block containing GO1 or in the preceding blocks,
execution of a GO1 block causes alanm “0370”.

If the optional 4th- and 5th-axis are rotary axes (A-, B-, or C-axis), feedrates of ba-
sic three axes (X-, Y-, and Z-axis) and the optional 4th- and 5th-a.~is are determined
as indicated in Table 2.2.

Table 2.2 Feedrates of Basic Three Axes and Rotary Axes (F Command)

Metric input
Metric Output
Inch input : H:+-=’:.

Inch Output
=:***’’”3::H i

Note: If tbe 4th- and 5th-axis are linear axes, the feedrates of these axes are the same as tfrefeedrates of basic three axes.

2-5

—. —-.. — — — .,—-.. -.— -—,. -., —.. —... — —-


(2) End Point

The end point can be specified in either incremental or absolute values corresponding
to the designation of G90 orG91. (For details, see 3.2.1, “Absolute/Incremental Pro-
gramming”.)

Example of Programming
Y-axis
(301 X40. Y40. Z40. F1OO;
40.

100 mm/min

H
Z-axis

Fig. 2.3 Linear Interpolation

2-6
2,1 INTERPOLATIONCOMMANDS

2.1.3 Circular Interpolation (G02, G03)

(1) Command Format

To execute the circular interpolation, the commands indicated in Table 2.3 must be spe-
cified.

Table 2.3 Commands Necessary for Circular Interpolation

G17 Circular arc in the XY plane


I — —
Plane Designation G18 Circular arc in the ZX plane

G19 Circular arc in the YZ plane

G02 Clockwise (CW)


Direction of Rotation
I G03 Counterclockwise (CCW)

Two axes among X, End point position in a workpiece


G90
Y, and Z coordinate system
Position of End Point — —
Two axes amongX, Signed distance frc,m the start point to
G91
Y,and Z the end point

Distance from the Start Signed distance from the start point to
Two axes among I, J, and K
I Point to the Center the center

R Radius of circular arc

F Velocity along the ,circular arc

2-7
(a) Plane designation

With the commands indicated below, a cutting tool moves along the specified cir-
cular arc in the XY plane, ZX plane, or YZ plane so that the feedrate specified by
the F command will be the tangential velocity of the arc.

. In the XY Plane
G17G02(or G03)X. ”” Y”. ”R””. (or I””” J.””) F..”;

. In the ZX Plane
G18G02(or G03)Z. .. X” R”R(or K””KI”. I.””) F”””;

. In the YZ Plane
G19 G02(or G03)Y””” Z””. R””. (or J””. K.””) F.””;

● To designate the circular interpolation mode (G02, G03), the plane of inter-
polation should be selected first by specifying theG17,G18, or G19. For the
4th- and 5th-axis, circular interpolation is allowed only when they are linear
axes.

The G code designated to select the plane in which circular interpolation is


executed also selects the plane where tool radius offset (G41/G42) is executed.
When the power is turned ON, the XY plane (G17) is automatically selected.

I G17 I XY plane, or Xa or X~ plane I


I G18 I ZX plane, or Za or Z~ plane I
I G19 I YZ plane, or Ya or Yfi plane I

● If an optional linear 4th-axis is selected, circular interpolation is possible in


the XcL Za, or Ya plane which includes the 4th-axis in addition to the XY, YZ,
and ZX planes. (cI=U, V, or W)

. Circular interpolation in Xa plane


G17G02(or G03)X. .”a””” R.”” (or I .“”Jo””)F””s;

o Circular interpolation in Ya plane


G18G02(or G03)Z. .”a””. R””” (or K o“”I”””)F.””;

. Circular interpolation in Za plane


G19G02(or G03)Y. ”.c.t””” R”. ”(or J “.” K-””) F.”.;

:~.a

—.-——-—. .__. . . . ______ __


2.1 lNTERPOtATION COMMANDS

● If an optional linear 5th-axis is selected, circular interpolation is possible in


the X(3, Z(3, or Y~ plane which includes the 5th-axis in addition to the XY, YZ,
and 2X planes. (~=U, V, or W)

Circular interpolation in X(3 plane


G17G02(or G03)X. ””~”. ”R. ”” (or I CO”JS-)FO.”;

Circular interpolation in Zfl plane


G18G02(or G03)Z”” ”~””” R””. (or K o“” I””) F-””;

Circular interpolation in Yct~ plane


G19G02(or G03)Y”” ”(3. ”” R.”” (or J .“.K.00”)F..”;

. If address characters which represent the 4th- and 5th-axis are omitted as with
the commands of “G17 G02 X “ “ “ R “ “ “ (or I””” J-””) F””” ;’’the XY
plane is automatically selected for the interpolation plane. Circular interpola-
tion with the 4th- or 5th-axis is not possible if these additional axes are rotary
axes.

(b) Rotation direction

The direction of arc rotation should be specified in the manner indicated in Fig. 2.4.
[
G02 Clockwisedirection(CW)

f G03 Counterclockwise
direetion (CCW)
— —3

Y-axis X-axis Z-axis

L QG03

XY plane
(G17)

Fig. 2.4
G02

X-axis
G03
$

---

Rotation Direction of Circular Arc


G02

ZX plane
(G18)
Z-axis
G03
$
-~
G02

YZ plane
(G19)
Y-axis

(c) End point

The end point can be specified in either incremental or absolute values correspond-
ing to the designation of G90 orG91.

2-9

—-——.—— ,- . ...— .——. =—.. -—-- ...-...—--— —..——-—


Example of Programming

G17 G90 G03 X15. Y40. 1-30. J-10. F150:

Y-axis

I‘:)
End point
40. Start point
G03

20.
Cc;/””” -10.
t

–30.

~ X-axis
15. 55.
+-

(a) Absolute programming (G90)

Example of Programming

G17 G91 G03 X-40. Y20. 1-30. J-10. F150;

Y-axis

1“
-40.
End

2‘
pc)int
40.
G03
20.

20.

‘i
Center //” -1o.

-30

~
15. 55.
.-=s
-+-

(b) Incremental programming (G91)

Fig. 2.5 End Point of Circular Arc

2-1o
2.1 INTERPOLATIONCOMMANDS

If the specified end point is not on the specified arc, the arc radius is gradually
changed from the start point to the endpoint to generate a spiral so that the endpoint
lies on the specified arc.

rt=r~+( r~+re)/13X0t
Radius correction amount per unit
angle
Ar==(r~-re) /El

(a) Correcting an arc

-1oo –50 o 100 -100 -50 0 50

–20

-1oo
(b) End point positioned inside the circumference (c) End point lying outside the circumference

Fig. 2.6 Interpolation with End Point off the Specified Arc

2-11

.— ___ -.—. .— —.-....-— . . ...—


(d) Center of arc

The center of arc can be specified in two methods – designation of the distance from
the start point to the center of the arc and designation of the radius of the arc.

“ Specifying the distance from the start point to the center

Independent of the designated dimensioning mode (G90 orG91 ), the center


of an arc must be specified in incremental values referenced from the start
point.

● Specifying the radius

When defining an arc, it is possible to specify the radius by using address R


instead of specifying the center of the arc by addresses I, J, or K. This is called
“circular interpolation with R designation” mode.

. For the circular arc with the central angle of 180 deg. or smaller, use an R
value of “R > O“.

. For the circular arc with the central angle of 180 deg. or larger, use an R
value of “R z O“.

Example of Programming

G17m2X..Y...OF..OF...;

smaller

Start point

Fig. 2.7 Circular Interpolation with Radius R Designation

2-12

—.. -—-. ,—.. ..


2.1 INTERPOLATIONCOMMANDS

(e) Feedrate

In the circular interpolation mode, the feedrate can be specified in the same manner
as in the linear interpolation mode. Refer to 2.1.2 “Linear Interpolation (GO1)“.

(2) Supplements to Circular Interpolation

● A circular arc extending to multiple quadrants can be clefined by the com-


mands in a single block. It is also possible to specify a full circle.
Example of Programming

Goo Xo Yo; Y-axis


G02 XO YO 110 JO F1OO;

I
—*
G02

—+- X-axis
1: 20

f}

Fig. 2.8 Full Circle

● With the commands of “G17 G02 (orG03) 1 “ “ oJ “ . “ F “ “ “ Ln;”, full-circle


interpolation is repeated b:y n times. If address L is omitted, interpolation is
executed once. Execution of the commands with the single-block function
ON causes full-circle interpolation to be interrupted after the execution of one
full-circle interpolation.

● In circular interpolation, if the distance between the start and end points is
smaller than the value set for parameter pm4450, these two points are con-
nected by a straight line.

2-13

—. ——.. =.. ———.. — —.——-—- .. . ...— —. —... -—.-——.---— -.-—.


.—
2.1.4 Helical Interpolation (G02, G03)*

It is possible to execute linear interpolation in synchronization with circular interpolation


with the axis which is not included in the circular interpolation plane. This is called helical
interpolation. The command format is indicated below,

● In the XY plane
G17G02(or G03)X”. Y”” R.” (or I. .J”-)Z(cI, ~)”. F””;

● In the 2X plane
G18G02(or G03)Z”” X”” R””(or K. “I””) Y(a, fJ)”” F..;

● In the YZ plane
G19G02(or G03)Y.’Z. .”(orJ, J, .K. G)X(cz, ~)”- F”O;

“ In the Xa plane
G17G02(or G03)X””a. ”R. ”(or I” .J. ”) Z(f3). ”F ””;

● In the Za plane
G18G02(or G03)Z”. a”. R””(or K “oI””)Y(~). .F ”-;

● In the Ya plane
G19G02(or G03)Y”” a”. R.”(or J.” K“”)X(~)”” F.O;

● In the X~ plane
G17G02(or G03)X”” (3”- R”. (or I”” J”) Z(ct) “F. .;

c In the Z~ plane
G18G02(or G03)Z”” ~”” R”. (or K”I” “)Y(a). ”F ””;

● In the Y~ plane
G19G02(or G03)Y””~”” R.. (or J” .K”. )X(a) ”. F””;

Where, a and ~ are the linear 4th and 5th axes respectively, each representing any of U-, V-,
and W-axis. If no 4th- or 5th-axis is specified as the end point command of the arc, any of
the command format is selected among the commands in the XY plane, 2X plane, and YZ
plane.

2-14
2.1 INTERPOLATIONCOMMANDS

Example of Programming

G17 G03 XO Y1OO. R1OO Z90. F1O;

90 +—.—.———— o~ End point

x
100
/k Y
Start point
R
F=1O
100
~Y

Fig. 2.9 Helical Interpolation

\\ I//

Q
1. An arc must be programmed within 360° range.
POINT
2. The feedrate specified with an F command indicates the tangential velocity in the
three dimensional space constituted by the circular interpolation plane and the lin-
ear axis perpendicular to the inte~polation plane.

3. Tool radius offset C* is valid for the axes included in the circular interpolation
plane.

2-15

-—— ,—...-— ——”-....——-.—— —.——.-——


2.2 REFERENCE POINT RETURN

2.2.1 Automatic Return to Reference Point (G28)

With the commands of “G28 X “ “ “ Y “ “ “ Z 00 “ (*a””” ~ 0.. );”, the numerically con-
trolled axes are returned to the reference point. The axes are fwst moved to the specified posi-
tion at a rapid traverse rate and then to the reference point automatically. This reference point
return operation is possible in up to simultaneous 3-axis (* 5-axis) control. The axes not des-
ignated in the G28 block are not returned to the reference point.
Example of Programming:

—.
(G90/G91) G28X””” Y””” Z...; ,
Z-axis I

I 1 @(A
Reference point
fixed point in the machine)

bf
-J-J-
## - — Z-axis deceleration LS
Positioning ~
.
F--
Reference point return operation
A “
z d Intermediate positioning point
Start
point
Y-axis deceleration LS
Y
~ Y-axis

Fig. 2.10 Automatic Reference Point Return

(1) Reference Point Return Operation

Reference point return operation is the series of operations in which the axes return to
the reference point after the reference point return operation has been started manually.

Reference point return is accomplished in two ways:

(a) Low-speed reference point return

In low-speed reference point return operation, a deceleration limit switch is used.


In high-speed reference point return operation, the first return operation is executed
in the low-speed type using a deceleration limit switch; the reference point data are
stored after the completion of the fwst reference point return and in subsequent ref-
erence point return operations is executed without using a deceleration limit
switch.

2-16

—.
2.2 REFERENCEPOINT RETURN

(b) High-speed reference point return

See parameter pm4003 D6 and D7.

It is possible to use the “high-s:peed reference point return” in place of the “auto-
matic reference point return”. [n this case, the reference point return is executed
in the following manner.

● After the positioning at the intermediate positioning point B, the axes return
directly to the reference point at a rapid traverse rate. The axes can be returned
to the reference point in a shorter time compared to the normal reference point
return operation that uses a deceleration limit switch for the individual axes.

● Even if point B is located outside the area in which reference point return is
allowed, the high-speed reference point return specification allows the axes
to return to the reference point.

● High-speed reference point return is enabled only for the axes for which nor-
mal reference point return has been completed either manually (manual refer-
ence point return) or by executing the G28 command after turning ON the
power.

“ If an axis for which low-speed reference pc~intreturn has nc~tbeen completed


either manually or by executing the G28 command after power-ON is included
in the G28 block, low-speed reference point return is executed for all axes des-
ignated in the G28 block.

● High-speed automatic reference point return is valid only when reference


point return is called by G28, and it does not influence manual reference point
return operation.

2-17

.—. —.—... ..—.—. ..—-—..-.,—-——-——--


(2) Automatic Reference Point Return for Rotary Axes

With a rotary axis, it is possible to execute the automatic reference point return the same
as with a linear axis. With a rotary axis, if it has been moved by more than + 360.000°
from the reference point estiiblished first, reference point return is executed to the clos-
est reference point in the preset direction of reference point return. The illustration be-
low shows how the reference point return is executed from points A and B. (The refer-
ence point return direction is determined by the setting for pm4002 D3 and D4.)
B
,
A~B~ +
-720° –360°
(Reference point return: Negative direction is selected for the reference point return direction)

(3) Supplements to the Automatic Reference Point Return Commands

(a) Tool radius offset and canned cycle

If G28 is specified in the tool radius offset mode (G41, G42) or in a canned cycle,
alarm “O170” occurs. G28 must not be specified in the tool radius offset mode
(G41, G42) or in a canned cycle.

(b) Tool position offset

If G28 is specified in the tool position offset mode, positioning at the intermediate
positioning point is made with the offset data valid. However, for the positioning
at the reference point, the offset data are invalid and positioning is made at the abso-
lute reference point. Whether or not the tool length offset function is disregarded
after the positioning at lthereference point can be determined by the setting for the
parameters as indicated below.

Table 2.4 G28 Command in the Tool Position Offset Mode

Parameterpm4011 Operation 1

pm4010 D6=0 As programmed


D1=O
I D6= 1: Offset valid I
pm4010 D7=0 As programmed
I Dl=l
D7 = 1: Offset valid I

2-18
2.2 REFEFiENCEPOINT RETURN

(c) Tool length offset

It is possible to cancel the tool length offset mode by G28 by changing the setting
for a parameter. If the setting is so made to cancel the tool length offset mode by
the execution of G28, it is valid Iordywhen aZ-axis command i.sspecified with G28
in the same block. Although cancellation of the tool length offset mode is possible
by G28, the tool length offset mode should be canceled before the designation of
G28.

Table 2.5 Canceling Tool Length Offset Mode

~o~- Operation 7
Tool length offset mode is canceled when the NC is reset or at the
execution of the reference pc)intreturn.
o
The H code is cleared to “O”.
In this case, the tool length offset G code is retained.

When the NC is reset or at the execution of the reference point


1 return, the tool length offset mode is not canceled.
Both the H code and the tool length offset G code are retained.

(d) Mirror image

If G28 is specified while the mirror image mode (M95) is called up, reference point
return is executed in the manner indicated in Table 2.6.

Table 2.6 G28 Command in the Mirror Image Mode

I Pararneterprn4001 I Operation I
Mirror image is applied to the intermediate positioning point.
D2=0 Movement to the reference point is not influenced by the mirror
image function.

I D2=1 I Alarm O1270ccurs. I

2-19

—...—— ,—... — ——--——-T—.—.——— ..—.—..—.


(e) Machine lock intervention

Concerning machine lc,ck intervention, there are two types of operation: turning
ON the machine lock after suspending axis movement by using the feed hold func-
tion, and turning OFF the machine lock after suspending axis movement again by
using the feed hold function. Table 2.7 shows how the machine operates according
to the machine lock intavention.

Table 2.7 Machine Operation according to Machine Lock Intervention


Machine Lock Intervention during
Machine Lock Intervention during
Positioning to Intermediate
Positioning to Reference Point
Positioning Point
Display data are infinitely updated. Al-
though positioning is made at the refer-
Low- ence point after the detection of the ac-
speed tuation of the deceleration limit switch,
type Although positioning is continued this cannot be detected due to machine
to the intermediate positioning point lock and, therefore, the display data are
L’lachine Lock (position data display only), move- infini~ly updated,
OFF -+ ON ment to the reference point is not
executed. In response to the machine lock inter-
High. Display da{a are not updated, either. vention, the axes stops moving. After
that, the display data (position dtita in
speed
the workpiece coordinate system) are
type
updated until the reference point return
is completed. (without axis movement)

Low- The axes move in the workpiece


speed coordinate system up to the inter- The axes move to the reference point.
type mediate positioning point. After
that, positioning is executed at the
Machine Lock reference point in the machine coor- Actual axis position is displayed due to
OFF + ON dinate system. Accordingly, the the intervention of machine lock.
--DOFF High- reference point given in the work- Accordingly, although the display data
speed piece coordinate system is offset. (position data in the workpiece coordi-
type However, the reference point in the nate system) agree with the reference
machine coordinate system is not point, the axes are not located at the ref-
offset. erence point.

2-20
2.2 REFERENCE POINT RETURN

(4) Supplements to the Automatic Reference Point Return Commands

● It is possible to select valid~invalid of reference point return for each axis. If


the axis for which “reference point return invalid” has been set is specified in
the G28 block, alarm “0241” occurs. Refer to parameter pm4002 DO to D4.

● It is possible to display alarm “0411” (X-axis) to “0415” (5th-axis) if the cycle


start switch is pressed without carrying out reference point return for all axes
after turning ON the power, Whether or not such alarm display should be giv-
en is determined by the setting for parameter pm4001 D6. For the axes for
which the setting is “D6 = 1 (to generate alarm)”, setting is possible whether
or not the reference point return is necessary for a parameter. Refer to paramet-
erpm4018 DO to D4 (X-axis to 5th-axis).

“ It is possible to display alarm “0411” (X-axis) to “0415” (5th-axis) when an


axis move command other than G28 is executed without completing reference
point return after turning C)N the power. Whether or not such alarm display
should be given is determined by the setting for a parameter. Refer to parame-
ter pm4004 DO to D4 (X-axis to 5th-axis).

“ The absolute coordinate values of the axes specified in the G?8 block are saved
to memory as the intermediate positioning point. For the axes not specified
in the G28 block, the intermediate positioning point saved in the previous ref-
erence point return operation remains valicl.

● If M, S, T, and/or B command is specified with G28 in the same block, the axes
continue moving to the reference point disregarding whether or not the FIN
processing is completed before the positioning of an axis at the intermediate
positioning point. Therefore, DEN is output at the reference point.

c The deceleration limit switch position must be carefully attended to when


executing the reference point return for the first time after turning ON the pow-
er. For details, refer to 2.4.2, “Manual Reference Point Return” of the Operat-
ing Manual.

2-21

.——. ——~ ..— — — .... —. —. —=..— —,, ——,.”—. ——,...41.—..—... —-Z-


2.2.2 Reference Point Return Check (G27)

This function checks whether the axes are correctly returned to the reference point at the
completion of the part program which is created so that the program starts and ends at the
reference point in the machine b,y specifying the commands of “G27 X. - “Y - - “Z” “ “
(*a” ”” P-””);”.

In the G27 mode, the function checks whether or not the axes positioned by the execution
of these commands in the simultaneous 3-axis (* 5-axis) control mode are located at the refer-
ence point. For the axes not specified in this block, positioning and check are not executed.

(1) Operation after the Check

When the position reached after the execution of the commands in the G27 block agrees
with the reference point, the reference point return complete lamp lights. The automatic
operation is continuously executed when all of the specified axes are positioned at the
reference point. If there is an axis that has not been returned to the reference point,
reference point return check error (alarm “042 1” (X-axis) to “0425” (5th-axis)) occurs
and the automatic operation is interrupted. In this case, the cycle start lamp goes OFF.

2-22
2.2 REFERENCEPOINT RETURN

(2) Supplements tothe Reference l`oint Return Check CommandandOtherOp-


erations

● If G27 is specified in the tool offset mode, positioning is made at the position
displaced by the offset amount and the positioning point does not agree with
the reference point. It is necessary to cancel the tool offset mode before speci-
fying G27. Note that the tool position offset and tool length offset functions
are not canceled by the G27 command.

● Check is not made if G27 is executed while the machine lock state is valid even
for one axis. For example, if an X-axis movement Commiind is specified in
the G27 block while in the :Z-axis neglect state, X-axis position is not checked.

. The mirror image function is valid to the direction of axis movement in the
reference point return operation called by G27. To avoid a position unmatch
error, the mirror image function should be canceled by specifying M94 before
executing G27.

2-23

.—. — .—...—

2.2.3 Return from Reference Point F?eturn (G29)

The commands of “G29 Y ~~~Z “ “ “;“ the axes, having been returned to the reference point
by the execution of the automatic reference point return function (G28, G30), to the inter-
mediate positioning point by back tracing the paths along which the reference point return
has been executed.
Example of Programming

G28Y. .” Z”””; Point A - B - C (Reference point)


~
Point B
C (reference point)
G29
- @-
Point D ~

Positioning in rapid tra- -~ ;


verse !\
I Reference point return
:
I
B (Intermediate positioning point)
0“
i /&” I
i

@“”””

Fig. 2.11 Return from Reference Point

2-24
2.2 REFERENCEPOINT RETURN

(1) Intermediate Positioning Point

“ Itisnotpossible tospecify theintemediatel?ositioningpointintheG29block.


The axes return to the previous point at a rapid traverse rate along the paths
taken in the return to the reference point. Note that the axes not specified in
the G29 block do not move.

● If G28 or G30 (see 2.2.4, “Second to Fourth Reference Point Return (G30)”)
has been executed several times before the execution of CJ29, point B to be set
for the execution of B29 is established at the intermediate positioning point set
in the last G28 or G30 operation. The following program written in absolute
commands explains how point B is set for the return operation from the refer-
ence point.
Coordinate values of intermediate positioning point
N21 G90; XYZ
N22 G28 Zlo. Y20. (o, 20., lo.)
N23 G28 X30. ; (30., 20., lo.)
N24 G29 X-40. Y-5 C’.;
~: End point
Operation called by the commands in N24 block
GOO X30. X20. ;
. Intermediate positioning point
GOO X-40. Y-50. ;
~ End point

2-25

- —.-.”..., .—... -.. ——--


Example of Programming

N31 G91;
N32 G2~ Z“””;
N33 G28 X20. Y40.;
..
N34 M(.)6;
N35 G29 X40. Y-40.;

Intermediate portioning point


d4
rO
,/ $- C

(absolute coordinate values) / /0’”

+Y

40.

Lq_J__K
‘1
/’ I
‘<

40.
1- +X

Fig. 2.12 Coordinate \Jalues of Point B for G29 Operation

c In the following cases, the intermediate positioning point used for the execu-
tion of G29 does not agree with the intermediate positioning point specified
for the execution of G28 or G30. Therefore, do not specify such commands
or attempt such operation.

Execution of the following before the execution of G29 after the comple-
tion of G28:

Coordinate system setting (G92 or coordinate system setting operation


in POS. job)
Intervention of machine lock
Intervention of manual operation with manual absolute OFF

. Execution of G28, or G30 or G29 in a block specified after the cancellation


of the mirror image (M94) at a position different from the position where
the mirror image was started.

Execution of G28, or M30 or M29 after the intervention of manual opera-


tion with the manual absolute OFF.

● If G29 is executed in the G91 incremental mode, it is valid for the commands
in the G29 block, in which the distance from the intermediate positioning point
is specified, and the position data of the intermediate positioning point are not
influenced by this mode.

2-26
2.2 REFERENCE POINT RETURN

(2) Supplements tothe Return Con~mand fromthe Reference P{3int Return

(a) Automatic reference point return

If G29 is specified without the execution of G28 orG30 after turning ON the power,
alarm “0240” occurs.

(b) Tool radius offset and canned cycle

If G29 is specified in the tool radius offset mocle (G41, G42) or in a canned cycle
(G73, G74, G76, G77, G81 to G89), alarm “0170” or “0182” clccurs.

(c) Tool position offset

It is necessary to cancel the tool position offset function before specifying G28,
G30, or G29. If these G codes are executed in the offset mode, the intermediate
positioning point B‘ is also offset, causing the tool to move to point B. Note that
the tool position offset and tool length offset functions are not canceled by G29.
C (reference point)

@-
/1

B;’ /
D’ ---- ,~%~ Offset amount
0 &“
B (intermediate positioning point)
/
/
/’

Fig. 2.13 G29 Operation Executed in the Tool Position C)ffset Mode

(d) Mirror image

Table 2.8 indicates how G29 is executed if it is specified in the mirror image (M95)
mode.

Table 2.8 G29 Operation Executed in Mirror Image Mode

Parameter pm4001 D2 Operation


I ==
Mirror image is applied to the intermediate positioning

}+271.c.rs. ‘+
point and the command values specified in the C,29 block

2-27

——..-———— .—. —. —.—.———— ..—— —. ...— .——. .- --.-———— ——


---- .——-.---——-.--—-—-.—..—
2.2.4 Second to Fourth Reference F’oint Return (G30)

With the commands of “G30 Pn X “ “ . Y “ o “ Z (*a . “ . ~ . “ “);”, the axes are moved
to P2 (second reference point), P3 (third reference point*), or P4 (fourth reference point*) in
the simultaneous 3-axis (* 5-axis) control mode after the positioning at the specified inter-
mediate positioning point. If “G30 P3 X30. Y50.;” N “ specified, the X- and Y-axis return to
the third reference point. If “Pn” is omitted, the second reference point is selected. The axes
not specified in the G30 block dc) not move.

(1) Reference Point Positions

The position of each reference point is determined in reference to the first reference
point. The distance from the first reference point to each of the reference points is set
for the following parameters.

Table 2.9 Reference Points

X-axis Y-axis Z-axis 4th-axis 5th-axis

2nd reference point pm pm pm pm ,pm

3rd reference point pm pm pm pm pm

4th reference point pm pm pm pm pm

(2) Supplements to the 2nd to 4th Reference Point Return Commands

● For the points to be considered to for the execution of G30, refer to the supple-
ments in 2.2.1, “Automatic Return to Reference Point (G28)”.

c If G29 is specified after G30, positioning is made at the point specified with
G29 after passing the intermediate positioning point specified with G30. Only
the coordinate value of intermediate positioning point of the axis specified
with G30 is updated.

“ For the execution of G30, reference point return must have been completed
after power-ON either manually or by the execution of G28. If an axis for
which reference point return has not been completed is included in the axes
specified in the G30 block, alarm “0240” occurs.

2-28
3
MOVEMENT CONTROL COMMANDS

Chapter 3 describes the procedure used for setting and se-


lecting the coordinate system and the programming for con-
trolling the movement of a cutting tool.

3.1 SETTING THE COORDINATE


SYSTEM . . . . . . . . . . . . . . . . . . . . . . . . ...3-3
3.1.1 Selecting the Coordinate System . . . . . . ~. . . . 3-3

3.1.2 Base Coordinate System (G92) . . . . . . . ~~.... 3-3

3.1.3 Workpiece Coordinate System


(G54to G59)* . . . . . . . . . . . . . . . . . . . . . . ....3-5

3.1.4 Local Cclordinate System (G52 Q2)* . . . . . . 3-14

3.1.5 Machine Coordinate System (G53) . . . . . . . 3-15

3.1.6 Rotation of Coordinate System


(G68, G69)* . . . . . . . . . . . . . . . . . . . . . . . . . ...3-18

3.1.7 Plane Selection (G17, G18, G19) . . . . . . . . . 3-21

3.2 DETERMINING THE COORDINATE


VALUE INPUTMODES . . . . . . . . . . . . . 3-22
3.2.1 Absolute/Incremental Designation
(G90, GW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-22

3.2.2 Inch/Metric Input Designation (G20, G21 1 . . 3-24

3.2.3 Scaling (G50, G51)* , . . . . . . . . . . . . . . ...3-26

3-1

.-—. ———.. — .— . ...— — ,—-. ——. —.”—. -..—-——.--——.--—.——--—— -


3.3 TIME-CONTROLLING COMMANDS . . 3-31
3.3.1 lDwell(G04) . . . . . . . . . . . . . . . . . . . . . . . . . ...3-31

3.3.2 lExact Stop (G09) . . . . . . . . . . . . . . . . . . . . . ..3-3I

3.3.3 lExact Stop Mode (G61, G64) . . . . . . . . . . . . . 3-32

3.4 TOOL OFFSET FUNCTIONS . . . . . . . . 3-33


3.4.1 “Tool Offset Data Memory . . . . . . . . . . . . . . ...3-33

3.4.2 ‘Tool Length Offset (G43, G44, G49) . . . . . . . 3-34

3.4.3 ‘Tool Position Offset (G45 to G48) . . . . . . . . . 3-38

3.4.4 “Tool Radius Offset C Function


(G40, G41, G42)* . . . . . . . . . . . . . . . . . . . ...3-48

3.4.5 :3-Dimensional Tool Offset Function


(G40, G41, G42)* . . . . . . . . . . . . . . . . . . . . ...3-90

3.5 S, T, M, AND B FUNCTIONS . . . . . . . . . 3-98


3.5.1 Spindle Function (S Function) . . . . . . . . . . . . 3-98

3.5.2 “T’oolFunction (T Function) . . . . . . . . . . . . . . . 3-99

3.5.3 lMiscellaneous Function (M Function) . . . . . 3-100

3.5.4 :Second Miscellaneous Function


(Function)* . . . . . . . . . . . . . . . . . . . . . . ...3-102

:3-2

-.
3.1 SETTING THE COORDINATE SYSTEM

3.1 SETTING THE COORDINATE SYSTEM

3.1.1 Selecting the Coordinate System

There are four types of coordinate systems such as the base coordinate system, workpiece
coordinate system*, local coordinate sysl:em’, and machine coordinate system, and it is pos-
sible to select the plane to be used in each of the coordinate systems.

IHI ,,.
,,-.kssP..ifi.di.
Q) l%3Sentt001p0siti0n

local coorciinate system


Lo-ate system (G52 Q2)
,.,

Shift distance for setting a workpiece


fF————— Workpiece
— coordinate system
,,” coordinate system (G54 to G59)
,,”

Arbitrary value Bi-te system (G92)


.,’

Machine zero point Machine coordinate system


(Reference point: 0,0: O)

Fig. 3.1 Coordinate Systems

3.1.2 Base Coordinate System (G92)

Before programming axis movement, a coordinate system must be set. When a coordinate
system is set, a single absolute coordinate system is determined and absolute move com-
mands specified after the setting of a coordinate system are all executed in it. The G92 com-
mand sets the position of the origin of a coordinate system used for programming.

(1) Commands

(a) Features of G92

G92 is a non-modal G code that is valid only in the specified block. In the G92
block, no other G codes can be specified.

3-3
(b) Command Format

With the commands of “G92 X “ “ “ Y . “ “ Z . . “ (*a””. p ..- ) :“, a coordinate


system is set so that the present tool position has the absolute coordinate values
specified in the G92 block (X, Y, Z, a *, ~ ‘). In other words, the addresses in the
G92 block specify the d!istance from the point that should be set as the origin (O,
O, O) of the coordinate system used for programming to the present tool position.
Axis movement commands can be specified for up to three axes (* five axes) simul-
taneously. Note that the axes not specified the G92 block do not move.
Example of Programming

G92 X500. Y300. Z400.:


+Y

.--i-l -—,7
w’ I
6-–––4–-
1 +x ‘
I
1 /%

Origin in the base coordinate system


/
+Z

Fig. 3.2 Setting the Base Coordinate System

3-4
3.1 SETTINGTHE COORDINATE SYSTEM

(2) Supplements to the Base Coordinate System Commands

● G92 should be specified in the state where tool offset has been canceled.

● With the system equipped with an incremental encoder, coordinate system is


established when the power is turned ON so that the present tool position will
be (O, O, O). Therefore, it is necessary to set the required coordinate system
before starting operation.

● Once set, the coordinates ystem is not influenced by the reset operation. To
reset a coordinates ystem, perform any of the following operations.

. Setting “O” on the UNIVERSAL (COORD-SET) screen

. Setting “O” for the coordinate system in the MDI mode

G92 XO YO 20 (* ao po) ;

3.1.3 Workpiece Coordinate System (G54 to G59)*

It is possible to set a workpiece coordinate system by shifting the base coordinate system.
When a G code (G54 to G59) is specified, shift distance corresponding to the specified G
code is called and the workpiece coordinate system is set by shifting the ba,se coordinate sys-
tem by the called shift distance. Shift distance is set on the WORK SHIIW SET screen corre-
sponding to G54 to G59. It is also possible to rotate a coordinate system around the origin
(O, O, O) by the set angle.

Table 3.1 G Codes Used to Call Workpiece Coordinate Systems

I G Code I Function I Group I

E-
G54 Shift to workpiece coordinate system 1 12

G55 Shift to workpiece coordinate system


+ 2 12 {
G56 Shift to workpiece coordinate system 3 12

G57 Shift to workpiece coordinate system


-+ 4 12 i
I G58 I Shift to workpiece coordinate system 5 I 12 I
G59 Shift to workpiece coordinate system 6
_–—--l--” -!

3-5

.—— ———.. —.-... —.. —... — — .——. -..-- .—-_.— ... .— ..——.—
(1) Number of Workpiece Coordinate Systems

The number of workpiece coordinate system sets can be increased optionally.

Table 3.2 Number of Workpiece Coordinate System Sets

Option 1 6 sets

Option 2 54 sets

Option 3 162 sets

(2) Command Format

Table 3.3 Setting Workpiece Coordinate System

F Option 2
G54 Jl (PI)

G54 J1 (PI)
I G55 J1 (Pi)

G55 J1 (Pi)
I G56 J1 (PI)

G56 J1 (Pi)
I G57 J1 (PI)

G57 J1 (PI)
G58 J1 (Pi)

G58 J1 (P])
G59 J1 (Pi)

G59 J1 (Pi)

I G54 J9 (P9) G55 J9 (P9) G56 J9 (P9) G57 J9 (P9) G58 J9 (P9) G59 J9 (P9)

G54 J1 (Pi) G55 J1 (Pi) G56 J] @l) G57 J] (P]) G58 J1 (Pi) G59 J1 (Pi)
Option 3
G54 J27 (P27) G55 J27 (P27) G56 J27 (P27) G57 J27 (P27) G58 J27 (P27) +G59 J27 (P27)
,I : +
Note: An alarm occurs if an improper value is specified for address J.
Option . . . . . . . . . . . . . . . . J20rlarger
Option . . . . . . . . . . . . . . . . llOor larger
Option 3 . . . . . . . . . . . . . . . 128 or larger

● By specifying “G54 (G55, G56, G57, G58, or G59) J1 (J2 “ “ o “ . “ J27)”, the
subsequent programs are executed in the selected workpiece coordinate sys-
tem. Address P can be used instead of address J, by changing the setting for
the following parameter. ~~G54”,“G54 Jl”, and “G54 JO” have the same
meaning.


E: I
Byspecifying
it is possible
``G53(or
to specify
G90)GO0
temporary
Address J

‘ddressp
X-"" Y"".
shift of a coordinate
Z-"" (*a
system
"""~.".);'',
in the machine
coordinate system.

● By specifying “G52;” the workpiece coordinate system selected currently is


canceled and the base coordinate system is called.

● If workpiece coordinate system shift distance is changed after the workpiece


coordinate system is selected by the execution of G54 to G59, whether or not
the new shift distance is made valid without specifying G54 to G59 again can
be selected by the setting for parameter (pm4021 DO).

3,.6
3.1 SETTINGTHE CCIORDINATESYSTEM

(3) Rotation of Workpiece Coordinate System

13y entering the address calling rotation of a workpiece coordinate system in the
G54 to G59 block, rotation of Itheworkpiece coordinate systeml is executed at the
same time when the workpiece coordinate system is called.

Example of Programming

G92 XO YO ZO;
. +- The base coordinate system is set.

G5A(G68XOYOR “ ‘ .)
. +- A workpiece coordinate system is set by G54. At the same time, the
workpiece coordinate system is rotated around (O, O) it by the angle
specified following address R.
G55; (G69)
.(G68XOY0 R”””)
.e The workpiece coordinate system set by G54 is canceled and a new
workpiece coordinate system is set according to the shift distance and
rotation angle specified in the G55 b]ock.
G52;(G69)
. G G52 returns the coordinate system to the one set by Cr92. Rotation of a
coordinate system is canceled at the same time.
M30 ;
Note: The commands in ( ) indicate the program which uses the coordinate rotation function.

3-7

._ ——— —— .—. —— ——.——. .— —. .-—._ ..—


G54
work piece
coordinate
~e G54 rotated coordinate
system
G54

system
shift Y
1 G92 base coordinate
system
G54 workpiece coordinate system shift X

Fig. 3.3 Rotation of Workpiece Coordinate System

c If coordinate rotation is executed when calling a workpiece coordinate system


by G54, rotation is also applied to the intermediate positioning point when
G28 or G30 is executed. However, this is not applied to the reference point.

The coordinate rotation function is valid only in theG17 plane.
● To cancel the coordinate rotation executed by G54, either specify G52 or reset
the shift distance of the called workpiece coordinate system to “O”, then speci-
fy G54 again.
● When the coordinate rotation is executed, the subsequent program paths will
be varied depending on whether or not the intervention of reset is valid. This
difference is caused by the following two specifications.

By the reset operation, the present position is taken into the NC as the com-
mand values to be re-set.

The coordinate :rotation function generates axis move distance by applying


rotation calculation to the NC commands in reference to the center of rota-
tion.

D
SUPPt.E-
MENT
If an address different from the one selected by the setting for parameterpm4012 D7
(J when the selection is P, or 1)when the selection is J) is specified with G54, such an
address is disregarded for the execution of G54.

(Example) pm4012 D7 = 1 (Selection of P) (for option 2 or 3)


G54 J2 XO YO; ‘-Executed as “G54 P1 XO YO;”

3-8

—.
3.”1SETTINGTHE COORDINATE SYSTEM

(4) Workpiece Coordinate System Shift Distance

Fig. 3.4 shows how positioning is executed by setting a workpiece coordinate system.

Example of Programming
Nl G90 xl 00. Y200.;
N2 G54
N3 Xloo. Y300.;
N4 X300. Y200.;
N5 G52;
N6 Xo. Ye.;

G54 PI Workpiece coordinate system shift distance B


Y
N3 (200., 100.)
t 1
400. - 300. .

300. - 200

N2
200. - N,

~~ Workpiece coordinate
100. - 500. 600. system (1)

~~ Base coordinate
700. 800. x
system

Fig. 3.4 Workpiece Coordinate System Shift Distance

The shift distance of a workpiece coordinate system can be corrected by the following
three methods.

s To use a microprogram

. To use external data input

. To use G1O command

3-9

—..——.——— . —..-—— .—... ——— .,—-—.——-—.— ..—.


.—
(a) Correcting workpiece coordinate system shift distance by microprogram

The workpiece coordinate system shift distance (and the external workpiece coor-
dinate system correction amount) can be read by entering a system variable in the
right side of the operation expression. It is possible to change these values by enter-
ing a system variable in the left side of the operation expression.

Example of programming

“ #116= #2501;

G54 (Pl ) X-axis workpiece coordinate shift distance is entered to common


variable #1 16.

● #2511 =#4;

G54 (J2) X-axis workpiece coordinate system shift distance is cleared and the
contents of local variable #4 are set. For the correspondence between the sys-
tem variables and the workpiece coordinate system shift distances, refer to
Tables 4.41,4.42, and 4.43.

(b) Correcting workpiece coordinate system shift distance by external data


input

The workpiece coordinate system shift distance can be corrected by the external
data input signal.

The shift correction amount is added to the present shift distances for G54 (J 1) to
G59 (J27) and the sum of externally input shift correction amount and the present
shift distance is used as anew shift distance. In this case, the workpiece coordinate
shift distance is not directly changed but the external workpiece coordinate system
shift distance is changed.

Workpiece coordinate system shift distance in actual operation


= External workpiece coordinate system correction amount
+ Workpiece coordinate system shift distance

Concerning the angle clf rotation, the workpiece coordinate system shift distance
should be corrected directly.

3-1o
3,-1SETTING THE COORDINATE SYSTEM

(c) Correcting theworkpiece coordinate system shift distance by programm-


ing (GI O)

It is possible to correct the workpiece coordinate system shift distance by using the
G1O.

Byspecifying’’GIO Q2(or L2)Pm Jn X ““” Y “c” Z(*Q ““ (3 “.. ); ’’, the


workpiece coordinate system shift distance of the specified workpiece coordinate
system is corrected. A combination of Pm and Jn specifies the workpiece coordi-
nate system for which the shift distance should be corrected.
● The correspondence between a P number and G code is:

PI = G54, P2 = G55, etc.


● Jn: Selects J1 - J27.

(Example) If “P2 J3° is specified, it is equal to “G55 J3”.


● If J is omitted or “JO” is specified, it is assumed that “J 1” is specified.
● If an incorrect value is specified for “m” or “n”, alarm “0202” occurs.

3-11
(5) Supplements to Commands Used for Setting the Workpiece Coordinate
System

● When the power is turned ON, the position where the tool is presently posi-
tioned is set as (O, O, O). For the system not equipped with absolute position
encoders, the present tool position is temporarily set as the origin of the coor-
dinate system until an appropriate coordinate system is set.

. In the state where G92 (base coordinate system setting) is not specified, a
workpiece coordinate system is established in reference to the origin of the
machine coordinate system.

● In the state where G92 (base coordinate system setting) has been specified, a
workpiece coordinate system is established in reference to the origin of the
base coordinate system.

c If G92 is specified in the state where a workpiece coordinate system has been
set, the base coordinate system is set so that the present tool position takes the
coordinate values specified in the G92 block. At the same time, the workpiece
coordinate system is defined in reference to the origin of the newly set base
coordinate system.

● If G54 to G59 is executed in the tool length offset or tool position offset mode,
present offset is not canceled. Tool length offset or tool position offset should
be canceled before specifying G54 to G59.

Example of Programming

G43 ZO HO1; -Position in workpiece coordinate system Z 100,

G90 Z1OOO. -Position in workpiece coordinate system Z1 100.


Actual Z-axis movement distance is 1400..
G54 shift distance Z = 300.
Offset HO1 = 100.

● If G92 is specified while a program is executed in a workpiece coordinate sys-


tem set by G54 to G59, all workpiece coordinate systems (G54 to G59) and
the base coordinate system are shifted so that the coordinate values of the pres-
ent position will be the coordinate values specified in the G92 block. There-
fore, G92 must not be specified in the G54 to G59 mode.

“ To change a workpiece coordinate system by G54 to G59, select the G90 mode
before calling the new coordinate system and select the G90 mode again be-
fore returning to the base coordinate system.

3-12
3.1 SETTINGTHE COORDINATE SYSTEM

● G54 to G59 must be specified in the GOOor GO1 mode. If these G codes are
specified in another mode, alarm “0322” occurs.
● If the workpiece coordinate system cancel (G52) is executed, the coordinate
system returns to the base cmmachine coordinate system that is used as the ref-
erence of the workpiece coordinate system.
Y
0 Present tool position

Hlt
L
1. Lo&l c(>ordinatesystem shiftcfistance Local coordinate
—-
Workpiece ., system (G52 Q2)
T ...+_
coordinate ~- Local coordinate
system shift Local coordinate system shift system (G52 Q2)
distance, distance - W’orkpiece coordinate
/’-..., system (G54 to G59)
- W’orkpiece coordinate
‘ >YWorkpl ‘ece cclordinate system shift distance system (G54 to G59)

& / —.-. Base coordinate

+
system (G92)
——- Machine coordinate
system (G53)
Refere! ;e point
(Origin in machine coordinate system)

Note The reference point and the origin of the machine coordinate system are the same point.

Fig. 3.5 Correcting the Workpiece Coordinate System Shift Distance

● The machine coordinate system, base coordinate system, and workpiece coor-
dinate systems that have been set are not influenced by the reset operation.
To reset the coordinate systems that have been set, operations meeting the type
of coordinates ystem to be reset are required.
Q Axis move commands can be specified with the workpiece coordinate system
setting command in the same block. In this case, the move commands are
executed in that workpiece coordinate system.

3-13

-—. . ... ——. -. . ... ———. ——... -—--—


..- —----- ....-..1-—.-- —---- -—..
3.1.4 Local Coordinate System (G5Z Q2)*

The coordinate system established by shifting the workpiece coordinate system by the spe-
cified shift distance is called the local coordinate system. Once a local coordinate system
is set, a cutting tool moves in that system. A local coordinate system is valid only after
the setting of a workpiece coordinate system. If local coordinate system setting commands
are specified although a workpiece coordinate system has not been set, alarm “0321” oc-
curs.

(1) Command Format

● Byspecifying’’G52 Q2X””. ”Y””-” Z “.””(*a””””~.”””);’’,the


coordinate system that is shifted from the present workpiece coordinate sys-
tem by the specified shift distance can be set.

● By specifying “G52 Q2 XO YO ZO (* aO ~0) ;“, the local coordinate system


is canceled and the previously selected workpiece coordinate system is recov-
ered.

c By specifying “G52;” independent] y in a block, the base coordinate’ system


is called. The base coordinate system is called with G52 specified indepen-
4 --.1.. :- - l---l.
lG1lLIY 111~ UIUCK.

N1 G90 GOl X1OO. Y200. F1OO;


N2 G5~
N3 X1OO. Y300.;
N4 G52 Q2 X300. Y200.;
N5 X200. Y1OO.;
N6 G52 Q2 XO YO;
N7 XO YO;
N8 G52;
N9 XO YO;
N3, N4

r
400. N5, N6

300., - 7[=/- Local coordinate


system
N2
200. - N1
/-
<N7, N8
100. - Workpiece coordinate
system

i I I ! I Base coordinate
o 100. 200. 300. 400. 500. 600. 700 X system

Fig. 3.6 Local Coordinate System


~orkpiece Coordinate System Shift Distance (200., 100.)]

3-14
3,“1SETTINGTHE COORDINATE SYSTEM

(2) Supplements to Local Coordinate System Setiilng Commands

● In the state where a workpiece coordinate system and local coordinate system
have been set, G92 command must not be executed. An operation to set a
coordinate system at the NC operation panel must also be avoided. Also refer
to supplements indicated in “Base Coordinate System (G92)”.
● If G52 is executed while this optional function is not selected, it cancels the
workpiece coordinate system (G54 to G59).
● The local coordinate syste:m is canceled by the reset operation.

3.1.5 Machine Coordinate System (G53)

The machine coordinate system, specific to the machine, is determined b:y the execution of
reference point return operation. It has the origin (O, O, O) at the reference point.

(1) Command Format

By specifying” (G90) G53 X . “ “ Y “ . “ Z c .0 ;“, axis move commands in this block


are executed in the machine coordinate system. G53 is a non-modal G code.
‘tM
Y~
Workpiece _ Machine coordinate system
k coordinate
Yo systeq _ - ~
- ‘G53
‘~ )(M

L Reference point
~ :Xw
~J
G52
#
~ G54 - G59 / G53
/
~ Xo
~ Basic coordinate system

Absolute zero point

Fig. 3.7 Machine Coordinate System


(2) Example of Programming

How the coordinate systems are defined by the program created based on the machine
coordinate system is shown in Fig. 3.8.

Example of Programming

N1 G92 X200. Yloo.;


N2 G54 G90 Xloo. Y200.;
N3 G53 X300. Yloo.;
N4 X300. YO;
N5 G52;
N6 Xo Yo:

Workpiece coordinate system (1) shift distance (300., 300.)

800. ~ 700. 500.

700. 600. 400.


t

600. 500. 300.


r
N2
:1 ;
500. } 400. 200.
r
400. ‘~ 300. ~ 100.–

I I I I I Workpiece
400. 500. 600. 700. 800. coordinate
I system (1)
200. t 100. –

N1 ~ Machine coordinate
100. –
Machinel 00. 200. 3CI0. 400. 500. 600. 700. 800. 900. system
I I I I I
N6 Base coordinate
100. 200. 300. 400. 500. 600. 700. 800. 900. 1000. 1100. system

Fig. 3.8 Example of f“rogram in the Machine Coordinate System (G53)

3-16
3,1 SETTINGTHE COORDINATE SYSTEM

(3) Supplements to the Machine Cc)ordinate System Commands

● The G53 command can be executed when all of the following conditions are
satisfied. If it is executed before all of them are satisfied, alarm “0322” occurs.

. Not in the mirror image mode

. Not in a canned cycle mode or tool radius offset C mode

. The immediately preceding 01-group G code is any of GOO,Gol, and G60.

. G53 and GOO are not specified in the same block.

● If G53 is executed with machine lock ON, move command is processed to up-
date the present position display until the value to which the move command
must be processed if machine lock were OFF, and then the processing is com-
pleted. Accordingly, if machine lock ON/OFF setting is switched over while
the commands in the G53 block are being executed, positioning cannot be
made correctly. However, if all commands in the G53 block are executed in
the machine lock OFF state, positioning can be completed correctly even if
machine lock status is switched over beforehand.

● G53 should be executed in the G90 mode. If it is execuled in theG91 mode,


the commands in the G53 block are executed assuming the G90 mode.

. If G53 is executed in the tool length offset or tool position offset mode, the
commands in the G53 blclck are executedl in a manner to cancel the offset
mode. Therefore, the tool length offset or tool position offset mode should
be canceled before specifying the G53 command.
3.1.6 Rotation of Coordinate System (G68, G69)*

(1) Using the G68 and G69 Commands

(a) Features of G68 and G69

For the rotation of a coordinate system, the following G codes are used.

Table 3.4 Coordinate System Rotation G Codes

w
I G69 I
Function

Coordinate system rotation

Cancel of coordinate system rotation I


Group

18

18 \

G68 and G69 are modal G codes belonging to 18-group. When the power is turned
ON and when the NC is reset, G69 is automatically selected.

The G68 and G69 blocks must not include other G codes.
The coordinate system rotation which is called by G68 must be canceled by G69.

3-18
3.”1SETTINGTHE COORDINATE SYSTEM

(b) Command format

● Byspecifying’’G17 (or G18, G19)G68a”””. ”b ““”” R-”.”’ ;“,the


commands specified in the following blocks are rotated by the angle speciiled
with R around the point (a, b). Rotation angle can be specified in units of 0.001
degree.

a, b: Center of rotation
R: Angle of rotation
(CCW rotation is “+”; to be
specified in an absolute value)

(a, b)

Fig. 3.9 Rotation of Coordinate System

● By specifying “G69;”, the. coordinate system rotation mode is canceled by


“G69”.
9 The G68 command is executed in the plane that has been selected when the
G68 command is specified. The 4th- and 5th-axis must be linear axes.

G17 : XY plane or Xct, X(3 plane


G18 : 2X plane or Z(a, Z(3 plane
G19 : YZ plane or Ya, Yf3 plane

3-19
(2) Supplements to the Coordinate System Rotation Commands

● If’’a” and “b” are omitted, the present position when the G68 block is executed
is taken as the center of rotation. Note that R must not be omitted.

● When the coordinate system is rotated, position data are given in the rotated
coordinate system.

“ The workpiece coordinate system rotation, mirror image, and scaling func-
tions must be specified in the predetermined order in a program. If this order
is disregarded, alarm “0285” occurs.

Workpiece coordinate > Mirror image > Scaling > Coordinate system
system rotation rotation
(G54) (M94) (G51 ) (G68)

● If the coordinate system rotation is executed in the mirror image mode, mirror
image is applied tcj the center of rotation and also in the direction of rotation.

● If the coordinate system rotation is executed in the scaling mode, scaling is


applied to the center of rotation. In this case, however, scaling is not applied
to the angle of rotation.

c The coordinate system rotation (G68) command cannot be specified in the tool
radius offset C mode. If it is specified in the tool radius offset C mode, alarm
“03 10” occurs.

● Usually, the coordinate system rotation is turned ON before the start of ap-
proach motion and turned OFF after the completion of machining. The work-
piece cannot be machined correctly if it is turned ON during machining.

● The alarm codes related to the coordinate system rotation are indicated in
Table 3.5.

Table 3.5 Alarm Codes

Alarm No. Description I


) 1

0310
A G code that cannot be specified in the G68 mode is specified.
G code not allowed in
G68 is specified in the tool radius offset C mode.
the G68 mode
Y — — 1
L
0311
The G68 or G69 block includes a format error.
Format error I

3-20
3.1 SETTINGTHE COORDINATE SYSTEM

3.1.7 Plane Selection (G17, G18, G19)

The plane where circular interpolation, tool radius offset, and coordina~es ystem rotation are
executed is selected by specifying the fcillowing G code,.

Table 3.6 Plane Selection G Codes

I G Code I Function I Group I

G17

&< G18

G[9
::3:-:4

A plane is defined in the following manner (in the case of XY plane):


~

The horizontal axis in the first quadrant is “+X-axis” and the vertical axis in the same quad-
rant “+Y-axis”.
+Y-axis

L —+ +X-axis
o
● When the power is turned ON, the XY plane (Gl 7) is selected.
● Axis move command of ii single axis can be specified independent of the
selection of plane by G 17, G18, and G 19. For example, the Z-axis can be
moved by specifying “G1’7 Z .....”.
● Execution of a canned cycle is possible onl:y in the G17 plane (hole machining
axis: Z-axis).
● If the 4th-axis * is selectecl, the following planes are added!.

G17 : XY plane or Xa plane


G18 : ZX plane or Zct plane
G19 : YZ plane or Ya plane
● If the 5th-axis * is selectecl, the following lplanes are addecl.

G17 : XY plane or X~ plane


G18 : ZX plane of Zf3 plane
G19 : YZ plane or Y~ plane
● The plane on which the tool radius offset is executed by the G41 or G42 com-
mand is determined by the designation of G 17, G18 or G 19; the plane that in-
cludes the rotary 4th- or 5th-axis cannot be selected as the offset plane.

3-21

__. ———
—-.—.
————-—

3.2 DETERMINING THE COC)RDINATE VALUE INPUT MODES

This section describes the commands used to input coordinate values.

3.2.1 Absolute/Incremental Designation (G90, G91 )

These G codes specify whether dimension values specified following an axis address are giv-
en in an absolute value or incremental value.

(1) Using the G90/G91 Command

(a) Features of G90 and G91

Table 3.7 Absoiute/incremental Designation G Codes

I G Code Function Group

w Absolute designation

Incremental designation
03

03

● G90 andG91 are modal G code belonging to 03-group. If G90 and G91 are
specified in the same block, the one specified later is valid.

. The power-ON state, that is the G90orG91 mode that is valid when the power
is turned ON, can be set for parameter pm4000 D 1.

m Power-ON state is G90.

Power-ON state is G91.

● The reset-state, that is the G90orG91 mode that is valid when the NC is reset,
can be set for parameter pm4000 D6.

pm4000 D6 = O and pm4000 D 1 = O: Reset-state is G90.


pm4000 D6 = O and pm4000 D 1 = 1: Reset-state is G91.
pm4000 D6 = 1: The G code (G90 or G91 ) that was valid before reset,
disregarding of the setting for pm4000 D 1.

3-22
3,2 DETERMININGTHE COORDINATEVALUE INPUT MODES

(b) Command format

● For the commands specified in and after the G90 block, the dimension values
specified following an address of X, Y, Z, (* a, ~) are treated as absolute val-
ues.

● For the commands specified in and after theG91 block, the dimension values
are treated as incremental values.

+X-axis
G91;
Incremental
G90;
Absolute

Fig. 3.10 Absolute/incremental Commands (G90, G91 )

3-23
3.2.2 Inch/Metric Input Designation (G20, G21 )

It is possible to select the dimension unit for the input data between “mm” and “inches”. For
this selection, the following G codes are used.

Table 3.8 Dimension Unit Selection G Codes

Group

~ I.P.t:~::::nsYst.. 06
I G21 I Input in “mm” system I 06 I

(1) Command Format

G20 andG21 should be specified at the beginning of a program in a block without other
commands. When the G cc}de which selects the input dimension unit is executed, the
following values are processed in the selected dimension unit: subsequent programs,
offset amount, a part of parameters, a part of manual operation, and display.

Example of Programming

ER
CR
01234;
G20; c Designating the input in “inch” system

3-24
3.2 DETERMININGTHE COORDINATEVALUE INPUT MODES

(2) Supplements to the Dimension Unit Designation Commands

● A parameter is used to select “inch/mm”. ~lerefore, the state when the power
is turned ON is determined by the setting for this parameter.

● If the dimension unit system should be switched over during the execution of
a program, the following processing must be accomplished in advance.

. If a workpiece coordinate system (G54 to G59) is being used, return it to


the base coordinate system.

. Cancel all tool offsets (G41 to G48).

Q After switching over the dimension unit system between G20 and G21, the
following processing must be accomplished.

. Execute G92 (coordinate system setting) for all axes before specifying axis
move commands.

. If position data are displayed in a workpiece coordinate system, or when


an external position data display unit is used, reset the present position data
to “o”.

c The tool offset amounts stored in memory are treated in a different manner be-
tween the G20 and G21 modes.

Table 3.9 Tool Offset Amounts in G20 and G21 Modes

Stored Offset Amount in the G20 (Inch System) Mode r- In the G21 (mm System) Mode 1
150000 I 5.9055 inch I 150.000 mm I

3-25

——— ——..—.—... ., ——.——.-——.—-...-!! !—. —... ——..


3.2.3 Scaling (G50, G51) *

The shape defined by a part program can be enlarged or reduced according to a required scale.
For the scaling processing, the fcjllowing G codes are used.

Table 3.10 Scaling G Codes

G Code Function Group 7


I
G50 I Scaling OFF I 15 I
~ G51 I Scaling ON I 15 I
The G50 andG51 blocks must be specified in the manner as indicated above without other
commands entered in these blocks. If other commands such as other G codes and X, Y, or
Z are entered in these blocks, alarm “0281” occurs.

The scaling function which is calledbyG51 must be canceled by G50. IfG51 is specified
in the scaling mode, it is disregarded.

3-26
3.2 DETERMININGTHE COORDINATEVALUE INPUT MODES

(1) Using the G50 and G51 Commands

By specifying“G51 I .0 “ J -- “ K “ “ “ P . . “;“, a program is executed on


the shape enlarged or reduced by the ratio specified with address P. The center
of scaling is defined by I, J, and K (representing X-axis, Y-axis and Z-axis,
respectively). To establish the present position as the center Iofscaling, specify
“G51 IOJO KO P “ “ “;“.

The scaling mode can be canceled by the command of “G50;”.

Scaling ratio can be specified in the following range.

Scaling range: 0.000001 to 99.999999 times

Command unit of P is “ 1 =: 0.000001”.

If a decimal point is used, the. value of P is assumed to have six digits to the
right of the decimal point only in the G51 block.

(Example)

P 0.999999 --+ 0.999999 times

P 2.0 + 2 times

P2 -+ 0.000002 times

If P is omitted, the scale factor determined by the setting for setting parameters
pm0803 and pm0804 is used. It is necessary to set the scale factor within the
allowable range.

Scale factor = pm0803/pm0804

(Example) If pm0803 = 3 and pm0804 = 100,


Scale factor = 3/100= 0.03 times

[f I, J, and/or K is specified in the G5 1 block, scaling is valid only for the speci-
fied axes. Note that scaling is not possible for additional a~es (4th- and 5th-
axis),

3-27

. .—. -—. -—, ——.


● For I, J, and K in the G51 block, specify the distance from the origin of the
workpiece coordinate system to the center of scaling if the workpiece coordi-
nate system has been selected.

Example of Programming 1

N1 G92 XO YO;
N2 GOOG90 X200. Y1OO.;
N3 G51 1200. J200.;

4oo.-

Center of scaling
2oo.- ,<
1

Fig. 3.11 Example of Programming 1

Example of Programming 2

N1 G54
N2 GOO G90 X200. Y1OO.;
N3G51 1200. J200.;

G92 system G54 system


Y ‘1’
4oo.–

4oo.– Center of scaling


Workpiece
coordinate ,x
2oo.–
system shift N2
distance 2oo.–
(200.,100.) x
I I I I
2130. 4bo. 6b0.
x
I I I I I I
200. 400. 6b0. 8A0.

Fig. 3.12 Example of lProgramming 2

—..—
3.2 DETERMININGTHE COORDINATEVALUE INPUT MODES

(2) Supplements to the G50 and G51 Commands

● The scaling mode should be turned ON in the approach operation to start ma-
chining and turned OFF after retracting a cutting tool from the workpiece. If
it is turned ON after the start of machining, the shape cannc)t be machined ac-
curatel y.
● Scaling is applied to the two axes in the plane for machining. If scaling is ap-
plied to only one axis, the circular arc will be distorted. Therefore, an alarm
occurs when circular interpolation is going to be executed if scaling is applied
to only one axis.
● If a scale factor greater than” 1” is set, make sure that the commands after scal-
ing will not exceed the maximum programmable value.
● Scaling factor of “O” cannot be specified. If specified, alarm “0281” occurs.
● For offset amounts, scaling is not applied.
● It is not allowed to execute a canned cycle with scaling applied to the Z-axis.
Otherwise, alarm “0280” occurs,
● The scaling mode is canceled (G50) by the reset operation (pressing the [RE-
SET] key, M02, M03, or external reset).
● In the scaling mode, command values and present position data display are all
processed after scaling.
● In the scaling mode, the following G codes cannot be specified. If specified,
alarm “0280” occurs.

G27, G28, G29, G30, G31, G52Q2, G53, G92


● Scaling (G51 ) command c:annot be specified in the tool radius offset C mode.
Otherwise, alarm “0280” occurs.
● Alarm code relating to the scaling function are indicated in Table 3.11.

Table 3.11 Alarm Codes

I Alarm No. I Description I

0280
A G code that cannot be specified in the scaling mode is speci-
G code not allowed in
fied.
the scaling mode

__J
In the G50 or G5 1 block, a command that is not allowed is

k9E~:aoso

● A G code that is not allowed in the scaling mode is specified.

3-29

—..——..—— .. ... — ——. —. —.-.., .— .-—e..


● The workpiece coordinate system rotation, mirror image, and scaling func-
tions must be specified in a predetermined order when they are specified in
the same block. If this order is disregarded, alarm “0285” occurs.
Workpiece coordinate > Mirror image > Scaling > Coordinate system
system rotation rotation
(G54) (M94) (G51) (G68)

● If scaling is called in the mirror image mode, mirror image is applied to the
center of scaling.

“ If coordinate system rotation is called in the scaling mode, scaling is applied


to the center of rotation. However, scaling is not valid for the angle of rotation.

3-30

—.
3.3 TIME-CON1-ROLLINGCOMMANDS

3.3 TIME-CONTROLLING COMMANDS

3.3.1 Dwell (G04)

It is possible to suspend the execution of axis move commands specified in the next block
for the specified length of time (dwell period).

By specifying “G04 P” “ “ ; “, execution of programmed commands is suspended for the


length of time specified by address P.

● Command unit of address P is” 1 = 0.001 see”. For example, a dwell period
of 2.5 seconds is specified by “G04 P2500;”. The block used to specify dwell
must not include commands other than G04 and P commarIds.

● The maximum programmable value with address P is indicated in Table 3.12.

Table 3.12 Dwell Period (Programmable Range of P)


1 —~ R
Format Programmable Range of Dwell Period (P)

P63 O to 999999.999sec -i

Note: The value is independent of the input and output unit systems.

● The timing at which the dwell should start can be selected by the setting for
parameter (pm4015 D3) :from “execution when the remaining number of
pulses which have been distributed in the previous block has reduced to the
allowable limit” or “execution immediately after the completion of pulse dis-
tribution”.
● Address X can be used instead of address P.

3.3.2 Exact Stop (G09)

If a block containing G09 is executed during cutting, and it calls the error detection ON
mode; the program advances to the next block in the error detection ON mc)de. This function
is used to cut a comer with a sharp angle.. G09 is a non-modal G code and valid only in the
specified block.

3-31
3.3.3 Exact Stop Mode (G61, G64)

The exact stop mode is called by G61. Once G61 is executed, the following blocks are all
executed in the error detection ON mode until the exact stop mode is canceled by G64.

——.

. .—-
. .——.
—— —— .—.—..—
...—.
—.—. —
L!!
● Error Detection ON Mode
TERM?
+- In the error detection ON mode, the number of lag pulses due to servo delay is checked after the completion of

————.
—.—.
prrlsedistribution in linear and circular interpolation, and the program advances to the next block only after the
number of lag pulses has been reduced to the preset value.
C... —------- —— ...-.-—...
— .—— ——— ——=—-..

L21
+ Error Detection OFF Mode
TERM?
4= [n the normal linear and cu’crrlarinterpolation, which is called in other than the G09 or G61 mode, the program
advances to the next block immediately after the completion of pulse distribution, causing the comers to be
rounded due to servo lag. This operation mode is called the error detection OFF mode.

———. -. —...,----.--..-,.-.——-—. —
m
QJ
TERM? `"-' -'---"-"""-'
@ Error Detection ON/OFF for Flapid Traverse Operation
""-""'--'`'"-''"'-"-'-`--------"--------'------"'---"--"-----
In rapid traverse operation, error detection ON/OFF are controlled only by COOand G06 and the G codes ex-
plained above are ignored,

3-32
——_— _.. . .. . .. .. .. .
3.4 TOOL C~FFSETFUNCTIONS

3.4 TOOL OFFSET FUNCTIONS

The following three kinds of tool offset functions are provided: tool length offset function,
tool position offset function (used for simplified tool radius offset), and tool radius offset C
function* (used for tool radius offset for complicated Shiipe).

1. If the tool wear offset function is selected optionally, the offset amount used in
the tool length offset function and the tool radius offset function is the sum of the
tool geometry offset amount ancl the tool wear offset amount.

2. Two types of tool offset number designation methods are provided and which
method should be used can be selected by the setting for a parameter.

pm4029 DO= O: H/D used in common


DO= 1: H/D used for individual functions

An H code is used for the tool length offset function and a D code for the tool
position offset and tool radius offset functions.

3.4.1 Tool Offset Data Memory

To execute the tool offset functions, the tool offset amount must be written to the tool offset
data memory in advance. Depending orl the selected specifications, the following number
of memories is available.

Table 3.13 Tool Offset Data Memory

r~ ToolOffset =ta~emory 1
I Basic specifications I 99 I
Addition of tool offset data memory
299
(option 1)
) — 1

L- @’tion2d 1
Addition of tool offset data memory

‘“

L
Addition of tool offset data memory
1199
(option 3)
— 1

3-33

————-—— .- . ...— —.—..——. ——,.—- ....!._.. — .—


Table 3.14 indicates the setting range of tool offset amount.

Table 3.14 Setting Range of Tool Offset Amount

I I Linear Axis I * Rotary Axis I


0 to 3:999.999 mm I O to * 999.999 deg I
O to * 999.999 inch O to *999.999 deg

Note: These values are not influenced by the output unit.

3.4.2 Tool Length Offset (G43, G44, G49)

The tool length offset function adds or subtracts the amount stored in the tool offset data
memory to or from the Z coordinate values specified in a program to offset the programmed
paths according to the length of a cutting tool.

(1) Commands

In the execution of the tool length offset function, addition or subtraction of the offset
data is determined by the specified G code and the direction of offset by the H code.

(a) G Codes used for tool length offset

The tool length offset function is called by the following G codes.

Table 3.15 G Codes Used for Tool Length Offset

[ G Code Function [ Group 1

3-34
3.4 TOOL OFFSET FUNCTIONS

● G43 and G44 are modal iind, once executed, they remain valid until canceled
by G49. G49 cancels the tool length offset mode. HOO also cancels the tool
length offset mode.

● By specifying “G43 (or G44) Z “ “ “ H . c . ; “, tool offset amount specified


by the H code is added to or subtracted from the specified ~Z-axisposition, and
the Z-axis moves to this offset target position. That is, the target position of
Z-axis movement specified in the program is offset by the tool offset amount.

c By specifying “(GO1 ) Z “ “ . ; G43 (or G44) H “ 0. ; “, the Z-axis moves


by the distance corresponding to the tool offset amount which is specified by
the H code.

● By specifying “G43 (or G44) Z “ . . H “ “ “ ; H “ “ - ; “, the Z-axis moves


by the distance which is equivalent to the difference between the previous tool
offset amount and the new tool offset amount.
——... ——— -—

G43, G44, and G49 can be specified only in the mode called by the G code (GOO,GO1,
or G60) in 01 group. If they are specified in other modes such as G02 or G03 mode,
an error occurs.
——

3-35
(b) H code for designating the direction of offset

The direction of offset is determined by the sign of tool offset amount, specified
by an H code, and a G code.

Table 3.16 Sign of Tool Clffset Amount and Direction of Offset

Sign of Tool Offset Amount (H Code)

R~ Offset in the positive direction Offset in the negative direction

GM I Offset in the negative direction I Offset in the positive direction I

Example of Programming

HIO . . . . . . . Offset amount –3.0


H1l . . . . . . . Offset amount 4.0
Position data display
including offset amount
(Z-axis only)
N101 G92 20; 0.000
N102 G90 0.000
GOOX1.0Y2.O;
N103 G43 2-20. HIO; -23.000
N104 GOI Z-30. F1OOO; -33.000
N105 GOO ZOHOO; 0.000

N201 GOO X-2.OY-2.O;


N202 G44 Z-30 Hll; -34.000
N203 GOI Z-40 F 100C); -44.000
N204 GOO ZOHOO; 0.000

Programmed positio

& –20.000 ‘,:::,%%”~ -30.000


Actual tool position < , .— /;
. -— L.’ –34.000
–23.000

‘-~~ooo ‘, //,
‘.. -
.
V . ‘., -
40.000
-33.000 –44.000

Fig. 3.13 Tool Position ‘Offset Function

3-36
—. .-— — .. . ... . — __
3.4 TOOL C)FFSET FUNCTIONS

(2) Supplements to the Tool Length Offset Functicm

If the offset amount is changed by MDI operation, the new offset amount be-
comes valid from the block in which an H code is specified.

It is possible to call up the tool position offset or tool raclius offset C function
in the tool length offset mode.

It is not allowed to specify CJ43, G44, or G49 in a canned cycle mode.

If G92 is specified with a Z command while in the tool length offset mode,
the tool length offset mode is canceled. However, G92 should be specified in
the state that the tool length offset mode has been canceled.

During automatic operation, it is possible to display the tool offset number (H


code number) that is presently valid.

G43, G44, and G49 can be specified only in the GOOor GO1 mode. Designa-
tion of these G codes in the G02 or G03 mode is not allowed.

For the execution of the reference point return command, including two axes,
in the tool length offset mode, whether the H code and the tool length offset
amount should be saved or canceled can be specified by the setting for a pa-
rameter.

I prn4010 D7=0 I Both the H code and the tool length offset amount are canceled. I

I prn4010 D7= 1 I Both the H code and the tool length offset amount are saved. I

For the reset operation in the tool length offset mode, whether the H code and
the tool length offset amount should be saved or canceled can be specified by
the setting for a parameter. It is also possible to specify whether a G code
(G49) in 08-group should be saved or canceled.
1

1 pm4010 D7 = O I Both the Hcodeand tie tool length offset amount are canceled. I

I pm4010 D7 = 1 I t30ththeH code andthe tool length offsetamount are saved. I

3-37

— ———., ——. -—- —.- . .. ..—.-— —-— —.—.


3.4.3 Tool Position Offset (G45 to G48)

The tool position offset function extends or contracts axis movement distance specified in
a program by the distance set in the tool offset data memory, and is primarily used for com-
pensating for the tool radius when cutting a square shape. It is not necessary to use this func-
tion if the optional tool radius offset C function (G40, G41, G42) is selected.

(1) Commands

In the execution of the tool position offset function, extension or contraction of axis
movement distance is determined by the specified H code and the direction of offset
by the D code.

(a) G Codes used with the tool position offset function

Table 3.17 G Codes Used with the Tool Position Offset Function

G Code Description Group

G45 Extension/Contraction *

G46 Contraction/Extension *

R G47 Double-extension/Double-contraction *

G48 Double-contraction/Double-extension *

● G45 to G48 extends or contracts axis move distance specified in the block that
contains G45 to G4.8 in the direction of axis movement. Extension or contrac-
tion is valid only for the axis move distance specified with G45 to G48 and
in other blocks, the axes move as programmed. Therefore, to return the axis
with which position has been offset by the execution of G45 to G48 to the pro-
grammed position, it is necessary to execute G45 to G48 that extends or con-
tracts the axis move distance in the opposite direction.

c To use the tool pos ition offset function, the program must be written in the in-
cremental mode (G91 ). If it is written in the absolute mode (G90), the function
extends or contracts the distance (incremental value) from the end point
reached in the block preceding the offset block to the target point specified in
absolute values in the offset block along the axis move direction.

3-38
3.4 TOOL CIFFSETFUNCTIONS

● To execute the tool position offset function, specify a G code calling up the
tool position offset function (G45 to G48), axis address and the tool offset data
memory number by using a D code in the same block. l.f a D code is used to
select the tool radius offset data, it can be omitted since D code is modal. Store
the radius of a cutting tool in the tool offset data memoly.
Example of Programming

G91
@G00G46x”” YIIo I; Contraction
@ GOl G47 Y” “ ~ “ (DO1)F’~~“ “; Double-extension
@ G47X. .”” (DO1) ; Double-extension
@ G47Y. ”.” (DO1) ; Double-extension
@ G47X. ””” (DO1) ; Double-extension
@GOO G46X. . ~ Y ~ ~ . (DO1) ; Contraction

~. —-— ———- —--— 1

(2/
I
I

I Programmed paths

Fig. 3.14 Tool Position Offset Function

3-39

—. .—... — .——. ——. —— ———..——-—_.—.—.—-


(b) G code for specifying the direction of offset

Whether the tool position offset is processed in extension or contraction is deter-


mined by the sign of the tool offset amount specified by a D code and the G code
specified to call up the tool position offset function as indicated in the table below.
However, the tool offset amount to be used in the G45 to G48 function should be
stored with the positive sign.

Table 3.18 Sign Assigned to Tool Offset Data

Sign Assigned to Tool Offset Data ~


~
Positive Negative

G45 Extension Contraction


>.—
G46 Contraction Extension

G47 Double-extension Double-contraction


r
G48 Double-contraction Double-extension

(2) Example of Programming

(a) Extension and contraction amounts

The relationship between the axis move distance specified in a program and the
actual tool move distance is given below. The axis move distance specified in an
incremental value is extended or contracted by one time or two times the specified
tool offset amount.

Example of Programm ing

G91 GOO G47 X60. D1O; D1O = 20.

60. (programmed distance) 40. (double-extension)


~ * —-——
-?

100.
t End point (actual tool movement)
Starl point

Fig. 3.15 Extension and Contraction of Programmed Tool Move Distance


3.4 TOOL CIFFSETFUNCTIONS

(b) Execution of extension/contraction from offset start point

If a program block is executed in the state where the start point of that block is offset
by the execution of extension or contraction in the preceding block, although the
total axis move distance is equal to the axis move distance specified in a program,
the axis moves the specified distance starting from the offset start point

Example of Programming

G91 GOO G47 X60. D1O; (DIO = 20.)

T!’- 60. (programmed distance) 40. (double-extension)


————

Stari point End point (;~ctual tool movement)


\
Oftset in a preceding block

Fig. 3.16 Execution of Commands from Offset Start Point

(c) Reversed axis movement direction due to execution of function

If the specified tool offset amount is larger than the axis move distance specified
in a program, axis movement direction might be reversed as the result of extension
or contraction. If this occurs, the axis moves in the direction opposite to the direc-
tion specified in the program.

Example of Programming

G46X1O. D1O; D1O= 20.


10. (programmed distance)

+’--Fx

~ d
End End point (actual tool movement)
point

Fig. 3.17 Reversed Axis Movement Direction

3-41

—- —.——. ———..—..—
(d) 1,J, and/or Kin G45 to G48 blocks

If I, J, and K are specified in the G45 to G48 block, each of these addresses calls
up extension or contraction processing in the same direction as X-, Y-, and Z-axis,
respective y. Therefore, tool radius offset is possible only for a one-quarter (1/4)
circle, three-quarter (3/4) circle, or a full (4/4) circle. Note that a half-circle should
be defined by combining two one-quarter ( 1/4) circles. In practical operation, the
offset should be appliecl from the block preceding the circular interpolation block
to obtain the arc correctly offset. See Fig. 3.19 below.
Example of Programming

G91
G45 G02 X50. Y50. 150. D1O; D1O = 20.

Tool rnovement
L,.”””
7
/ Extension in Y-direction: 20
/ l————
/-
Programmed path
‘~’
Extension in X-direction: 20.
//
/Y /p / : y
0
10

50. (x)
J
Start point 50. (1) ‘x
~x \
Extension in I direction: 20.

Fig. 3.18 Tool Radius (Offset for a 1/4 Circle

3-42
3.4 TOOL OFFSET FUNCTIONS

Example of Programming

G91 GOI F”. . .


G46 X“”” Y . . . D1O;
G45 Y . . . . /7
G45 G02 X ‘“ “ “Y . . . I, . . . .
. ..4— — -
GOI X;
Tool movement 0“ {
\,/’

// (x, Y)

i f“
- Center
Cfi

= Programmed path
‘- L

/b
/“
X5
Start
point

Fig. 3.19 Offset Applied from the Preceding Block

(e) Canceling G45 to G48 by G28 (or G30)


Example of Programming(G91 mode)

NO G92 XO YO;
N1 G46 GOO X50. Y50. D5; D5=5.
N2 G47 Y50.;
(45, ,05.)q”~~--------~~(3 (lo5”’ 105-)
N3 G47 X50.; ; —-----y...,
N4 G28 X30. Y-30.; 8 ‘.
N5 X50. Y1O.; ,1 J N4
,. ,.Y““’ (135., 75.)
..
(45., 45.) ‘ N1 ,= ’’-”.

~ /

I -- - ‘2 ‘55”’‘5”)
“---LLE’ ‘50”’‘0“)——— —
(0,oyNo.N4
Note 1: Although offset is applied to the intermediate positioning point specified in N4, the machine origin is not offset.
2; Axis movement specified in N5 is executed in the following manner according to the setting for pm401O.
Offset cancel is selectedbypm4010: Movement to P1
Offset not-cancel is selected by pm401C: Movement to P2

Fig. 3.20 Canceling G45 to G48 by G28 (G:30)

3-43
(f) Canceling G45 to G413by G92
Example of Programming (G91 mode)

NO G92 XO YO;
NI G46 GOO X50. Y50. D5; D5 = 5.
N2 G47 X50.; N4 G92 X50. Y50.
N3 G47 Y50.; ~/ N3, N4
N4 p (105., 105.)
’92 ’50” ‘50”; PI (55., 55.)
N5 X-50. Y-50.; P2 (60., 60)

: P2
Pl: N5
_..<:., , . . . . . . . . . . . . .. . .. ..
.l . .. . .. .. . . . . . . ..~ N2
(105., 45.)
45., ;5!)
+’
NO
K (o,o)
Note: Axis movement specified in N5 [s executed in the following mamrer according to the setting for pm401O.
Offset cancel is selected by pm401O: Movement to P1
Offset not-cancel is selected by pm4010: Movement to P2

Fig. 3.21 Canceling G45 to G48 by G92

3-44
3.4 TOOL OFFSET FUNCTIONS

(3) Supplements to the Tool Offset Function

In a G45 to G48 block, only a G code in 01 -group (GOO,GCI1,G02, G03, G60)


can be specified with G45 to G48. If a Cr code in other groups is specified,
alarm “0365” occurs.

To move an axis only by the offset amount in the incremental mode (G91 ),
specify “O” for the axis address. In this case, axis movement direction cannot
be reversed even if “O” is preceded by a sign.

. Example of Programming 1

G91 GO1 G45 XOYOD1OF . . . ;


Both the X- and Y-axis move in the positive direction by the offset amount
called up by D 10.

. Example of Programming 2

G91 GOOG46XOD11;
The X-axis moves in the negative direction by the offset amount called up
by D1l.

For the designation of an offset number in the tool position offset mode (G45
to G48), either H or D code can be used. Which address characters should be
used can be selected by the setting for a parameter.

I pm4011 D1 = 1 Only H codes are valid. 1


I Pmall D1 =0 I Only Dcodes are valid. I

3-45

——.——.—.—.-,.4-4, ,— .——. —.—.


● If G45 to G48 is specified for simultaneous two-axis movement commands,
the axis move distance is extended or contracted for both axes. Therefore, if
the tool position offset function is used in such a manner, the workpiece may
be cut excessively or an uncut portion may be left.

Overcut /
/ Uncut
& /
/

/ ,/;;5
/
/
/
/
— —.
d
‘ (a) Overcuts (b) Uncut portion

Fig. 3.22 Calling G45 to G48 Mode for Simultaneous Two-axis Operation

● If an offset amount is changed by using the switches on the NC operation pan-


el, the offset amount presently called is not changed immediately. The new
offset amount becomes valid when G45 to G48 is executed next.
9
The tool position cifset function can be called up in the tool length offset
mode.
● The mirror image function can be called up in the tool position offset mode.
In other words, mirror image machining is possible using the offset tool paths.
9 The tool position offset function can be executed independent of the plane
selection G code (G17, G18, G19).

It is not allowed to call up the tool position offset function (G54 to G58) in
a canned cycle mode. If G54 to G58 is specified in the canned cycle mode,
alarm “01 70” occurs.
● If G92 is specified in the offset mode, the coordinate system is set after cancel-
ing the offset for the axes specified in the G92 block. The axes should be re-
turned to the position not including offset by executing extension or contrac-
tion commands in the direction opposite to the presently offset direction
before specifying G92. The axis move commands given in the next block are
executed in the following manner according to the setting for parameters.

3-46
3.4 TOOL CIFFSETFUNCTIONS

When parameter pm4011 111 = O:

I prT14010D6=0 I Movesas pmgmrmled. I


pm4010 D6 = 1 Offset applied.
— 1

When parameter pm401 11)1 = 1:

d
p
@) G91 GO1 Z-25. F150;
Ci46 X40,Y40.D 10 F300;
. >.++ I----Q–--L —.
@
0 G45 Y70,;
:1 & “ so N: b @ G45 Ci02X30.Y30.130.;

;6 ‘o ‘
@ G45 CiOlX30.;

0
k
1--”-- (q

,
L7: ‘i
-.1.
@

8
@
@
Y-50.;
Ci48x50.;
Y50.;
ci47 X70.;
G47 Y-60.;
1 O G46 XO;
@ G46 G03 X-40. Y-40. J-40.;
,
o
L ‘---------w ---------
@ G46 GO1YO;
*
*@/
@ G47 X–140.;
lq~
, ‘ Starl point / (G) G46 X–’-IO,Y-40.;
40. I ____.__._..&l!& _ -....-- .-J L———_ +x G 225.;

Fig. 3.23 Example of Programming 1


( 50. , 50. , 20., ~ G91 GOI F300;
G46 X30.Y40.D15;
G45 X70.;
/’ @ G45 G03 X40,Y40.J40,;
o @ G45 G03 X-40. Y40. [–40.;
@ G46 GO1 X-20.;
/ Y50.;
G45 X-50;
@l G45 G03 X-50. Y-50. J-50.;
@ G46 GO1 YO;
X50.;
c Y-80.;
@j G46 X-30. Y-40.;
I
1
I

o ““6
1- —— +x
./
Start p~t~o
70.

Fig. 3.24 Example of Programming 2

3-47

———..—— .—— —.—.-— .——. .——..—


3.4.4 Tool Radius Offset C Function (G40, G41, G42) *

The tool radius offset function automatically offsets the programmed tool paths by specify-
ing the radius of the cutting tool to be used. The distance to be offset (radius of cutting tool)
can be stored to the tool offset data memory by using the switches on the NC operation panel.
In a program, the offset data are called up by specifying the number of the tool offset data
memory using a D code.

(1) Commands

To call up the tool radius offset C function, the following G codes are used.

Table 3.19 G Codes Used to Call Up the Tool Radius Offset C Function

w~
I G42 \
Tool radius offset C mode cancel

Tool radius offset C (offset to the left)

Tool radius offset C (offset to the right) I 07

The tool radius offset C function is called up by the execution of G41 or G42 and can-
celed by G40. Direction of offset is determined by the designated G code (G41, G42)
and the offset amount is selected by the D code which is specified with the G code desig-
nated to call up the tool radius offset mode. When the power is turned ON, the G40
mode is set.

G41 (offset to the left)

Tool –

Programmed path

G42 (offset to the right)

Fig. 3.25 Tool Radius Offset C

3-48
.— —. .. —---
3.4 TOOL GFFSET FUNCTIONS

● If a negative value is set in the tool offset dalta memory specified by the D code,
the offset direction is reversed. The D code must be specified with G41 orG42
in the same block or in a preceding block. If DOOis specified, it specifies the
tool radius of “O”.

● The tool radius offset plane is selected by the designation of G17, G18, orG19.
The G code used to select the plane must be specified with G41 or G42 in the
same block or in a block preceding the G41 or G42 block.

Table 3.20 Plane Selection G Codes



, G Code Function T Group 1
I G17 I XY plane selection I 02 I
I G18 I ZX plane selection I 02 I
I G19 I YZ plane selection I 02 I

● It is not allowed to change the selected plane in the offse~ mode. If a plane
selection G code is specified in the offset mode, alarm “’O183” occurs.

Q The tool radius offset C function is not val id for the 4th- and 5th-axis. These
axes are treated as an axis not in the selected offset plane.

(2) Entering the Offset Mode

There are two types of offset mode entry methods (types A and B) and which method
should be used can be selected by the setting for a parameter.

pm4012 D6=0 Type A I

pm4012 D6=1 Type B


I

3-49

——
—....—
(a) Type A: pm4012 D6 = O

Start-up motion (axis movements for the start-up of offset) is not executed if there
are no axis movement commands in the G41 or G42 block.

● Start-up motion is executed when an axis move command is specified.

Q If there are no move commands of the axes in the offset plane in the block next
to the G41 or G42 block, one more block is buffered to execute the start-up
motion.

● In the offset mode, specification of up to two consecutive blocks that do not


contain axis move (commands in the offset plane is allowed. However, if no
axis move command in the offset plane is specified in three or more consecu-
tive blocks, offset motion is interrupted and the offset block is not generated.

(b) Type B: pm4012 D6 = 1

Start-up motion (axis movements for the start-up of offset) is executed even when
an axis move command is not specified in the G41 or G42 block.

“ In response to the designation of G41 or G42, the cutting tool moves to the
position offset by the radius. The offset is made to the left or right side in refer-
ence to the tool advancing direction and in the normal direction at the start
point of the next block.

● If there are no axis move commands in the offset plane in the G41 or G42
block, the axes move by the offset amount.

● If there are no move commands of the axes in the offset plane in the block next
to the G41 or G42 block, one more block is buffered to execute the start-up
motion.

● In the offset mode, specification of up to two consecutive blocks that do not


contain axis move eomrnands in the offset plane is allowed. If no axis move
commands in the (offset plane are specified in three or more consecutive
blocks, tool radius offset starts from the next block that contains axis move
commands.
3,4 TOOL OFFSET FUNCTIONS

(3) Start-up of Offset

Since the offset start-up is executecl with the offset taken into account, the G code in
01-group must be either GOOor GO1. If a G code other than GOO or GO 1 is specified,
alarm”0 180” occurs. If the offset starts in the GOOmode, the axes move to the offset
point at their individual rapid traverse rates. Therefore, be aware of possible interfer-
ence of a cutting tool with the workpiece.

There are two types of start-up such as start-up at inside corner and start-up at outside
comer.

(a) Start-up at inside corner (1 80° or less)

The cutting tool moves to the offset point (on the normal start point of the vector
of movement called up in the block next to the start-up block).

c From straight-line to straight-line

Example of Programming

G17 GO1 F . I. . . . .
G41 D””””” x . . . . . Y“””””;
x, . . . . . .
,- CWting tool, G40

Y ‘%
\
s
-.-”. -9
w

7
~x Programmed tool path

Note: “S” indicates the single-block stop point.

Fig. 3.26 Offset Start-up (Straight-Line to Straight-Line)

3-51
c From straight-line to arc

Example of programming

G17G01 F”’’””;
G41D””” ”” X””” ”” Y”””””;
G02X’”” ”” Y””” ”” J”””””;

Center

Fig. 3.27 Offset Start-up (Straight Line to Arc)

3-52
34 TOOL CJFFSETFUNCTIONS
——

(b) Start-up at outside corner (“180° or larger)

In this case, two kinds of start-up modes (types A and B) are prov ided and the mode
to be used can be selected by the setting for a parameter.

1 pm4013 DO= 1 Type A


—A

1 pm4013 DO=O Type B

● Type A: pm4013 DO= 1

The cutting tool moves to the offset point (on the normal start point of the vec-
tor of the block next to the start-up block).

From straight-line to straight line at outside corner ( 180° to 270°)


Example of Programming

G17G01 F””’””;
G42D.””””X”Y. .... . ~ Cutting tool, (240
x, . . . . . .

8
\
\
\
Y \
\
\
\ Programmed path
\
\
\
s -J-@
-,--- +
s
Lx +x

Fig. 3.28 Offset Start-up (Straight-line to Straight-line (1))

#
Straight-line to Straight-line at outside comer (270° to 360° )

,
Example of Programming tool, G40

#
* P
G17 GO1 F . . . . . ,.
G42D ””” . . x . . . . . Y“””””; ,6’
x, . . . . . .

(;d .--+‘--Er:
““””
---
Fig. 3.29 Offset Start-up (Straight-line to Straight-line (2))

3-53
. Straight-line to arc at outside corner (1 80° to 270°)

Example of Programming

G17G01 F”’”””;
G42D”””””X”””-.Y”..””;
G02X””” ”” Y””” ”” J”””””;

(
\\
\\
\\
8*
\\
\\

\
i

/)
Center

Fig. 3.30 Offset Start-up (Straight-line to Arc (1))

. Straight-line to arc at outside corner (270° to 360°)

Example of Programming

G17G01 F”””””;
G42D””.”.X”..””Y””.””:
Cutting tool, G40
G02X””” ”” Y””” ”” J”’””’;

\
‘*

o
Center

Fig. 3.31 Offset Start-up (Straight-line to Arc (2))

354
3.4 TOOL OFFSET FUNCTIONS

● Type B: pm4013 DO= O

The cutting tool moves to the position obtained by the calculation for point
of intersection using the cclmmands in the start-up block and the next block.

. Straight-line to straight-line at outside comer ( 180° to 270° )

Example of Programming

G17G01 F . . . . . .,
G42D ””” . . x . . . ., Y“””””;
x, . . . . . .
, Cutting tool, G40

\ ~,
~ \
\~
Y ‘, “.
,\ Programmedpath
\\
\\
~t

W d&
.- +
1>
s
➤X

Fig. 3.32 Offset Start-up (Straight-line to Straight-line (1))

. Straight-line to straight-line at outside corner (270° to 360°)

Example of Programming

G17G01 F”””””;
G42D.”””-X.”.”Y”””.”;
x, . . . . . .
Cutting G40

P
#’0
.“
,“”
&
Programmedpaih

------- ------ +
+<”

Fig. 3.33 Offset Start-up (Straight-line to Straight-line (2))

3-55
. Straight-line to arc at outside corner ( 180° to 270° )

Example of Prclgramming

G17G01 F”’’””;
G42D.”.””X”..”.Y””.””;
G02X””” ”” Y””” ”” J’””””;
Cutting tool, G40

\8
\8
\~\\
8’
\,’,
.:,
,*

\
‘*

b
Center

Fig. 3.34 Offset Start-lJp (Straight-line to Arc (1))

. Straight-line to arc at outside comer (270° to 360° )

Example of Prclgramming

G17G01 F””””;
G42D”.0”.X”.”””Y””O””;
G02X’”” ”” Y””” ”” J”””””;
Cutting tool, G40

A
Center

Fig. 3.35 Offset Start-up (Straight-line to Arc (2))

S.56
3.4 TOOL OFFSET FUNCTIONS

(4) Axis Movements in the Offset Mode

Once the tool radius offset mode is set by the execution of G41 or G42, the cutting tool
moves along the paths offset from the programmed paths until the tool radius offset
mode is canceled by G40. Since the offset paths are automatically generated by the NC,
the program should simply define the shape to be machined. The t:ool paths are con-
trolled according to the angle made between the specified programmed paths.

(a) Inside corner (smaller than 180°)

The cutting tool moves to the position obtained by the calculat [on for the point of
intersection.

● Straight-line to straight-line

Q f-’\

Fig. 3.36 Straight-line to Straight-line

● Straight-line to Arc

Q,)

‘0’ ‘+--:P

Fig. 3.37 Straight-line to Arc

● Arc to arc

Fig. 3.38 Arc to Arc

3-57

___ .- ..______ ._ .,____ ____ .—--- .—-—— ..—.— .. .-———


..————---—
(b) Outside corner (larger than 180°)

For this offset, two types of offset modes are provided and the offset mode to be
used can be selected by the designation of an M code.

Tool radius offset round-the-arc ON

Tool radius offset round-the-arc OFF


(calculation is executed to obtain the point of intersection)
E ‘=’----

● Tool movements in the M96 (tool radius offset round-the-arc ON) mode

. Straight-line to straight-line
Round-the-arc motion
/

Note: [n this case, round-the-arc motion of a cutting tool is included in rhe preceding block

Fig. 3.39 Round-the-arc Motion (Straight-line to Straight-line)

. Straight-line to arc
Round-the-arc motion

s
>\ ---
#@ ‘-.
‘\
*“* b
Cfj G02
~ol
s) T

Center

Fig. 3.40 Round-the-arc Motion (Straight-line to Arc)

3-58
3.4 TOOL OFFSET FUNCTIONS

. Arc to arc

Rourld-the-arc motion

Fig. 3.41 Round-the-arc Motion (Arc to Arc)

. Tool movements in the M97 (tool radius offset round-the-arc OFF) mode

Straight-line to straight-line at outside corner (1 80° to ‘270° )


I

Q\ (;()”1
& \\
8\
8 GO1
\
‘% d )
\
b -:--{. -
s
T

Fig. 3.42 Offset Motion (Straight-line to Straight-line)

. Straight-line to arc at outside corner (180° to 270°)

b
Center

Fig. 3.43 Offset Motion (Straight-line to Arc)

3-59
Arc to arc at outside comer (1 80° to 270°)

\
\
\
\
\d
\

Fig. 3.44 Offset Motion (Arc to Arc)

. Straight-line to straight-line at outside corner (270° to 360°)

Fig. 3.45 Offset Motion (Straight-line to Straight-line)

Straight-line to arc at outside comer (270° to 360° )

. /’”
,’”
d ‘“:
~y%
!

Fig. 3.46 Offset Motion (Straight-line to Arc)

3-60

.—..—.
3.4 TOOL CIFFSETFUNCTIONS

. Arc to arc at outside comer (270° to 360°)

Fig. 3.47 Offset Motion (Arc to Arc)

(c) Offset motion in the GOO mc}de

In the offset motion specified in the GOO block, the axes move to the offset position
independently at their individual rapid traverse rates. Therefore,, attention must be
paid to the tool path so that interference will not be caused during this movement.

● Offset motion at inside corner (smaller than 180°)

//?,
GOOor GO1

Fig. 3.48 Offset Motion at Inside Corner

● Offset motion at outside comer ( 180° to 360°)

c$
GOOor GO1

cl’ \
GOO
(in the M96 mode)

Fig. 3.49 Offset Motion at Oulside Corner

3-61
Blocks not Including Axis Move Commands in the Offset Mode

In the tool radius offset mode, the NC generates the tool paths by buffering the data of
two blocks. If a block not including axis move commands is read, the NC reads one
more block to generate the offset tool paths. Designation of such a block which does
not include axis move commands is allowed in the tool radius offset mode for up to two
consecutive blocks.

After the designation of G41, there must not be three or more consecutive blocks that
do not include the movement commands of the axes in the offset plane.

(a) Consecutive three or more blocks not including axis move commands

If three or more blocks not containing axis move commands in the offset plane are
given consecutively, the cutting tool is moved to the position offset normally by
the specified offset amount at the end point of the block immediately preceding
such blocks.

Example of Programming

G17GOl G41X. ”””” l(””””” DO.” “.F ””’””;


x . . . . . Y, . . . . . .

x .....Y ...... .
GO4P1OOO; : Blocks not including axis movement
commands in the offset plane
x . . . . . Y, . . . . . .
(If such blocks continue up to two
blocks, the NC can generate tool
paths without a problem.)
x . . . . . Y, . . . . . .
z, . . . . . . J
z, . . . . . . l–
X....Y.....;

X“”””” Y”””””;
G40X””””” Y”:

3-62
3.4 TOOL OFFSET FUNCTIONS

blocks

Fig. 3.50 Offset Motion if Three or More Blocks not Including Axis Move
Commands are Specified in the Offset Mode

3-63

_—-—..—.
.—.
—.. —
(b) Insertion of dummy block

If there are no axis move commands in three consecutive blocks, the cutting tool
is positioned on the normal end point of the block immediately preceding such
blocks. If it is impossible to specify move commands of the axes in the offset plane
due to the retraction motion of the third axis or other reasons and if normal position-
ing is not desirable, a dummy block that includes I, J, or K can be inserted in the
program. The dummy block does not call up actual axis movements, but it only
gives the data necessary for the calculation to generate the offset tool paths. In the
example program given below, a dummy block specifying the same movements
as given in the block (N020) where the axis movement restarts in the XY plane after
the Z-axis movement is inserted in a program; addresses I and J are used in the
dummy block.

Example of Programming

N001G17G01 G41X . . . .. Y.. . ..D .....F....


N002X040”. Y....;

XYplane

NOIOX”””” Y....; 1
NO1l I”. ”” J””..; +- Dummy block
N012Z . . . . . .

Z-axis(3 blocksor
more)

N019Z ...; 1:
N020X””””” Y””.; -,

XY plane

N029X . . . .. Y...... ‘-1’”-


N030G40X. Y.....;

Y
Y)

L___
.- -

Fig. 3.51 Insertion of Dummy Blocks

3-64
3.4 TOOL OFFSET FUNCTIONS

● In a dummy block, addresses I, J, and K are used corresponding to X-, Y-, and
Z-axis. Specify these addresses meeting the plane which has been selected as
the offset plane. Note thal in dummy blocks, commands should be given in
incremental commands. With the example program indicated above, if
“x”” ””” Y””””” “ in N20 are specified in absolute values, change them to
equivalent incremental values.

● If the object of the dummy block is circular interpolation, enter the dummy
block as shown in the example program given below. Insert the dummy block
in which the straight line expressing the tangential direction at the start point
of circular interpolation is specified as shown in Fig. 3.52. The cutting tool
moves to point A as shown in Fig. 3.53 by the execution of the dummy block
so that the following circular interpolation can be executecl.
Example of Programming

N050G01X ”””” ”Y’’ ”””;


N051 GO1 I (b) J (–a) ; + Dummy block
N052Z .””-”;

Z-axis

N059Z 9””””; 1
N060G03X”””” Y0 I (a) J (b) ; - Circular interpolaticm
N061G01X ”””” ”Y ”””””;

Fig. 3.52 Insertion of Dummy Block

3-65

.———.
/

/
/

I N051: Dummy block

Fig. 3.53 Movement tcl Point A by Execution of Dummy Block

● If I, J, or K is specified when canceling the offset mode, the offset position is


corrected from point @ to point @ according to the direction specified by
these addresses.

Direction defined \
byland J ~ \
\
\ \
\ \>
\ \
\ \
\ \
\ \
\ \
\
\
.----- ------ - 4- ----
\
\
\
\
G42

Fig. 3.54 Correction of Offset Position

3-66
3.4 TOOL OFFSET FUNCTIONS

(6) Switching the G41 and G42 in the Offset Mode

The direction of offset (left side ancl right side) can be directly switched without cancel-
ing the offset mode. There are two kinds of G41/G42 switching methods (types A and
B) and the method to be used can be selected by the setting for a p arameter.

pm4013 D1 = I Type A ------

pm4013 D1 =0 TypeB -*
-----

(a) Type A: pm4013 D1 = 1

The offset direction is switchecl at the start and end of the block in which the switch-
ing of the offset direction is specified,
Example of Programming

N10G17G01 F”””””;
N11G41(G42)D .””””;

f
N20G01X ””””’ Y””” ”” F”””””;
N21G42(G41) X””” ”” Y.”.””; - Offset direction switching block

‘i-
‘(
-%’
‘,

6
G41 \
i N21
/1

N20
\

fE!i5T
\
\
d

(a) G41 + G42 (M96 mode) ~ U


G42

A\, -
N20 N21

# . . Ci41
\
*~_ _ *

N22
G42
(b) G42 - G41
Note: If the contentsofN21 block are expressed in two blocks as indicated below
G42 (or G41) ;
X....l’..;
the offset direction is switched in the same manner.

Fig. 3.55 Switching the Offset Direction at the Start and End of the Block

3-67

.—...—— —— ..——..—-—. —— .—.


.—
(b) Type B: pm4013 DI := O

Direction of offset is switched at the point of intersection of the offset tool paths.
s

,/
/’
/f
/’
It
,’
G42 ,
.
i
~ Point of intersection
------- +. ----&
s

Fig. 3.56 Switching of the Offset Direction at Point of Intersection of Offset


Tool Paths

If there is no point of intersection, the offset direction is switched according to type


A.

G41

\
\
\ I
\ \
\ I
\ $
\
\l
\\
\,
\
.,;

\
\
\
\

Fig. 3.57 Switching of the Offset Direction when There is No Point of


Intersection

368
—. .—
3.4 TOOL CIFFSETFUNCTIONS

(7) Changing the Tool Offset Amount in the Offset Mode

There are two kinds of offset amount changing methods (types A ancl B), and the meth-
od to be used can be selected by the setting for a parameter.

(a) Type A: pm4013 D2 = O


When a new D code is specified, the new offset data are calculated from the axis
move commands given in the block including the new D code and the next block.

E- dl
------ ------ ------ ------ ----
-dh, s

T~” ““ “d
Block specifying a new D code

Fig. 3.58 Calculating the New Offset Data from the Axis Move Commands
in the New D Code Specifying Block and the Next Block

(b) Type B: pm4013 D2 = 1

When a new D code is specified, the new offset data are calculated from the axis
move commands given in the block including the new D code and the preceding
block.
S d’
------- ------ ------ ---- ----

(J ~

“oc’s”~”~ “b

Fig. 3.59 ‘Calculating the New Offset Data from the Axis Move Commands
in the New D Code Specifying Block and the Previous Block

3-69
(8) Canceling the Offset Mocle

There are two types of offset mode cancellation methods (types A and B), and the meth-
od to be used can be selected by the setting for a parameter.

pm4012 D6=0

pm4012 D6= 1
-

“ Type A: pm4012 116= O

Offset mode cancellation movement is not executed in the G40 block if no axis
move commands are given. The offset mode is canceled by the first axis move
command given in a block specified following the G40 block. Axis move
commands should be specified with G40 in the same block.

● Type B: pm4012 D6= 1

Offset mode cancellation movement is executed in the G40 block even if there
are no axis move commands given. The cutting tool moves normally to the
offset position at the endpoint of the block immediately before the G40 block.
Since G40 calls up (offset mode cancellation axis movements, it must be speci-
fied in the GOO or lGOl mode. If it is specified in a mode other than GOO or
GO1, alarm “0181” occurs.
3.4 TOOL CIFFSETFUNCTIONS
——

(a) Canceling the offset mode at inside corner (smaller than 180°)

● Straight-line to straight-line

Example of Programming

G41

GOIX””””” F.”””-;
G40X.”””-Y”.”.”;
Cutting tool, G40

)
0

Y G41

-----

Fig. 3.60 Canceling the Offset Mode at Inside Corner


(Straight-line to Straight-line)

3-71

.——..
-—— .—
● Arc to straight-line

Example of Programming

G41

G02X””””” Y.”. . . I . . . . . J, . . . . . .
G01G40””””” X” . . . . Y, . . . . . .
Cutting tool, G40

#---
,-
/’

6
Center

Fig. 3.61 Canceling the Offset Mode at Inside Corner (Arc to Straight-line)

3-72
3.4 TOOL C)FFSET FUNCTIONS

(b) Canceling the offset mode at outside comer (larger than 180°)

There are two types (types A and B) of offset mode cancellation axis movement
patterns, and the pattern to be used can be selected by the setting for a parameter.
For this selection, the same parameter as used to select the stari:-up mode is used.

I pm4013 DO= 1 I Type A I


I pm4013 DO=O I Type B I

● Type A: pm4013 DO= 1

The cutting tool is moved normally to the offset position at the end point of
the block immediately before the offset mode cancellation block and then to
the end point specified in the program.

. Straight-line to straight-line at outside comer ( 180° to 270°)

Example of Programming

(G42)

GOIX-” ”--F.”.”-;
G40X-”””-Y”” ”-4:
Cutting iool, G40

Fig. 3.62 Straight-line to Straight-line at Outside Corner

3-73

——————. -—- —-------— —. —. —. — .. . .. ——— ..—. —


—.-—.———-—-—-— ..
. Straight-line to straight-line at outside comer (270° to 360°)

Example of Programming

(G42)

GOIX””””. F--. ”S;


G40X. ”””. Y-..-;
Cutting tool, G40

Q-’”
Fig. 3.63 Straight- !ine to Straight-line at Outside Corner

. From arc to straight-line at outside comer ( 180° to 270°)


Example of Programming

G42

G02X”””’ ”Y””””” l””” ”” J””””” ;


G01G4”.”””X.””.-Y’””-”;
Cutting tool, G40

b c~n~~~
Fig. 3.64 From Arc to Straight-line at Outside Corner

3-74
3,4 TOOL C)FFSET FUNCTIONS

. Arc to straight-line at cutside corner (270° to 360° )

Example of Programming

G42

G02X””” ”” Y””” ”” I””” ”” J’”””” ;


GOIGW”””.”XO””..Y.””-.;
Cutting tool, G40

(5 c~nt~~
Fig. 3.65 Arc to Straight-line at Outside Corner

● Type B: pm4013 D = O

The cutting tool moves to the point obtained by the calculation of the point
of intersection using the axis move commands in the offset mode cancel block
and those in the block immediately before this block, and then to the point spe-
cified in the program.

. Straight-line to straight-line at outside comer ( 180° to 2,70°)


Example of Programming

G42
Cutting tool, G40

GOIX.....F.....;
G40X.....Y.....;

Fig. 3.66 Straight-1ine to Straight-line at Outside Corner

3-75
. Straight-line to straight-line at outside corner (270° to 360° )

Example of Programming

G42

GOIX.”0”.F”””..;
G40X”. ””” Y” -4.”;
Cutting tool, G40

d
. . ---- ------ -----

Fig. 3.67 Straight-line to Straight-line at Outside Corner

3-76

—— —. .—
3.4 TOOL CIFFSETFUNCTIONS
——

. Arc to straight-line at cutside corner (1 80° to 270° )

Example of Programm ing

G42

G02X””” ”” Y””” ”” I””” ”” J”””””;


G01G40” ”””” X””” ”” Y”””””;
Cutting tool, G40
\

~ Center

Fig. 3.68 Arc to Straight-line at Outside Corner

3-77

.—— .—..—.— —.—-...— _. —._, —-—.... —_... -_. . ..... ..—


. Arc to straight-line at outside comer (270° to 360°)

Example of Programming

G42

G02X””” ”” Y””” ””l””””” J””””” ;


GOIGW<””X”””””YO””.”;

Cutting tool, G40

b
Center

Fig. 3.69 Arc to Straight-line at Outside Corner

3-78
3.4 TOOL CFFSET FUNCTIONS

(9) Interference Check

The interference check function prevents the cutting tool from cutting into or interfering
with the workpiece. However, this check is not made at the start-up of the tool radius
offset mode. The process to be taken in case of interference is detected from the blocks
read into the buffer memory can be selected by the setting for a parameter as indicated
below.

I Type A pm4013D4=l Alarm occurs and operation stops


1 L-~
I
)
Type B I
,
pm4013D4=0 I Tool paths are corrected.
—.~
I

Whether or not the interference check is executed is also determined by the setting for
a parameter. m

I pm4013 D3 =0 / Interference check is not made. ~

I pm4013 D3= 1 I Interference check is made. ~

The illustration in Fig. 3.70 shows how the interference check function operates. In
reference to the programmed paths, offset tool paths are generated according to the set
tool radius offset amount. With tool radius offset amount Dx, tool paths fl + f2 ~ f3
~ fA+ fs - ffj is generated and with Dy tool paths fl’ - fG’are generated. However,
in the tool paths generated with the offset amount of Dy, path f3’ -* f4’ shows 180°
reversed movement from the correct programmed path direction fs -’Df4. The function
assumes this interference and generates an alarm.
fl ‘ fz’ f!j’ f6’
Y -
com- Dyi
mand fo’

fl f2
x
com- Dx ~
mand

I
1p
f
/ -

‘w’”
Programmed
paths

Fig. 3.70 Definition of Interference

3-79

—.
—. —-—- ——. —... —
(a) Type A: pm4013 D4 = 1 Generation of alarm

The following programs give examples in which the function determines that inter-
ference (overcuts) will occur due to considerable differences between the pro-
grammed paths and the tool paths generated after offset.

\
● Example program 1

.4’”
G) \ ..’’’20

L. / ‘“
1

:8-----------------------
@ @ ‘i,---
~--
\
;;;

NO

d .
N3
NI N2

Fig. 3.71 Example Prclgram 1

● Example program 2
0------- .-----.,
i
\
!
$

NO

N1

N2

Note: Since the cutting tool cuts into the workpiece excessively at the end point@ of block N 1, alarm “’O187”occurs.
The operation stops when the cutting tool reaches the end point of block NO.

Fig. 3.72 Example Prcjgram 2

..
3.4 TOOL C)FFSET FUNCTIONS

(b) Type B: pm4013 D4 = O Cclrrecting the tool paths

If the function detects possible interference after the calculation of the offset tool
paths, the function clears the tool paths that might cause interference and generates
the paths that are free of interference.

● Generating interference-free paths for straight-line to straight-line motion

For the programmed paths as shown in Fig. 3.73, three points fl, f2, and f3 are
generated at the joint of blocks N1 and N2 according to the tool radius offset
function.

Point f4 is also generated ai the joint of N2 and N3. Interference check is made
using these four points fl to fd and the points causing interference are erased
one by one until the tool paths that are free of interference are generated.

Checked for f3 - f4: Erasing f3 since interference occurs.


Checked for f2 - f4: Erasing f2 since interference occurs.
Checked for f] - f4: No interference

Tool paths are generated as@ + fl -+ f4 + @.

Fig. 3.73 Generating Tool Paths without Interference


(Straight-line to Straight-line)

3-81

—.—...-— —— —— .——. —.——...-—.—..-. .—-— —


● Generating interference-free paths for arc to arc motion

For the programmed paths as shown in Fig. 3.74, four points fl, fz, f3, and fA
are generated at the.joint of N 1 and N2 according to the tool radius offset func-
tion. At the joint of N2 and N3, another four points fs to fg are generated.
Interference check is made using these eight points fl to fg and the points caus-
ing interference are erased one by one until the tool paths that are free of inter-
ference are generated.

Checked for f4 - f5: f4 and f5 are erased since interference occurs.


Checked for f3 - fij: f3 and f(j are erased since interference occurs.
Checked for f2 - f7: No interference

Tool paths are generated as f I + f2 + f7 + fg.


fz f7

Fig. 3.74 Generating Interference-free Paths for Arc to Arc Motion

3-82
3.4 TOOL CIFFSETFUNCTIONS

● Example where interference-free tool paths cannot be generated

For the programmed paths as shown in Fig, 3.75, three points fl, f2, and f3 are
generated at the joint of N 1 and N2 according to the tool radius offset function.
At the joint of N2 and N3, another three points fAto fGare generated. Interfer-
ence check is made using these six points fl to ffj and the points causing inter-
ference are erased one by one until the tooli paths that are free of interference
are generated.

Checked for f3 - f4: f3 and f4 are erased since interference occurs.


Checked for f2 - f5: f2 and f5 are erased since interference occurs.
Checked for fl - fG: f 1 and fGare erased since interference occurs.

Occurrence of alarm (“0188”): Operation stops when the cutting tool is posi-
tioned at the start point of N 1 block.

Fig. 3.75 Example where Interference-free Tool Paths cannot be


Generated

3-83

.—..-— .—.——. ——. —.—..._...—.. —... —.—.


(1 O)Supplements to the Tool Radius Offset Commands

In tool radius offset C mode, the maximum programmable values specified


in Table 3.21 also apply.

Alarm “01 84” occurs if the following shapes are specified.

. Circular arc: Radius (r) of arc+ 5 ~ Tool radius (d)

Cutting
/ tool

d —-
Q
T r

r<d

(a) 7
Alarm in offset at the outside of an arc (b) Alarm in offset at the inside of an arc

Offset is correctly executed at the outside


of the arc even if “r < d.

1— . -—

Fig. 3.76 Programmed Paths Causing an Alarm@

3-84
3.4 TOOL CIFFSET FUNCTIONS

. Point of intersection dcles not lie on the tool paths


.- No point of intersection error

IH \
J The error occurs if a cutting tool has
an excessive y large diameter in
comparison with the programmed
.opointof/fiy.:?::
shape to be rlachined.
intersection
‘d
> /’ d!
\ ,\
\_.~
~q Cutting tool

T)

Fig. 3.77 Programmed Paths Causing an Alarm@

Q Ifmyofthe following Gcodesi sspecifiefli ntheoffsetm (>de,alam``O182''


occurs.

If the NC is reset in the offset mode, the offset mode is canceled and the G40
mode is set.

Table 3.21 Prohibited GCodes

Prohibited G Codes

T
——
G12, G13(G17to G19)
G codes that cause an G28, G29
alarm G73, G74, G76, G77, G81 to G89
G92

● The tool radius offset C function is applied to the tool paths offset by the tool
length offset and the tool position offset function. The tool :radius offset func-
tion should not be applied to the tool paths for which the tool position offset
function is used as the tool radius offset operation. If such offset is applied,
it could complicate the programming.
● When specifying G41, G42, or G40, GOOor GO1 and an F code must be speci-
fied with G41, G42, or G40 in the same block or a block that precedes the
G40/G41/G42 block.
● If a plane selection G code (G17toG19) is specified in the offset mode, alarm
“0183” occurs.
● If the circular interpolation function is specified in a plane other than the offset
plane specified by G17, G 18, or G19 while in the offset mode, alarm “01 83”
occurs.

3-85

——... —- —...... — .—.—..——....-—. — .— -


Circular cut (G12, G13) and a canned cycle (G73, G74, G76, G77, G80 to
G89) must be called up in the tool radius offset cancel mode. The circle cut
function incorporates the tool radius offset function. If circle cut or a canned
cycle is called up in the offset mode, alarm “O182” occurs.

The tool radius offset C function is valid for the circular interpolation com-
mands which include a radius command.

Subprogram call (M98, M99) commands can be specified in the offset mode.

If simultaneous 3-axis (* 5-axis) movement is specified, offset is applied to


the shape projected to the offset plane specified by G17, G 18, or G 19.

L
Offset
dane

Fig. 3.78 Simultaneous Three Axes Movement Specified in the Offset Mode

● It is possible to correct the offset position temporarily by specifying a dummy


block including addresses I, J, or K.
Example of Programming

(G42)

NIOOGOIX . . . .. Y”.””..

/
N101 I“. ””” J”””””;
NI02 X. ...; N102

//$?
Nloo ~

Y
“m
/ I
N101: Dummy block including I and J

/’
i

L_———~—~ x
Fig. 3.79 Correcting the Offset Position Temporarily

3-86
34 TOOL C}FFSET FUNCTIONS
——

● If the MOO,MO1 (or M02, M30) command is specified in the offset mode, cor-
rect offset processing is interrupted since such M codes prohibit buffering of
blocks. To avoid this, insert a dummy block including I, J, or K immediately
before the block that includes MOOor MO1. This allows continuous correct
offset processing.
Example of Programming

(G41)
N200G01X”””. YO+;
N201 I“””. ”J ”..”; +—
Specify the axis move commands
N202 MOO; in N203 block using 1,J, and K.
N203 X.. ””” Y.”; 1

● The tool offset data memoly capacity varies depending on whether the option
is selected or not. The maximum value that can be set as the tool radius offset
value is + 999.999 mm (or + 99.9999 inch).
● If compensation is made in the M96 mode for a step which is smaller than the
tool radius, overcuts occur. If M97 mode is selected for the same operation,
an uncut portion is left. However, in actual cutting, it is recommended to se-
lect the M97 mode.

Overcuts

(a) M96 mode

—— I

Uncut portion

(b) M97 mode

Fig. 3.80 Offsetting at Step Smaller than Toed Radius

3-87
—..—
● Even in the M96 mode, if the tangential angle made between the axis move-
ments specified in the program is smaller than 30° or if y is smaller than a cer-
tain value as shown in Fig. 3.81, round-the-arc motion is not made, but the
cutting tool directly moves to point B. Value of y is set for parameter pm4450.
Note that since the value set for pm4450 is also used as the minimum distance
for the execution cf circular interpolation, the setting for this parameter has
influence on normal circular interpolation.
Actual tool movements

I
1 ii Smaller than 30”

Fig. 3.81 Tool Movements with Small Tangential Angle of Programmed


Paths

● If G39 is specified in the tool radius offset C mode (G41/G42), an arc can be
inserted at comers.

G39 is a non-modal G code. G39 must be specified in a block without other


commands. If other commands are specified with G39 in the same block,
those specified after G38 are all disregarded.

If the commands are specified in the G39 block in the manner as “G39 I_ J_

/ \
S_ F_ ;“, I, J, S, and F codes are disregarded.

(G91 , G42) \

/0
I \
N3 X- 10. Y-30.;
/’ \
1, s
N4 X-30. Y-20.; N3 N7
S1’ ,/A\, G39
G39 ; ,)
N5 X80.; ,/ I
/ I
N6 Y30.; ,/ ..- 1
Nti I t
G39; ,. , \’, N4
1’ NIK 1!
N7 X-20. Y30.; r \
,
““

I
I 1 -HS I
).. .4: .- .-. . ---- —.- —--- _— ------ I -- ;
G39 s

Fig. 3.82 Program for the Around-the-arc Offset

3-88
34 TOOL CIFFSETFUNCTIONS
——

Upon completion of the execution of G39 block, the mode (M96/M97) se-
lected previously is recovered.

In the single-block mocle, the cursor does not stop at the G39 block, but it
stops at the next block.

If interference is detected by the interference check function in the paths


generated by G39, G39 is disregarded and the tool paths are automatically
corrected.

● In the offset mode, intervention of MDI operation is not allowed. However,


MDI operation with one line of program is possible.

3-89

.—— .——. ——. -z _ ___ . ..— — -—— .—. -.— ———..-.


3.4.5 3-Dimensional Tool Offset Function (G40, G41, G42)*

By specifying G41 and G42, it is possible to shift the tool paths in the 3D vector direction.

(1) Commands

(a) Features of G40, G41 ,and G42

Table 3.22 G Codes Used for the Tool Offset Function

G Code ~ Function Group

G40 : 3-dimesional tool offset cancel 07

G41 3-dimen~ion too] offset, left 07

G42 3-dimensional tool offset, right 07


E

(b) Programming format

● G41(or G42)X”. .Y””. Z””” I”. “J”” cK””o D”””;’

‘Tr=ffse’number
I
L–
-

A~ismove commands
Vector angle command values

With the commands indicated above, the NC enters the 3-D tool offset mode and
start-up processing begins. The plane used for the 3-D tool offset is fixed to the
XYZ plane. Therefore, offset is not valid for additional axes. With G42, offset is
made in the direction clpposite to the offset motion called by G41.

3-90
3.4 TOOL OFFSET FUNCTIONS

.. ..-. ..... .... .... . . .. .-.-..-.—.-.,_._,,,.,


_,-.-.. _.._-. -.....-..-.— .—...,— —. —-——.—. —.. —,-—_.——.
\l//
\
1. The start-up block (G41, G42) must contain all of I, J, K, and D. If any one of
POINT
these addresses is not specified in the start-up block, the 2-D tool radius offset C
is executed.
Q
● If a D command is not specified, alarm 0162, “LACK OF ADDRESS” occurs.
Alarm 0184 “RADIUS OFS CAL ERROR” occurs if “O” is set for all of I, J,
and K,

● If the offset amount specified “byD is “O”, the tool paths are generated as pro-
grammed.

2. It is not necessary to specify X, “Y,and Z at the start-up of the 3-D tool offset.

3. The 3-D tool offset start-up must be made in either the GOO or the GO1 mode.
—— — . ———.

Whh the commands indicated above or “GO1 (or GOO)X . “ “ Y “ “ . Z 0.. DOO
“”, the 3-D tool offset mode is canceled toward the endpoint specified in this block.
if such a block does not contain any of these axes, the offset cancel motion is
executed for such axis by the offset amount.

\\ I/,
1. If DOOis specified to cancel the 3-D tool offset mode, the NC execute processing
POINT
assuming that G40 is specified. To call up the 3-D tool offset mode after that,
specify G41 or G42 again.
Q
2. When the 3-D tool offset mode is canceled, I, J, and K values are cleared to “O”.
Note that the command value specified by address D is not cleared and remains
valid as a modal value for executing the program after that.

3. It is not necessary to specify X, Y, and Z when canceling the 3-D tool offset.

4. To cancel the 3-D tool offset mode, set the GOO or GO1 mode.

5. Although and additional axs command such as A and B may be specified in the
same block with the 3-D tool offset commands, the function is ncjt valid for the
additional axis.
—-.—— —-. --. —..... .-. -.. —”_. -— ———. —.. _— . ——

3-91
(c) Description of theaddresses

● X, Y, Z, I, J, and K: The same format as used when specifying these


addresses as normal axis commands.

The number of digits are indicated in Table 3.23.

Table 3.23 Number of Command Digits

! I Section
Integer ] Decimal Fraction I

I Metric 16131

Inch 5 4
[

If a command not conforming to the specified format is given, it cause alarm 0104
“’NUMERIC DATA OVERFLOW”. Values for I, J, and K are cleared to “O” when
the power is turned ON, the NC is reset, or the 3-D tool offset is canceled.

D: For the D command, the number of digits must meet the number of offset pairs.
If the specified value exceeds the number of offset pairs, alarm 9150 “OFFSET
NO. OVER” occurs. If a decimal point is included, the command value does
not have a sign (+/–) or a command value other than a positive value is speci-
fied, alarm 0102 “’’--”, “.” MISUSE” occurs.
3.4 TOOL C}FFSET FUNCTIONS

(2) Operation

(a) Programmed paths

ln the 3-D tool offset mode, the end point of each block is determined based on the
\,ector commands I, J, and K spe~ifiecl in that block.

Example of Programming

GOI X5. Ylo.


G42 X40. Y22. I-1. J5 .5 KO. Ill (DI = 2.0)
GO1 X65. Y15. 1-1.5 J5.5 KO
GO1 X90. Y35.
G40 X11O. Y1O. (GO1XI1O. Y1O. DOO)

Y-axis

L Vector angle
50

/’
/
*
,/
x“”
OtSet amount vector

40 Tool paths after 3-D tool offset / ‘i /


i

30
/&nds “j,,,cotiset
20 ?
1
10

rllllllllll L~L_L~ Ll__l..- X-aXiS


(O, O) 10 20 30 40 50 60 70 80 90 100 110

Fig. 3.83 Tool Path in 3-D Tool Offset and F’rogrammed Tool Path

3-93

-—..-. .—_.
.—..—.—...-. ..- ——.——— ——-—.
● The offset vectors clfthe individual axes are specified in the following manner.
~_Ixd
R
Jxd
Y=~

~=Kxd
R

I,J, K : I, J, and K command values


d : Specified value for the specified tool offset number
R : If pm 6850 is “O”
R.= JIx I+ JxJ+Kx K
If pm6850 is other than “O”
R.= pm6850 (1 = Least setting unit)

● The end point of a block is calculated in the following manner.

X’c= x+x
Y’=Y+y
Z’=z+z
x, Y, z : End point specified in the program
X’, Y’, Z’ : End point after offset

(b) Blocks not including 1,J, and K

The I, J, and K commancis specified in the 3-D tool offset mode are retained as mod-
al values and used in the following program. Therefore, the vector comonents of
the block in which I, J, and K commands are not specified are those generated in
the previous block.

The same vector as geneated


in the previous block
//-h\
/’ ~ ~,
Generation of vector,. z
——————
~

~
Block containing 1,J, and K commands
and K commands

Fig. 3.84 Tool Paths after 3-D Offset (No 1,J, and K Commands)
3.4 TOOL OFFSET FUNCTIONS

There are cases that overcuts occur as shown in Fig. 3.85 as the result of offset de-
pending on the relationship between the commands and the offset angle.

The siirne vector as geneated


in the previous block
,,M9
/“
Generation of vector , ~‘
—————— / ‘“
~

Y’7 /’

1/
Block containing 1,J, /
The same vector as geneated
and K commands
in the previous block

‘/
Fig. 3.85 An Example of 3-D Offset Causin Overcuts
(Continuous Blocks without 1,J, and K Commancis)

(c) Changing the angle and size of vector

The vector angle can be changed by specifying I, J, and K commands in the 3-D
tool offset mode. Concerning the size of vector, there are two methods to change
it,

● Changing the vector size by changing the tool offset number.

“ Changing the vector size by specifying the tool offset number and I, J, and K
commands after setting other than “O” for the 3-D vector size setting parameter
pm6850

(3) Error Processing

(a) Reset in the 3-D tool offset mode

If the NC is reset while it is in the 3-D tool offset mode, the 3-D tool offset mode
is canceled by the same processing as the execution of G40. In this cacel proces-
sing, axis movement usually executed to cancel the offset amount is not executed
although the I, J, and K values are cleared to “OI”.

(b) Vector change error in the 3-D tool offset mode

Although vector angle/component can be changed in the 3-D tool offset mode,
alarm 0162 “LACK OF ADDRESS” occurs if any of I, J, and K. addresses is not
specified even in one block causing the operation to be stopped.

3-95

———— .—.—-— .—..-—— — .—.—.—.-.. ...— —.-.—-—..——-——


.———
(c) Specifying the vector command that does not allow calculation of 3-D tool
offset amount

The 3-D tool offset is executed based on the calculation that is performed using the
3-D vector size in the denominator. Therefore, if the I, J, and K vector commands
are “O”, 3-D offset calculation becomes impossible. In this case, alarm 0184 “RA-
DIUS OFS CAL ERRC)R” occurs and the NC stops operating.

(d) Starting the 3-D tool offset in the 2-D tool offset mode

It is not allowed to switch the offset mode from the 2-D tool offset mode to the 3-D
tool offset mode,

If the command to call up the 3-D tool offset mode is specified while in the 2-D
tool offset mode, alarm 0189 “OFS ABNORMAL ERROR” occurs.

(e) Changing the offset direction in the 3-D tool offset mode

While in the 3-D tool offset mode, it is not allowed to change the offset direction
(G41 -+ G42, orG42 -+”G41). If such designation is made, alarm 0189 “OFS AB-
NORMAL ERROR’ occurs. To change the offset direction, the 3-D tool offset
mode must be canceled once and the new offset direction must be specified when
the 3-D tool offset mode is called up next. Note that it is allowed to change the
tool offset direction by using the I, J, K, and D commands.

(f) Changing the plane in the 3-D tool offset mode

If a plane selection G cc)de (G 17, G 18, G1 9) is specified in the 3-D tool offset mode
to change the plane, alarm 0183 “SURFACE UNMATCH IN OFS MODE” occurs.

3-96
3.4 TOOI. OFFSET FUNCTIONS
—-——

(4) Relationship between 3-D Tool Offset and Machine Operations

(a) Relationship with the G codes that use adclress 1,J, and 1(

If the G code that allows I, J, and K codes to be specified in the same block is speci-
fied in the 3-D tool offset mode, the I, J, and K codes specified in such a block are
not regarded as the vector value of the 3-D tool offset. Therefc)re, the I, J, and K
commands specified with the G codes indicated in Table 3.24 are processed as the
information that is related with the specified G code and the vector angle/compo-
nent is not changed even if these commands are executed. If a D command is speci-
fied with the G codes that allow the destination of D code, such D command is used
to change the offset number instead of changing the vector angle/component. The
offset amount is changed immediately after the execution of the D command.

Table 3.24 G Codes That Use 1,J, and K Addresses in the Same Block

G Code Function Name


— -1
G02, G03 Circuir interpolation/ Circle cut
— A- - -4
G106 Automaticcomer override
— .1

G65, G66, G67 ] Macropogram call


— — —J

(b) Relationship with tool radius offset C

If the G codes that are not allowed in the 3-D tool offset mode or modal G codes
that must not be existent at the start of the tool radius offset C are specified in the
3-D tool offset mode, an alarm occurs. Also note that addresses I, J, and K are used
in the 3-D tool offset mode to define the vector angle. Due to this these addresses
must not be used as the dummy block commands (incremental commands) like in
the tool radius offset C.

(c) Relationship with the high-speed cutting function

If high-speed cutting function is called in the 3-D tool offset mode, alarm 0[ 89
“OFS ABNORMAL ERROR” occurs. To execute high-speed cutting, it is neces-
sary to cancel the 3-D tool offset mode. If the 3-D tool offset mode is called during
high-speed cutting operation, normal tool radius offset C is exec~ted instead of the
3-D tool offset.
3.5 S, T, M, AND B FUNCTlOINS

3.5.1 Spindle Function (S Function)

A spindle speed can be directly specified by entering a 5-digit number following address S
(Srll-ll–ll–ll–l). The unit of spindle speed is “r/rein”. The specified S value becomes valid
from the moment the S command completion input signal (SFIN) is turned ON. If an S com-
mand is specified with M03 (spindle forward rotation) or M04 (spindle reverse rotation), the
program usually advances to the next block only after the spindle has reached the speed spe-
cified by the S command. For details, refer to the instruction manuals published by the ma-
chine tool builder.
Example of Programming
S 1000 M03;

s
1000 r/rein Spindle speed agreed
t ——-— ——— . +
i
I
I Actual spindle speed
I

u
I fl
1 Start of
spindle rota- - t
tion

——————+ com’’eti”nof
M
tI
Starl of the block indicated above

Fig. 3.86 Spindle Speed Command

An S command is modal and, once specified, it remains valid until another S


command is given next. If the spindle is stopped by the execution of M05,
the S command value is retained. Therefore, if M03 or M04 is specified with-
out an S command in the same block, the spindle can start by using the S com-
mand value specified before.

If a spindle speed is changed while the spindle is rotating by the execution of


M03 or M04, pay attention to the selected spindle speed gear range. For de-
tails, refer to the instruction manuals published by the machine tool builder.

The lower limit of an S command (SO or an S command close to SO) is deter-


mined by the spindle drive motor and spindle drive system, and it varies with
each machine. Do not use a negative value for an S command. For details,
refer to the instruction manuals published by the machine tool builder.
3.5 S, T, M, AND B FUNCTIONS
——9

3.!5.2 Tool Function (T Function)

The tool function has two command designation types as T2-digit commands and T4-digit
commands.

(1) T2-digit Commands

A tool number is specified by a 2-digit number following address T (TEIO). In a T


command, leading zeros may be omitted.

“ T commands are modal and, once a T command is executed, it remains valid


until another T command :[sspecified next.

● T commands are normall y used to select the tool number o f the tool to be se-
lected next by the automatic tool changer (ATC). A T command can be speci-
fied independent of the G and H or D code that is used for tc~ollength and tool
radius offset of the presently selected tool.

● The range of tool numbers that can be specified with address T varies with
each machine. For details, refer to the insmrction manuals published by the
machine tool builder. If a T code is specified with axis move commands in
the same block, whether the T command is executed with the axis move com-
mands simultaneously or i~is executed after the completion of the axis move
commands varies with each machine. For details, refer to the instruction
manuals published by the machine tool builder.

(2) T4-digit Command ●

A tool number is specified by a 4-digit number following address T (TCIOUU), In


a T command, leading zeros maybe omitted. In comparison to the T2-digit commands,
only the number of digits is increased and functions and other detai Is are the same as
T2-digit commands.

3-99




3.5 S, T, M, AND B FUNCTIONS

(2) Internally Processed M Codes

M cocles h the range of M90 to M99 and Ml 90 to M 199 are processed by the NC inter-
nally and the corresponding output signal (BIN code and decode output) is not output
even when these M codes are executed.

Table 3.25 Internally Processed M Codes


‘~i~--- FUncion ‘-~~,~=~
Program interruption function OFF
Program interruption function ON
* M92 I Multi-active registers OFF
* M93 I Multi-active registers ON I

* M94 I Mirror image OFF I o I


* M95 Mirror image ON
* M96 Tool radius offset C, round-the-arc mode + o 4
* M97 I Tool radius offset C, point of intersection calculation mode I I
M98 \ Subprogram call I I
M99 End of subprogram
*M191 Comment output function +--–+
* M192 I Tool life control count

Note 1: M 190 to M 199 are used for extension LMcodes.


2: When the power is turned ON, the M code mode indicated by “(>” symbol is set. This is not influenced by the
reset operation.

3-101
(3) Other General M Codes

The functions of the M codes other than the specific M codes are determined by the ma-
chine tool builder. The representative use of several general M codes is given below,
For details, refer to the instruction manuals published by the machine tool builder. If
an M code is specified with axis move commands in the same block, whether the M
code is executed with the a~is move commands simultaneously or it is executed after
the completion of the axis move commands is determined by the machine tool builder.
For details, refer to the instruction manuals published by the machine tool builder.

Table 3.26 Other General M Codes

M Code Function Remarks


, 1
Spindle start, forward direction

Spindle start, re\’erse du-ectlon


Generally, M state between M03 and M04 cannot
=+ be switched directly. To change the M code state,

Et===- execu’
‘“’once’
I M09 I Coolant OFF I

3.5.4 Second Miscellaneous Function (B Function) *

For positioning of an index table and other functions, B codes (B OUEl) are used; a B code
consists of a three-digit number and address B. If a B code is specified with axis move com-
mands in the same block, whether the B code is executed with the axis move commands si-
multaneously or it is executed after the completion of the axis move commands is determined
by the machine tool builder. Fo:r details, refer to the instruction manuals published by the
machine tool builder. The B function and the T4-di.git specification * are not selectable at
the same time.

● B commands are modal and, once a B command is executed, it remains valid


until another B command is specified next.

● The standard interface of the B function outputs the signals to the machine in
“3-digit BIN” format.

● ‘B” is used to specify the address for B codes. If the B function is selected,
B-axis cannot be used to represent the the 4th- or 5th-axis.

3-102
ENHANCED LEVEL COMMANDS

Chapter 4 describes the program support functions, automa-


tion support functions, and macro programs.

4.1 PROGRAM SUPPORT FUNCTIONS


(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-3
4.1.1 Canned Cycles
u
A

(G73to G89, G181to G189) *.............4-3

4.1.2 Hole Machining Pattern Cycles


(G70, G71, G72)* . . . . . . . . . . . . . . . . . . . ...4-34

4.1.3 Solid Tap Function (G84, G74) * . . . . . . . . . . 4-39

4.1.4 Deep-hole Solid Tap Function


(G184, G174)’ . . . . . . . . . . . . . . . . . . . . . . . . . . 4-50
4.1.5 Circle Cutting (G12, G13)* . . . . . . . . . . . . . . . 4-64
4.1.6 Mirror Image ON/OFF (M94, M95) * . . . . . . . 4-70
4.1.7 Programmable Data Input (G1O) * . . . . . . . . . 4-76
4.1.8 Subprogram Call Up Function
(M98, M99) . . . . . . . . . . . . . . . . . . . . . . . . . ...4-79

4.1.9 Polar Coordinate Interpcdation


(G126, G127)* . . . . . . . . . . . . . . . . . . . . . . . . . . 4-81

4.1.10 Cylindrical Interpolation (G128, G129)* . . . . 4-91

4-1
4.2 PROGRAM SUPPORT FUNCTIONS
(2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-101
4.2.1 ProgramCopy(G25)* . . . . . . . . . . . . . . . ...4-101

4.2.2 Automatic Corner Override (Gl 06) * . . . . . . 4-104

4.2.3 Stored Stroke Limit B and C


(G22, G23)* . . . . . . . . . . . . . . . . . . . . . . . ...4-109

4.2.4 Comment Output Function (M191) * . . . . . . 4-115

4.2.5 [3reak Point Function . . . . . . . . . . . . . . . . ...4-116

4.2.6 High-speed Cutting . . . . . . . . . . . . . . . . . . ..4-116

4.2.7 Chamfering and Corner Rounding


Commands . . . . . . . . . . . . . . . . . . . . . . . . ...4-121

4.2.8 Corner Feedrate Designation


(G107, G108)* . . . . . . . . . . . . . . . . . . . . . . ...4-126

4.3 AUTOMATING SUPPORT


FUNCTIONS . . . . . . . . . . . . . . . . . . . ...4- 138
4.3.1 Skip Function (G31 )*.. . . . . . . . . . . . . . . ...4-1 38

4.3.2 Program Interrupt Function


(M90, M91) * . . . . . . . . . . . . . . . . . . . . . . . ...4- 141

4.3.3 TooiLifeC ontrolF unction* . ............. 4-144

4.4 MICROPROGRAMS . . . . . . . . . . . ..”4- 154


4.4.1 [differences from Subprograms . . . . . . . . . . 4-154

4.4.2 Microprogram Call (G65, G66, G67) . . . . . 4-156

4.4.3 variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-169

4.4.4 Operation Instructions . . . . . . . . . . . . . . . . . . 4-201

4.4.5 Control instructions . . . . . . . . . . . . . . . . . ...4-203

4.4.6 Registering the Microprogram . . . . . . . . . . . 4-209

4.4.7 RS-232C Data Output 2


(BPRNT, DPRNT) . . . . . . . . . . . . . . . . . . . . ..4-21O

4.4.8 Macroprograrn Alarm Numbers . . . . . . . . . . 4-214

4.4.9 Fxamples
- of Microprograms . . . . . . . . . . . . 4-215

4..2
4,1 PROGRAM SUPPORT FUNCTIONS (1)

4.1 PROGRAM SUPPORT FUNCTIONS (1)

4.1.1 Canned Cycles (G73 to G89, G181 to G1 89) *

Canned cycles (G73, G74, G76, G77, G80 to G89, G181, G182, G185, G186, G187, and
G189) can define specific movements that usually require several blocks of single-block
commands. 19 kinds of canned cycles are provided and G80 cancels the called up canned
cycle program.

(1) G Codes Calling Canned Cycles and Axis Movement Patterns of Canned
Cycles

Canned cycles are largely classified into normal hole-machining cycles and 2-step hole-
machining canned cycles.

(a) Normal hole-machining canned cycles

I
For calling normal hole-machining canned cycles, the following G codes are used. ,

4-3

.—..—.——. — ..—. —,,..,, ,—. .— —-- ,— - . —.


Table 4.1 Table of Norlmal Hole-machining Canned Cycles

Processing at Hole
G Code ~ Axis Feed Retraction Applications
Bottom
I
I Intermittent feed
High-speed deep hole
G73 ~ (dwell at each peck Rapid traverse
drilling
! feed possible)
]
Spindle rotation in Cutting feed +
G74 ~ Cutting feed the reverse direc- Dwell + Spindle Reverse tapping
tion after dwell reverse rotation
Spindle indexing Rapid traverse +
G76 Cutting feed Boring
+ Shift Shift, Spindle start
Spindle indexing Rapid traverse +
+ Shift + Rapid Spindle indexing,
G77 ‘ traverse + Shift Dwell Shift + Rapid Back boring
+ Spindle start traverse + Shift,
+ Cutting feed Spindle start

G80 — — Cancel

G81 Cutting feed — Rapid traverse Drilling

G82 Cutting feed Dwell Rapid traverse Spot facing

G83 Intermittent feed Rapid traverse Deep hole d;illing

Spindle start in the Cutting feed +


G84 Cutting feed reverse direction Dwell + Spindle Tapping
after dwell reverse rotation
G85 Cutting feed — Cutting feed Boring
Rapid traverse
G86 Cutting feed Spindle stop Boring
+ Spindle start
Manual return
G87 Cutting feed Spindle stop Boring
+ Spindle start
Spindle stop after Manual return
G88 Cutting feed Boring
dwell + Spindle start
G89 ~ Cutting feed Dwell Cutting feed Boring

4-4
4,1 PROGRAMSUPPORTFUNCTIONS (1)

(b) 2-step hole-machining canned cycles

The following G codes are used to call 2-step hole-machining canned cycles.

Table 4.2 Table of 2-step Hole-machining Canned Cycles

Processing at Hole
G Code Axis Feed Retraction Applications
Eottom

Cutting feed + Rapid —
G181 Rapid traverse 2-step hole drilling
traverse -+ Cutting feed

Cutting feed + Rapid 2-step hole spot


G182 Dwell Rapid traverse
traverse + Cutting feed facing

Rapid traverse 2
Cutting feed + Rapid —
G185 -, Rapid traverse 2-step hole boring
traverse -+ Cutting feed
+ Cutting feed 2

Cutting feed + Rapid Rapid traverse


G186 Spindle stop 2-step hole boring
traverse + Cutting feed + Spindle start

Cutting feed 1
Spindle stop after
G187 + Cutting feed 2 Cutting feed 2 2-step hole boring
(dwell
+ Cutting feed 1

Cutting feed 1 Cutting feed 2


G188 + Rapid traverse Dwell + Rapid traverse 2-step hole boring
+ Cutting feed 1 + Cutting feed 2

4-5

——— ———. —.. —.. — —-— ..——


(2) Programming Format

The programming format used for a 2-step hole-machining canned cycle differs from
that used for a normal hole-machining canned cycle as indicated below.

(a) Example of programming for normal hole-machining canned cycles


G code calling up a canned cycle
r
.Y+.Zk:..R~...P...W& .

Command for changing initial point level


!-~t~~
I I I ~ Length of dwell at hole bottom

~ Designation of R-point level coordinate


I I value

L
~ Designation of Z-point level coordinate
value
Desiccation of hole machining point
coor&ate values (X, Y) -

Depth for temporary return to R-point level in G73 cycle’


Feedrate
Number of repetitions

G73, G83: Cut-in depth


G76, G77: Shift distance
G74, G84: Dwell time at R-point level

4-6

_— —_____ _____ ., _.. ----


4.”1PROGRAMSUI’PC)RTFUNCTIONS (1)

(b) Example of programming for optional special canned cycles


G code calling up a canned cycle
F
G. .X+.. Y*.Z*..R*W+...

––-~–L- Command for changing initial point level


Designation of R-point level coordinate value
IL Designation of Z-point level coordinate value
Designation of hole machining point coordi-
nate values (X, Y)

F...C..C...P..n.l..K
—— ..}.”

‘~:[-F-’”umberO 2-step hole machinirlg cutting start point

L’ 2-step hole machining rapid traverse start poi


G73, G83: Cut-in depth
G76, G77: Shift distance
A

(274, G84: Dwell time at R-point level I


2-step hole machinirlg feedrate change point
Owentime
Depth for temporary return to R-point level in
G73 cycle
Feedrate at 1st step in 2-step hole machining
cycle
Return feedrate in reciprocal feed
Feedrate at 2nd step in 2-step hole machining
cycle
Advance feedrate in reciprocal feed

The following four steps are executed as one cycle with the commands indicated
above.

● Positioning at the hole machining position

● Rapid traverse to R-point level

● Hole machining up to Z-point level

● Return to R-point or initial point level

4-7

——., — —. —.-. —.- —, —... — .——,. — —.— —. —.. .L..<—..


71 —--—. —.- —-.
(c) Description of the addresses

Table 4.3 Description c)f the Addresses

‘---
Description

The hole machining position is specified by either incremental or absolute


values. For positioning operation, GOOor GO1 mode can be selected by the
+ setting for a parameter. If the GO1 mode is selected, positioning at the hole
machining position is executed at a feedrate specified by an F code.

) Z (hole machining axis) The position of the hole bottom is specified by either an absolute value or an
incremental value referenced to the R-point level. Axis move from the R-
point level to the bottom of the hole is controlled in the GO1 mode using the
feedrate specified by an F code. With some types of canned cycles, GOO
operation is included (intermittent feed, for example).
Return motion from the bottom of the hole to the R-point level is controlled
in the G!20or GO1 mode.

I R (hole machining feed I The pos [tion of R-point level is specified by either an absolute value or an
start level) I incremental value. The feed axis is the hole machining axis. Return opera-
tion from the R-point level to the initial point level is controlled in the GOO
mode.

oL (number of repetitions) ~The number of repetitions is specified by address L. If designation of’ad-


1dress L is omitted, “L1” is assumed. If “L = O“ is specified, only position-
ing at (X, Y) is executed.

.——-.—.
—..
-—.
——.
———
—...
———.-——.—
L!!
TERM?
e-
+ Initial Point Level
The initial point level is the absolute position of the point where the hole machining axis is located when the
NC mode enters the canned cycle mode from the canned cycle cancel state. The initial point level is not changed
if a canned cycle is executed in the G99 (R-point level return) mode.
-.—. .-.-— ——..——.—..—-..-.. —.—...—.. -.—.,..——.——

<..8
4.1 PROGRAM SUPPORT FUNCTIONS (1)

(d) Changing the initial-point level

The initial point level can be changed by using address W, the return operation to
the new level is called the W-point level return.

● With the W command specified in the G91 mode (an incremental command),
W-point level is set in reference to the initial point level specified in the pre-
ceding block.

● In the G98 mode (initial point level return), single-block stop does not occur
at the R-point level, but at the W-point level or the initial )point level.

● If the W-axis is set for an additional axis, the W command cannot be used to
change the initial point level. In this case, if address W is specified, it is re-
garded as an axis command.

Example of Programming

N1G99G81X1 ””” Y1. .R1””. Z1 0“.F”””;


N2G98 X2”” ”Y2”” R2””” Z2. .”W1. ““;
N3 X3”” ”Y3. R3.”. Z3.. .W2” ““;
N4 X4”” ”Y4 ”””;

(7 . ------- ------
(xl , Yl)
1
I
(x3, Y3)

-
4~--~—
(x4, Y4)

i+’F;~ m::
I
Z2 —

Fig. 4.1 W-point Level Command

...-.-...——..— .—.—-.-.-..-...—--—..—-. —.——..—..-...,.


-”—.—.-— ——.-.cz.~..

(3
SUPPLE-
MENT
If the initial point level should be changed, it is not necessary to cancel the cannecl
cycle.
.——-—,—— —-.——— _. —._. —_ —..—__

4-9
(e) 2-step feed *

In drilling operation, it is possible to execute drilling at an accurate position without


executing centering operation if feedrate is reduced near the level where the drill
engages the workpiece.

------
u, I-t

E feed
I
A:
1
R-point level
Initial point level

1
f
I Q
F feed

u ‘-pointievel
Address E: 1st-step feedrate
Address Q: Distance to be moved at 1st-step feedrate (unsigned value)

Fig. 4.2 2-step Feed

(f) Reciprocal feed *

For tapping, boring and other similar operations, individual feedrates can be speci-
fied for advance and return feed.

By using this feature, tapping operation which will be completed before the spring
in a tapper is fully extencled can be performed. In addition, this mode provides vari-
ous advantages for different types of operation. In boring operation, cycle time can
be shortened. In reaming operation, return movement of the cutting tool does not
leave scratches on the finished surface.

O------------------- Initial point level

Address E: Return feedrate

Fig. 4.3 Reciprocal Feed


4.1 PROGRAM SUPPCIRT FUNCTIONS (1)

(3) Table of Operation

(a) Normal hole-machining canned cycles (including new initial point level re-
turn)

Table 4.4 Table of Normal Hole-machining Canned Cycles


. Dwell
O Single-blockstop
\ ,-
-.. . (R-ooint
G99 Level Return) Mode I G98 (Initial Point Level Return) Mod= G98 (W-point Level Re~l
— —
G73X. .- Z.. .Z. .. R”’” Q””” L . .. F.. .Cp . . . . . .. w’....

G73
(constant ---- -— I

~ 3 g+c~: ‘;;:;::;’
I
f@ff$E’ i:$~l-’;p
‘itch)
1-figh-speed :l&g;
deep hole
. level ‘“”--5–– ~~in’
drilling [ Z-pointlevel

Z+oint level
.1 — Zf)oint level

Dwell time: P or setting for pm04Cfl pm4017 D4 = O: pm0401 invalid, 1: pm~Ol valid
— & Setting for pm0870 Q: Unsigned incremental value C: [Jnsigned incremental value I
G73X...,Z.RI.JI..J- ‘. K“”L.”F.”.C*’”.p-’”W ‘“”;

G73 ,
.----——-—-—
(variable

‘itch) ]~;~c

1-figh-speed
:_ [?-q:? _.—— ~;i~?ti$?: I
deep hole — C-point
— ~. level
~ k .JQ+ c-point
1,,.el
1 level ~~[
drilling

eZqoint level — Z-pointlevel –~~.poin~level

Dwell time: P or setting for pm0401 pm4Cf17 D4 = O: pm0401 invalid, 1: pm0401 valid —
& Setting for pm0870 Q: Unsigned incremental value C: IJnsigned incremental value —
G74X, Y...R.,.P.L..L . ..~. .. Q*. .. w...;
(x, Y) Initial point
(x, Y) Initial ‘o —— level
G74 (x, Y) ----
-----y--
Q ---- Q ‘y—y~gg;e”e’ ; ~-~~’”t
~ Spindle reverse rotation
1 after dwell : rotation after dwell , Spindle reverse
1
t rotation after dwell
;,/
/ R-point — —— R-point
R-point
level ; level

f--l
level F feed

~ If
F feed F feed F feed
F feed
F feed !
Reverse 1
/f--T Z-point — Z+30int
tapping Z-point level
level
level /“
~/
/
Spindle forward rotation after dwell i Spindle forward rotation after dwell
Spindle forward rotation after dwell
—~..

P: Dwell time at Z-point level Q: Dwell time at R-point level


— — —

4-11

..-. .—_. ——.——


. ..
Table 4.4 Table of Normal Hole-machining Canned Cycles (cent’d)
● Dwell
0 -.. .=.- ------- stnn
Sinale-block .-r
G99 (R-point Level Return) Mode G98 (Initial lPoint Level Return) Mode G98 (W-point Level Return) Mode
G76 G76XY. ZRQ. L ,,.F.PW,.;
(fixed shift
. . .. ..
distance)

,::g;’;:: :?$:: :$<2$

Boring

and stop

Q: Shift dismnce (signed incremental value) Shifting feedrate: pm2864


Dwell time: P or setting for pm0400 pm4017 D3 = O: pm0400 invalid, 1: pm0400 valid
G76 G76X. ,YZ. R.. .J. J ...L.F.P..W.;
(variable
shift
distance)

Boring Spindle index


and stop after
dwell
‘“--”EF= ,,:zt:~e ;“--QE’:

i: X-axis shift distance (signed incremental value) j: Y-axis shift distance (signed incremental value)
Shifting feedrate: pm2864 Dwell time: P or setting, for pm0400 pm4017 D3 = O: pm0400 invalid, 1: pm0400 valid
G77 G77XYZ. .. Q.Q. L ...F...W,.;,..;
(fixed shift / Spindle start
0 ~_–- Q.WYtig;;::;fp’Jint
distance)
7
o -.--JWor~- 1nitial point
Dwell , , level
l“ Z-point level
Not used Spindle ~ ::!::Keg ‘?~w:’eve’ ~ ,
Back ‘rientw && Fi-pOintlevel
Spindle start
boring 2 ‘ +-U=T- ‘Ji:t
Spindle start
t%=?

Q: Shift dis~~nce (signed incremental value)


Shifting feedrate: pm2864
Dwell time: P or setting for pm0400
pm4017 D3 ==O: pm0400 invalid, 1: pm0400 valid
G77 G77X. Y. Z. R.. I.. J L..,F,P..W;..;
(variable Initial point
Q..,z.,L/gs;,evel
sh]f’t (O<=dy ,nitial point
1 Q..!::2,q~
distance) level
~spnd,eflfl ‘-’’-J):: ‘z-poin’lev’l spn~,~~~=a~y~;’:’
Not used , ~rlentatlo~i~~~ Shift & ~+oint ,evel orientation ; ‘Eft 8 ~
Back
boring ‘~~—— R-point level
Spindle start Spindle stari
* l--m+

i: X-axis shift distance (signed incremental value)

j: Y-axis shift distance (signed incremental value)


Shifting feedrdte: pm2864 Dwell time: P or setting for pm0400
pm4017 D3 =:O: pm0400 invalid, I: pm0400 valid
-1 --

4-12
4.1 PROGRAM SUPF’ORT FUNCTIONS(l)

Table 4.4 Table of Normal Hole-machining Canned Cycles (cent’d)


9) Dwell
C) Single-block stop_

G99 (R-point Level Return) Mode S98 (InitialPoint Level Return) Mof G98 (W-point Level Return) Mode
G80
G80:
Cancel

Drilling

7. ---.-- (x, Y) 2 ‘-”- ~~’-’Q~---~ —Initial


point Ieve

l----r
t ,
R-poin
level

Z-point
level
l-+

L_--’
-

—-----Z-point
R+oint
level

level
L ! Z-point
level

G82 382 X.. .Y, .Z.R..P..L

‘d ------
(x, Y)
-Q -#-!x’ - ‘)-y-—---y--)w:l ‘/
----J~’yh—
initial
point Ievc
level ,

.IE=r &;
y-%:
R-point ~ R-point
level level 1
Dwell (P) Dwell (P) F level
Z-point : Z-point (m ~
L-LZ-point
level level
level

G83 182X,..Y.. .Z..R...Q.L .F...W;.W;
(x, Y) Initial point
(constant m Q —— level
pitch) L&$’) ----y—————

a$
~ W-point level
-— R-point level
t T-l ‘
1 A R-point level Q
/,,
:+-
,,
Q:’I~L: 6
!-t--
,,’ :?l ;,, 1:
,,1, Q
,,, :,:! 6
Deep hole Q Q
,1, 6 ,“,
,,
,
,! Q II
drilling ,,
,,
It 8
Q Q
6
@$ t
,,

t L--Z-point level
L z.poin~,eve, L Z+oint level
— —
): Setting for pm0871 I
lwell time: P-or setting forpm0401 pm4017 D4 = O: pm0401 invalid, 1: pm0401 valid
G83 >83X..,Y,.
(variable
pitch)

Deep hole
drilling

1 .~. —
: Initial value J: Decrement value K: Final value ( mcrementa] value)
): Setting for pm0871
)well time: P or setting forpm0401 pm4017 D4 = O: pm0401 invalid, 1: pm0401 valid

4-13

—..—..——..
.—
Table 4.4 Table of Normal Hole-machining Canned Cycles (cent’d)
. Dwell
O Single-blockstoD
G99 (R-point Level Return) Mode G98 (Initial Point Level Return) Mode G98 (W-point Level Return) Mode

G84 G84X, .YZR. P. L .F..Q*.W.”;


T
(x, Y) Initial point (x, Y)
.- ..* (x, Y)
u y Spindle ionvard Q ----- Q -----+—————— ::% ‘oint
rotation after dwell ~“—~~nc$~~nvard
Spindle / Spindle i ~ W-point level
Tapping reverse ‘ reverse ‘
/ ~poi”t ,eve, ;;;’ :
rotation :7;::: rotation R-point level
atter dwell atter dwell after dwell

\ Z-point level \ \
II m Z-point level m Z*oint level

P: Dwell time at Z-point level Q: Dwell time at R-point level

G85 G85X. .Y. .R. L.. .L. F w;

(x, Y) (x, Y) initial point


Q ----- ~ (x, Y)
-_.--~_____ level
Initial point
0 Q -----y—----- Ievel
,
~ W-point level
Boring
R~oint level R-point level
R-point level

m Z-point level [1 E Z-point level


Z+oint level

G86 G86X. ,. Y.. .R. .R. ..L F ..W..;

Spindle start

(x, Y)
o ----- Q--.+<;;nt Q(’) Initial point
Q level
Spindle start W-pointIev
Boring T----#=
R-point
R+oint ---&--- R+oint Ievt
level
level
spindle Spindle
Spindle
-% W Z.Point stop
‘% I ~ z.p~i”tl~”el stop -
m ~ Z+Oint level
stop
level

G87 G87XY. ZR. L F w,;

Spindle start
“ l-’;
(x, Y) Q
o ...... Q...-!!!:;;;po”,

Boring
:@: I

Spindle st :,,dl:] t:;


,,,de:l%!’!!:

L
4.”1 PROGRAM SUPPORT FUNCTIONS (1)

Table 4.4 Table of Normal Hole-machining CannedC ycles(cont’d)


● Dwell
O Single-block stop

G99 (R-point Level Return) Mode G98(lnitial Point Level Return) Mode _~vel Return) Mode

G88 G88X. . Y.. .R. .R. .. P.. L ..F..W..;

(x, Y)
o . . ..- ~-fi~~~’~~~point ‘-fix*- ‘pind’j~lpoint
?
Spindle start level
W-point level
Boring ~
Spindle Spindle stop
Spindle R+oint level —- R+oint level
stop after — R-point level after dwell
stop after Manual feed
(P)
dwell (P)
~~ [
Y %_ L Z-point level
~ .Z+mint level ‘we’”:. I — Z-point ievel ~ r
.E
~—.

G89 G89X. . Y..Z...R..P..L ...F...;..;

Boring
o

Dwell
--.--b

\~::

(P)
(x, Y) Q

D~~j;;;
(x, Y)

~~;
o

‘;<~~!f
(x, Y) Initial point

u
A

4-15

-z—— .,—--.. --— ..-—.—..


.--...——-— —-— ——.——-———— -
(b) 2-step hole-machinirg canned cycles with special options*
(includes new initial point return)

Table 4.5 Table of 2-step Hole-machining Canned Cycles


Options
. Dwell
0-—=Sinale-block
----- stoo
.-r
G99 (R-point Level Return) Mode G98 (Initial Point Level Return) Mode G98 (~-point Level Return) Mode
G74 G74X. Y. ZR. P.L ~~~FE Q. W.; Spindle reverse
rotation after dwell
(x, Y)
Inifial point Q . . ..- Initial point
(X, Y)
Spindle reverse (x, Y) level
Q ----- c1
y rotation after dwell -‘- - ~–—~—s~~dy~ reverse W*Oint
level
Reverse ~/ mtaficmafterdwell
R-point
tapping F feed
F feed E fe~ level F
1~+ feed { t = ~~~ ~ E “fed ~~~~;
Z-point level
/ /
Spindle iorward rotation after dwell
Spindle forward rotat[on after dwell Spindle forward rotation after dwell
L
P: Dwell time at Z-point level Q: Dwell time at “R-pointlevel
E: Return feedrate in reciprocal feed (Z-point level -- R-point level)
G81 G81X. Y.. Z. RL. ..F E..Q.W...;
(x, Y) initialpoint
u -----y— level
(x, Y) (x, Y)
. . . .. . ~ W-point level
Q 0 . .....
~-y- ;5:’ ‘“’”t
E feed
Drilling I ; Q ‘+oin’’eve’
E feed
1 , Q ‘-point’e”e’ F feed
‘feed \ ~ ‘“point ‘eve’ +!
F feed ~ F feed
E Z-point level
,P Z-point level [: Z-point level

E: 2-step feed feedrates (1st step: E, 2nd step: F) Q: Feedrate switchover point (u~signed incremental value)
G82 G82X. YZR. ..L. L ..FE.Q..W...;
(x, Y) Initialpoint
Q ----~ level
o . . . . .._$y) Q ‘ W$omt level
-----~~l::;’ ‘“’”t

E feed
4 / ~ ‘+oint’eve’
Spot facing E feed E feed
1 ; Q ‘-po’”t ‘eve’
I : Q ‘Toi”t’eve’ F feed
F feed /i
F feed E Z~oint level
{:
l! Z-point level
, k Z+omt level
~D
Dwell (P)
Dwell (P)

~ E: 2.step feed feedrates (1st step: E, 2nd step: F) Q: Feedrate switchover point (unsigned incremental value)
G84

‘~~~:~e~Qw;~::lpoint Q..:, “~e;;;iol:


rotat!onafter dwell Spindle reverse
l; ~pafierdwel —
/
Tapping — R+oint
E feed ‘eve’ ‘feed l~y%:::::
:ed t I I ‘feed 1~-l!=:: Z-point
k Zf)oint ‘r level
/ /“
-/ level / level Spindle forward rotation affel
Spindle forwardrotationafter dwell Spindle forward rotation after dwell
dwell
L
P: Dwell time at Z-point level Q: Dwell time at R-point ]evel
L’
E: Return feedrate in reciprocal feed (Z-point level -- R-point level)

4-16
4.1 PROGRAMSUPPORT FUNCTIONS (1)

Table 4.5 Table of 2-step Hole-machining Canned Cycles with Special


Options (cent’d)
● Dwell
O Single-blockstop
I
G99 (R-point Level Return) Mode G98 (Initial Point Level Return) Mode ~ G98 (W-point Level Return) Mode
—! —
G85 G85X. . Y.Z..R.L..F .. E. W..;
(x, Y)
‘o ‘----- ~——– :&:eyP“i”t
(x, Y) Q ___.~l_.__</__ ::::1 point
Q ------ -~ ;::ey P“i”t ,
,
I, r &xin’
,feedl - I,jef-pointlevel

R-point
Boring R~oint level
level

F feed F feed E feed


E feed
1~–~r y I [1 — — Z-point level
Jr

Z-point level — Z-point


level

E: Return feedrate in reciprocal feed (Z-point level -+ R-point level)

G86 G86X. .Y. Z.. L. F.. F ..E..Q...W;

------- ;;:,? ‘oi”t


:/j ~:, :T:: p?:

Boring

/ # – ‘-po’nt ‘eve’
Spindle stop Spindle stop

E: Return feedrate in reciprocal feed ( 1st step: E, 2nd step: F)


Q: Feedrate switchover point (unsigned incremental value)
—————————
G89 G89X. .Y. Z. R.. P.. L ..,F...W.W. ;

‘----- -~~~~e~ pOint

,;fe;n:: “;~;: ,DJ:fF


Boring

Dwell (P) Dwell (P)


E: Return feedrate in reciprocal feed (Z-point level + R-point level)

4-17
Table 4.5 Table of 2-step Hole-machining Canned Cycles with Special
Options (cent’d)
. Dwell
O Single-block stop

G99 (R-point Level Return) Mode G98 (Initial F’oint Level Return) Mode G98 (W-point Level Return) Mod

G181 ]181X. .. Z.. .Z. .. R.. .L . . . F..J.K.E.Q.W.. +.


I L’/...(x’—+——————
‘)
C2 . . . . . .0——
(x, Y)
Initial point
level
‘cl ,“ ./$

i ~—-
Initial point
W@int level

Ryoint level Efeed -R+”in’’eve’

2-step hole
drilling
E feed

F feed
F feed
L-L----,J+
:!
K-point level
E feed Q
~=

L E feed

F feed IL _ ‘ Z-point level I


F feed - Z-point level

m
A

G182
: 2-step hole machining rapid traverse start point (signed absolute/incremental value)
C 2-step hole machining cutting feed start point (signed absolute/incremental value)
2 2.step feed feedrates ( 1st step: E, 2nd step: F)
;182X.
m
.. Z.. .Z. .. R.. p,.
Q: Feedrate switching point (unsigned incremental value)
L..F...EK.E...Q...

0 ----- ~~~~—
.!
Initial point
level
W

0 (x, Y)
-----~— Initial
f&pbirf
point
level

E feed
/ ?—IT ‘-point ‘eve’
E feed t
E
! Q ‘+oint‘eve’
2-stephole ; feed Ffeed i~ ;
/ {~- J-point level J-point level
;pot facinf :,
K-point level K-point level
K-point level
E iced Efeed I ~ Q Efeed t ~ Q
i~Q ~ti
~feed i’ E Z*olnt level
F feed { ~
Z-point level
F teed ): = Z-point level
N /
Dwell {P)
Dwell 1P)
Dwell (~)

1: 2.step hole machining rapid traverse start point (signed absolute/incremental value)
<: 2.step hole machining cutting feed start point (signed absolute/incremental value)
3: 2-step feed feedrates ( 1st step E, 2nd step: F) Q: Feedrate switching point (unsigned incremental value)
:.. .J,.K.E..W..;
G185

J -----~
(x, Y)
Initial point 0...-..+0 Initial point
o ‘-----~
Initial point
level
W-point Iew

H=
level level
R~oint Ieve

1=
R-point level R-point level F feed { t E feed

2-step hok F feed / E feed


F feed
+ ~+
! E feed J-point level
t
boring J-point level J-point level

F feed ~
t+
t
E feed
K-point

Z~Oint
level

level
F feed
i
lEt- ! E feed
K-point

Z*Oint
leve

Ieve

1: 2.step hole machining rapid traverse start point (signed absolute/incremental value)
K: 2.step hole machining cutting feed start point (signed absolute/incremental value)
E: Return feedrate in reciprocal feed [Z-point level + K-point level, J-point level + R-point level)

4-18
4.1 PROGRAMSUF’PCIRTFUNCTIONS (1)
—9——

Table 4.5 Table of 2-step Hc)le-machining Canned Cycles with Special


Options (cent’d)
● Dwell
O Single-blockstop
G99 (R-point Level Return) Mode G98 (Initial Point Level Return) Mode G98 (W-point Level Return) Mode I

G186 G186X. Y.,Z...L.L.. F ..J...E..E..Q,W,; 40 ;=dti “-

2-step hole
boring ::@: ::$?:: ‘~~p:z
K+oint level E feed Q
– K-pointlevel
Eleed ~ ‘ Q E feed ~ :_ c1 F feed i z___ Z-point level
F feed { E Z~oint level F feed / — Z-point level
Spindle stop
/ P
Spindle stop Spindle stop

J: 2-step hole machining rapid traverse start point (signed absolute/incremental value)
K: 2.step hole machining cutting feed start point (signed absolute/incremental value)
E: 2-step feed feedrates ( 1st step: E, 2nd step: F) Q: Feedrate switching point (unsigned incremental value)

G187 G187X. .Y. .. Z.. .R, .L F.. .P . . . J.. .KW. .. W...;

.. . . .

I
2-step hole
I boring ~kE

!:]+~E-:~~E
Dwell (P)

Dwell (P; I
J: 2.step hole machining rapid traverse start point (signed absolute/incremental value)
K: 2.step hole machining cutting feed start point (signed absolute/incremental value)
E: Return feedrate in reciprocal feed (J-point level -+ K-point level)
— —
G189 G189X. .Y. .Z, ... P . L...J..J..W.E...W. .;
(x, Y) Initialpoint
Q ----y-— Ievef
(x, Y) (x, Y) _ W-point level
Q . . ..- ~—-—–
q -----~ Initial point l“” lttal point <
— R-point level
level level
F feed ~ { E feed
R~oint level , ~ ;-R-point level J-point level
~J––
F feed ~ t E feed F feed ~
?-step hole — J-point level
J~oint level :_
! p K-point level
boring
Ffeed / ~ E feed
K-point level Kyoint level
Lj — Z-point level
Ffeed ~ f E feed Ffeed ~ IE:4
m Z-point level e — Z-point level
/ /“
Dwell (P) Dwell (P)
-e-.

J: 2-step hole machining rapid traverse shfipoint (si~edabs()lute/incremen@lv:~lue)


K: 2.stephole machining cutting feed smflpoint (signed absolllte/incremenhl val~le)
E: Retumfeedra~ inreciprmal feed (Zpoint level +K-point level)

4-19
(4) Using the Absolute/Incremental Designation Commands (G90/G91)

(a) Example of programming in the G90/G91 modes

● Program for returning to the initial point level in the G90 mode

G98G90G81X .”” Y””” Z-70. R-40. F .“”; . . . . . . . . . . . .a

● Program for returning to the R-point level in theG91 mode

G99G91G81X ..” Y””” Z-70. R–4O. F“. .; . . . . . . . . . . . .@

@
.- Initial point levelQ —
Q
?~ --+
I I
o I -40
;1 I
;I
11 T
– R-point level
II
1
-40. ---– ---- t R-point
level !
I
I
I
I –70.

-70..._–– i
_-. -J- h Z-point level
i
I
I
[ [1 Z-point level
–z

(a) Returning to the initial point level (b) Returning to the R-point level
(absolute programming mode) (incremental programming mode)

Fig. 4.4 Programming in the Absolute/Incremental Programming Mode


4.1 PROGRAMSUPPORT FUNCTIONS (1)

(b) Switching the G90/G91 mode

As shown in the program given below, only addresses speciiled later are updated
as in blocks N2 + N3, including the switching of G code from G90 to 91. For ad-
dresses not specified, the position data specified in the preceding blocks are re-
tained.

Example of Programming

N1 G92 XOYOZO ;
N2 G98 G90G81 X1O. YI.O. Z-50. R–20. F1OO ; . . . . . . .$
N3 G91 X20. R-30 . .+ . . . . . . . . . . . . . . . . . . . . . . . . ......
N4 Z-50- ......................... ......@
N5 G99 Z-40. R-50. ; . . . . . . . . . . . . . . . . . . . . . . . ......@
N6 G80 GOOZ50. ; . . . . . . . . . . . . . . . . . . . . . . . . . . . .@

Table 4.6 Absolute Position of R- and Z-point Levels

Absolute Position
Program Remarks
z= R=

o -50. –20. Starting a canned cycle

Changingthe data of X and R. Z-point level specified


@ -50. -30.
in the block immediatelybeforethis block is retained.

Changingthe data of Z. R-pointlevel specifiedin the


@ --go. -30.
block immediately before this block is retained.
.
@ -90. -50. Changingthe data of R and Z

Cutting tool moves to Z = O.


@ Canceling the canned cycle
(absolute position)

4-21

.—..—— —.— . . . . ..——— .-—. — .—.—


(c) Changing the R- and Z-point level in the G91 mode

If R is. specified without Z while a canned cycle is executed in theG91 mode, Z-


point level is recalculated as incremental distance from R-point level.

Example of Programming

G92 XO YO ZO
G98 G91G81X O.” Y.-. Z-1 O.OR-5. OF” “.; ....... @
XC”” R-7.O; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @
x ““”>3.0; .................................. @
R-4.0 Z-11.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @

Table 4.7 Changes in Incremental Distance from R-point Level to Z-point


Level

R=

Notel: Z-point position iscommanded to be-10 .Ointhe G91 medein advance.


2: R-point position iscommmded to be-7. Oinfie G9lmodeinadvmce.

(5) Specifying the High-Speed Deep Hole Drilling (G73) and Deep Hole Drilling
(G83) Codes*

(a) Variable pitch peck feed command

In a deep hole drilling cycle called by G73 and G83, it is possible to specify a vari-
able pecked feed stroke by using addresses I, J, or K instead of specifying address
Q that specifies a constant peck feed stroke.

I : Initial value of peck feed stroke


J: Decrement value for the second and later peck feeds
K: Final value of peck feed stroke
6: Return stroke at each cut

4-22
4.1 PROGRAMSUPPORT FUNCTIONS (1)

● Addresses P, Q, I, J, and K are modal in the canned cycle mode and, once speci-
fied, they remain valid until the canned cycle is canceled. For these addresses,
values should be specified without sign.
c It is possible to specify a variable peck feed stroke by using address Q instead
of address I. If addresses I, J, K, or Q are specified in the same block, variable
pitch peck feed is exebutecl with the value specified for address Q as the initial
value of peck feed stroke. Since Q is modal, specify QO if a Q command is
given before specifying a variable pitch with I, J, or K.

f
● If neither Q, I, J, or K is specified in the G73 or G83 block., alarm “01 74” oc-
curs.
● If “J=O” is specified or no J command is specified in the G73 or G83 block,
peck feed (intermittent feed) cycle with constant pitch is called up.
I I
I I

-–l–..––
~-,,,. 12-.nin+ level – R-point

3“’
, m~~ I’”’l
,1111
,, ,111111
-i+’~ 6
l++lfi
11111
I-J ;lllll l,\
,~. 111
ill-r+ -4 ij

‘-2JT7J- l–” , ~-+


II
I [1,1
,111

‘-(”-’:WL
l–(n–l)J ,1
II It
I II
I( ‘–—
I -- — I
I !+

K’: Final stroke of peck feeding to Z-point level K’ S K

(a) G73 mode cycle (b) G83 mo~e cycle

Fig. 4.5 Peck Feed Cycle in the G73 and G83 Modes

4-23

.——
——.——. -.— —. .—.. .—-— —.—.. — —. —. —-. _.— -—. - ... ..-— .—.--.— .—..
Example of Programming

G91G73X””” Y””” R-3 O. Z-55. IIO. J1. K4. F “ “ “ ;

Peck feed stroke


1st peck feed— 10 mm -1 10.
2nd peck feed— 9 mm
3rd peck feed— 8 mm
4th peck feed— 7 mm
5th peck feed— 6 mm
6th peck feed— 5 mm
7th peck feed— 4. mm + K4.
8th peck feed— 4. mm
9th peck feed— 2 mm +- K’

Total 55.00 mm - -Z -55.

(b) Dwell at each peck feed

In a deep hole drilling cycle called by G73 or G83, load applied to a drill can be
reduced by giving dwell for a short time after reaching the bottom in each peck
feed. Dwell time can ba set for parameterpm0401 or specified by address P.

If peck dwell is specified in a program using address P, it supersedes the setting


for parameter pm0401. If a P command is not specified in a program, the set-
ting for parameter pm0401 (1 = 1 ms) is used for peck dwell. If PO is specified,
the setting for parameter pm0401 is used.

Default value for dwell at the bottom of a hole can be set by using parameter
pm0401.

The setting for parameter pm0401 is disregarded by setting appropriate value


for parameter pm4017 D4. If pm0401 is disregarded, peck dwell is not
executed unless a P command is specified.

4-24
4,1 PROGRAMSUPPORT FUNCTIONS (1)

(c) Mid-retract command (C-point level command)

In a high-speed deep-hole drilling cycle called by G73, it is possible to retract a cut-


ting tool to the R-point level after it has reached the specified level. The mid-retract
command allows single-block stop at the retracted level.

This feature makes discharging of chips possible during the execution of a cycle.

The C-point level is specified by an unsigned incremental value. The cutting tool
retracts to the R-point level after each drilling of distance C.

This command is invalid if C-axis is set as an optional axis. If C-axis is selected


as an optional axis, designation of address C calls up C-axis.

1st retraction . . . (R+C) level


2nd retraction . . . (R+2C) level
o ----~ — Initial point level
;
R-point level

C-point level

J ‘~ q--~ C-point level

irL
{ . Dwell
O Single block s!op

Z-point level

Note: For C and Q, unsigned incremental values should be specified.


Entry of a minus sign is disregarded.

Fig. 4.6 Mid-retraction Command (C-point Level Command)

4-25
(6) Programming Format for Boring (G76) and Back Boring (G77)*

The direction of shift motion in the G76/G77 cycle can be specified by ‘-Q command
+ angle (setting parameter pm0805)” as well as the commands in a program. For the
designation of dwell time before shifting, it is possible to specify it by the commands
in a program in addition to (he setting for parameter pm0400.

t
Shift direction
T-
Dwell time

(a) Boring command (G76)

● If addresses I or J specified with address Q in the same block, addresses


iire

I and J are disregarded.


● For the dwell at the bottom of hole, the setting for pm0400 is given priority
to the commands specified in a program.
9
Parameter pm0400 is valid if“pm4017 D3 = 1”.

Axis shift feedrate is set for parameter pm2864. If “pm2864=O”, feedrate spe-
cified by an F command is used.

Since address Q is modal, if a Q command is specified before I or J commands,
these commands are disregarded. To make I and J commands valid, specify
them after canceling a canned cycle by G80.

. Programming for fixed shift distance


G76 X_ Y_ Z_ R_ Q_ L_ F_ P_ W_ ;

. Programming for variable shift distance


G76 X_ Y_ Z_ R_ I_ J_ L_ F_ P_ W_ ;

(7
Spindle starts after shift at initial point level, W-point
level, or R-point level
[x, Y)
. . . . . . . ..-..+ Q/ +--a ~ $i@l point lev-

W-point level
+----
~ &---- R-point level

l-!
!

1-
Shift
Spindle index and stop -~ ~ ‘~ .Z-point level

Q
● Dwell
or shifted by (1, J)
[) Single-block stop
Fig. 4.7 Co[mmands of Boring Cycle (G76)

4-26
4.1 PROGRAM SUPPORT FUNCTIONS (1)

(b) Back boring command (G77)

If addresses I or J are specified with address Q in the same block, addresses


I and J are disregarded.

For the dwell at the bottom of a hole, the setting for pm0400 is given priority
to the commands specified in a program.

Parameter pm0400 is valid if “pm4017 D3 = 1”.

Axis shift feedrate is set for parameter pm2864. If “pm2864=O”, feedrate spe-
cified by an F command is used.

Since address Q is modal, ifa Q command is specified before I or J commands,


these commands are disregarded. To make I and J commands valid, specify
them after canceling a canned cycle by G80.

. Programming for fixed shift distance


G77. X_ Y_ Z_ R_ Q_ L_ F_ P *_ W *_ ;

. Programming for variable shift distance


G77_ X_ Y_ Z_ R_ I_ J_ L_ F_ P *_ W *_ ;
Spindle start

/
o *..-.—–.7
(x, Y) +
0“ ‘-->- ~> ~ ~ - Initial point level
,;
o ~.—.––. : :
- ~N-pointlevel
~+
,,
~. z-point level

,,
,,
Spindle start ~
,,
,,
,;
r~
Spindle orientation “k~~
~1 $---&-- R-point level
~.i
–=!

--l
7 ● Dwell
or shifted by (1, J) O Single-block stop

Fig. 4.8 Commands of Back Boring Cycle (G77)

4-27

.. —. ———. ——— .—— —.. —


(7) Programming Format for Reverse Tapping (G74) and Tapping (G84)*

In a tapping cycle, dwell can be specified after the return to the R-point and initial point
levels in addition to the dwell at the bottom of the hole to absorb elongation and contrac-
tion of the tapper spring.

G74 and G84 call up the reverse tapping and tapping cycles, respectively; there are no
differences in the basic control for these two patterns of tapping cycles. If the tapping
cycle starts with the spindle. rotation of M03, M04 is output at the bottom of the hole
for the return operation and, conversely, if a cycle starts with the spindle rotation of
M04, M03 is output output at the bottom of the hole for the return operation. If G84
is specified without starting the spindle, M04 is output at the bottom of the hole, and
if G74 is specified without starting the spindle, M03 is output at the bottom of the hole.

u
A
(a) Reverse tapping command

“ Example of prOgHIImkg

G74 X_ Y_ Z_ R_ P_ L_ F_ E_ Q_ W_ ;
(G74)

0-“-------”-?~
(x, Y)
Initial point level

W-point level
Spindle reverse rotation after
I

~ <n:::r”at’-point’eve
FW(i IF
o- Z-point level
\
● Dwell
0 Single block stop \ Spindle forward rotation after dwell for Pat the hole bottom

Fig. 4.9 Reverse Tapping Commands (G74)

4-28
4.1 PROGRAM SUPPORT FUNCTIONS(l)

(b) Tapping cornmand(G84)

● Example of Programming

G84 X_ Y_ Z_ R_ P_ L_ F_ E_ Q_ W_ ;

0 (x, Y)
--------’”--y----- Initial point level

t F
,I
I
1
W-point level
_....— Spindle reverse rotation after

Ffeed~l ~ I Efeed

Z-point level
● Dwell
0 Single block stop \ Spindle forward rotation after dwell for P at the hole bottom

Fig. 4.10 Tapping Cycle Command (G84)

4-29
(8) Programming for 2-step Hole Machining Canned Cycles*

To execute a hole machining cycle in a hollow workpiece such as a cast workpiece,


2-step hole machining canned cycles are provided. For each type of canned cycle,
called by a G code of 80s, 2-step hole machining canned cycle is available. To call up
a 2-step hole machining canned cycle, add “100” to a G code number used to call up
a hole machining canned cycle. The following G codes are used to call up the 2-step
hole machining canned cycle: G181, G1 82, G1 85,G186,G187, and G189.

(a) 2-step hole drilling command (G181 )


Example of Programming

G181x_Y_z_ R_ L_ FJ_K_E_Q_w_;

Initialpoint level

[ * ‘-p”int’eve’
R-point level

E feed Q

F feed
J-point level
p

I K-point level

E feed I Q
t
1
F feed I
E Z-point level
O Single block stop

J: 2-step drilling cycle rapid traverse start point (absolute/incremental)


K: 2-step drilling cycle cutting feed start point (absolute/incremental)
E: 2-step feed feedrates (Ist step: E, 2nd step: F)
Q: Feedrate switching point (unsigned incremental value)
W: New initial point (absolute/incremental)

Note: To specify J or K in the G91 (incremental) mode, specify the distance in reference to the R-point level.

Fia. 4.11 2-stec) Hole [)rillina Cvcle Command (G181)

4.30
4.1 PROGRAMSUPPORT FUNCTIONS (1)

(9) Example of Canned Cycle


Example of Programming

N1O C92 XO YO ZO ;
Nll G90 G98 ; + Abscdute mode, Initial point level return
N12 G81 X30. Y40. R-20. Z-30. F200 ; -+ Drilling cycle
N13 M98 P400 ; + Subprogram call
N14 GOO XO YO ;
N15 T05 : + Selection of a tapper
N16 M06 ; + Tool change cycle
N17 G84 X30. Y40. R-20. Z-30. .F2000 ; -+ Tapping cycle
N18 M98 P400 ; + Subprogram cal1
N19 000 Xo Yo ;

0400
N1OO G91 X40. L3 ;
N101 Y30. ; )

J
Subprogram defining hole position pattern
N102 X-40. L3 ;
N103 Y30. ;
N104 X40. L3 ; +’i
N105 G90 G80 ;
?
N106 M99 ;
~------ ----––+---–-->
1 7
I ~1
L-----------++ ----.+
it
‘lOi
,ml
1
40.
/’
/’ 3:~cL:~z=:i “1--
/’
1 ——. —~ +x
--L Start point

Fig. 4.12 Example of Canned Cycle

4-31
(1O)Supplements to Canned Cycle Functions

● When a canned cycle is executed with the SINGLE-BLOCK switch set ON,
the cycle is suspended at the following points and the FEED HOLD lamp
lights.

. After positioning at (X, Y)

. After positioning at R-point level

. After the completion of one cycle if an L command is specified

Upon completicm of a canned cycle, the single-block stop takes place as in


operations other than canned cycles and, in this case, the FEED HOLD
lamp does not hght.

● Before entering the canned cycle mode, define the R-point and Z-point levels
newly by designating R and Z. The R-point and Z-point data is cleared when
the canned cycle mode is canceled.

s If a canned cycle is executed after changing the address data, one of the follow-
ing address commands must be specified in that block; otherwise, the canned
cycle is not executed. X, Y, Z, a, b, R

● When M, S, T, andlor B * is specified in a block which calls up a canned cycle,


M, S, T, and/or B * signal is output at the first positioning operation. If the
number of repetitions (L) is specified, M, S, T, and/or B * signal is output at
the first positioning operation, too. M, S, T, and B * commands should be spe-
cified in a block without other commands.

● If the following G codes are specified in the canned cycle mode, alarm”0 170”
occurs.
It is necessary to cancel the canned cycle mode before specifying these G
codes.

G code in *-group with an exception ofG04,G70,G71, and G72

. G code in 07-group (G41, G42)

c It is possible to insert the block that calls for dwell during the execution of a
canned cycle. In this case, dwell function is executed correctly.

● If a canned cycle is called up in the tool radius offset C (G41, G42) mode,
alarm “01 82” occurs.

● Before entering a canned cycle, the spindle must have been started in automat-
ic operation by executing M03 or M04. It is not allowed to enter a canned cycle
after changing the spindle rotation direction manually.

4-32
4.1 PROGRAMSUPPORT FUNCTIONS (1)

It is possible to call a subprogram while in the canned cycle mode by specify-


ing the subprogram call command (M98). The canned cycle can be continu-
ously executed in the called subprogram. When a subprogram is called, the
P command (dwell time) used for a canned cycle is temporarily destroyed by
the P command (jump destination program number) specified with M98.
However, the previously specified P value is recovered when jump to the sub-
program is completed.
The limit on the nesting level (up to 4 levels) of M98, command from punched
tape, etc, and other requirements are the same as those applicable to the modes
other than the canned cycle mode.
An alarm occurs if M98 and canned cycle commands are spacified in the same
block.

An L command specifying the number of repetitions of a canned cycle is non-


modal. However, there is a special case in which an L command is saved tem-
porarily. As in the example of programming given below, if only an L com-
mand is specified in a block, it is saved until it is actually executed.

Example of Programming

G91 G81 X1O. R-20. Z-30. F1OO ;

L3 ; The canned cycle is not executed since this block does not
include X, Y, Z, a, or R.
L3 is saved.
X20 ; G81 is executed three times according to the L3 command
which has been saved. After the execution of the G81 cycle
three times, L3 is deleted.

A canned cycle is canceled either when G80 or a G code in 01-group is speci-


fied.
If a G code of 01-group is specified with a G code calling up a canned cycle,
alarm “O170” occurs. However, if G80 is specified as a G code to call up the
canned cycle, alarm does not occur, but the specified operation is executed.

An F command specified in a canned cycle remains valid even after the cancel-
lation of the canned cycle.

If an address search is executed during the execution of a canned cycle while


a cycle is suspended (block stop state), an alarm occurs. Address search during
block stop state specified in a program is allowed. If more than one cycle is
executed by the designation of an L command, address search attempted at the
completion of a single cycle causes an alarm.

It is possible to call up a canned cycle while in another canned cycle already


called up. If address data are omitted in a newly specified canned cycle calling
block, the modal data of that address are used.

4-33
4.1.2 Hole Machining Pattern Cycles (G70, G71, G72) *

The hole machining pattern cycle permits hole machining position data to be entered by the
radius and angle. The function converts the data into the position data in the Cartesian coordi-
nate system to execute positioning. The function supports three pattern cycles; bolt-hole
circle, arc, and line-at-angle. These pattern cycles can be used in the canned cycle mode.
Positioning at the coordinate position specified by the radius and angle is executed in the rap-
id traverse (GOO) mode.

Table 4.8 G Codes Used for Calling Hole Machining Pattern Cycles

G Code Function Group

G70 Bolt hole circle command *

4-34
4.1 PROGRAM SUPPORT FUNCTIONS (1)

(1) Bolt Hole Circle Command (G70)

By using the bolt hole circle pattern, hole machining, positions are defined on the circle
of radius “I” and having the center at (X, Y). The positions are arranged on this circle
– equally divided by L and starting from a point at angle J measured from the X-axis.

G70X””” Y””” I””” J””” L’””;

Table 4.9 Description of Addresses


— —
Address Description

x, Y Used to define the center lofthe bolt hole circle. The values to be assigned to ad-
dresses X and Y should cnnform to the specified dimensioning mode,G90orG91.

I Used to specify the radius of the bolt hole circle to be defined. The value must be
positive and can be set in units of least input.

J Used to set the angle of the first positioning point. The value shcmld be set in units
of 0.001 degree; the angle measured in the counterclockwise direction is expressed
by using a positive value.

L Used to set the number of equally divided positions on the circle. If a positive value
is used, positioning is executed in the counterclockwise direction and if a negative
value is used, positioning is executed in the clockwise direction.

Example of Programming

G81 G98 G90 2–50. R–20. F20 LO ;


G70 X90. Y30. 140. J20. L6 ;
G80 GOo Xo Yo ; “+
1

‘z
(90., 30.)

4 6 End point
+)
r
~i
5

Fig. 4.13 Bolt Hole Circle Command (G70)

4-35

__. —. .——..—.————.— . ..—


(2) Arc Command (G71 )

By using the arc pattern, hole machining positions are defined on the arc of radius “I”
and having the center at (X., Y). The positions are arranged on this arc – L, equally
spaced in angular intervals of K, and starting from a point at angle J measured from the
X-axis.

G71X””” Y””” I””” J””” K””” L”” “;

Table 4.10 Description of Addresses

Address Description

x, Y Used to define the center of the arc. The values to be assigned to addresses X and Y
should conform to the specified dimensioning mode, G90 or G91.

I Used to specify the radius of the arc to be defined. The value must be positive and
can be set in units of least input.

J Used to set the angle of the first positioning point. The value should be set in units
of 0.001 degree; the angle measured in the counterclockwise direction is expressed
by using a positive value.

K Used to set the angular intervals.


The values should be set in units of 0.001 degree, and positioning is executed, in the
counterclockwise direction when a positive value is specified.

L I Used to set the number of positioning times. A positive value must be set.

Example of Programming

G81 G98 G90 2-50. R-20. F20 LO ;


G71 X70. Y30. 1110.J20. K15.2 L7 ;
G80 Goo Xo Yo ; 7 6
End point

——

Y=30mm
Start point X = 70 mm
J

Fig. 4.14 Arc Command (G71)

4-36
4.1 PROGRAM SUPPORT FUNCTIONS (1)

(3) Line-at-angle Command (G72)

By using the line-at-angle pattern, hole machining positions are defined on the line hav-
ing an angle of J from the X-axis. ‘The positions are arranged on this line – L, equally
spaced in intervals of I, and starting from at the point defined by (X, Y).

G72X.””Y”””I.-”JO”.L”””;

Table 4.11 Description of Addresses

Address Description
.----1
x, Y Used to define the coordinate values of the start point.
The values to be assigned to addresses X and Y should conform to the specified
dimensioning mode, G90orG91,

I Used to set the interval.


If a negative value is set, positioning is executed in the symmetrical direction in
reference to the start point. The value can be.set in units of least input.

J Used to set the angle of the line measured from the X-axis. The value should be set
in units of 0.001 degree and the angle measured in the counterclockwise direction is
expressed by a positive value. ----1
L Used to set the number of positioning times. A positive value must be set.
.1

Example of Programming

G81 G98 G90 Z-50. R–20, F20 LO ;


G71 X70. Y30. 125. J15.5 L6 ;
G80 Goo Xo Yo ;

En5 point

X=70mm
,ZA., -.

1 Y=30mm

Start point

Fig. 4.15 Line-at-angle Command (G72)

4-37

—-— .—— —.—


—— --—.—- .—..
(4) Supplements to the Hole Machining Pattern Cycle Function

● To execute a hole machining cycle using G70, G71, or G72, a canned cycle
(G73,G74,G76,G77,G81 - G89) should be specified with “L = O“ in the pre-
ceding block as shown in the Example of Programming of Fig. 4.15. By the
designation of “L Z=O“, the hole machining position data are saved without
executing the canned cycle.

● It is allowed to specify a G code calling a canned cycle with G70, G7 1, or G72


in the same block. However, the canned cycle (G73 and G83) which uses ad-
dresses I, J, and K cannot be specified with G70, G71, or G72 in the same
block. To use G73, G83, or 2-step hole machining canned cycles (G181,
G1 82, G1 85, G1 86,G187,G189), either use address Q or specify I, J, or K in
the preceding block.

● The hole machining canned cycle executed usingG70,G71, or G72 ends after
the retraction from the hole machined last. To execute positioning to the next
position, move distance must be calculated if the cycle is programmed in the
G91 (incremental) mode. Since the use of the G90 (absolute) mode does not
require such calculation, it can be used more conveniently than theG91 mode.

“ Upon completionofG70,G71, or G72, the canned cycle mode remains valid.


It is necessary to execute G80 to cancel the canned cycle mode.

. If G70, G71, or G72 is specified in the tool radius offset mode (G41, G42),
alarm “O182” occurs.

4-38
4.1 PROGRAMSUPPORTFUNCTIONS (1)

4.1.3 Solid Tap Function (G84, G74) *

The solid tap function executes tapping b:y synchronizing Z-axis feed with spindle rotation.
If tapping is executed by using this function, a floating chuck is not necessary any more and,
at the same time, accurate tapping is made possible at a high speed. Conventional tapping
operation can also be programmed.

(1) Requirements for Adding the Solid Tap Function

To add the solid tap function, the following conditions are required.

● To install the S5-digit analog output option.

● To use Yaskawa’s VS-626VM3 or VS-626M5 for the spinclle driver.

● To fix the gear ratio, to be used for solid tapping, by installing a PG to the
spindle or the spindle drive motor. The best performance can be expected if ‘
the spindle is directly coupled to the spindle drive motor. n

(2) Commands Used for Solid Tap Cycle

To execute solid tapping, change the mode to the solid tap mode and then specify the
solid tap cycle.

(a) Solid tap mode commands

The following G codes are provided to determine which of the tapping mode is
called up, solid tap or conventional tapping cycle. These G codes are modal.
When the power is turned ON or the NC is reset, G94 mode is f,et.

● Solid tap mode command (G93)

Once G93 is executed, the tapping cycle commands (G84/G74) are executed
in the solid tap mode. In this mode, Z-axis feed is controlled in the “feed per
revolution” mode. In the solid tap mode, no machining other than solid tap-
ping is allowed.

“ Solid tap mode cancel corn.mand (G94)

The solid tap mode is canceled and the conventional tapping mode is called
up. Once G94 is executed, tapping cycles are executed in the conventional
mode, in which the Z-axis feed is controlled in the “feed per minute” mode.

4-39
(b) Programming for the solid tap cycle

After executing G93, solid tapping is enabled by specifying the commands indi-
cated below.

● Programming for tapping cycle


G code calling up tapping cycle
G84X&.Yk ZZ,..R+..PF

L Tap pitch
c Dwell time at the hole bottom
R-point level coordinate value
“1 ~ Z-point level coordinate value

X and Y coordinate values of tapping pos

‘E:;;::;:etitions

● Programming for reverse tapping cycle


G74X+.Y*...ZR*.R*. .P...F.. (S)L;
~ G code calling up reverse tapping cycle

For an F code, specify Z-axis feed pitch (mm/rev, inch/rev) per one revolution of
the spindle.

The unit of command and programmable range of F and S codes are indicated be-
low. Note that, even within the specified programmable range, the values exceed-
ing the specified limit cannot be used: “F x S = 24000.0 mm/min or 944.8 inch/
min”.

F command 1 = 0.000 I mrnhev


(Metric input) Range: 0.0001 to 200.0000 mrnlrev 1
F command 1 = 0.000001 inchhev
(Inch input) Range: 0.00000 I to 7.874015 inchhev I
S command 1=1 rev
Range: 1 to 4500 rev I

4-40
(3) Part Program Using Solid Tap Commands

(a) M** ~ommand

This command selects the gear range used for solid tap cycle. If no such M code
is specified, A gear is selected.

(b) G93 command

When the G93 command is executed, the spindle stops and the solid tap mode is
established with the position loop set for the control of the spindle.

It is also possible to execute spindle indexing to position the spindle at a fixed posi-
tion before establishing the solid tap mode after the spindle has been stopped. To
execute spindle indexing, change the setting for parameter (pm 1053 D2 = 1). Note
that spindle indexing to the fixed position is possible only when the spindle and the
spindle PG rotate at a 1 : 1 ratio.

The solid tap mode is cancelecl by G94.

4-41
(c) G84 command

How the tapping cycle is executed in the solid tap mode is described below.

0
o ------ . . ... . . --- Initial point level
4
@: @
i
R-point level
@
\
@
@@

E Z-point level
@

Note: For spindle motion, linear pattern acceleration/deceleration is automatically applied. The time constant is set for
parameter pm2471.

Fig. 4.16 Tapping Cycle Executed in the G84 Mode

Positioning at the position specified by X and Y


Positioning at the R-point level
Spindle rotating in the fcmvard direction, and cutting to the Z-point level at the spe-
cified feedrate (at the start of this block, the number of servo lag pulses is checked
for the spindle and the Z-axis whether it is within the allowable number error de-
tect ON)
Spindle stop (the number of servo lag pulses is checked for the spindle.)
Dwell (if P command is specified.)

Spindle rotating in the reverse direction, and cutting to the R-point level at the spe-
cified feedrate
Spindle stop
Positioning at the initial. point level (in the G98 mode)

4-42
4.1 PROGRAMSUPPORT FUNCTIONS (1)

(d) G74 command

If G74 is specified instead of G84, the same operation is executed with the excep-
tion that the spindle rotates in the reverse direction instead of h-ward rotation in
step @ and that the spindle rotates in the forward direction instead of reverse rota-
tion in step@.

(e) G94 command

The G93 solid tap mode is canceled when the G94 command is executed. In the
solid tap canceled mode, the G84/G74 cycle is executed in the conventional tap-
ping mode.

Example of programming and description of operation

Example of Programming

NI G92 XO YO ZO ;
(M**) ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...@
N2 G93 -. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0
N3 G98G90 ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..@
N4 G84 XIOO. Y1OO. Z-50 1?–20. F1. S3000 ; . . . . . . @
N5 X200. Y200. .“ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @
N6 X1 O. Y1O. .“ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @
N7 G80 .“ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @
N8 G94; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...@

Operation
Spindle drive gear range is selected (A/B). If the transmission gears are not pro-
vided, A gear is selected.

Solid tap mode ON

Modal information of the canned cycle

Tapping in the solid tap mode at (100., 100.) in 1 mm pitches.

Tapping in the solid tap mode at (200., 200.) in 1 mm pitches.

Tapping in the solid tap mode at (10., 10.) in 1 mm pitches,

Canceling the canned cycle

Solid tap mode OFF

4-43

.—. ——--. ——. ——.—.. ——


(4) Relationship between the Solid Tap and Other Operation

(a) Dry run

Whether the solid tap cycle or the conventional tapping should be executed when
G93 is executed with the DRY RUN switch ON can be selected by the setting for
a parameter.
I
pm4016 D6=0 I Conventional tapping cycle \

pm4016 D6= 1 Solid tap cycle

If a tapping cycle is called up with the setting of“pm4016 D6 = O“, the cycle is
executed in the following manner.

If G93 is executed with the DRY RUN switch set ON, G93 is invalid and the
G84JG74 command called up in the solid tap mode is processed as the G84/G74
command called up in the conventional tapping mode. The feedrate for this opera-
tion is determined by the setting of the JOG switch. Once the solid tap mode is en-
tered with the DRY RUN switch ON, the G84/G74 command is processed as if the
command were called up in the conventional tapping mode even if the DRY RUN
switch setting is changed from ON to OFF during the execution of the cycle. There-
fore, the spindle does not start even when G93 is executed.

For the execution of the G93 block, whether the DRY RUN switch is ON or not is
judged when the G93 code is read. Usually, this state is determined while the com-
mands in the preceding block are executed. Therefore, when G93 is operated with
DRY RUN ON for program check, etc., be sure that the DRY RUN switch is ON
from the beginning and do not change it before completion.

(b) MST function lock

If G93 is executed with the MST FUNCTION LOCK switch set ON, G93 is invalid
and the G84JG74 cycle is executed in the conventional tapping mode. Spindle
position is not controlled, either.

Whether the solid tap cycle is executed with the MST function lock state or not is
judged when the G93 code is read. Therefore, if the G93 program should be
checked in the MST function lock state, the MST LOCK switch must be set ON
from the beginning of operation so that it will not be turned ON during the opera-
tion.

4.-44
4.1 PROGRAM SUPPORT FUNCTIONS (1)

(c) Machine lock, axis-dependent machine lock

If tapping cycle is executed in the solid tap mode with the MACHINE LOCK
switch or Z-AXIS LOCK switch of axis-dependent machine lock switches set ON,
although the spindle rotates, Z-axis does not move but only the position data are
updated.

(d) Feedrate override and spindle override

During tapping cycle in the solid tap mode (G84 or G74), feed override is fixed at
1009”. Note that override for rapid traverse is valid. Spindle override is also inval-
id during tapping cycle in the solid tap mode and fixed at 100?h.

(e) Feed hold

During tapping cycle in the solid tap mode, feed hold is invalid.

(f) Mode change

During tapping cycle in the solid tap mode, mode change is invalid.

(9) Program re-start

If the program is restarted from a block in the solid tap mode, G93 is not executed.
Therefore, to restart a program. from a block in the solid tap mode, it is necessary
to enter and execute G93 in tha MDI mode.

(h) Special options for canned cycles

Although an E command for reciprocal feed does not cause arl alarm, it is disre-
garded. The return feedrate is set for parameter pm 1252.

(5) Supplements to the Solid Tap Function

● In the G93 block, only S, F, and N codes can be specified. If other commands
are specified in the G93 block, alarm “0250” occurs.

● In the G93 mode, an S code is processed as the S command for solid tap opera-
tion.

4 -4.5
● In the G93 mode, only G codes indicated below can be specified. If a G code
not indicated below is specified, alarm “0250” occurs. Concerning GO 1, al-
though it can be specified in the G93 mode, axis move commands cannot be
specified.

G codes that can be specified in the G93 mode


GOO,GO1,G04,G70,G71, G72, G74, G80, G84, G90, G91 , G98, G99

“ Spindle indexing cidled in the G93 mode is the indexing to the fixed position
in reference to the zero point pulse (C-axis) that is output from the spindle PG.

● If the G93 mode is established once, the spindle will fail to start even if the G93
mode is canceled by G94 unless M03 or M04 is specified. Note that this fea-
ture is determined ‘by the processing sequence of the machine. Although an
S command remains, gear selection signal is not output in the G93 mode. Ac-
cordingly, it is necewa~ to specify an S command again when specifying M03
or M04.

c If there is more than one gear range, it is necess~ to select the gear range to
be used for solid tap before specifying G93. Execute G93 only after the ap-
propriate gear has been selected.

● Concerning the R-point and Z-point level commands, G98/G99, G90/G91, L


command, etc., all the precautions described for conventional tapping opera-
tion apply.

“ The output voltage for spindle forward rotation/reverse rotation in G84/G74


cycle will have a different sign according to the setting for the parameter. If
“pm1001 DO=O “ , “+” for the forward rotation, and if “pm 1001 DO= 1”, “-”
for the forward rot:ition. For reversing the spindle rotation direction, the NC
automatically reverses the sign without using SINV signal.

● To specify G94 after the completion of solid tap, make sure to cancel the
canned cycle by specifying G80.

. When G94 is specified after the completion of solid tap, an F command value
is reset to “O”. Make sure to specify an F command when a program including
cutting feed is specified after the designation of G94.

4-46
4.1 PROGRAMSUPPORT FUNCTIONS (1)

(6) Functions Related to Solid Tap

If the options related to the solid tap function are selected, the following functions are
added or modified.

(a) Display of synchronization error in solid tapping

c While in the solid tap mode, the servo lag error display screen displays the fol-
lowing data.

X-axis . . . Spindle servcl lag error

Y-axis . . . Synchronization error between the spindle and Z-axis

Note that the value indicated for Y-axis is not accurate if the operation is
executed continuously (single block OFF).

“ If“pm4015 D6 = 1”, it is possible to display the peak value of the number of


synchronization error pulses for X-axis and Z-axis. (X-axis: Positive peak val-
ue; Z-axis: Negative peak value)

(b) Error detect in the solid tap mode

By setting” 1” for parameter pm4015 D5, it is possible to set the error detect OFF
mode for rapid traverse (X- and Y-axis positioning, Z-axis positioning) during sol-
id tap.

By this setting, cycle time can be reduced. In this case, the program must be made
carefully since the program advances to the Z-axis block immediately after the
completion of pulse distribution for the positioning of the X- and Y-axis.

(c) High-speed return speed in solid tap

● By setting a numeral “n” for parameterpm 1252, the cutting speed is controlled
during solid tap so that the feedrate in the return motion will be “n” times (O.1
~ n —
— ~ 25.5) the feedrate applied in the cutting motion.

pm1252 Programmable range: O to 255


Setting: 1 = 0.1 times (If “pm 1252= O“, setting of
“ 1” is equivalent to 1 time.)

● For spindle speed, the value of “S command value X multiplication ratio” is


clamped at the maximum speed for solid tap.

4-47

.—-—-—.— —..—— ——-....—...—— —.— ..——. .—— -—— ..—..—..


(d) Alarm code

Table 4.12 List of Alarm

~larm Code Description Causes

0250 A command not ● In the G93 block, a command other than G93, S, F, and N is
allowed in the specified.
solid tap mode ● G93 is specified in other than the GOOor GO1 mode estab-

lished by the 01-group G code.


● A G code not allowed in the G93 mode is specified.

● Pitch F specified for solid tap operation is greater than the al-

lowable maximum value (200 mrru’rev).


I — —

L
2191 Solid tap inputi ● When solid tap operation is executed, the position control loop
output error is not established for the spindle.
● When spindle indexing is executed, SLPC is turned OFF be-

fore the completion of indexing.

(7) Parameters and input/Output Signals Related to Solid Tap Function

(a) List of parameters

Table 4.13 List of Parameters

Item Parameter Setting and Setting Range

Spindle speed for checking pm1225 : 1st spindle gear A Setting 11 r/rein
spindle stop after indexing pml 226 : 1st spindle gear B Range 1-255
Error detect ON area with pm1331 : Ist spindle gear ~L Setting 1=1least detect-
spindle position loop established pm1332 : Ist spindle gear !3 able increment
Range 1-255

Servo error area with spindle pm1351 : Ist spindle gear A Setting l=l%
position loop ON pm1352 : 1st spindle gear El Range 0-200

Spindle speed for command volt- pm 1415 : 1st spindle gear A Setting 1 = lr/min
age of 10 V with the gear used pm 1435 : Ist spindle gear E! Range 1-32767
for solid tap
I
Maximum spindle speed for sol- ]m 1416 : 1st spindle gear A Setting 1 = lr/min
id tap >m1436 : 1st spindle gear F, Range 1-32767

Spindle position loop gain for >m1417 : Ist spindle gear A Setting 1=0.01(1/s)
solid tap ]m 1437 : Ist spindle gear !3 Range 1-32767
*
In-position width for solid tap ~m1500 : Solid tap A gear Setting 1 = 1 pulse
servo axis to be accelerated to )m1501 : Solid tap B gear Range 0-32767
the target point

Solid tap synchronization com- >m1502 : Solid tap A gear Range -32767-32727
pensation parameter (k 1) om1504 : Solid tap B gear 1

4-48
4,1 PROGRAM SUPPORT FUNCTIONS [1)

Table 4.13 List of Parameters (cent’d)

Item Parameter Setting and Setting Range

Solid tap synchronization com- pm 1503 : Solid tap A gear Range -32767-32727
pensation parameter (k2) pm 1505 : Solid tap B gear

Spindle gear ratio for solid tap- pm1510 : 1st spindle gear A: Number of teeth at the spindle side Setting 1 = I tooth
ping pm151 I : Ist spindle gear A: Number of teeth of intermediate Range 0-32768
gear (spindle)
pm1512 : Ist spindle gear A: Number of teeth of intermediate
gear (motor)
pm1513 : 1st spindle gear A: Number of teeth at the motor side
pm1514 : 1st spindle gear B: Number of teeth at the spindle side
pm1515 : 1st spindle gear B: Number of teeth of intermediate
gear (spindle)
pm1516 : 1st spindle gear B: Number of teeth of intermediate
gear (motor)
pm1517 : 1st spindle gear B: Number of teeth at the motor side

Linear pattern spindle accelera- pm2471 : 1st spindle gear A Setting l=lms
:ionldeceleration time constant pm2472 : 1st spindle gear B Range 0-32767
Forsolid tapping

Spindle indexing start speed pm2541 : 1st spindle gear A Setting 1 = 1 r/rein
pm2542 : 1st spindle gear B Range 0-32767
creep speed for spindle indexing pm2546 : 1st spindle gear A Setting 1 = 1 r/rein
pm2547 : 1st spindle gear B Range 0-32767

(b) List of input/output

Table 4.14 List of input/Output Signal

Item Address

Solid tap spindle selection input #31155


(STGR I) *H
4.1.4 Deep-hole Solid Tap Function (G184, G174)*

When carrying out large-diameter hole tapping or deep-hole tapping operation, it is difficult
to finish tapping in a single step of tapping operation due to chips accumulated inside the hole
and cutting load that increases as tapping cycle progresses. In such cases, tapping cycle has
to be repeated until the thread is cut to the bottom of the hole.

The tapping cycle can be repeated by a single block of commands by specifying the G 184
or G 174 command in the solid tap mode (G93).

(1) Commands

The G codes used for deep-hole solid tapping are indicated below.

Table 4.15 G Codes Used for Deep-hole Solid Tapping

Reverse deep-hole solid tapping


=~

4-50

.—
4,1 PRCIGRAM SUPPORT FUNCTK)NS(l)

(a) Addresses

Basically, the same addresses as used in the G84/ G74 solid tapping cycle are used
in the G 184 / G 174 deep-hole solid tapping operation in the same format. The ad-
dresses that are used specially for the deep-hole solid tapping are indicated below.

Table 4.16 Addresses Used for Deep-hole Solid Tapping


— ——.
iddress Description Unit Programmable Range

Used to specify the depth of feed for each


1 = 0.001 mm,
Q infeed cycle in an unsigned incremental val- O~m , inch 0.001 to !199999.999 mm
ue.

Used to specify the depth of feed for the
1 = 0,001 mm, 0,001 to !~99999.999 mm,
I first infeed cycle in an unsigned incremental 0,000 ~ inch
0.000 I to 99999.9999 mm
value.
— —
Used to specify increment/ decrement
1 = 0.001 mm, 0.001 to !~99999.999 mm,
J amount of depth of feed in an unsigned in-
0.0001 inch 0.0001 to 99999.9999 inch
cremental value.
— ——.
Used to specify the depth of feed for the last
infeed cycle in an unsigned incremer,tal val-
1 = O.001 mm, 0.001 to 999999.999 mm,
K ue.
0.0001 inch 0.0001 tc 99999.9999 inch
When “I -(n - 1) x J < K’, the value spe-
cified for K is taken as the depth of feed.
.
Used to specify the feedrate multiplication
ratio to be applied when moving up the Z-
E axis (retraction operation). If no E com- 1 = 0.1 (Note)1,‘2 0.1 to 25.5
mand is specified, the value set for pm 1252
is used.

Used to specify the levels (tool retraction
start levels) where the tool is retracted to the
R-point level in an unsigned incremental
1 = 0.001 mm, 0.001 to ‘999999.999 mm,
c value. These levels (C-point levels) are set
0.0001 inch 0.0001 tc 99999.9999 inch
in intervals of the value set for address C
starting from the R-point level in the direc-
tion to the Z-point level.

Used to specify the chamfering amount for
G184 /G174 cycle by parameter pm0873.
1 =0.001 mm
6 Note that the vaIue must always be input in (Note)3 o to 999999999
“mm” even if the tapping cycle is pro-
grammed in the inch mode.
—I —
Note 1: .4n E command specified in a canned cycle is usually treated as the command for E feed (mm/min, inchhnin).
However, if an E command is specified in the G 184/ G 174mode, it is treated as the feedrate multiplying com-
mand and, therefore, the unit of command differs from the unit applied to normal E commands.
2: .41thoughthe E command is modal if it is used in a canned cycle.,the modal value before the change of a G code
becomes invalid if a G code of 09 group is changed to G 184/ G174 from a G code other than these.
3: With the G 174command, the same tapping operation is executed as with the cycle called by the G 184command
with the exceptions that the tapping is carried out in the reverse rotation or the spindle and that the spindle rotates
in the forward direction for tap retraction operation.

4-51

————. ——-.——--—-— ..—,,.— -————.


(2) Operation

There are two types of deep-hole solid tapping operations as indicated below.

● R-point return type (type A)

● Pecking cycle type (type B)

Which of the types should be used can be selected by the setting for parameterpm4016.

Type A pm4016 D4=0

L
Type B I pm4016 D4= 1 I

(a) R-point return type (type A)

The R-point return type includes the two types of commands such as fixed pitch
command and variable pitch command.

● Fixed pitch command

Example of Programming

G93;
G184(or G174)X+
E . . S. -L”.;
x . . . Y“””;

Solid ~p mode ON, G94 Solid tap mode OFF

Deep-hole solid tap, G 174 Reverse deep-hole solid tap

F--
G184/G174

x, Y Hole position (mm, inch)

L-
IR
t
Z Distance from the R-point level to the bottom of the hole, or the position
of the hole bottom (mm, inch)

R-point level (mm, inch)

Iw W-point return level (mm, inch)

IQ Depth of feed in each infeed operation (mm, inch)


I
1P
}
Dwell time at the Z-point level (bottom of the hole) (see) I
Thread pitch (mm/rev, inch,kev)
I
IE Feedrate multiplication ratio for retraction to the R-point level I

L-
IL
Spindle speed (r/rein)

Number of repetitions I

4-52
4,1 PROGRAM SUPPORT FUNCTIONS (1)

@
Q,
------
+---------- ~ -,-, Initial point level

‘6
-1---- -- -~ -- R-point level

‘1[
Q~@5
----
i @
Q;

-i------ - @
Q{

II
-1-------G-
Q; Q

-i ------------- - --- z.pOi”tlf+@


0-”--Single-block s?op position

Fig. 4.17 Tapping Cycle with Fixed Pitch Cc)mmand

Operation (Gl 84 mode)

Positioning at the hole po:sition specified by X, Y

Positioning at the R-point level

Starting the spindle in the forward direction; Z-axis feed by the distance speci-
fied by Q at the specified feedrate

Stopping the spindle

Starting the spindle in the reverse directicm; Z-axis retraction to the R-point
level at the specified feedrate

Stopping the spindle

Repeats steps @ to@ by changing tapping feed distance to “Q x n“.

When the Z-point level is reached, the spindle stops and d\vell is executed (if
a P command is specified).

Starting the spindle in the reverse directicm; Z-axis retraction to the R-point
level at the specified feed:rate

In the G98 mode: Positicming at the initial point level


In the G98 mode with a W command: Positioning at the W-point level
In the G99 mode: Cycle completes at the R-point level.

4-53

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


—------ .——----—-——--- —-— ,.-. —.——--- .——
--
“ Variable pitch command

Example of Programming

G93;
G184(or G174)X+ O“ Y+ ““Z+ ““R+ “. W+ ““1-oJ..K””P””
F . . E“” S”. L”;
x . . . Y“””;
G94;

G931G94 Solid tap mode ON, G94: Solid tap mode OFF

G184/G174 Deep-hole solid tap, G 174 Reverse deep-hole solid tap

x, Y Hole pcxition (mm, inch)
.
z Distance from the R-point level to the bottom of the hole, or the position
of the hole bottom (mm, inch)

R R-point level (mm, inch)

w W-point return level (mm, inch)

I Initial value of feed distance (mm, inch)

J Decrement value of feed distance (mm, inch)

K Last value of feed distance (mm, inch)



P Dwell time at the Z-point level (bottom of the hole) (see)

F Thread pitch (mm/rev, inch/rev)

E Feedrate multiplication mtio for retraction to the R-point level

s Spindle speed (r/rein)



L Number of repetitions

454
4.1 PROGRAMSUPPCIRTFUNCTIONS (1)

r-l

,-f
---.-
V ......
@~------------------?---
q
63 ,—L JL
@
--
Initial point level

R-point level

‘ ‘~~i~l[
@~
I

---
t
I-J I @

I-2J
1------
I
0

-?---------
l-(n-l)J
&-----------
--------- -------
K-
[ -------
K~%-------------------
------- ------- ----- Z-point level

Fig. 4.18 Tapping Cycle with Variable Pitch Command

Operation (G I 84 mode)

Positioning at the hole position specified by X, Y

Positioning at the R-point level

Starting the spindle in the forward direction; Z-axis feed by the distance speci-
fied by I at the specified feedrate

Stopping the spindle

Starting the spindle in the reverse direction; Z-axis retraction to the R-point
level at the specified feedrate

Stopping the spindle

Repeats steps @ to@ by increasing tapping feed distance by “I – (n – 1) J“


from the previous feed distance until “Increased amount of feed distance
~
— K>>
Feed distance in the nth cycle = I + (I - J)+- (I - 2J) + (I -- 3J) ...
+(1–(n–l)J)
— nXI--(~(i–l))XJ
j=]

=nXI--n(n2-1)XJ

Infeed to the Z-point level by taking the feed distance that satisfies “Increased
amount of feed distance < K“ as value K.

When the Z-point level is reached, the spindle stops.

4-55

—=— .,——-. ———. — .—.


—. ————
@ Dwell is executed according to the P command,

o Starting the spindle in the reverse direction; Z-axis retraction to the R-point
level at the specified feedrate

@ In the G98 mode: Positioning at the initial point level


In the G98 mode with a W command: Positioning at the W-point level
In the G99 mode: Cycle completes at the R-point level.
.—..——

(3
SUPPLE-
MENT
The tapping operation is executed in the fixed pitch cycle if I = O, or there is no J com-
mand.

If K = O, or there is no K command, alarm 0162 “LACK OF ADDRESS” occurs,

4.-56
4.1 PROGRAMSUPPORT FUNCTIONS (1)

(b) Pecking cycle type (type B)

The pecking cycle type includes the two types of commands such as fixed pitch
command and variable pitch command.

● Fixed pitch command

Example of Programming

G93;
G184(or G174)X+ ““ ‘t+ ““ Z+ .. R+ .“ W+ “.Q”” C”. P”” F””
E . . S.-L”;
x . . . Y“””;
G9~

G931G94 Solid tap mode ON, G94 Solid tap mcde OFF

G184G174 Deep-hole solicl tap, G174: Reverse deep-hole solid tap

\ X, Y I Hole position (mm, inch)

z Distance from the R-point level to the bdtom of the hole, or the position
I of the hole bottom (mm, inch)

R+---
Depth of feed in each infeed operation (mm, inch)

Dwell time at the Z-point level (bottom of the hole) (see)

~incwrev)
Is
‘–
Feedrate multiplication ratio for retraction to the R-po nt level

I Spindle speed (r/rein)


-
L Number of repetitions

c C-point level (mm, inch)

4-57

.-.. -- —-. -.. ...— .——. ——.. — __ ——.———


>,,
Q, @
_t--_--r.
-r-;__i---
H Z-point level
@ @

Fig. 4.19 Tapping Cycle with Fixed Pitch Command

Operation (G 184 mode)

Positioning at the hole position specified by X, Y

Positioning at the R-point level

Starting the spindle in the forward direction; Z-axis feed by the distance speci-
fied by Q at the specified feedrate

Stopping the spindle

Starting the spindle in the reverse direction; Z-axis retraction by “6” at the spe-
cified feedrate

Stopping the spindle

Starting the spindle in the forward direction; Z-axis feed by “Q + ~“ at the spe-
cified feedrate. This is repeated until the Z-position level is reached.

When the Z-point level is reached, the spindle stops and dwell is executed ac-
cording to the P command.

Starting the spindle in the reverse direction; Z-axis retraction to the R-point
level at the specified feedrate

In the G98 mode: Positioning at the initial point level


In the G98 mode with a W command: Positioning at the W-point level
In the G99 mode: Cycle completes at the R-point level.

4-58

-.
4,1 PROGRAM SUPPCIRT FUNCTIONSfl)

—... —. —-. ——..-.—... _———.—--- —.— .. ..—

(3
SUPPLE.
MENT
1. If a C command is specified, the following operation is executed when the cut
level reaches the C-point level.

. The spindle stops and then starts rotating in the reverse direction; Z-axis
retracts to the R-point level at the specified feedrate.

. The spindle stops.

. The spindle starts rotating in the forward direction; Z-axis is fed to “C + Q“


level at the specified feedrate.
2. The E command is valid for the retraction operation from the C-pc}int level to the
R-point level and from the Z-point level to the R-point level. It i.s not valid for
the Z-axis retraction by “6”.
--...— .—.— —

4-59
● Variable pitch command

Example of Programming

G93;
G184(or G174)X+ ““ Y+ ““ Z+ .. R+ .. W+ 001.”J”.K..C..
P . . F“” E”o S”” L””;
x . . . Y“””;
G94;

w G 184/G174

x, Y
Solid tap mode ON, G94 Solid tap mode OFF

Deep-hole solid tap, G 174 Reverse deep-hole solid taIJ

Hole position (mm, inch)


i

D z

R
Distance from the R-point level to the bottom of the hole, or the position
of the hole bottom (mm, inch)

R-point level (mm, inch) 7

H+
IJ
W-point return level (mm, inch)

Initial value of feed distance (mm, inch)

I Decrement value of feed distance (mm. inch)


7
I

I
Last value of feed distance (mm, inch)

+t- Dwell time at the Z-point level (bottom of the hole) (see) {
IF I Thread Ditch (mm/rev. inchhev) I
IE I Feedrate multiplication ratio for retraction to the R-point level I
Is I Spindle speed (r/rein) I

4-60
4.”1 PROGRAMSUPPORTF
UNCTIONS(l)

v, a)
... .. q------------------
?
-- Inithlwintlevel

-- ------ -- ”.- .
R-point level
?

c
@

------- -----

------
--- -{-
__:!: -
8 .-
c
------ q---
------
------
---------
------
--
-----------
~li
----
-51. -

Z-point level
+--%--’ 6)6i-
c“ @ ‘--
Fig. 4.20 Tapping Cycle with ‘Variable Pitch Command

Operation (G I 84 mode)

@ Positioning at the hole position specified by X, Y

@ Positioning at the R-point level

coStarting the spindle in the forward direction; Z-axis feed by the distance speci-
fied by I at the specified feedrate

@ Stopping the spindle

@ Starting the spindle in the reverse direction; Z-axis retraction by “6” at the spe-
cified feedrate

@ Stopping the spindle

@ Repeats steps @to @by changing the feed distance to”1 – ( n – 1) J + b“ until
“I – (n – 1) J 5 K“ is satisfied.

@ If .’Feed distance < K“, the value of “K + h“ is taken as the feed distance and
the cycle is repeated until the Z-position level is reached.

@ When the Z-point level is :reached, the spindle stops.

@ Dwell is executed according to the P command.

o Starting the spindle in the reverse direction; Z-axis retraction to the R-point
level at the specified feedrate.

@ In the G98 mode: Positioning at the initial point level


In the G98 mode with a W command: Positioning at the W-point level
In the G99 mode: Cycle completes at the R-point level.

4-61

——..——..---.——— .- —-.-—
(3
SUPPLE-
klEtIJT
1, If a C command is specified, the following operation is executed when the cut
level reaches the C-point level.

. The spindle stops and then starts rotating in the reverse direction; Z-axis
retracts to the R-point level at the specified feedrate.

. The spindle stops.

. The spindle starts rotating in the forward direction; Z-axis is fed to “C + I


+ (n – 1) J“ level at the specified feedrate.
2. The E command is valid for the retraction operation from the C-point level to the
R-point level and from the Z-point level to the R-point level. It is not valid for
the Z-axis retraction by “8”.

3. The tapping operation is executed in the fixed pitch cycle if J = O, or there is no


J command.

If K = O, or there is no K command, alarm 0162 “LACK OF ADDRESS” occurs.

4-62

—--- .—.
4,1 PROGRAM SUPPORT FUNCTIONS (1)

(3) Supplements to the Deep-hole Solid Tapping F:unction

● If theG184/Gl 74 command is specified in the G94 mode, the solid tapping


is executed in the G84 / G74 mode using the addresses of X, Y, Z, F, S, R, and
P.
● In the GI 84/Gl 74 mode, feed override and spindle override are fixed at 100~o.
Note that rapid traverse override is valid.
● During the execution of a tapping cycle, single-block stop is not executed and
only the cycle is suspended at the R-point level. Concerning the feed-hold
stop, the points where the cycle execution is suspended differ depending on
the selected type of tapping cycle.

Feed-hold stop is not executed during tapping.


If the FEED HOLD switch is pressed during the execution I
Type A
of a tapping cycle, the operation stops afl:erthe completion
(R-point return type)
of chamfering. (The same position as the single-block stop
position.)
I
I If the feed hold switch is pressed during tapping, Z-axis
retracts to the R-point level instead of retraction by “b”.
If the feed hold switch is pressed during the retraction by
Type B
“h”, Z-axis retracts tc, the R-point level after the completion
(pecking cycle type)
of the next feed.
After the operation is suspended due to feed hold, the re-
maining tapping cycle is executed by restart operation. I

4-63

. ..—.—. .——..—— ..—. — .. .——. —..


4.1.5 Circle Cutting (G12, G13) *

The circle cutting function allows a series of circle cutting operation to be executed by the
commands specified in a single block.

(1) Programming Format

The following programming format is used to specify circle cutting.

G12(or G13)I””” D”. .F ...;


Y-axis

utting tool

X-axis

Fig. 4.21 Circle Cuttimg Commands (GI2, G13)

4-64
4.1 PROGRAMSUPPORT FUNCTIONS (1)

(a) Description of the addresses

c High-speed feed interval (designation R

By specifying “G12 (or G13) I “ “ “R - “ -D . “ “F “ .0 ;“, circle cutting is


executed in the manner shown in Fig. 4.21. The interval in which a cutting tool
is moved at a high speed can be specified by R. In Fig. 4.22, the intervals@
and @ indicate the high-speed feed intervals.
Y-axis

Mting tool

X-axis

(tool path)
G12: @-@ -@-@ ‘@-+@)
G13: @-@ *@-@ ‘@-+@)
G12 : CIOCkwiSe (CW)
GI 3: Counterclockwise (CCW)
I : Radius 01 finished circle (signed incremental value)
R : High-speed feed interval (signed incremental value)
D : Tool radius offset number
F : Feedrate for cutting

Fig. 4.22 High-speed Feed Interval Designation by R

4-65
Designation of circle section repetition by L

By specifying ‘“G12 (or G13) I “ . “ D ~“ “ L .0 “ F “ “ “ ;“, circle cutting is


executed by repeating cutting at the circle section by L times.

Spiral circle cutting designation by Q and K

Byspecifying’’G12 (or Gl3)I “ - “D “ “ “K o “ “Q “ “ “F “ “ “ ;“,thecycleto


cut a circle by controlling the spiral cutting tool path shown in Fig. 4.23 is de-
fined.
Y-axis
A

~ X-axis

Q: Arc radius increasing increment


1: Radius of spiral starting circle
K: Radius of circle to be finished

Fig. 4.23 Spiral Circle Cut Designation by Q and K

● Combination of designation of rapid traverse section, repeat command, and


circle cutting in spiral

Byspecifying ``GIJ?(or G13)I. ." R"". (orJ""-)K" .. Q-"- L". "F".";'',


it is possible to combine the addresses indicated above.
4.1 PROGRAM SUPPORT FUNCTIONS (1)

● High-speed feed intewal i~utomatic calculation designationby J

By specify ing’’G12 (or G13) I . “ “J “ “ uD “ . “F . “ “ ;”, thehigh-speedfeed


intervals can be calculated automatically. ‘Toshow how the spiral path is gen-
erated, the illustration is given assuming tool radius (D) of O.
Example of Programming

Goo Z–40. ;
G13 1-50. J-7. D15 F300 ;
Goo Z40. ; D15=–8.Omm
8.0 Tool radius
I .L /7.0 Cutting allowancs

w{
/

11 w-----i ~
> J: Cutting allowance

w High-speed feed interval calculated aUtOrTlatically

Fig. 4.24 High-speed Feed Interval Automatic Calculation lDesignation by J

4-67
(2) Notes and Supplements to the Circle Cutting Function

● Circle cutting is possible only in the XY plane. If circle cutting is specified


in a plane other than the XY plane, alarm “0361” occurs.
● The feedrate to be selected for axis move in the high-speed feed intervals is
set for parameter pm2862. It is possible to override this feedrate. However,
when the DRY RUN switch is ON, the dry run feedrate is used.
● In the circle cutting mode (G12, G 13), the tool paths are generated by compen-
sating for the tool radius independent of the designation for the tool radius off-
set function called up by G41 and G42.

G12 and G13 must be specified in the G40 (tool radius offset cancel) mode.
If these G commands are specified in other than G40 mode, alarm “0182” oc-
curs.
● Movements in the “X-” direction (symmetrical to Y-axis) are possible by
changing the signs of I, J, K, and D. In the example as shown in Fig. 4.25, a
negative value should be assigned for I, R, (and D). Note that cutting is not
possible by Y-axis movements.
Y-axis

Cutting

X-axis

(tool path)
G12: @ @ ‘@ -4 o
G13: @*@-@ +3 0
D: Tool radius offset number

Fig. 4.25 Movements in the “X-” Direction (Symmetrical to Y-axis)

4-68
4.1 PROGRAM SUPPORT FUNCTIONS(l)

● I, J, K, R, Q,and Lspecifiadi nthecirclec luttingb lockarei ~llvalidonlyinthe


specified block. Among these addresses, iit least I must be specified. If none
of these addresses is spec ifled, alarm “0362’” occurs.

c The restriction indicated below applies for I (radius of circle to be finished)


and R (high-speed feed interval). If this restriction is not satisfied, high-speed
feed is not executed. \

lR-dl < 11-dl

Also note that high-speed feed is not possible if the signs c,f “R-d” and “l-d”
differ from each other.

“ Before specifyingG12orG13, specify the tool radius offset number D. If this


is omitted, the offset motion is determined by the setting for a parameter.

E+EJS.-P,.,
_–+ Ofiset is applied using the D number specified previously.

m
A

4-69
4.1.6 Mirror Image ON/OFF (M94, M95) *

The mirror image function can be turned ON and OFF by specifying the following M codes
in a program.

Table 4.17 Mirror Image ON/OFF M Codes

M94 and M95 are modal. When the power is turned ON and when the NC is reset, M94 is
set. M94 and M95 must be specified in a block without other commands.

u
A (1) Specifying the Mirror Image Application Axes

The axes for which the mirrcr image is applied are set using the parameters pmOO02 DO
to pmOO03 DO or by using the mirror image axis setting switches on the machine opera-
tion panel.

The mirror image axis setting switches are used to set the axes for which symmetrical
machining should be executed. Set parameter “pm5001 D1 = 1” and turn ON the
switches corresponding to the axes. For the designated axes, the mirror image function
is applied from the block next to the one in which M95 is specified; mirror image re-
mains valid until M94 is specified. Note that the mirror image application axes must
not be changed in the M95 :mode.
4.1 PROGRAM SUPPORT FUNCTIONS (1)

(2) Mirror Image ON (M95)

Mirror image is applied to the specified axes from the block next tcl the one in which
M95 is specified. In the mirror image mode, the specified axes move in the direction
opposite to the direction specified in the program.

The mirror image function is executed in the same manner independent of the dimen-
sioning mode (absolute or incremental). The position at which M95 is specified is taken
as the mirror-point,

Y-axis

u----o

/!/


Programmed

\
path

F
_+—-----
M95
Mirror image ON for X-axis

X-axis

Fig. 4.26 Mirror Image ON (M95)

4-71

———.. .—. .—— —,.. —— .—-.. ———” —— .— --—-—---- .—-— ——. —


(3) Mirror Image OFF (M94)

For the blocks after the block in which M94 is specified, mirror image is canceled.

The mirror image function must be called up and canceled at the same point. If mirror
image is canceled at a point different from the point where mirror image has been called
up, axis movements after the cancellation of mirror image are offset from the pro-
grammed paths by the amount equivalent to the difference between these two points.
Example of Programming

NOI G92 XO YO ;
N02 M95 ; + Mirror image ON
N03 G90 GO1X40. Y40. F300 ;
N04 X120. ;
N05 Yloo. ;
N06 X40. ;
N07 Y40. ; If “M94;” is entered here, the commands in the following
<“ blocks are executed in the manner as shown by dotted lines.
N08 Xo Yo ;
N09 M94 ; + Mirror image canceled correctly
N1O X20. Y-40. ;
Nll X60. ;
+Y
X-axis mirror image ON Programmed paths
~. —._l-l —100 -—

I t I i1
A
‘L. —--_! ’_.–4(J .
//’
k
/’ ‘
/’
L, L +x
–120 -80 \, -40-2 2 L 20 40 60 120

‘!,
‘..F---*_~o w
4
Axis movements caused by Correct axis movements
incorrect cancellation of mirror
image

Fig. 4.27 Disagreement between Mirror Image Call Up and Cancel Positions

4-72
4.1 PROGRAM SUPPORT FUNCTIONS [1)

(4) Mirror Image External Input Function

In addition to the conventional mirror image function, it is possible to set the mirror
image execution mode when the power is turned ON or the NC is reset by appropriate
parameter setting.

If the parameter setting is made so that the M95 mode is set when the power is turned
ON or when the NC is reset, it is possible to select whether or not the mirror image func-
tion is called up at the intermediate positioning point for G28 operation.

The following indicates how this function should be used:

● When the power is turned ON or when the NC is reset.

pm400 1 DO= O M94 mode (mirror image OFF) 1


pm4001 DO= 1 M95 mode (mirror image ON)
J

To specify G28 or G29 with the parameter setting of “pm4001 DO= O“, it is
necessary to turn OFF the mirror image function by specifying M94. If G28
or G29 is specified without turning OFF the mirror image function, alarm
“01 27” occurs.

4-73
● When the M95 mode is set at power ON (pm4001 DO= 1)

r
~
pm4001 D2=0

pm4001 D2 = 1
Mirror image is applied to the intermediate positioning point of
G28.

Mirror image is not applied to the intermediate positioning point


of G28.
L

Example of Programming

G90 GOO XO YO ;
GOO X1OO. Y50. ;
G28 X40. Y1OO. ;

Y Reference point

-@-
X-axis mirror image
ON
/i&’

/“
L’ Srammedpaths

“-\
++ -40 c 40 100

Fig. 4.28 Example of Mirror Image Application (X-axis) to G28 Intermediate


Positioning Point
4.1 PROGRAM SUPPCIRT FUNCTIONS (1)

(5) Supplements to the Mirror Image ON/OFF Function


Before specifying G28 or G29 to execute tool change or to end machining,
make sure to turn OFF the mirror image function by specifying M94. If G28
or G29 is specified without canceling the mirror image function, alarm “O127”
occurs.
● The mirror image function is invalid for offset distance used by the tool length
offset function. In the mirror image mode, the present position data (POS) dis-
play the actual tool movements.
● Using the mirror image function with the workpiece coordinate rotation, scal-
ing, and/or coordinate rotation function

The functions must be specified in a predetermined order. If they are specified

u
by disregarding the predetermined order, alarm “0285” occurs.

Workpiece coordinate rotation (G54) > Mirror image (M94) A


> Scaling (G51 ) > Coordinate rotation (G68)
● If the scaling function is called up in the mirror image mode, it is applied to
the center point of scaling.

If the coordinate rotation function is called up in the mirror image mode, it is


applied to the center of rotation and also in the direction of rotation.
● If the axes for which mirror image is applied are specified using the M code,
buffering of the M codes which set and reset the axes must be disabled by the
setting for appropriate parameters (pm4400 to pm4409).

4-75

————— ——.—.-— ——-—..———. —————. —- ————.


4.1.7 Programmable Data Input (G”l O) *

By using the G1O command, it is possible to write the tool offset amount and the work coordi-
nate system.

(1) Setting the Tool Offset Amount

The tool offset amount can be set by using the specially provided screen. By using a
program, the tool offset amount is set in either of the following two types (H and D used
in common, and H and D used independently).

(a) When H and D are used in common

By specifying “G1O L,1OP “ “ “R 00 “ ; (P: tool offset number, R: tool offset


amount, L1 O: omissible)”, the tool offset data of the specified tool offset number
can be changed to the required amount.

● If G1O is executed in the G90 mode, the value set for R is saved as the tool off-
set amount.

● IfG1OisexecutedintheG91 mode, the value set for R is added to the existing


offset amount.

(b) H and D used for different offset data

The format used to write the offset amount differs between H code and D code.

● For H code

G1O L1OP . “ “R “ . “ ; (L1O: omissible)

● For D code

G10L12P””” R”””;
or
GIOQIP””” RO ””;

4.-76
4.1 PROGRAM SUPPORT FUNCTIONS(l)

(2) Changing Workpiece Coordinate System *

The workpiece coordinate system shift amount is set for G54 to G59 by using the spe-
cially provided screen. By using a program, the workpiece coordinate system shift dis-
tance is set in the following manner.

G10Q2PmJnX”””Y””.Z”..(*ct” ““~-..);
or
G10L2Pm JnX. ”” Y”. .Z. ”. (*lx ””” p’””);

c Q2 and L2 are used to discriminate the setting of the workpiace coordinate sys-
tem shift distance from the setting of the tool offset amount.

● Pm (m: 1 to 6) corresponds to the workpiece coordinate system number (m)


to be set.

Without P or P 1 I G54 I

I P2 I G55 I
,
P3 I G56 I
I P4 I G57 I
I P5 I G58 I
P6 G59
--

● Jn (n: 1 to 27) corresponds to the expanded workpiece coordinate systems.

4-77
The programmable data input function is summarized in the table below.

Table 4.18 Programmable Data Input Format

Type Format

H/D used in G1OL1O P..R”c;
common G1O P “R””;

G1OL1O P. R.;
Offset H
H/D used for G1O P ..oR..;
different off- —
set functions G1OL12 P. R..; I
D
G1OQ1 P“”Ro”;

L

Work coordi-
nate system
shift distance
1--- 6 pairs

54 pairs
G1O Q2
Glo L2

GIO Q2
GIO L2
PI - P6 (without J, JO, Jl)
PI - P6 (without J, JO, Jl)

P1-P6J1-J9
P1-P6J1-J9
Axis shift distance;
Axis shift distance;

Axis shift distance;


Axis shift distance;
1

G1O Q2 P] -P6 Jl -J27 Axis shift distance;


162 pairs
G1O L2 PI-P6 J1-J27 Axis shift distance;

Note: When the workpiece coordinate system shift distance is changed, the specified value is saved as it is independent
of the G90 or G91 mode.

4-78

————— ——,
4.1 PROGRAM SUPPORT FUNCTIONS (1)

4.1.8 Subprogram Call Up Function (M98,, M99)

This function can be used when subprograms are stored in the part program memory. Sub-
programs registered to the memory with program numbers assigned earl be called up and
executed as many times as required,

The created subprograms should be stored in the part program memory before they are called
up.
o ......... . — Program number
. . . . . . . . . . . . .
>
. . . . . . . . . . . . .
............ .
M99 ; ~ End of subprogram

(1) Commands

The M codes indicated in Table 4.19 are used.

Table 4.19 Subprogram Call M Code

I M Code I Function I

M98 Subprogram call up

M99 End of subprogram +

(a) Subprogram call (M98)

c By specifying “M98P “ “ “L “ = . ; “, the subprogram of the program number


that is specified by P is called up and executed by the number specified by L.
If L is omitted, the subprc)gram is executed once. If the specified program
number is not found, alaml “0390” occurs.

● Nesting of subprograms is possible - the allowable nesting level is four. If the


nesting level exceeds this limit, an alarm occurs.

● By specifying “M98P . “ “L o “ “Q “ o “ ; ‘“the subprogram specified by the


P command is executed from the block specified by the Q command. A se-
quence number must be specified by a numeral of up to five digits.

4-79

—.—— ___ .—_.


——-..—.—
(b) End of Subprogram Code (M99)

At the end of a subprogram, M99 must be specified in a block without other com-
mands. Upon execution of M99, the program automatically returns to the block
in the main program next to the one where the subprogram has been called up.
Fig, 4.29 shows how a subprogram called up from the main program is executed.
Example of Programming

Main Program Subprogram


0100 ; 0200 ;
NOOIGOO ”””””; r ,I NOO1 ”..;
;, :,
NO02 M98 P200 L3 ; N002 ”..””;

:1
;, :,
N003 . ...”.
NO04 M98 P200 ; .....
J
N005 .”””; N050 M99 ;
IT
First time Third time

Fig. 4.29 Execution of A Subprogram

● By specifying “M99P . . “ “ “ ; “, the program returns to the block specified


by the P command. in the main program instead of the block next to the one
where the subprogram has been called up.

● If M99 is specified in a main program, the program returns to the beginning


of that main progri~m and the program is repeatedly executed.

4-80


4.1 PROGRAM SUPPORT FUNCTIONS (1)

4.1.9 Polar Coordinate Interpolation (Gl 26, G1 27)*

This interpolation feature allows the machining to be accomplished by the combination of


tool movements and rotation of a workpiece in the virtual orthogonal coordinate system. Ma-
chining is possible for the section around the axis of rotation by using the commands in an
orthogonal coordinate system. To use this function, an additional axis of rctation is necessary
in addition to the normal servo axes (X, Y, and Z axes).

The polar coordinate interpolation permits the setting of arbitrary axes using parameters.

The number of the linear axis used for polar coordinate


pmOIOO interpolation
Setting range: 1- 3(1 =X,2=: Y, 3 = Z)

The number of the rotary axis used for polar coordinate


pmOIOl interpolation
Setting range: 4,5 (4= a, 5 = [3)

(1) Commands

(a) Features of G126 and G12~7commands

The polar coordinate mode is turned ON and OFF by the G codes indicated below.

Table 4.20 G Codes Used to Turn ON/OFF the Polar Coordinate Mode

H+%===+-++
G127 Polar coordinate mode OFF
l-—u

Specify the G 126 andG127 commands in a block without other Icommands. If oth-
er G codes are specitled with the G 126 or G 127 command in the same block, alarm
0161 “UNMATCH G CODE” occurs.

The G 126 and G127 commands are modal and once the G1 2.6 command is speci-
fied, the polar coordinate mode remains ON until the G 127 command is specified
next. The NC is in the G 127 (polar coordinate mode OFF) mode when the power
is turned ON or when the NC is reset.

4-81

—_..—.—.—__...—. .—.. --. —. —-


(b) Feedrates in polar coordinate interpolation

Since the F command in the polar coordinate interpolation mode is specified in the
virtual orthogonal system, the feedrate of the rotary axis is restricted by the setting
for parameter pm2800 for which the allowable maximum feedrate for the linear
axis is set.

In addition, the restriction due to the servo system (rapid traverse of the rotary axis)
is applied to the rotary axis. When creating a program, pay attention so that actual
feedrate (peak feedrate) of the rotary axis, which is determined by the F command
in a program and the cclordinate value (workpiece diameter), will not exceed the
rapid traverse rate. This must be very important when carrying out interpolation
near the center of the workpiece.

● Limits on feedrates

To restrict the actual feedrate of the rotary axis so that it will not exceed the
rapid traverse rate, the following must be satisfied.

F/D = (n/360) X (rapid traverse rate of the rotary axis)

F (mrn/min) : F command x feed override


D (mm) : The diametric value of the position where the axes
move closest to the center of the workpiece.
If the offset function is used, the paths after offset must
be taken into consideration.

● Example of calculation

. To obtain the maximum value of the F command (override setting is as-


sumed to be 100970)

Conditions:

To carry out 15 mm wide grooving at the center of the workpiece

12 mm dia. end mill is used.

The rapid traverse rate of the rotary axis is 12000 deg/min.

F/(15 - 12) ~ (Jc/360) X 12000

F ~ 314

4-82
4.1 PROGRAM SUPPCIRT FUNCTIONS(l)

From the calculation indicated above, it is kaown that F300 may be specified
in a program.
c+
I\

012

>
x+

Fig. 4.30

. To find the allowable minimum diameter for the operation conducted at


F80.

Conditions: The rapid traverse rate of the rotary axis is 12000 deg/min.

80/D S (n/360) X 12000


D ~ 0.764

From the result of the calculation made above, the operation (:hatcause the tool
paths (after offset) to move closer to the center exceeding this value is not al-
lowed.

4-83

..—.
.——
(2) Example of Programming

The following program is created on the polar coordinate plane where the X-axis is tak-
en as the linear axis and the C-axis is taken as the rotary axis.
+C
80

60

<----,40 -----

,<- - ‘ 20
A
+x
–8 –60 –40 –20 o+ 20 ,’60 80- -0
V – 20 J’
[.
.
I–40
‘%
< Q--- ‘].;6!- . ‘

–80

Example of Programming

G40; G80;
G67;
G50; G69;
N1260 GOO X1OO. CO.;
G126; + Polar coordinate mode ON
G42 D1O;
G90 GOO Z50.;
GOI X50. F500;
GO1 C20. F1O();
G03 X30. C40. R20.;
GO1 X-20.;
G02 X-50. C1O, R30.;
GO1 C-30.;
X-30. C-50.;
x-lo.;
C-60.;
X20.;
C-20.;
X40. co;
G40 GO1 X1OO. F50();
GOO Z1OO.;
G127; ~ Polar coordinate mode OFF

Fig. 4.31 Example of Programming

4-84
4.1 PROGRAMSUPPORT FUNCTIONS (1)

(3) Programming in the Polar Coordinate Mode

In the polar coordinate mode, only the following G codes can be used: GOO,GO1, G02,
G03, G04, G1O, G40, G41, G42, G65, G66, G67, G90, G91, and Cr127. Concerning
the GOOcommand, onl y the axes not included in the polar coordinate plane can be desig-
nated in the GOOmode. If a G code other than those indicated above is specified in the
polar coordinate mode, alarm 0161 “UNMATCH Cl CODE” occurs.

(a) GOO (positioning command)

The GOOcommand can be specified only for the axes which are i~ot included in the
polar coordinate plane. If positioning command is specified ~or an axis not in-
cluded in the polar coordinate plane, alarm 0483 “PROG. ERROR IN G 126
MODE’ occurs. If positioning is required for the axis which is included in the polar
coordinate plane, the polar coordinate mode must be canceled once.

(b) GO1 (linear interpolation command)

This command can be specified for all axes. However, it is not allowed to specify
the axis included in the polar coordinate plane and the one not included in the polar
coordinate plane in the same block. If these axes are specified in the same GO 1
block, alarm 0483 “PROG. ERROR IN G 126 MODE” occurs.

The designation of the end point for the linear interpolation should be made in ei-
ther “mm” or “inch” for both the linear and rotary axes.

Feedrates of the axes are controlled so that the vector sum (tani~ential velocity in
the direction of tool movement) of the linear axis feedrate and the rotary axis fee-
drate will be the feedrate specified in the program.

(c) G02/G03 (circular interpolation commands)

The circular interpolation commands can be specified only for the axes included
in the polar coordinate plane. The circular interpolation command in a plane other
than the polar coordinate plane causes alarm 0192 “CANNOT DECIDE CIRCU-
LAR SURFACE”. If helical interpolation is specified in [he polar coordinate
plane, alarm 0191 “TOO MANY AXIS IN CIRCULAR” occurs.

4-85
The designation of the end point for the circular interpolation should be made in
either’’mm” or “inch” fcmboth the linear and rotary axes. The radius for the circular
interpolation should be specified by an R command or by specifying the center of
the arc. When an R command is used, designation of the radius should be made
in either “mm” or “inch”. If the center of the arc should designated instead of the
R command, specify the distance from the start point to the center of the arc by
signed incremental value using addresses I, J, and K.

● If the linear axis is X-axis, use I and J assuming the XY plane.

● If the linear axis is Y-axis, use J and K assuming the YZ plane.

● If the linear axis is Z-axis, use K and I assuming the 2X plane.

Specify the distance to the center of the rotary axis in either “mm” or “inch”. Con-
cerning the feedrate, specify the tangential velocity in reference to the tool moving
direction like in the linear interpolation.

(d) G40/G41/G42 (tool radius offset C)

The tool radius offset C function can be used only in the polar coordinate plane.
The D command specifying the offset memory number may be specified in any
block.

To execute tool radius offset in the polar coordinate plane, turn ON the polar coor-
dinate mode and the tool radius offset mode. If the polar coordinate mode com-
mand is specified while in the tool radius offset mode, alarm O161 “UNMATCH
G CODE” occurs. The commands can be specified in the same manner as in the
normal mode.

The tool path in the polar coordinate plane is offset by the tool radius set in the tool
offset data memory. The direction of offset is specified by G41 and G42.

It is necessary to cancel the offset by specifying the G40 command before turning
the polar coordinate mode OFF. If the polar coordinate mode is turned OFF while
in the tool radius offset mode, alarm 0182 “UNUSABLE G COMMAND IN OFS
MODE” occurs.

(e) G90/G91 (absolute/ir~cremental commands)

It is allowed to change the dimension data designation mode between absolute and
incremental while in the polar coordinate mode. Designation can be made in the
same manner as in the normal mode.

4-86
4.1 PROGRAM SUPPCIRT FUNCTIONS (1)

(4) Display of Position Data

● In the polar coordinate mocle, the machine coordinate values indicate the actu-
al machine position.

. Linear axis (mm or inch)

. Rotary axis (deg.)

● Although the external present position data of the axes in tht polar coordinate
plane do not give the correct position in the polar coordinate mode, the pre-
vious position data display is recovered by executing the Cr127 command.
● The present position data of rotary axis in the polar coorclin ate plane is “O” in
the workpiece coordinate system when the G 126 commancl is specified.

The previous coordinate value is recovered by executing theG127 command.


If the rotary axis has rotated exceeding + 360°, the coordinate value in the
workpiece coordinate system is not clamped at a value in the range of t 360°.
● In the polar coordinate mode, the display unit of the polar coordinates and the
rotary axis is changed from “deg” to “mm” or “inch” for the workpiece coordi-
nate values and the position display of the remaining distance.

● The remaining distance display, given in the polar coordinate mode, expresses
the remaining distance in the polar coordinate plane and it differs from the re-
maining distance in the machine coordinate system.
● If an axis is moved manual Iy while in the polar coordinate mode, the position
does not change except the machine coordinate system data.

4-87
(5) Relationship between the Polar Coordinate Interpolation and Operations

c The following functions cannot be specified in the polar coordinate mode.


Similarly, it is not allowed to specify the G126 command while any of the
functions indicated below is called.

. Mirror image
. Scaling(G50,G51 )
. Coordinate rotation (G68)
. Workpiece coordinate rotation (G54R)
. Geometry offset function
. High-speed cutting command
. Base coordinate system setting (G92)

● In the polar coordinate mode, the manual absolute function is fixed at OFF.
Although manual intervention is possible, the following tool paths are shifted
by the manually operated distance. This distance is processed at the comple-
tion of the G 127 block.

● In the polar coordinate mode, program restart is not possible. If a program is


restarted from the block which is specified in the polar coordinate mode, alarm
0483 “PROG. ERRORING126 MODE’ occurs. Note that the program re-
start is possible for blocks that contain the commands in the polar coordinate
mode.

Q Overrides (rapid traverse, jog, spindle speed) are valid.

● Polar coordinate interpolation is possible in the dry run mode. Feed com-
mands are executed at the feedrate set as the dry run feedrate.

● In the polar coordinate mode, the program interrupt function(M91 ) is invalid.


If program interrupt takes place while in the polar coordinate mode, alarm
0484 “PINT. ERR IN G 126/G 128” occurs.

● When the polar coordinate mode is canceled, the interpolation plane selected
before the call of the polar coordinate mode is recovered.

● In the polar coordinate mode, chamfering and comer rounding function is in-
valid. If chamfering or comer rounding command is specified in the polar
coordinate mode, alarm 0483 “PROG. ERROR IN G 126 MODE” occurs.

● In the polar coordinate mode, the stored stroke limit function is valid. In the
polar coordinate mode, however, the SOT function before axis move is invalid
and the entry to the prohibited area is not checked.

4.-88
4.1 PROGRAM SUPPORT FUNCTIONS (1)

G The polar coordinate interpolation function cannot be specified while the pro-
gram path drawing function is executed. While the NC path is being drawn,
it is not possible to draw l.he path in the polar coordinate plane.

(6) Supplements to the Polar Coordinate Interpolation Mode

● In the polar coordinate interpolation mode, the rotary axis .n the polar coordi-
nate plane is treated as the linear axis. Therefore, the unit of commands must
be “mm” or “inch” instead of “degrees”. The same input increment as selected
for linear axes must be used.

c At the time the polar coordinate mode is called by executing theG126 com-
mand, the origin of the workpiece coordinate system of the linear axis in the
polar coordinate plane ancl the center of the rotary axis must be coincided with
each other. If these points are not at the same position, the accuracy of the ma-
chined profile is not guarimteed.
A
It must also be taken into consideration that the workpiece coordinate value
of the linear axis, in the polar coordinate plane, must be positive when the polar m
coordinate mode is turned ON. If the mode is turned ON while the coordinate
value is negative, alarm 0482 “G 126/Gl 27 COMMAND ERROR’ occurs.

● Feedrate specified by F indicates the feedrate (mm/min, inc h/rein) in the polar
coordinate plane. In the polar coordinate mode, interpolation is executed in
the virtual plane. Therefore, specify the feedrate in the polar coordinate plane
after the entry to the polar coordinate mode. Concerning the restriction on the
feedrates in the polar coordinate interpolation mode, refer to item (6).

● Although M, S, and T commands may be specified in the polar coordinate


mode, it is not allowed to specify these commands with G 126 and G 127 com-
mands in the same block. Also it must be understood that the offset data cannot
be changed even if tools are changed in the polar coordinate mode.

If an M, S, and/or T command is specified. with theG12!6 or G127 command


in the same block, alarm ()125 “M, S, T CANNOT CONIMAND” occurs.

● In the polar coordinate mc)de, it is allowed to use macro system variables and
macro control statements. However, the workpiece shift amount and offset
amount used in the polar coordinate mode must not be changed by the macro
system variable. If changed, an alarm could occur,

4-89
● To execute tool length offset, specify the tool length offset command before
specifying the G126 command.

It.is not allowed to change the tool length offset command and the tool offset
number while in the polar coordinate mode. To change these, it is necessary
to cancel the polar (coordinate mode once. Alarm 0483 “PROG, ERROR IN
G 126 MODE” occurs if the tool length offset command (includes cancel com-
mand) or offset number is changed in the polar coordinate mode. The same
alarm occurs if axis offset movement occurs as the result of changing the offset
amount.

c The workpiece shift command (G54 – G59) must be specified before specify-
ing the G 126 command. If a workpiece shift command or its cancel command
(G52) is specified while in the polar coordinate mode, alarm 0161 “UN-
MATCH G CODE” occurs.

● Although it is possible to enter the polar coordinate mode with the tool position
offset ON, the tool position offset command must not be specified in the polar
coordinate mode. Cancel the offset amount before specifying the G 126 com-
mand.

● In the polar coordinate mode, the following restrictions apply to the program-
mable data input ccjmmands.

. An alarm occurs if the workpiece shift data in memory is changed.

. An alarm occurs if the tool length offset data in memory is changed. (Note
that the tool radius offset data can be changed.)

If the offset data of the offset being executed is changed while in the polar
coordinate mode, alarm 0483 “PROG. ERROR IN G 126 MODE” occurs.
4,-1 PROGRAM SUPPC)RT FUNCTIONS (1)

4.1.10 Cylindrical interpolation (G128, G12(9)*

This interpolation feature allows the machining to be accomplished by the combination of


tool movements and rotation of a workpiece in the virtual orthogonal coordinate system. Ma-
chining is possible on the circumference of cylindrical workpiece by using the commands
in an orthogonal coordinate system. To use this function, an additional axis of rotation is nec-
essary in addition to the normal servo axes (X, Y, and Z axes).

The cylindrical interpolation permits the setting of arbitrary axes using parameters.

The number of the linear axis used for cylindrical interpolation


pmO105
I Setting range: 1-3 (1 =X,2= Y, 3 = Z) I
The number of the rotary axis used for cylindrical interpolation
pmO106
Setting range: 4,5 (4= ci, 5 = ~)
!I I

u
1 —

A
(1) Commands

(a) Features of G128 and G129

The cylindrical interpolation mode is turned ON and OFF by the G codes indicated
below.

Table 4.21 G Codes Used to Turn ON/OFF the Cylindrical Interpolation Mode

‘-=5
G Code

Cylindrical interpolation mode ON


~ ’128
G129 Cylindrical interpolation mode OFF
____-l-- 22 J

These G codes are buffering G codes.

Specify the G128 and G129 commands in a block without other commands. If oth-
er G codes are specified with the G 128 orG129 command in the same block, alarm
0161 “UNMATCH G CODE” occurs.

The G 128 andG129 commands are modal and once the G 128 command is speci-
fied, the cylindrical interpolation mode remains ON until the G 129 command is
specified next. The NC is in the G 129 (cylindrical interpolation mode OFF) mode
when the power is turned ON or when the NC is reset.

4-91
(b) Programming format

G128R””c ; + Cylindrical interpolation mode ON


~ Machining program in the cylindrical interpolation mode

G129R; - Cylindrical interpolation mode ON


where, R = radius of cylindrical workpiece
(1 = 0.001 mm or 0.0001 inch)

Make sure to specify the radius of the cylindrical workpiece. If the R command
is not specified, alarm 0162 “LACK OF ADDRESS” occurs.

(2) Example of Programming

The following program is created on the cylindrical plane (the plane obtained by devel-
oping the circumference of the cylindrical workpiece) where the Z-axis is taken as the
linear axis and the A-axis is taken as the rotary axis.

,. --,-- ., 180
,,’ ~ .,, ,
l.,

T
,,,

(t, 150

: 4--+
,/
,,,

1,

.,
[
----’
,,
,,) ( :

.
~:
(:., 120

“I$t$
‘“j; ; [
i
l“,
-2-: ---+---
90

60

30

360 330 300 270 240 210 180 150 120 90 60 30 0

4-92
4.1 PROGRAMSUPFORT FUNCTIONS (1)
——

Example of Programming

G40;
GOO 230. A-10.;
G128; G57.296; +- Cylindrical interpolation mode ON
(workpiece radius= 57.926)
G90:
G42 GO1 AO F200;
GOO X50.;
GOI A90. F1OO;
G02 A120. 260. R30;
GO1 290.;
2120. A150.;
2150.;
G03 2150. A21O. R30;
GO1 290.;
2120. A150.;
2150.;
G03 2150. A21O. R30.;
G02 2120, A240. R30;
GO1 A300.;
230. A330.;
A360,;
GOO X1OO.;
G40 GO1 A370.;
G129; - Cylindrical interpolation mode OFF
GOO AO;

Fig. 4.32 Example of Programming

4-93
(3) Programming in the Cylindrical Interpolation Mode

In the cylindrical interpolation mode, only the following G codes can be used: GOO,
GO1, G02, G03, G04, G1O, G40, G41, G42, G65, G66, G67, G90, G9 1, and G129. Con-
cerning the GOO command, only the axes not included in the cylindrical plane can be
designated in the GOOmode. If a G code other than those indicated above is specified
in the cylindrical interpolation mode, alarm 0161 “UNMATCH G CODE” occurs.

(a) GOO (positioning command)

The GOOcommand can be specified only for the axes which are not included in the
cylindrical plane. Positioning is not possible on the cylindrical plane. If position-
ing is required for the axis which is included in the cylindrical plane, the cylindrical
interpolation mode must be canceled once.

(b) GO1 (linear interpolation command)

This command can be specified for all axes. However, it is not allowed to specify
the axis included in the cylindrical plane and the one not included in the cylindrical
plane in the same block. If these axes are specified in the same GO1 block, alarm
0481 “PROG. ERROR ING124 MODE” occurs.

The designation of the end point for the linear interpolation should be made in ei-
ther “mm” or ‘“inch” for both the linear and rotary axes.

Feedrates of the axes are controlled so that the vector sum (tangential velocity in
the direction of tool movement) of the linear axis feedrate and the rotary axis fee-
drate will be the feedrate specified in the program.

(c) G02/G03 (circular interpolation commands)

The circular interpolation commands can be specified only for the axes included
in the cylindrical plane. The circular interpolation command in a plane other than
the cylindrical plane ca~ses alarm 0192 “CANNOT DECIDE CIRCULAR SUR-
FACE”. If helical interpolation is specified in the cylindrical plane, alarm 0191
“’TOO MANY AXIS IN CIRCULAR” occurs.
4.1 PROGRAM SUPPC)RT FUNCTIONS (1)

The designation of the end point for the circulalr interpolation should be made in
either “mm” or “inch” for both the linear and rotary axes.

The radius for the circular interpolation should be specified by an R command or


by specifying the center of the arc. When an R command is used, designation of
the radius should be made in either “mm” or “inch”. If the center of the arc should
be designated instead of the R command, specify the distance from the start point
to the center of the arc by signed incremental value using addresses I, J, and K.

● If the linear axis is X-axis, use I and J assuming the XY plane.

Q If the linear axis is Y-axis, use J and K assuming the YZ plane.

● If the linear axis is Z-axis, use K and I assuming the 2X plane.

Specify the distance to the center of the rotary axis in either “mm” or “inch”. Con-
cerning the feedrate, specify the tangential velocity in reference to the tool moving
direction like in the linear interpolation.

(d) G40/G41/G42 (tool radius olfset C)

The tool radius offset C function can be used only in the cylindrical plane. The D
command specifying the offset memory number may be specified in any block.

To execute tool radius offset in the cylindrical plane, turn ON the cylindrical inter-
polation mode and the tool radius offset mode. If the cylindrical interpolation
mode command is specified while in the tool radius offset mode, alarmO161 “UN-
MATCH G CODE” occurs. The commands can be specified in the same manner
as in the normal mode.

The tool path in the cylindrical plane is offset by the tool radius set in the tool offset
data memory. The direction of offset is specified by G41 and G42.

It is necessary to cancel the offset by specifying the G40 command before turning
the cylindrical interpolation mclde OFF. If the cylindrical interpolation mode is
turned OFF while in the tool radius offset mode, alarm 0182 ““UNUSABLE G
COMMAND IN OFS MODE” occurs.

(e) G90/G91 (absolutehncremental commands)

It is allowed to change the dimension data designation mode between absolute and
incremental while in the cylindri cal interpolation mode. Designation can be made
in the same manner as in the normal mode.

4-95

.-—.—..-. .— .—— ———


.——-———
(4) Relationship between th{>Cylindrical interpolation and Operations

● The following fun.ctions cannot bespecified in the cylindrical interpolation


mode. Similarly, it is not allowed to specify the G 128 command while any of
the functions indicated below is called.

. Mirror image
. Scaling (G50, G51)
. Coordinate rotation (G68)
. Workpiece coordinate rotation (G54R)
. Geometry offset function
. High-speed cutting command
. Base coordinate system setting (G92)

● In the cylindrical interpolation mode, the manual absolute function is fixed at


OFF. Although manual intervention is possible, the following tool paths are
shifted by the manually operated distance. This distance is processed at the
completion of the G 127 block.

● In the cylindrical interpolation mode, program restart is not possible. If a pro-


gram is restarted from the block which is specified in the cylindrical interpola-
tion mode, alarm 0481 “PROG. ERROR IN G 124 MODE’ occurs. Note that
the program restart is possible for blocks that contain the commands in the cy-
lindrical interpolation mode.

● Overrides (rapid traverse, jog, spindle speed) are valid.

c Cylindrical interpolation is possible in the dry run mode. Feed command are
executed at the feedrate set as the dry run feedrate.

● In the cylindrical interpolation mode, the program interrupt function(M91 ) is


invalid. If program interrupt takes place while in the cylindrical interpolation
mode, alarm 0484 “PINT. ERR IN G 126/G 128” occurs.

● When the cylindrical interpolation mode is canceled, the interpolation plane


selected before the call of the cylindrical interpolation mode is recovered.

● In the cylindrical interpolation mode, chamfering and comer rounding func-


tion is invalid. If chamfering or comer rounding command is specified in the
cylindrical interpolation mode, alarm 0483 “PROG. ERROR IN G 126
MODE” occurs.

● In the cylindrical interpolation mode, the stored stroke limit function is valid.
In the cylindrical interpolation mode, however, the SOT function before axis
move is invalid and the entry to the prohibited area is not checked.

4-96
4.1 PROGRAM SUPPORT FUNCTIONS [l)

● The cylindrical interpolation function cannot be specified while the program


path drawing function is executed. While the NC path is being drawn, it is not
possible to draw the path in the cylindrical plane.

(5) Accuracy

Since special operation processing is executed in the NC for circuli~r interpolation, an


error is inevitable in the calculated angle at the end point of rotary axis movements.

During the cylindrical interpolation mode, errors are accumulated as rotary axis com-
mands are executed. Angular error in the cylindrical interpolation is,smaller as the val-
ue at the decimal fraction part is smaller in the following calculation.

65536C/2nR R (mm) : Workpiece radius


C (deg) : The angle of rotation of the rotary axis specified in a
block

An error becomes larger as larger values are specified for workpiece radius Rand speci-
fied angle of rotation C. The error generated during the operation ir~ the cylindrical in-
terpolation mode is taken into the rotary axis movement command v alue specified after
the cylindrical interpolation is canceled. The calculation used to find the angular error
is indicated below.

(a) Calculating the error in the position of the rotary axis

● In the “mm” mode:

The angular error “e” (deg.) is calculated using the following formula.

mod (65536C/2JtR) x 2TcRC


e=
65536 X 360 (degj

The error is minimized when the quotient of “65536 C/2ml?” is an integer and
the maximum error is caused if the decimal fraction part o:f “65536 C/2JtR” is
“0.999....”.

● In the “inch” mode:

The angular error “e” (deg.) is calculated using the following formula.
e = mod (65536C/2nR” 10) x 2nRC. 10
65536 X 360 (deg)
The error is minimized when the quotient of “65536C/2nFi c 10“ is an integer
and the maximum error is caused if the decimal fraction part of
“65536C/2nR o10“ is “0.999....”.

4-97
(b) Example of calculation

Example of Programming

GOO AO;
G128 R50.; + Workpiece radius: 50.00 mm
N1 GO1 A360. 12200; ~ Linear interpolation in the range of O to 360
deg. of the rotary axis
G129;
GOO AO;

The following calculates the angular error (e) generated at the end point of block
N 1 after the execution cjf the program above is calculated.
mod (65536 x 360/2n o50) x 271”50”360
e= (deg)
65536 X 360
_ 0.7241234x
— 2Jz”50~
65536x 360

= 0.00347

From the result of calculation indicated above, it is found that if the surfac,e of the
50-mm radius workpiece is machined in the range of 360 deg., angular error of
0.003 to 0.004 deg. is gmerated.

4-98
.—
4.1 PROGRAM SUPPCIRT FUNCTIONS (1)

(6) Supplements to the Cylindrical Interpolation Mode

In the cylindrical interpolation mode, specify the amount the rotary axis is
moved in the cylindrical plane in units of “degrees”. The programmable range
of the rotary axis in the cylindrical plane is A 999999.999.

Feedrate specified by F indicates the feedrate (mrn/min, inch’min) in the cylin-


drical plane. In the cylindrical interpolation mode, interpolation is executed
in the virtual plane. Therefore, specify the feedrate in the cyl.indrical plane af-
ter the entry to the cylindrical interpolation mode.

If an M, S, and/or T comtnimd is specified with the GI 2801- G129 command


in the same block, alarm 0125 “M, S, T CANNOT COMMAND” occurs.

In the cylindrical interpolation mode, it is allowed to use macro system vari-


ables and macro control statements. However, the workpiece shift amount and
offset amount used in the cylindrical interpolation mode must not be changed
by the macro system variable. If changed, an alarm could occur.

To execute tool length offset, specify the tool length offset command before
specifying the G 128 command.

It is not allowed to change the tool length offset command and the tool offset
number while in the cylindrical interpolation mode. To chan,ge these, it is nec-
essary to cancel the cylindrical interpolation mode once. Alarm 0481 “PROG.
ERROR ING124 MODE” (occurs if the tool length offset command (includes
cancel command) or offset :wmber is changed in the cylindrical interpolation
mode. The same alarm occurs if axis offset movement occurs as the result of
changing the offset amount.

The workpiece shift command (G54 - G59) must be specified before specify-
ing the G 128 command, If a workpiece shift command or its cancel command
(G52) is specified while in the cylindrical interpolation mode, alarm 0161
“UNMATCH G CODE” occurs.

Although it is possible to enter the cylindrical interpolation mode with the tool
position offset ON, the tool position offset command must not be specified in
the cylindrical interpolation mode. Cancel the offset amount before specify-
ing the G 128 command.

4-99

. . .—— —.—— —. —-..—.—....——— ..—.—..-. .——-——


● In the cylindrical interpolation mode, the following restrictions apply to the
programmable data input commands.

. An alarm occurs if the workpiece shift memory is changed.

. An alarm occurs if the tool length offset memory is changed. (Note that the
tool radius offset data can be changed.)

If the offset data of the offset being executed is changed while in the cylindrical
interpolation mode, alarm 0481 “PROG. ERROR IN G 124 MODE” occurs.

● It is possible to select the input unit for the rotary axis in the cylindrical inter-
polation mode by the setting for parameter pmO050.

If the travel distance is taken as input unit of the rotary axis, an error is gener-
ated in the range clf + 2 pulses in the distributed pulses. If the angle is taken
as input unit of the rotary axis, an error is generated in the range of + 1 pulses
in the distributed pulses. Therefore, select the angle for the input unit if in-
tended operation requires higher accuracy.

pmO050 DO= O Angle is used as the command (l = 0.001 deg.).

b pmO050 DO= 1 Travel distance is used as the command ( 1 = 0.001 mm or


0.0001 inch). j

4.-100
4.2 PROGRAM SUPPORT FUNCTIONS (2)

4.2 PROGRAM SUPPORT FUNCTIONS (2)

4.2.1 Program Copy (G25)*

By specifying “G25 P (pl p2) -.. Q (q 1 q2) . . . L. . . ; “, the programs can be repeatedly
executed by L times in the range from the block of sequence number “ql ‘“in the program of
program number “p 1” to the block of sequence number “c12”in the program of program num-
ber “p2”.

Table 4.22 Description of Addresses

Address Description T
P pl Program number of copy start program (5-digit O number)
! — 4
I IP2 I Copy start sequence number (4-digit N number) I

IQ
I
b~ \ q2 I
- - -—––4
Program number of copy end program (5-digit (Onumber) (p 1 = q 1)

sequence number (4-digit N number)

m
copy end
I
IL I Number of repetitions (omission: Ll) I A

CD
SUPPLE.
MENT
1. For both “p 1” and “q 1” commands, leading zeros can be omittecl. For “p2” and
“q2”, omission of leading zeros is not allowed. If more than four digits are speci-
fied for “p2” or “q2”, the four digits from the least significant dij;it are taken for
a sequence number.

2. The O number (ql ) to be specified later can be omitted. In this ciise, the same O
number as specified for “p 1” is assumed.

3. The sequence numbers specified for “p2” and “q2” are searched from the first
block of the specified program. Therefore, the sequence numbers used for the
objective block for search must not be assigned to more than one block. If there
are two or more blocks that are assigned the same sequence number, the block
appearing first is searched.

4. If the specified block or progra:m cannot be searched, an alarm occurs; alarm


“0390” if “pl” cannot be searched, alarm “0393” if “p2” or “q2” cannot be
searched, and alarm “0260” if none of “pl “ , “p2,” and cCq2°can be searched.

G25 can be executed in the tape, MDI, or memory mode operation. However, for the execu-
tion of G25, it is necessary to store the program to be copied to the memory. If more than
one block is assigned the same program number, the block appearing fh-st is valid for search
operation.

4-101
(1) Program Copy Nesting

It is allowed to specify G25 in the program that is copied. This is called program copy
nesting and up to four levels clfprogram nesting are allowed. If the nesting level exceeds
four, or the total nesting (prclgram copy nesting and subprogram call nesting) exceeds
four, alarm “0261” occurs.

If G25 is used with macro program call up (G65, G66), program copy nesting is possible
for up to four levels independent of macro program call up.

E Level O Level 1
< ’25c Level 2
G25

Level 3
< : Level 4

Fig. 4.33 Program Copy Nesting

(a) Example 1 (copying in the same program)


Designation of a program number is not necessary when copying in a program in
the same program.
When the NC is reset, the program returns to
Tape or the beginning of the program set for level O.
memory . ..-
7 ,.r---- ‘emery
,
,

00001, NIOO . . . . . . N200 . . . . . . .


N01G92 ..... N300 . . . . . . .
Ni10 M99 P140:

Simple : 1
N120G25P2’000250; &
N220 M98 P400; .
‘ump
N1OG25PIOOQ15O; REiET ::
Ni40 . . . . . . . ,.
. .

Ni50 , N250. ., N380 M99;


\f- \ ‘
~— L J 1

Level O Level 1 Level 2 Level 3


Program No.: 000001 Program No.: 0[10001 Program No.: 000001 Program No.: 000400

Note TOgi>e G25 in tape, the program number must always be specified with P

(Example) NIO G2j PIOOIOOQ150;

L Program Number

Fig. 4.34 Copying in the Same Program Number

4-102
4,2 PROGRAMSUPPORT FUNCTIONS [2)

(b) Example 2 (copying program of another program number)

Tapeor WhentheNCk reset,the progriimreturnsto


memory Memory thebeginningof the programsetforlevelO.
~. —+------ .- —--—-- ------- ----
1
I
nr

NOlO G25 P1OO1OO; ‘ ]N120 G25 F’IICI0200; I

J’N---J
0100150; IQ1100250; +,U: l\l

. .
. .

n
.-
L.evel O Level 1 Level 2 Level 3
Program No.: 050 Program No.: 010 Program No.: 0110 Program No.: 00065
A
Note If M99 is specified to execute jump to another le~’el,program enters endless loop and cannot exit this loop.

Fig. 4.35 Copying Another Program Number

(2) Supplements to the Program Copy Function


If the NC is forcibly reset due to the occurrence of an error Iorif M30 or M02
is executed to reset the NC during the execution of G25, the program returns
to the beginning of the program in level O.
● If a numeral of four digits cr less is specified for P or Q, it is regarded as a se-
quence number and the sequence number search is executed in the program
of the present program number.
● If M98 is specified in the G25 block, or if M99 is specified in the block desig-
nated by .’p2° and “q2”, alarm “0602” occurs.
● If M99 is specified in a block in the range of blocks beginning with “p2” block
and ending with “q2” block, alarm “0264” occurs.
● When calling up the progra.rn copy function in the canned cycle mode, it is not
allowed to specify the prog:ram copy commands with the canned cycle call up
command in the same block. If specified, the ahrrn “0170” occurs.
● The program copy commands can be specified in the canned cycle mode (G70
to G72, G73, G76, G81 to G89).

4-103

.—..— .—.
4.2.2 Automatic Corner Override (G I 06) *

When cutting the inside of a workpiece, load applied to the cutting tool increases gradually
during the cutting at comers since the area of the cutting tool that is in contact with the work-
piece increases as the tool moves near the corner.

The automatic comer override function automatically changes the cutting feedrate of the cut-
ting tool at a point where load applied to the cutting tool changes. The function calculates
such a point from the allowance specified in the program and the radius of the cutting tool
presently used and overrides the programmed feedrate. The override values are set for pa-
rameters.

(1) Programming Format

G106G01X. .. Y... I(or J) ...;...;


I: Allowance in the X-axis direction
J: Allowance in the Y-axis direction

With the commands indicated above, automatic comer override is executed. In the
G 106 block, axis commands of other than X- and Y-axis are not allowed. If an afis other
than X- or Y-axis is specified or none of X- or Y-axis is specified in the G 106 block, an
alarm occurs.

‘f

L x

g A

Fig. 4.36 Automatic Corner Override

4-104
4.2 PROGRAMSUPPORT FUNCTIONS (2)

(2) Parameters

Override values aresetfor pmameters foreach of theovemideste1Js. Ifallowanceis


greater than the tool radius, the value for pm2 120 is always assumed to be 100.

Table 4.23 Automatic Corner override Parameters

Feedrate Parameter Description


I I ==
Override value applied to the range where an axis moved at F1
F1 pm2120
(1 to 100%)
J
Override value applied to the range where an axis moved at F2
F2 pm2121
I I (1 to 100%) I

The override values must satisfy the following conditions.

rl
● Setting range is from 1 to 100 (%). If a value greater than 100 is set, such a

E
value is disregarded and replaced with 100 (clamped at 100). If “O” is set, A
override is disregarded.

● The values for Fo, F1, and F2 must be “FO> F1 > F2”. If the value of F2 is great-
er than the value of F1, the value of F2 is replaced with the value of F1.

(3) Operation

As explained above, the function calculates the point where load is applied to the cutting
tool from the radius of tool and the idlowamxa For this calculation, the following three
cases are taken into account according to the position where load is applied.

● Tool radius is not greater than 1/2 of allowance (D 5 I (J)/2)

● Tool radius is greater than the allowance (D > I (J))

● Tool radius is greater than a half the allowance and not greater than the allow-
ance (I (J)/2 e D = I (J))

Note that comer override is valid only in one axis direction. If both X- and Y-axis are
specified, the direction in which override is applied is determined from the specification
of allowance (I, J).

The allowance (I, J) must always be specified. If neither of I or J is specified, or both


I and J are specified, an alarm occurs.

4-105
(a) Tool radius is not greater than 1/2 of allowance
In this. case, override is :not applied independent of the setting for parameters and
feed-rate is clamped at 1<O.
Allowance

m A

,
(
,
/

Fig. 4.37 Automatic Corner Override – Tool Radius S Allowance/2

(b) Tool radius is greater than allowance


Allowance

; -s+

o A’B C

F. = (Programmed feedrate) x (Override VO)


F’, = FO x (pm2120)
F’2 = FO x (pm2121)

Fig. 4.38 Automatic Ccjrner Override – Tool Radius> l/J (Allowance)

4-106
4.2 PROGRAMSUPPORT FUNCTIONS (2)

,/
d- 1
/
Point A (contact point)

Point B (point of mtersectlon)

1 /

Point C

d- A

Fig. 4.39 Feedrate Change F’oints

(c) Tool radius is greater than a half the allowance and not greater than allow-
ance

- Feedrate
F. = (Programmed feedrate) x (Override Yo)
F, = Fo

- Feedrate change points


F2 = F. x (pm2121)

Fig. 4.40 Automatic Corner Override – I (Allowance)/2 < Tool Radius S I


(Allowance)

4-107
Allowance

d
Point A (point of intersection)

t
v

d Point B
(Center of circle comes on dotted line.)

Fig. 4.41
4 .

Feedrate Change Points


Point C

(4) Supplements to the Automatic Corner Override Function

Q When G 106 is specified, the G code mode set by 01-group G code must be
GO1.
If a G code other than GO1 is specified, an alarm occurs.

● It is not allowed to specify G106 in the canned cycle mode. To specify G 106,
it is necessary to cancel the canned cycle mode.

4.108
4.2 PROGRAMSUPPORT FUNCTIONS (2)

4.2.3 Stored Stroke Limit B and C (G22, G23) *

The stored stroke limit function checks whether the present position of axes operated manu-
ally or automatically enters the stored stroke limit (entry prohibited area) which is set by G22.
The No. 2 entry prohibited area is called the stored stroke limit B and the No. 3 to No, 5 entry
prohibited area the stored stroke limit C. If an axis has entered the stroke end limit, operation
is stopped and alarm occurs.

(1) Programming Format

G22X. .. Z.. .J. .. I.. .J. .-K... P. ..;


A

I t
(Upper limit of points (Lower limit of points (Area designation: No. 2- ho. 5)
A2 - A5) B2 - B5)

With the commands indicated above, the function checks the entry of axes into the entry
prohibited area specified by P.

The commands of “G23 P...;” cancell the function to check entry into Ihe prohibited area
specified by P.
Stored stroke limit B
/ /, A2 A2 (X, Y, Z)

<

/ /,

/’ ““”’T
8
56 /’” /“/ //// ‘“”
/
B2 (1, J, K) 82 (1,J, K)
Stored stroke limit B is de- Stored stroke limit B is de-
fined outside the boundary. fined inside the boundary.

Note: If P is omitted, P2 is assumed.

Fig. 4.42 Stored Stroke Limit B, C

4-109
(a) Setting the boundary and area

The parameter numbers used for area designation are indicated in Table 4.24.

Table 4.24 Parameter Numbers Used for Area Designation

L~ No. 2 prohibited area (+): A2 point

No. 2 prohibited area (–): B2 point

No. 3 prohibited area (+): A3 point


I

I
pm0834

pm0837
I

I
pm0835

pm0838
I

I
pm0836

pm0839
1

No. 3 prohibited area (–): B3 point pm0840 pm0841 pm0842

No. 4 prohibited area (+): A4 point pm0843 pm0844 pm0845


,r————
No. 4 prohibited area (–): B4 point pm0846 pm0847 pm0848

No. 5 prohibited area (+): A5 point pm0849 pm0850 pm085 I

No. 5 prohibited area (–): B5 point pm0852 pm0853 pm0854

(b) Designation of check axes

The axes for which stored stroke limit B, C (No. 2 to No. 5 entry prohibited areas)
is checked is designated by using parameters (maximum of three axes).

Table 4.25 Stored Stroke Limit Check Axis Numbers for No. 2 to No. 5 Entry
Prohibit Areas

Stroke Limit Check Axis No. (Note)


Check Area
No. 1 No. 2 No. 3

No. 2 entry prohibited area pm6111 pm6112 pm6113

No. 3 entry prohibited area pm6114 pm6115 pm6116

No. 4 entry prohibited area pm6117 pm6118 pm6119

No. 5 entry prohibited area pm6 120 pm6121 pm6 122

Note: Setting: I = X-axis, 2 = Y-axis, 3 = Z-axis

4-110

—- .—...---. —.——-—
4.2 PROGRAM SIJPF’ORT FUNCTIONS (2)

(c) Parameters used for setting the entry prohibited area outside/inside of the
boundary

Table 4.26 indicates the parameter numbers used for setting the entry prohibited
area outside or inside the boundary.

Table 4.26 Outside/Inside Designation of Entry Prohibited Area


(No. 2 to No. 5)

I Check Area Parameter Nc).‘~=m~”l

● Whether the boundary is included or not into the stored stroke limit is deter-
mined as indicated below.

Table 4.27

I Entry Prohibited Area I Boundary ~ Included/Not Included

Positive direction ~ Included


Prohibited Area Defined Outside — ,_
Negative direction Not included

l--
Positive direction Not included
Prohibited Area Defined Inside
Negative direction Included

Prohibited Area Defined Outside Prohibited Area Defined Inside

Fig. 4.43 Definition of Whether Boundary Is Included in Entry Prohibited


Area

4-111
(d) Turning ON/OFF the !Stored Stroke Limit Check

Whether or not the entry to No. 2 to No. 5 entry prohibited area should be checked
can be designated by the setting for the parameters or by using appropriate input
signals. If input signals are used to set, only stored stroke limit C can be turned
ON/OFF.

● If parameters are used for this setting, check for two entry prohibited area can
be turned ON simultaneously in stored stroke limit B, C (No. 2 to No. 5 entry
prohibited areas).

Table 4.28 Turning ON/C)FF the Stored Stroke Limit C

Check Area Parameter No. Description 1

I
No. 5 entry prohibil.ed area I pmOO08 D3 ~

In addition to the setting for the parameters, it is possible to use the input sig-
nals to turn ON/OFF the stored stroke limit C. The check becomes valid as
the OR condition between the setting by parameter and the input signal.

Table 4.29 Turning ON/OFF the Stored Stroke Limit C

RET 00
Description
1

I
Stored stroke limit check invalid for No. 3 to No. 5 entry prohibited area
01 Stored stroke limit check valid for No. 3 entry prohibited area
1 0 Stored stroke limit check valid for No. 4 entry prohibited area
1 I Stored stroke limit check valid for No. 5 entry prohibited area
1

4-112
4.2 PROGRAM SUPPORT FUNCTIONS (2)

(2) Stored Stroke Limit A

Stored stroke limit A is always executed independent of the axis types whether the ob-
jective axis is linear or rotary. However, for a rotary axis, parameters are provided to
set whether the stored stroke limit check is executed or not. Usually, the setting is for
“not checked”.

Table 4.30 Parameters for Setting Servo Axis Types

-E=a

Note: D6 = O:Linear axis, 1: Rotary axis

Table 4.31 Parameters for Setting Valid/lnva.lid of Stored Stroke Limit for
Rotary Axes

Axis Name

Parameter pm6004 DO
x ,m6:4==a
Note: Stored stroke limitcheck is executedor nc,t executed according to the setting for the b.ts.
O Limit check is not executed.
1: Limit check is executed.

4-113
(3) Supplements to the Stored Stroke Limit B and C Functions

● It is possible to set Iwo areas in stored stroke limit B, C with stored stroke limit
A.

● Whether the stored. stroke limit function is valid or invalid is judged immedia-
tely after the return to the reference point from the setting for the correspond-
ing parameter bits. If the reference point is set in the entry prohibited area, an
alarm occurs; in this case, set the parameter bit so that the stored stroke limit
check function becomes valid after the completion of reference point return
of all axes after power ON.

● If the axis to be checked is in the entry prohibited area, an error occurs immecti-
ately when the stored stroke limit check function becomes valid. In this case,
turn OFF the No, 2 to No. 5 entry prohibited areas by the setting operation and
either change the data or move the axes out of the entry prohibited area manu-
all y.

● If an alarm occurs clue to the entry of an axis into the entry prohibited area, only
the axis movement in the opposite direction is allowed.

● If the machine lock function is ON, stored stroke limit check is not possible.

● With the axes not specified with G22 command, the stored stroke limit check
is executed with thle values set for parameters.

● The stored stroke limits B and C allows the designation of two areas at the
same time. If more than two areas are made valid at the same time, an alarm
occurs.

● When setting the coordinate values for defining a stored stroke limit area
width, set the values which are greater than the value obtained by the calcula-
tion using feedrates. If the stored stroke limit area width is set smaller than
the calculated value, there is a case that an alarm cannot be detected.
Feedrate (mnv’min) + 60 (see) X 6 (msec)
3
Coefficient for detection

(Example)

Feedrate (m/min) Stored Stroke Limit Area Width (mm) 7

L
4 ~ 0.4
24 2.4
36 3.6
J

4-114
4.2 PROGRAM SUPPORT FUNCTIONS (2)

4.2.4 Comment Output Function (Ml 91) ‘r

The function displays the comment entered in a part program on the screen so that an operator
can easily find which part of the program is being executed.

By specifying “M191 / * YASNAC J300M * / ;“, “YASNAC J300M” is displayed at the


warning message output line on the screen. The comment should be enclosed by”/ *“ and
“* /“. If there is an error in the commands, alarm “01 15” (M191 FORIVMT ERROR) is dis-
played on the screen.

● A comment can include up to 16 characters. If a comment includes more than


16 characters, only 16 characters are displayed. If a warning occurs while the
comment is displayed, the comment is cleared and warning message is dis-
played.

● IfM191 is specified with axis move commands in the same block, the entered
comment is displayed after the completion of axis move commands.

● The comment enclosed by the control in ~lnd control out codes is invalid for
this function.

“ If a comment is entered in other than an Ml91 block, it is invalid.

4-115
4.2.5 Break Point Function

The function displays “BREAK POINT!” message and suspends program execution in the
block stop mode when the block assigned with the sequence number that is set for a parameter
is executed. The message “BREAKPOINT!” can be cleared by the cycle start or reset opera-
tion,

The sequence number to call up this function is set for the following parameters:

pm0801 Break point sequence number 1

I pm0802 I Break point sequence number 2 I

u
A
4.2.6 High-speed Cutting *

By converting the linear interpolation mode (GO1) or circular interpolation mode (G02, G03)
commands in the part program memory into the axis move distance per unit time (to be re-
ferred to as segment data), high-speed cutting is made possible.

(1) Programming Format

Enclose the part of program to be operated at high-speed cutting mode with “HON” and
“HOF”.

Example of Programming

(G91 F1OOOO;)
......
HON;
Xloo;
Yloo;
X50;
X50 Y50;
HOF;
.....

4-116
4,,2 pROGRAM SUppoRT FIJNCTIONS (2)

(2) Parameters

(a) Additional axis address

For additional axes, address characters can be selected from A, B, C, U, V, or W


by the setting for parameters pm 1201 and pml ‘202. The address characters to be
used to express basic axes are restricted to X, Y, and Z.

(b) Segment data conversion start and end codes

In this manual, “HON” and “HOF” are used for the start and end codes. However,
the codes are not restricted to these and can be specified in the following range.

● Three alphanumerics (beginning with an alphabet)

“ Those which are not reserved for use in the NC language such as HON, HOF,
A
and G05.
u
Start designation code : Parameters pm41 61, pm41 62, andpm4163

End designation code : Parameters pm41 64, pm41 65, andpm4166

(c) Segment data type

For parameter pm41 67, always set “4”.

(d) Selecting the conversion mcde

For parameter pm41 60, always set” 1”.

(e) Number of axes used for high-speed cutting

Set the number of axes for parameter pm 1200. The setting range is from 3 to 5;
“3” for 3 axes, “4” for 4 axes, and “5” for 5 axes.

(f) Accuracy at corners

Use parameter pm4800 for setting set acceleratiorddeceleration to be applied for


cutting at comers.

If “O” is set, setting of “500 (mm/sec2)” is assumed.

4-117
(9) Acceleration/deceleration

User parameter pm4810 for setting acceleratiotideceleration to be applied for


high-speed cutting with exception of comers.

If “O” is set, setting of “500 (mm/sec2)” is assumed.

(h) Allowable acceleratic)n for circular arc blocks

Use parameter pm4822 for setting the allowable limit of acceleration for circular
arc blocks where high-speed cutting is executed.

If “O” is set, setting of “’500 (mrn/sec2)” is assumed.

(i) Shape offset coefficient

The shape offset coefficient is a constant used to compensate for follow-up error
generated due to servo lag.

Table 4.32 Shape Offset Coefficient


I
I No. 1 OffsetCoefficient No. 2 OffsetCoefficient
X-axis pm1801 pm1781
_ ---—

Y-axis pm1802 pm1782

Z-axis pm 1803 pm1783

4th-axis pm 1804 pm1784

5th-axis pm 1805 pm1785

(3) Input Units

Set 0.001 mm or 0.0001 inch for parameter pmOO07. The unit of output is fixed at 0.001
mm.
4,2 PROGRAM SUPPORT FUNCTIONS (2)

(4) Changing Acceleration/Deceleration for High-speed Cutting

The values set for parameters can be temporarily changed by specifying a new value
in a program by using G202. The command format of the G202 block is indicated be-
low.

Example of Programming

G202 RO.5 K1 .5 QO.5;

;202 \ Non-modal Group G Code


— —
R Acceleration/deceleration (equivalent to pm48 10)
Setting unit: 1 = 1 mrn/sec2
Setting unit 1.0 = 1000 mm/sec2
.
K Comer accuracy (equivalent to pm4800)
Setting unit: 1 = 1 mm/sec2

B
Setting unit 1.0 = 1000 mm/sec2
A
Q Circular interpolation block allowable acceleration (equivalent to~v1823)
I Setting unit: 1 = 1 mm/sec2
~Setting unit 1.0 = 1000 mm/sec2
— — —

● G202 can be used only when the optional high-speed cutting function is se-
lected.

“ G202 should be specified in a block without other commanck. It cannot be spe-


cified with other G codes in the same block. Although G2,02 is a non-modal
command, once set, it remains valid until it is reset.

. G202 should be specified in a block before defining the high-speed cutting


area. If G202 is specified in the high- speeci cutting area, an axis is decelerated
and stopped once and the:n accelerated again after changing the acceleration
to the specified value. Therefore, this could result in damage to the workpiece
due to stopping.

● If G202 is not specified, or for addresses riot specified in the G202 block, the
values set for parameters are used.

● G202 simply updates the parameter set values internally and does not update
the actual parameter values. Therefore, the values set for parameters pm4800,
pm48 10, and pm4823 are not updated.

4-119
(5) Supplements to the High-speed Cutting Function

● For blocks including only feed value (F command), high-speed cutting is not
possible since segment conversion is not possible for such blocks.
● During high-speed cutting, “SHC” or “GHC” is displayed at the operating sta-
tus display area on the screen.
● The single block function is invalid in the area enclosed by “HON” and “HOF”
codes.

During high-speed. cutting, switching of the dimensioning mode between
“mm” and “inch” systems is not possible by using G20 and G21.
● During high-speed cutting, scaling, coordinate rotation, and other functions
are not allowed.
Q
The dry run function cannot be called if the DRY RUN switch is turned ON
during the execution of commands in the area enclosed by “HON” and “HOF”
codes.

In the area enclosed by “HON” and “HOF” codes, external deceleration is not
possible.
● In the area enclosed by “HON” and “HOF” codes, reset key, external reset, and
feed hold are valid.

The subprogram call up code (M98) can be used.
9 In the area enclosecl by “HON” and “HOF” codes, the feedrate specified in the
program is displayed on the PROGRAM EXECUTION screen since special
processing is executed in the NC.

In the area enclosecl by “HON” and “HOF” codes, processing is executed only
for the basic axis (X, Y, Z) and those set for parameters pml 200 to pm 1202.
Therefore, if the parameters are not set correctly, operation is not performed
as programmed. If axis move commands are specified for the axis not set for
parameters, they are disregarded. This does not cause an alarm.

G41, G42, and G40 should be specified in the area enclosed by “HON” and
“HOF” codes. If the high-speed cutting mode is started with G41, G42, or G40
specified before such area, alarm 0189, “OFS ABNORMAL ERROR” (tool
radius offset error) or alarmO181, “RADIUS OFS END ERROR” (tool radius
offset end error) occurs.

4-120
4,2 PROGRAM SUPPORT FUNCTIONS (2)

● For the G41, G42, or G40 program specified in the high-speed cutting mode,
only the following G codes can be specified.

GOO, GO1, G02, G03, G90, and G91

If G codes other than these G codes are specified, alarm “()181” occurs.

The following G codes can be specified in hligh-speed cutting:GO1, G02, G03,


G41, G42, G90 andG91. In addition to these G codes, GOO specified in the
tool radius offset mode is treated as GO1 to execute high-speed cutting.
Axis move commands specified with a G code other than those indicated
above are not converted imo segment data and thus they are processed in nor-
mal mode. Note that designation of G20, G21, G25, G50, G51, G50R, G66,
G67, G68 and G69 causes alarm “0163”.

● When the setting foraparameter is made so that “the tool radius offset C cancel
is made”, alarm “O189” occurs if the HOF code is specified immediately after
the designation of G40. Therefore, to specify G40 in the h igh-speed cutting
mode, either insert a GO1 mode block between the G40 and HOF blocks or en-
ter an axis move commancl in the G40 block.

4.2.7 Chamfering and Corner Rounding Commands

For the continuous linear interpolation blocks or circular interpolation blocks, chamfering
or corner rounding are executed by specif ying “P” or “Q” command. If “’P’”and “Q” are spe-
cified in the same block, chamfering is executed.

(1) Programming Format

Both P and Q commands are non-mcldal commands and should be specified with an ab-
solute value. If a minus sign is used, processing is executed based on I:heabsolute value
of the specified value.

If chamfering or corner rounding command is specified n the incremental mode(G91 ),


the programmed commands are treated as if the chamfering or comer rounding com-
mands were not specified.

4-121
(a) Chamfering command

GO1(or G02, G03) . ~. P_;


(P: distance between the chamfering statiend point and assumed point of
intersection)

With the commands indicated above, chamfering at an arbitrary angle is executed.

.’
— < ---- P

M’ d

End point of the programmed block


(assumed point of intersection)

Fig. 4.44 Chamfering at Arbitrary Angle

(b) Corner rounding command

GOI (or G02, G03) . ~ ~ Q_;


[Q: Radius of arc contacting the two continuous cutting blocks)

With the commands indicated above, rounding is possible at arbitrary angle cor-
ners.

End point of the programmed block


(assumed point of intersection)

Fig. 4.45 Corner Rounding at Arbitrary Angle Corners

4-122
4.2 PROGRAM SUPPORT FUNCTIONS (2)

(2) Operation

Chamfering and comer rounding cclmmands are valid only when the cutting feed blocks
continue. If the block specified imrnediatel y after the designation of chamfering or cor-
ner rounding is not a linear or circular interpolation block, alarm “O198” occurs. Alarm
“0198” also occurs if there are no axis move commands in the next block.

In the chamfering and corner rouncling blocks, the following G codes can be specified:
GO1, G02, G03, G07, G1O, and G!3

(a) Chamfering command

Example of Programming
End point of N2
G17 G54 G90 GOO XO Y1O.; block Plc)

N1 GOl XIO. F150;
N2 G03 X60. Y60. R50. P1O.; R50. r ..-.
\
N3 GOl X70.; Plo ;
~E
N4 X80. Y30.;

7
}
~,.Y’

i
L —

Fig. 4.46 Chamfering Command

(b) Corner rounding command

Example of Programming
‘f
G17 G54 G90 GOO XO Y1O.;

1.7
N1 GOl X1O. F150; End point of N2
block
N2 G03 X60. Y60. R50. Q20
N3
N3 GOl X80.; ..
(
N4 X80. Y30.;
(220.

NZ

I
L_.._._ –— —x
Fig. 4.47 Corner Rounding Command

4-123

— .— —-—. ———.—— .—. ——— .—. —. .——. — .—. — ..-. .—— —


(3) Alarms

If there is aprogram error in the chamfering or comer rounding commands, the follow-
ing alarms occur.

(a) Alarm 0196 CHAM/RND COMMAND ERROR

(b) Alarm 0197 CHAM/RND PLANE ERROR

Arbitrary angle chamfering and comer rounding are executed in the specified
plane. If the plane specified for the execution of chamfering or comer rounding
differs from the plane specified in the next block, alarm “O 197” occurs. An axis
move command of the axis not included in the specified plane also causes alarm
“0197”.

(c) Alarm 0198 CHAM/RND CANNOT COMMAND

If an axis moves beyond the axis move range specified in the program as the result
of insertion of a chamfering or comer rounding block, alarm “O198” occurs. If the
chamfering or comer rounding block includes commands for which buffering is
not allowed, the chamfering or comer rounding cannot be executed and alarm
“01 98” OCCUS.

(4) Supplements to the Chamfering/Corner Rounding Commands

“ If chamfering or comer rounding operation is executed, the single block stop


point is changed to the end point of inserted chamfering or comer rounding
operation.

● If chamfering or co]mer rounding is inserted between the blocks for which the
difference in the tangential angles is within + 10, chamfering or comer round-
ing is invalid. Note that this does not cause an alarm. With a circular interpola-
tion block, the difference in angles is obtained based on the tangent at the point
of intersection.

● If an interpolation command block includes the subprogram call up command


(M98 P_ Q_) or the macro program call up command (G65 P._ Q_), the P conl-
mand is assumed as address “P” used for subprogram call up, and chamfering
or comer rounding is not executed.

● If M, S, and/or T command is specified in the chamfering or comer rounding


block, the NC waits for the finish signal at the end point of chamfering or cor-
ner rounding.

4-124
4.2 PROGRAM SUPPC)RT FUNCTIONS (2)


Even if the programmed shape is distorted due to the execution of chamfering
or corner rounding, these commands are executed. For example, although the
chamfering command between the arc block and linear interpolation block
causes a path which cuts the inside of the programmed arc as shown in
Fig. 4.48, chamfering is executed as programmed.

y
r ---------
p -1
P
/ /’
P
/
p

/“’”
@#q!@l&

/ A Ah

Fig. 4.48 Chamfering between Arc Block and Linear Interpolation Block

● If the chamfering/corner rounding option k not selected, addresses P and Q


specified in the program are disregarded.

c If chamfering or comer rounding is executed in the scaling mode, scaling is


not executed for the chamfering or comer rounding.

● If a chamfering or comer rounding command is specified in the block immedi-


ately before the start or end block of the tool radius offset block, chamfering
or comer rounding is executed as programmed. The offset start and end move-
ments are started from the point where the chamfering or comer rounding is
completed.

● If a chamfering or comer rounding command is specified in the start or end


block of the tool radius offset block, offset start and end movements are
executed at the start point of chamfering or comer rounclin,q.

● If a chamfering orcomerrounding command is specified i.n the tool radius off-


set mode, tool radius offset is executed after the generation (ofthe chamfering
or comer rounding block.

4-125
4.2.8 Corner Feedrate Designation (GI 07, G1 08)’

With the automatic comer override function which is conventionally available, feedrate 1s
decelerated only at the entry to the inside corner. The new comer feedrate designation func-
tion decelerates feedrate both at the entry and exit of the inside and outside comers so that
an error between the actual tool paths and the programmed tool paths caused by servo lag is
minimized.

Axis movement specified in a GCI1block is divided in three sections such as decelerated fee-
drate section 1, specified feedrate section, and decelerated feedrate section 2.

Concerning axis movements specified in the G02 and G03 modes, specified decelerated fee-
drate is applied.

(1) Commands

The comer feedrate designation function is turned ON/ OFF by the following G codes.

Table 4.33 G Codes Used for Turning ON/OFF the Corner Feedrate Designa-
tion

G Code Function Group

● Comer feedrate designation mode ON


G107 ● Se ~tingthe decelerated feedrate, deceleration *
distance, and arc tolerance
—.—
y G108 Corner feedrate designation mode cancel *;

(a) Corner feedrate designation mode ON command (GI 07)

G107P””” L’”” Q ““-;


G107P. .. L...;
G107 P... Q . . ..
G107 L... Q . . ..
G107 P...;
G107 L...;
G107 Q..;
G107;

4-126
4.2 PROGRAM SUPPORT FUNGTIONS (2)

P : Sets the decelerated feedrate.


Setting unit 1 = 1 mm/min or 0.1 inchhnin
L : Sets the deceleration distance in the tangential direction
Setting unit: 1 = 0.001 mm or 0.0001 inch

Q : Sets the arc to]erance


Setting unit 1 = 0.001 mm or 0.0001 inch
Setting range: O to 92767

If address P, L, and/or Q is not specified, the values set for the following parameters
are used:

Decelerated feedrate . . . . . pm0860, pm0862

Deceleration distance . . . . pm0861, pm0863, pm2585

Arc tolerance . . . . . . . . . . . pm0416,pm10417

(b) Corner feedrate designation mode cancel command (GI 08)


The G108 command must be specified in a blcjck without other commands.
-—,—. -— —— .——.——

D
SUPPLE-
MEIUT
1.

2.
The setting ranges for P and L are the same as applied for normal F commands
and axis commands.

The Q command becomes invalid when the NC i.sreset either by reset operation
or a command in a program.

3. When the NC is reset, it is placed in theG108 mode.

4. The values set for P and L are displayed at the lower area of command value dis-
play screen in the [RUN] process. The display is blank while in the G108 mode.
——.—... — .— ——

(2) Operations

c In the GO1 mode

Axis movement specified in a block is divided into three sections, including


the acceleration section and the deceleration section.

4-127
● In the G02/G03 mclde

Axis movement is executed at the decelerated feedrate.

J L
Actual movement distance
-=---Jr
------------- ---l --- ---------- =

,~ypla

Tool radius offset ~


(outside) ~ I
I ,,
I
1
1
I
I
1
;L
1
1 $,
I
I Tool radius offset (inside) 1,
I
, t,
1
1,
I
1
1#
1,
1
,
--------- ----------- - -
1

r
.-/
------------------ --------------

Specified poin t
II Specified point
ti ‘1 F: Specified feedrate
P: Decelerated feedrate
L: Distance in which the tool
-1 Actual movement distance k moves at the decelerated feed rate
“O @ @ (not specified single axis
movement distance)
@ Decelerated feedrate section 1 ‘
Example of Program @ Specified feedrate section
@ Decelerated feedrate section 2
G107P””” L”.” -ModeON
GO1 ~ Start of axis feed
G02
GO1
. . . _ SPecifY GI07 to change P and/or L during the
. . . execution of the commands in the G107 mode.
G03
GO1
. ..
GO1 G End of axis feed
G108 e- Mode OFF
End
Decelerated feedrate m-+
1
@ Specified feedrate G02
@ @ @ Decelerated feedrate
@
GO1
o GOI GOI S*
Stari < G03
@ Go1 @
m Specified feedrate
GO1 Decelerated feedrate GOI
@
T? ‘q~ @ \@ - :ece,erated feedrate
Decelerated feedrate
Specified feedrate _ Specified feedrate

Fig. 4.49 Example of Programming

4-128
4.2 PROGRAMSUPPORT FUNCTIONS (2)

..—.-.——..-—.—.———— ——- .—.... ———.-— —.—-.———.. -.---—

(3
SUPPLE-
MENT
1, In the decelerated feedrate sections 1 and 2, the tc)ol is moved at the feedrate spe-
cified by the P command in the G 107 block.

In the following conditions, the tool is moved at the decelerated feedrate in the
entire sections.

● If F/ 150000 Z L, the tool moves at the decelerated feedrate in the entire section
up to the distance calculated by the following formula.

Distance = L x 2 + F x 2/15000

● If F/ 150000 K L, the tool moves at the decelerated feedrate in the entire section
up to the distance calculated by the following formula.

Distance = L X 2 + F/15000

2. In the G02 and G03 modes, the tool moves at the decelerated feedrate.

3. Deceleration distance L is the length of tangential line and differs from the
lengths along the axes.

4. For the length of the line, the actual movement distance in which the tool radius
offset, tool length offset, and position offset are included is used instead of the
specified line.

5. The blocks inserted due to the execution of the tool radius offset are processed
as the normal blocks.

6. The G107 andG108 commands are not always specified in the same block.

The G 108 command is used to change the decelerated feedrate and deceleration
distance after the entry to the G 107 mode. Usually, it is used with circular inter-
polation operation that will take a relatively long time if the decelerated feedrate
which is specified in the previous block is applied, In such a case, the decelerated
feedrate is increased temporarily y by specifying the G 108 command to shorten the
cutting time.

7. If the feedrate specified by the F command is slower than the decelmated feedrate
specified with the G107 command, the axis movement commands are executed
at the specified F command.

8, The P and L commands specify the decelerated feedrate and deceleration distance
which are valid only for the commands specified with the G 107 command and
they are different from the normal P and L commands used to specify the feedrate
and number of repetition times.

9. While the tool is moving in the decelerated feedrate section, “F” flashes at the
operation status display area.
—-.— —————————

4-129
(3) Corner Feedrate B Specification

When the comer feedrate B specification k optionally selected, the following three
functions can be used.

● Automatic arc-comer feedrate designation function

● Automatic deceleration distance designation function

● Start-up G107 mode selection function

(a) Automatic arc-corner feedrate designation function

The function automatically determines the feedrate to be applied to movements


along arc-comers so that the tolerance (error between the programmed arc and the
actual tool path) at the arc shaped (G02, G03) comers will be equal to the value set
for the parameter.

This function is valid when both of the following requirements are satisfied.

● Parameterpm4031 D2 = 1

● A value equal to or greater than” 1” is set for arc tolerance parameter pm041 6
(“mm” mode) or pm0417 (“inch” mode).

In the case of the example of the program indicated below, feedrates to be applied
to the movements along the arc-comer and the leading and trailing sections are
shown in Fig. 4.50. The broken lines in Fig. 4.50 represent the feedrate waveform.

4- 130
4.2 PROGRAM SUPPORT FUN~Tl~NS ~~)

Example of Program

● Setting parameters

G91 G107Po”. L”””


GO1 X“”OY”.”F””’
G02 X“””Y’.R”C.
GO1 X.”” Y””.

● Program commands

G91 G107P”. ”L””o Q o“”


GO1 X.”” Y””. F.”
G02 X“.”Y.”CR”O.
GO1 X“”OY.””

,,,y~q:,,

F Feedrate specified in the program


P Decelerated feedrate specified using the corner feedrate designation function
FR Feedrate determined by the automatic arc-corner feedrate designation function
Note: If the calculated value of f’R exceeds the value specified by F, FR = F.

Fig. 4.50 Feed rate at Arc-Corner

CD
SUPPLE-
MENT
1. To make this function invalid, set “O” forpm0416 (for “mm” mode) or pm041’7
(for “inch” mode). If a Q command is specified in a program, the f unction is valid
even if “O” is set for these parameters.

2. While the tool is moving in the arc-comer section, “F” flashes i?athe operation
mode display area as with the normal feed by an F command.
— — ——

4-131

__. -.—— —— .-—_— .— ..——. —— —.. .. .—. -—-. — .—— -


(b) Automatic deceleraticm distance designation function

The deceleration distance (tangential direction) which is specified by address L in


the G107 block is automatically determined according to the P command to be spe-
cified in the G 107 block. The deceleration distance L is calculated in the following
manner P x At x N = L.

This function is valid when all of the following requirements are satisfied.

● Parameterpm4031 D2 = 1

● A value equal to or greater than” 1” is set for deceleration distance muhiplica-


tion parameter pm2585.

● Address L is not specified in the G107 block, or G1 07 is not specified with the
parameter setting of“pm4031 D 1 = 1”. For details ofpm4031, refer to item
(c).

If all of the requirements indicated above are satisfied, the deceleration distance L
is calculated by the following formula.

L’=Px Atxn +600


(where, At= Ts + Tp)

where,
L’ : Deceleration distance to be calculated (mm)
P : Decelerated feedrate specified by the comer feedrate designation func-
tion (mm/min)
If address P is not specified, the value set for pm0860 is used.
Ts : Acceleration/deceleration time constant of X-axis cutting feedrate
(see) (Ts = pm2501 x 0.001)
Tp : 1 + X-axis position loop gain (see) (Tp = 100 + pm 1580)
n : Deceleration distance multiplication ratio set for pm2585
(1 = 0.1 time)
This function is invalid if n = O.

4-132
4,2 PROGRAM SUPPC)RT FUNCTIONS (2)

-- .-.
If the deceleration distance multiplication ratio is 4 times (pm25W = 40), tor exam-
ple, deceleration distance L’ is equivalent to the area of the shaded parts in Figs.
4.51 and 4.52. Fig. 4.51 shows how the feedrate changes when CJO1 blocks contin-
ue and Fig. 4.52 show the changes in feedrate when tool movement mode changes
from the GO1 mode to the G02 mode. Note that broken lines in Figs. 4.51 and 4.52
represent the feedrate waveform including the delay due to “TS + Tp”.

Feedrate
!
,/----

L
u L

U Time
I I
]’ At’
Distance equivalent to deceleration / ’01 + “01

I
distance multiplication ratio of”1”

Fig. 4.51 Deceleration Distance (Continuous GO1 Blocks)

Feedrate

/ ‘“’-+ ’02
Distance equivalent to deceleration
distance multiplication ratio of”1”

Fig. 4.52 Deceleration Distance (GOI to G02 Block)

4-133

——-.——.
. . ..-. -.——.....— .... ——. ———. —— ————.—-—..-.———

D
SUPPLE.
MENT
1.

2.
The cutting feed accelerationldeceleration
must be the same for all axes.
time constant and position loop gain

To make this function invalid, set “O” for pm2585. For the setting conditions un-
der which the deceleration distance is set, refer to Table 4.34 in item (c).
.———...—---—. —______ ——— -—--——

(c) Start-up G 107 mode selection function

This function establishes the G107 modal mode when the power is turned ON. In
addition to this, the functions described in items (a) and (b) above are automatically
set valid at the same time when the necessary requirements are satisfied.

This function is valid when all of the following requirements are satisfied.

● Parameterpm4031 D1= 1

● Parameterpm4031 D2 = 1

When this function is made valid, the corner feedrate is automatically designated
for GO1, G02, and G03 blocks. Concerning the deceleration at comers, arc,-comer
feedrate, and deceleration distance, they are specified as shown in Table 4.34 ac-
cording to the part prog,ram and the NC parameter setting conditions.

Table 4.34 Decelerated Feedrate and Arc-corner Feedrate


Specified Value
—~
,

1 G107
I
Address P
pm0416 or
I Address Q
Decelerated Feedrate
I
Feedrate at Arc-corner

EcI==IO Specified by address P Specified by address P 1

Specified by pm0860 Specified by pm0860


I Not used Not used I 21 Specified by pm0860 Calculated FR value

Note I: The table above is for ‘“mm”mode. The parameter numbers are changed as indicated below for “inch” mode.
pm0416 + pm0417
pm0860 + pm0862
2 If address Q is specified, prio]ity is given to the value set for address Q

4’134
4.2 PROGRAMSUPF’ORTFUNCTIONS (2}

Table 4.35 Deceleration Distance

I Conditions I Specified Value I


G107 Address L pm2585 Deceleration Distance

Used Used o Spec Ified by address L

Used Used 21 Calculated U value



Used Not used o Specified by pm086 1

Used Not used 21 Calculated L’ value

Not used Not used o Specified bypm0861

Not used Not used Z1 Calculated U value

Note: The table above is for “’mm”mode. The parameter number is changed as indicated below for “inch” mode.
pm0861 + pm0863

(3
SUPPLE-
MENT
If the G107 command is specified while this function is valid, the ccmner feedrate is
specified at the condition specified by G 107 until the G 108 command is specified.
When the G 108 command is specified, the corner feedrate designation function is
turned OFF and it is turned ON again when theG107 command is specified once again.
If the G 107 command is specified independently without other commands, the status
to be established at power ON is recovered.

To make this function invalid, either:set“pm4031 D1 = O“ or specify the G1 07 / G 108


command as indicated in Tables 4.34 and 4.35.
_.—— .—.-— —-.— . .. ..— ——.—.-—,————.

(4) The Relationship between the Corner Feedrale Designation and Operations

(a) Override

The override function by the I/O input is valid in the section where the tool is moved
at the specified feedrate (specified feedrate section). In the decelerated feedrate
sections, axis movement stops only if the override signal is “O”.

(b) Override cancel

By canceling the override, 100% override is applied to the specified feedrate. The
decelerated feedrate specified “bythe G 107 command is not influenced by override.

4-135

.—. —— —. —...-. —— . .
(c) Dry run

In the dry run mode, the comer feedrate designation is invalid and the dry run fee-
drate is used.

(d) Canned cycle

The G74 and G84 commands (tapping cycle) and the G93 command (solid tapping)
cannot be specified with the G 107 command in the same block. If specified, an
alarm occurs. The G 10? command is valid in canned cycles other than G74, G84,
and G93 cycles. If theC181 drilling cycle is executed in the G 107 mode, for exam-
ple, axis feed in the section from R-point level to the Z-point level is controlled in
the G107 mode.

(e) High-speed cutting

If high-speed cutting is called in theG107 mode, theG107 mode is canceled tempo-


rarily and it is recovered after the completion of high-speed cutting.

(f) Inch/mm switching

The values for addresses P and L are generated at the execution of the G 107 com-
mand. If dimension mode is switched between “inch” and “mm” in the G 107
mode, the values for addresses P and L are not updated according to this switching
and, therefore, the program is not executed correctly.

(g) Cycle start in the G1 C17mode after feed hold

In the decelerated feedrate sections 1 and 2, cutting restarts at the decelerated fee-
drate.

In the specified feedrate section, cutting restarts at the specified feedrate.

(h) Others

The G 107 command can be specified with the G68/G69 (coordinate rotation) com-
mand, subprogram, and microprogram functions in the same block.

4-136
4.2 PROGRAM SUF’PC)RT FUNCTIONS (2)

(5) Related Parameters

Table 4.36 Table of Parameters



Parameter Description Setting Range Setting Unit

Comer feedrate designation function B


‘2=’ ON
pm4031 —
Comer feedrate designation function B
D2=0 o=

~1=, ~ comer feedrate designation function
Mmade valid at power ON or after reset
pm4031
D,=o ~ comer feedrate designation function
Mmade valid at the execution of GI07

Arc-comer tolerance for the comer fee-


pm0416 Oto 32767 1 =0.001 mm
drate designation function (“mm” mode)

Arc-comer tolerance for the comer fee-


pm0417 O to 32767 1 = 0.0001 inch
drate designation function (“inch” mode)
— —
Decelerated feedrate for the comer fee-
pm0860 o to 999999 1 = 1 mm/min
drate designation function ~’mm” mode)

Deceleration distance for the comer fee-


pm0861 o to 999999999 1 = 0.001 mm
drate designation function (“mm” mode)

Decelerated feedrate for the comer fee-


pm0862 o to 999999 1 = 0.1 inch/rein
drate designation function (“inch” mode)

Deceleration distance for the comer fee-
pm0863 o to 999999999 1 = 0.0001 inch
drate designation function (“inch” mode)

pm2585 Deceleration distance multiplication ratio Oto 32767 1 = 1 time

Note: To change the setting for the parameters indicated above, resetting operation is necessary.

4-137
4.3 AUTOMATING SUPPORT FUNCTIONS

4.3.1 Skip Function (G31) *

By specifying “G31 X.. . Y. -. Z. . (*Q. . . ~ . ..) F. ~. ;“, special linear interpolation


is executed. If a’skip signal is input during the execution of linear interpolation, linear inter-
polation is interrupted and the program advances to the next block without executing the re-
maining linear interpolation.

Delay from the input of the skip signal to the start of processing corresponding to the input
signal is shorter than 0.5 msec; this is processed at extremely high speed.
Example of Programming

N1OO G90 G31 X1OO. Y50.;


N200 GO1 X80. Y15.;

Skip signal is turned ON


at this point. (loo., 50.)
@
.“ ,
/’
\ /’ I

Fig. 4.53 Example of Skip Function

4-138
4,3 AUTOMATING SUF’PORT FUNCTIONS

(1) Programming Format

(a) Feedrate

For the execution of theG31 block, feedrate can “beselected from the following two
methods according to the setting for parameter pm2001 DO.

I pm2001 DO= O I Tos~cifytiefeedm@ withFas ancrtherorcliilary program I

I pm2001 DO= 1 I To use the feedrate preset for parameter pm2440 I

(b) If skip signal is turned ON

When the skip signal is input, the coordinate values of the point where the skip sig-
nal is input are automatically saved to the parameters. Therefore, the coordinate
values of the skip point can be used as the coordinate data in macro programs.

pm081 1 Saving the X-axis coordinate value

pm0812 Saving the Y-axis coordinate value

pm0813 Saving the Z-axis coordinate value

pm0814 Saving the 4th-axis coordinate value 1


\ pm0815 I Saving the 5th-axis coordinate value I

Note The coordinate values of the point where the skip signal is input are saved.
This point differs from the point where axis moves are stopped.

(c) If skip signal is not turned ON

If the skip signal is not turned ON during the execution of the commands specified
in the G31 block, the operation stops upon completion of these commands and
alarm “049 1” occurs. Note that G31 is a non-modal G code.

Note that G31 is a non-modal code.


1 I
An alarm occurs if the skip signal is not input until the completion
pmOO07 D2 = O
of the G31 block.

An alarm does not occur if the skip signal is not input until the
pmOO07 D2 = 1 completion of the G31 block. The program advances to the next
block.

4-139

.—
(2) Operation

(a) Designating the skip signal polarity

Designate the polarity of the skip signal by using parameterpm5011 DO.

Validwhen the skip signalgoes from “1” to “O”(negativelogic).

Validwhen the skip signalgoes from “O”to ““1” (positivelogic).


E

If the designated skip signal polarity and the input status of the skip signal do not
agree, the program proceeds to the next block at the start of the G31 block.

(b) G codes that do not allow the use of the skip function
The skip function cannot be used in the following states. If the skip function is
called up, alarm “0160” or “0161” occurs.

“ In the canned cycle mode (G12, G13, G81 to G89, G181 to G189)

● In the solid tap mode (G93)

● In the tool radius offset mode (G41, G42)

G In the tool position offset mode (G45 to G48)

● In the coordinate rcjtation mode (G68)

● If specified with scaling (G51 ) in the same block

4-140
4,3 AUTOMATING SUPPORT FUNCTIONS

4.3.2 Program interrupt Function (M90, M!ll)*

The M codes are used for the program interrupt function indicated in Table 4.37.

Table 4.37 M Codes Used for Calling Up and Canceling the Program Interrupt
Function

M Code Description

l--%+--
Canceling the prclgram interrupt function

Calling up the program interrupt function

M90 and M91 P should be specified in a block without other commands. If other commands
such as axis move commands are specified with M90 or M91 P in the same block, alarm
“01 12“ occurs.

(1) Command Format

(a) Start of interruption (M91 )


By specifying“M91P . . . ;“, if the program interrupt signal goes ON during the
execution of the program before the execution of M90, the program presently
executed is interrupted (axis move is decelerated and stopped), and the program
jumps to the one specified by P.

Example of Programming

0123~ 0200;

M91 P200;

: _ PINT is input /;

:~
~ M99 (P1OO) ;
M90; /
,/ /
/
/ If P command is specified
/
N1OO-; “

4-141

———.——
——__. —... —.—-. — ———-.——-. ——.. ..—..—-— —-—. —.— -—-
● While the interrupt program, where jump has been made in response to the in-
put of the interrupt signal during the execution of a program in the M9 1 mode,
is executed, another interrupt signal is invalid.

● It is possible to specify the sequence number of the block where the interrupt
program should start by using a Q command in theM91 P block.

(b) End of interruption (tV190)

The program interrupt function is canceled by specifying “M90;”.

(2) Supplements to the Program Interrupt Function

● In the program that is called up after interrupting the execution of another pro-
gram, it is not allowed to specify M90orM91. If specified, alarm“O114“ oc-
curs.

● TheM91 commancl can be specified in a subprogram or macro program. Jump


to an interrupt program is not counted as a nesting level. Therefore, the level
saved to the macro local variable does not change.

c By the execution of M99 specified in the interrupt program, the program re-
turns to the block next to the one where the interrupt program has been called
up. It is also possible to specify the return block by specifying a P command
with M99. When returning to the previous program by the execution of M99,
the modal information which was valid before the interruption, is recovered.
However, if M99P is used to return to the previous program, the modal in-
formation changed during the execution of the interrupt program is used for
the execution of the previous program.

● If the interrupt signal is input during the block stop state, the program jumps
to the interrupt program when the operation is started by depressing of the
cycle start switch.

● The program interrupt signal is invalid if input during the execution of high-
speed cutting.

● [f the program interrupt signal is input during the execution of the G28 block
(low-speed pattern), the program interrupt signal is disregarded. It is valid if
it is input during the execution of high-speed pattern reference point return.

● If the program interrupt signal is input during the executionofG31 (skip), the
skip mode is canceled and the program interrupt function is executed.

4-142
4.3 AUTOMATING SUPPORT FUNCTIONS
——

● If the program interrupt signal is input during the executiorl of a block includ-
ing M, S, T, or B command, the program jumps to the interrupt program. Be-
fore jumping to the interrupt program, axis move is stoppecl after deceleration
if the interrupt signal is input during axis move. If the M or ‘Tfunction is being
executed when the interrupt signal is input, the program does not jump until
the M or T function completion signal is input.

● If the program interrupt signal is input during the execution of tapping in the
solid tap mode, execution of the interrupt program starts only after the comple-
tion of the solid tap block.

4-143
4.3.3 Tool Life Control Function *

When the tool life control function is used, the tools are controlled in groups and the service
life of the tool is set for individual tools. Tools are selected by tool group and if a selected
tool is used to the preset life, it is replaced with another tool in the same tool group according
to the preset tool selection order.

(1) Tool Life Control SpecificiXions

(a) Number of tool life controlled tools

Whh the tool life control function, tool life can be controlled for up to 256 tools.
The tools are grouped for this function. Parameter pmOO09 is used to set the num-
ber of tool groups and the number of tools in each group.

Table 4.38 N umber of Tool Life Controlled Tools

%Nutnberof’roup
o
‘umberOfTOO’sinGrOup
0 128 2
0 1 64 4
I o 32 8
1 1
16 16


\\ I/,
Do not change the number of tool groups during the execution of the tool life manage-
POINT
ment function.

4-144
4.3 AUTOMATING SUPPORTFUNCTIONS

(b) Tool life control data

The data used by the tool life control function is stored as the tool group file. The
data in this file is retained ever~ after the power is turned OFF.

Table 4.39 Tool Life Control Data


Title Description

r NO (tool number) The number assigned to the tool for which tool life is con-
trolled.

3 NO (tool length offset The tool length offset number corresponding to the set tool
lumber (H)) number

3 NO (tool diameter offset The tool radius offset number corresponclin~ to the set tool
lumber (D)) number

-M% (tool life) The service life of the tool set for the tool number

JSED (tool used data) Courted used data of the tool set for the too I number

$TS (status) Status of the life of the tool set for the tool r umber
OVEWSKIP

.IFE TYPE Tool life control data for each tool group
TIM]+ 1 to 9999
COUNT 1 to 9999
DIS’11 1 to 9999
DRfLL: 1 to 9999

4-145
(2) Specifying the Tool Life Control

(a) Specifying in a program

In a program, the T codes, IUD codes, and M codes indicated below are used to
specify the tool life control function.

Table 4.40 Tool Life Control Commands Specified in a Program

Program
Operation (with the setting ofpm4110 = 1)
I Block

Specifies tool group number “5”. Tools are selected from the specified tool
] TIOO5;
group in the preset order.

I M06; Places the status of the selected tool in “selected”. I


I H999; Selects the H number registered for the tool. I
I D999; Selects the D number registered for the tool. I
I DO Cancels D. I
I HO Cancels H I
Returns the T command to a normal T command.

Changes the tool to a not life-controlled tool; ends the tool life control mode
1 M06; which has been called up by the preceding M06.

I M30; End of program

4-146
4.3 AUTOMATING SUPPORT FUNCTIONS

(b) Counting the tool life

Tool life is counted for the life-controlled tools while they are actually called up
and used in the tool life control mode. It is possible to set the tool life counting type
for each of tool groups.

Table 4.41 Counting the Tool Life

Count Type Counting Method

Controlled by Length of time the cutting tool is actually used in the cutting mode is counted in units
time of seconds. The life count data are increased by “1” in units of minutes.
While the NC is in the single-block stop, feed hold, rapid traverse, or dwell state, the
time is not counted.

Controlled by Length of distance the cutting tool is actually used in the cutting mode is counted every
distance second. The life count data are increased by” 1” in cutting of every meter or foot.

Controlled by Life count is increased by the set number at each execution of M02, M30, or M 192.
the number of It is also possible to count the life data in response to the execution of T9999.
uses When “T9999L***;” is executed, the value set with L is added to the life count data.
If no L command is given, L 1 is assumed.
It is not possible to use an M.command and T command for countirg the life count
data at the same time.
Which of the M or T command should be used can be determined by the setting for
parameter pmOO07D4.
pmOO07D4 = O: Counting at M02/M30/M 192
pmOO07D4 = O: Not counting at M02/M30/M 192

Controlled by The life count data is increased by the number of execution of hole machining cycles.
the number of The life count data is counted by the L command (number of repetitions) for the
holes canned cycles and the hole pattern cycles.
— —

Since tool life is counted in the buffering processing, if life exceeded occurs during
the execution of the next one block, the life exceeded status is triggered before the
execution of that block.
———., —— —.,- —..—
\\ I/,

(n POINT
During the operation, registration or deletion of a tool file is not allowed.
—.— .——.—-..—...—.—.—.--—
E’

4-147
- —-—-.-.,... ---- .-.-.,..--, --.-----. ----..-. -,------------------------------------------

1. It is possible to select the tool life counting (number of uses) objective groups by
using the parameter indicated below.

I pm4029 D3 =0 I Countingcm~y forthe specified tool groups I


I pm4029 D3 = I I Co~[ntingforai~ registered LOOI
groups I

2. If the last tool in a group ~is skipped, the one previously used is called. If the pre-
vious tool has been skipped, the one used before the previous tool is called.
.. —-—-.— — ___ —--——----

(C) Selecting a tool

When a tool group is specified, the tools that have used up the life or those in the
skip state are disregarded and the tool is selected from the remaining tools in the
order of registration. If the life expires during the use of the tool, machining is con-
tinuously performed. When the same tool group is specified next, another tool is
selected among the available tools in that tool group. If the life of all the tools regis-
tered in a group has expired or placed in the skip state, the tool change signal is out-
put. If machining is continued in this state, the tool used last is called up and ma-
chining is performed continuously.

(d) H999/D999 command

During the execution of tool life control function, H999/D999 is used to specify
the offset number for the tool length offset/tool radius offset function. If
H999/D999 is specified, the tool length offset number/tool radius offset number of
the tool number of the tclol presently called up is read from the tool life control data.

By the HO/DO command, the offset data (tool length offset datahool radius offset
data) are canceled.

4-148
4.3 AUTOMATING SUPPORTFUNCTIONS

(e) Input/output signals

Table 4.42 Input/Output Signals

Contents of Signal Description

Tool-1ife count disregarded input If thi&input signal is “ON’ during the execution cf the tool life con-
(TLCTN = #30127) trol functic,n, counting of the tool life is suspended.

Tool skip input If this input signal state changes from “’OFF”to “{ON”during the
(TLSKP = #30126) execution of the tool life control function, the tool life status is forci-
bly skipped.
pm4029 D 1 = O For the tool presently selected
pm4029 D1 = 1: For the tools in the specified group (TLGRP)

Tool group number input Specifies the tool group number that is used for the tool skip input.
(TGN = #30250 to #30257)

Tool change signal output When service life of al] took in a tool group has expired, the too]
(TLCHA = #35087) change signal status is set to “closed”.

New tool selection signal output When a new tool is selected in a tool group, if the life count data of
(TLCHB = #35086) the new tool are W“, this signal is output with a T code at the same
time.

(f) Display and setting of tool life control data

The tool life control data can be displayed by depressing the [T-I.IFE] (f3) job soft
key in the [SET] process. On this screen, the tool life control data (tool numbers
in a tool group, offset number, life, number of use, etc.) can be changed by directly
writing the data. The data can be changed only while the the automatic operation
is suspended (reset status, single block stop status) and not in the edit prohibited
status.

(g) Specifying tool group

Tool group is specified by a T code. Tool group number is specified by the value
set for parameter pm4110 x 10(00+1 to+ 128. These numbers correspond to group
1 to group 128.

If the setting is “pm4110 = 5“: Tool groupsT5001 to T5 128 are set.

4-149
(3) Life count multiplication command

For counting the tool use data (distance, time), it is possible to specify the multiplying
factor in a program by specifying “G125 P***; [P: Life count multipl ying factor (one
digit to the right of the decimal point)]”.

● G125 is a non-modal G code. Once “G125 P***” is specified, the life count
multiplying factor specified as P*** remains valid until the NC is reset or
G125 is specified again. The life count multiplying factor is returned to “ 1”
when no P command, PO or P1 is specified with G125.

● The life count multiplying factor is valid only when counting tool life in dis-
tance or time. Therefore, it is not valid for the number of use or the number
of holes.

Example of Programming

G125 P1.5;
With the commancls indicated above, the life count data (distance, time) are
counted in 1.5 times the normal counting mode.
Distance: 2 m ~ 3 counts
Time: 2 minutes - 3 counts

4-150

— ..—.--———

4.3 AUTOMATING SUPPORT FUNCTIONS
———

(4) Display and Setting of Tool Life Control Data

For the display and setting of the tool life control data, a special screen is provided.

(a) Display of tool life control data

A display screen is provided fcmeach tool group. The display page is selected by
using the page keys.

For a single tool, the following tool data are set and the data of 10 tools are dis-
played on one page: tool numbsr, tool life, use clata, tool length offset number, tool
radius offset number, and status For the tool for which tool life control is present] y
executed, the tool data are displayed in reversed characters.

TOOL LIFE SET 012345 N1OOOO

GROUP 005
T-NO H-NO D-NO LIFE USED STS
TOOO1 001 002 30C! 302 OVER
@Tooll 011 012 40[ 400 OVER
TO024 100 101 100(1 150
* * . . .
* * . . *
* . . . .
* * . . *
* * . *
* * . * *
* . . . *
MEM STP LSK

Immmmlnlmlwiil
Fig. 4.54 Example of Tool Life Control Screen

4-151

.—. — ..——. ——— -—..--.,.


(b) Setting of tool life control data

The data can be updated while the NC is stopped in the automatic operation mode
(reset status, single-block stop status) and when the NC is not in the edit prohibited
status. In other status (aluring operation, feed hold stop, edit prohibited status), up-
dating of the data is not allowed. During the operation or feed hold stop status, the
input data are disregarded and in the edit prohibited status, a warning message is
displayed.

To set the tool life control data, follow the procedure indicated below.

Select the screen for the tool group for which the data are registered by using
the page key.

Select the life count type from time used, number of uses, cutting distance, and
number of holes.

Write the tool number to be registered to the selected tool group. When a tool
number is written, the tool length offset number, tool radius offset number, and
use count are initialized to “O” and the life data to “9999”.

Write the offset numbers (tool length offset number and tool radius offset num-
ber) for the registered tool.

Write the tool life for the registered tool.

Set “O” for the use count when the registered tool is a new tool.
.
\\ I/,
1, It is not possible to write the status data.
nPOINT

‘Q’ 2. The data can be cleared by using soft keys. For this operation, the following three
soft keys are provided: clear the data of all tools in group [KIND] (fl ), clear the
data for the selected tool [T-ERS] (f2), and clear the use data [U-ERS] (f3).

3. The LIFE, USED, and STATUS data are closely related to each other.
If “LIFE c USED”, the STATUS is life expired (OVER).

The life data can be corrected only when the automatic operation is suspended
with the edit lock OFF.

If the life data are corrected during automatic operation, the warning message
“CAN’T WRITE!” is displayed.
—-.-.-————. — ——..

4-152
4.3 AUTOMATING SUPPORT FUNCTIONS

(c) RS-232C input/output

The tool life control data can be inpudoutput by following the instructions dis-
played on the I/O screen.

(5) Supplements to the Tool Life Ccmtrol Function

● If tool life control group command is specified for a tool group which has not
been registered, alarm “030 1” occurs,

“ If the count condition (pmOO07 D4) is M code when the tool life control type
is “number of uses”, and T9999L command is specified alarm “0301” occurs.

“ If the status of all tools in the specified group is skipped, alarm “0302” (LIFE
CONTROL GROUP ALL SKIPPED) occurs.

● It is not possible to specify the tool life control group command and the use
count command by one-line MDI operation. A

4-153
4.4 MACROPROGRAMS

The NC has a set of instructions that can be used by the machine tool builders and the users
to implement the original functions. The program created by using these instructions is
called a microprogram, which can be called and executed by the commands specified in a
block with G65 or G66.

A microprogram provides the following.

● Variables can be used.

c Arithmetic and logical operations using variables and constants are possible.

● Control commands for branch and repeat can be used.

0 Commands to output messages and data can be used.

* Arguments can be specified.

This makes it possible to create a program in which complicated operations and operations
requiring conditional judgment are included.

4.4.1 Differences from Subprograms

Differences between microprograms and subprograms are indicated below.

● With microprogram call up commands (G65, G66), arguments can be speci-


fied. However, with subprogram call up command (M98), it is not possible
to use arguments.

● If commands other than P, Q, and L are specified in the M98 block, the pro-
gram jumps to the specified subprogram after executing these commands.
With G65 and G66, commands other than P and L are regarded as argument
specification and the program jumps to the specified microprogram immedi-
ately. In this case, .~owever, the commands specified preceding G65 and G66
are executed norndly.

* With a microprogram, local programs at the same level as the level of the mi-
croprogram are used. However, with subprograms, levels of local variables
are not changed.

In other words, local variables in a microprogram are different before and af-
ter the call up of the microprogram and those in a subprogram remain the same
before and after the call up of the subprogram.

4-154
4.4 MACROPROGRAMS

r
Local variable levels are
different.
1

Argument pi~ssed *
:~ Variables
.—
G65 P~’” cargument-specif ication>; Operation commands
Control commands
Output commands

-——————~ ,
~ M99;
Microprogram
(a) Microprogram

,— Local variable level remains ——


at the same level
i 1

+————————————— Variables
:
Operation commands
M98 PV*; Control commands
Output commands

‘~~ :
— M99;

(b) Subprograms

Fig. 4.55 Differences between Microprograms and Subprograms

4-155
4.4.2 Microprogram Call (G65, G66, G67)

Microprograms’ are usually executed after being called up.

The procedure used for calling up a microprogram is indicated in Table 4.43.

Table 4.43 Microprogram Calling Format

Calling Up Method Command Code Remarks


r 1

H==%=-+:
G code call up G***
Canceled by G67

G command: 3 digits
:

M code call up M*** M command: 2 or 4 digitsi

I S code call up I S*** \ S command: 6digits I

T command: 4 digits

~= B command: 4 digits

(1) Simple Call Up (G65)

By specifying “G65 P . . . L... <argument specification>;”, the microprogram which


is assigned the program number specified with P is called up and executed L times.

If it is necessary to pass arguments to the called up microprogram, these arguments can


be specified in this block.

Table 4.44 P and L Commands

I Address I Description I Number of Digits I

P Program number 5 digits

L Number of repetitions 9 digits

—-.
-——. —”.. -., —.——-— —. .—— ..——— —-—

QTERM?
e
+ Argument Specification
A real number is assigned to the Imal variable that corresponds to the level of the called up microprogram.
When specifying arguments, G65 must be placed before all arguments.
Commands specified before G65 are processed as normal commands and the program jumps to the called up
microprogram after the completion of these commands.
For details, refer to item (9) “’SpecifyingArgument”.
... .. ......-—.—-. -.-- ... --—.- ...--.. --. --....--.-----.-....-.--.-----.----."--..-".".- —.—-

4-156
4.4 MACROPROGRAMS

(2) Modal Call Up (G66, G67)

The modal call up commands set the mode for calling up a microprogram. The speci-
fied microprogram is called up and executed when the specified conditions are satis-
fied.
● By specifying “G66 P . . . L. ~. argument-specification:>; “, the mode for
calling up the microprogram is set. Once this block is execu ted, the micropro-
gram which is assigned the program number specified with P is called up and
executed L times after the completion of move commands.

If an argument is specified, the argument is passed to the microprogram each


time it is called up as with the simple call up of a macroprclgram. The corre-
spondence between the address of argument and local variables is the same as
in the case of simple call up (G65).
● G67 cancels the G66 mode. When arguments are specified, G66 must be spe-
cified before all arguments. If G66 is specified, G67 must be specified in the
same program corresponding to it.

Table 4.45 Modal Call Up Conciitions

Call Up Conditions
After the execution of move command -:Y=

4-157

.__. ———. —-..-—— ..—.. --. .——.. —


.—.——
(3) Microprogram call up by G code

By specifying “G*** <argument-specification> ;”, the microprogram/subprogram of


the program number that ecu-responds to the number specified by G code is called up
and executed.

For the G code used to call up a macroprograrnlsubprogram, a maximum of 24 pairs of


G codes can be se~ each G code has a maximum of 3 numerical digits that are not used
by the NC. The program numbers of programs to be called up can be set corresponding
to the set G codes.
7., ,. .-= ––– –... . ,. m . . .. -–...-- n- .. .. -- — - .--t-----
I ame 4.40 rarame~ers [or aemng me uurresprmuence

Number of Pairs Microprogram Call Up G Code I Program No. to be Called Up I

1 pm4480 pm4840
2 (max. 3 digits) (max. 5 digits)
I

23
24 pm4503
T
Max. 24 pairs

(4) Microprogram Call Up by M Codes

(a) Microprogram call up format

By specifying “M*** <:argument >;”, the microprogram of the program number


that corresponds to the specified M code is called up and executed.

In this case, if a move command is specified in the same block, the microprogram
is executed after the completion of the axis move command.

For the M code used to call up a microprogram/subprogram, a maximum of 24


pairs of M codes can be set excluding such M codes as MOO,MO1, M02, M30, and
those used for internal processing. The program numbers of programs to be called
up can be set corresponding to the set M codes.

4-158
4,4 MACROPROGRAMS

Table 4.47 Parameters for Setting the Correspondence



Number of Pairs Macroprograrn Call Up M Code Program No. to be Called Up

1 pm4504 pm4864
2 (max. 4 digits) (max. 5 digits)

23
24 pm4527 pm4887
T
Max. 24 pairs

(b) Specifying arguments

It is possible to specify arguments in the M code macroprograrn call up block. In


this case, it is not allowed to specify axis move commands in the same block.

pm4020 D5 = O Call up without argument specification

pm4020 D5 = 1 Call up with argument specification


—1

If more than one M code is specified in a single block, the first M code is checked
whether it is for microprogram call up. Concerning the second and later M codes,
if the setting for parameter pm4020 D5 is “call up with argument specification”,
the use of them is determined by the setting for a parameter whether they are treated
as a normal M code or as M cc~deused for specifying an argument.

pm4020 D6 = O Normal M code

pm4020 D6 = 1 M code for specifying argument
—1

When an M code used for microprogram call up is executed, M code or MF which


is output for normal M code is not output.

4-159

——————. .——. ———.. —. .—-. —— .—. —..——. .-——.. —.


(5) Microprogram Call Up by S Code

(a) Microprogram call up format

By specifying “S*****”, it is possible to determine whether the specified S com-


mand should be treated as a normal S command or a microprogram call up S com-
mand by the setting for parameter pm4888. If “pm4888 = O“, the S command is
treated as a normal S command.

When using an S command for calling up a microprogram, one required program


number can be set. In this case, the S command value is used as the argument of
common variable #147. Designation of other arguments is not allowed.

Table 4.48 Parameter Used for Microprogram Call Up by S Code

=7=]
, Microprogram call up S command

When more than one S command is specified in a block, the first S command is
checked whether it is a microprogram call up S command or not. For the second
and later S commands, it is possible to select whether they should be treated as nor-
mal S commands or disregarded by the setting for a parameter.

I pm4020 D7 = O ~ Treated as normal S command I


I pm4020 D7 = I ~ Disregarded I
When a microprogram call up S command is executed, S code and SF are not out-
put as a normal S code. The S command is a 6-digit command.

4-160
4.4 MACROPROGRAMS

(6) Microprogram Call Up by T Code

By specifying “T***** “, it is possible to determine whether the specified T command


should be treated as a normal T command or a microprogram call up T command by
the setting for parameter pm4889. If “pm4889 = O“, t-heT command is treated as a nor-
mal T command.

When using a T command for calling up a microprogram, one required program num-
ber can be set. In this case, the T command value is used as the argument of common
variable #149. Designation of other arguments is not allowed.

Table 4.49 Parameter Used for Microprogram Call Up by T Code

BCa::::!a
Microprogram call up T command

When a microprogram call up T co:mmand is executed, T code and ‘TF are not output
as a normal T code. The T command is a 2-digit or 4-digit command.

(7) Microprogram Call Up by B Cocle (Second Miscellaneous Function)

By specifying “B*****”, it is possible to determine whether the specified B command


should be treated as a normal B command or a microprogram call up B command by
the setting for parameter pm4890. If “pm4890 = O“, the B command i.s treated as a nor-
mal B command.

When using a B command for calling up a microprogram, one required program num-
ber can be set. In this case, the B command value is used as the argument of common
variable #146. Designation of other arguments is not allowed.

Table 4.50 Parameter Used for Microprogram Call Up by B Code

r CommandSelection
T:==-
Normal B command pm4890 = O

Microprogram call up B command pm4890 max. S digits

When a microprogram call up B command is executed, B code and BF are not output
as a normal B code. The B command is a 4-di~it command.

4-161
CD
SUPPLE-
MENT
When
block,
microprogram
the execution

● G.. .T. ..
call up is specified
priority

T... S..
is “G>

.B
with G, M, S, T, and/or
M > S > T > B“.

...;
B entered in one

If the commands are specified as indicated above, only “G . ..” is valid and M,
S, T, and B are disregarded. This does not cause an alarm.

● B.. .T. .. T... M.. .G ...;


This block of commands is processed in the same manner. That is, the G com-
mand is given priority for the execution of the program independent of the order
of the specified microprogram call up commands.

(8) Nesting of Macroprograrn Call Up

As with subprograms, it is possible to call up a microprogram from another micropro-


gram. In this type of call up, nesting level increases one each time a microprogram call
up is executed by G65, G66, G, M, S, T, or B code. The allowable maximum nesting
level of microprogram call up is four.

(a) Nesting level of microprogram call up

With a microprogram called up by G, M, S, T, and B codes, the allowable nesting


level is one. In other words, from a microprogram called up by G, M, S, T, or B
code, call up of another microprogram using G, M, S, T, or B code again is not al-
lowed. If G, M, S, T, or B code is specified in a microprogram which has been
called up by the execut:~on of microprogram call up G, M, S, T, or B code, an alarm
occurs in the case of a G code and with other codes (M, S, T, and B), they are
executed as normal M, S, T, and B codes.

4-162
4.4 MACROPROGRAMS

(b) Modal call up (G66)

In the modal call up mode, the specified microprogram is callecl up and executed
at each execution of a move command. If more than one G66 is specified in the
same program, the prior G66 cc)mmand specified is valid durin~~ the execution of
a microprogram called up by the G66 command given later. Therefore, after the
execution of a move command given in the microprogram called up by G66 speci-
fied later, the microprogram specified with the previous G66 is also executed. In
other words, the macroprograrns are executed sequentially starting with the one
specified last.
Example of Programming

G66 P9400; 0’?400; 09500;


GOO X1 O.; GOO X40.; GOO X60.;
G66 P9500; GOO z50.; Goo ‘Z70.;
GOO Z20.; M99; M99;
G67;
G67;
Goo Z30.;

Execution order of programs


After the execlJion of
G66 P9400; axis move commands
GOO X1 O.; — ‘09400;
G66 P9500;
Goo Z20.;
— G67 After the execution of
G6~ *E? axis rnovecommands
Goo Z30.; GOOX&O.; —— 0940CI;

‘:\\Ex
[’ \
I z Cancel of G66 P9400
GOO X40.;
GO() Z50.;
–~ Cancel of G66 P9500 \ M99;

Note If microprogram call up is nested by specifying more than one G66, cancel code G67, cancels G66 sequentially
beginning with the one specified last. It is not allowed to specify G66 in the macroprcgrarn which is called up
by G66.

Fig. 4.56 Nesting of Macroprograrn Call

4-163
(9) Specifying Argument

The term “to specify argument” means “assigning a real number” for local variables
used in a microprogram. There are two types of argument specifications: type I and
type II. These types can be used as required, including a combination of the two types,

(a) Correspondence between addresses and local variables (Type 1)

Table 4.51 Address – Variable Correspondence and Usable Addresses


for Call Up Commands (Type I)
Address– VariableCorrespondence Call Up Commands and Usable Addresses
Address in Type I Local Variable G65, G66
A #1 o
B #2 o
c #3 o
D #7 o
E #8 o
F #9 o
4
G–’- #lo x
H #11 0
a
1 #4 0
J #s 0 +

K #6 0
~
1 #12 x
M #1; o
N #14 x
o #15 x
P #16
Q #17 +

R #18 :Y
s #19 o
T #20 o
#21 o
~
#22 c
I
I #23 c
x #24
Y #25
z #26
& :2
Nole ~ Can be used, X : Cannot be used

4-164
4.4 FAACROPROGRAMS

(b) Correspondence between addresses and local variables (Type II)

To use I, J, and K, they must be. specified in the order of I, J, and K. Sufilxes 1 to
10 specified in the table below indicate the order they are usecl in a set, and the suf-
fix is not written in actual commands.

For addresses for which argument specification is not required, the commands can
be omitted. In this case, local variables corresponding the addresses without com-
mands are <empty>.

Table 4.52 Address – Variable Correspondence and Usable Addresses


for Call Up Commands (Type II)
— —
Address – Variable Corresponclence Call Up Commands and (Jsable Addresses

Address in Type II Local Variable G65, G66


A #1 c—
B #2 c

c #3 c
.—
11 #4 c

J] #5 c

KI #6 c—
12 #7 r’
L
——
J2 #8 c
K2 #9 c
13 #lo c
J3 #11 c=
K3 #12 c’

14 #13 c-
J4 #14 c-
K4 #15 c

15 #16 c, —

J5 #17 G
K5 #18— c,

16 #19 c:

JG #20 C, —

I K6 #21 c)

4-165
Table 4.52 Address – Variable Correspondence and Usable Addresses
for Call Up Commands (Type II) (cent’d)
Address – Variable Correspondence Call Up Commands and Usable Addresses ~

Address in Type II I-ocal Variable G65, G66

17 #22 o
J7 #23 o
K7 #24 o
18 #25 c

J8 #26 o
Kg #27 o
19 #28 o
Jg #29
_
Kg #30 1
I
I
I 1]0 #31
&
#32 o
i “o
Klo #33 o
L
Note 1. 0: Can be used
2. If more than one address is specified for one variable number, the one specified later is valid.
3: If more than one set of I, J, or K is specified, the order of sets is deternrined for each I/J/K set, so that variable
numbers are determined comespending to that order.

4166
4.4. MACROPROGRAMS

(c) Example of argument specification

When arguments are specified, the rnacroprograrn call up code must al ways be spe-
cified before the specification of arguments. If argument specification is given be-
fore the microprogram call up code, an alarm occurs. The value of argument speci-
fication can include a signkmd decimal point independent of the address.

If no decimal point is used, the value is saved to the variable as the value with a
decimal point according to the normal number of digits of that address.
1 set 2 sets 3 sets
G65 P*** Al O. C20. X30. Z40. 150. K60. J70. 180.;

T
~L L

#6: 60.
- #10: 80.
#8: 70.

#4: 50.
L #26: 40.
~[~= #24: 30.

— #3: 20.
#1: 10.

1 set 2 sets
G65 P“** 110, D20. 130. J40. E50.;

7 J40. is disregarded and E5CI.is made valid.


‘Lnl #8: 50.

D20. is disregarded and 130.is made valid.


~E 1 #7: 30.

#4: 10.

Fig. 4.57 Example of Argument Specification

4-167

.—. —— .—— ..——-.——— —.— ..-—.


.—-— ——— —.——— ——
(d) Decimal point position in argument

An argument is usually specified with a sign and a decimal point. If a decimal point
is not specified, the decimal point position is assumed at the position indicated
Table 4.53.

Table 4.53 Decimal Point Position in Argument

Addressfor ArgumentSpecification Input in mm Input in inches

A, C 3 3

B (without B3-digit option) 3 3

B (with B3-digit option) o 0

D, H o 0

E, F o(1) 1 (2)

I, J, K 3 4

M, S, T o 0

Q, R 3 4

u, v, w 3 4
I
x, Y, z 3 4
1
Note 1: The number indicates the position of the decimal point counted from the lowest position.
2: Numbers in ( ) indicate the number of digits right to tfredecimal point when the setting of parameter “’pm2004
DO= l“.

4-168
4.4 MACROPROGRAMS

4.4.3 Variables

Three types of variables are provided: local variables, common variables and system vari-
ables.

(1) Local Variables (#1 to #33)

Local variables are used locally for each microprogram. Each time a microprogram
is called up, new local variables (#l to #33) are secured independently for that micro-
program. For the local variables, values specified using arguments are saved or there-
sults of operation executed in the microprogram are saved.

For those for which an argument is passed, the value is saved and those for which argu-
ment is not passed, the contents are <empty>. When execution of a program returns
from the called up microprogram by the execution of M99, the local variables secured ,
for that microprogram become <empty>. They are also <empty> when the power is
turned ON or the NC is reset. m

Main program Microprogram Microprogram Microprogram Microprogram


(Level 1) (Level 2) (Level 3) (Level 4)

~ G65 W’* G65 P“= G65 P’**


G65 T’* ----

M99 M99 M99


M30 ~~ M99 -----
I Return
~ ——

1 Read/write
possible
1

#l #1 #1 #/l #1

#33 #33 #33 #133 #33


~
Local vari- Local vari- Local vari- Local vari- Local vari-
able (Level O) able (Level 1) able (Level 2) able (Level 3) able (Level 4)

Fig. 4.58 Local Variables

4-169
@ Local variables of level O are secured for the main program. For micropro-
grams, local variables are secured corresponding to the level (level 1 to level
4) of the called up microprogram.

@ If a microprogram is called up by G65, for example, the local variables used


for the program where microprogram call up is executed are saved and the lo-
cal variables are secured for the called up microprogram corresponding to its
level. In this case, the arguments are passed to the called up microprogram.
Consequently, even with the same microprogram, the local variables of the
level of that microprogram have different values if the microprogram is called
up in different timing.

@ When the execution of a microprogram returns to the microprogram one level


above by the execution of M99, the local variables of the previous micropro-
gram level are reset to <empty> and the local variables having been saved are
recovered.

@ Your should not change the contents of local variables while a macroprogmm
is being executed. If they are changed after interrupting the operation by
single block stop, make sure that the new contents do not cause problems be-
fore restarting the operation.

@ Local variables can be used in a subprogram. In this case, the local variables
of the present macrc)program level are used. Argument specification is not al-
lowed when calling up a subprogram. The contents of the local variables are
not reset to <empty>, when the execution of a program returns from the subpro-
gram by the execution of M99.

4-170
4.4 MACROPROGRAMS

(2) Common Variables (#100 to #299, #500 to #999)

Common variables means the variables that can be used in common in main programs,
subprograms, microprograms, and those called up in nesting. Therefore, the common
variable where the result of an operation executecl in a macroprogra m is saved can be
used in another microprogram. For common variables, argument specification is not
allowed.
Main program Microprogram Microprogram Microprogram Macropro
(Level 1) (Level 2) (Level 3) (Level 4)
I
I
G65 P’””
r-l
~ G65 P’”

J
-F’’l+’w

d M99 M99

Read/write permitted
I
r—l
I
#100 to #299

#500 to #999
I
I I
Common variables

Fig. 4.59 Common Variables

● Common variables are classified into two types according tc the state they are
in when the NC is reset.

Table 4.54 Common Variables

Thecontentis <empty:> when the power is turned ON or the NC is reset.


#100 to #299 By setting parameter “pm4009 D] = 1”, the content is not cleared to <empty>. 1

The content is saved and not cleared to <empty> when the power is turned ON
#500 to #999
or the NC is reset.
— A

* The number of sets of the common variables can be optionally expanded.

4-171

——.— .—..——-— —.--— — -— —


Table 4.55 Option Type and Expanded Common Variables

I Option Type I Number of Sets I


#100 to #149 (50 sets)
a
#500 to #559 (60 sets)

#100 to #199 (100 sets)

B
b
#500 to #599 (100 sets)

#100 to #199 (100 sets)


c
#500 to #699 (200 sets)

#100 to #299 (200 sets)


d
#500 to #999 (500 sets)

(3) System Variables

With the system variables, their use is predetermined as indicated in Table 4.56.

Table 4.56 System Variables

&mvariab’e
System Variable No.

#1000 to#1031, #1032

I Interface output signals I #llooto#1131, #l132

#2001 to #2299
Tool offset amount work coordinate system shift distance
#12001 to#13199
k
~ Alarm message display #3000

i Clock I #300 1, #3002

Control for single-block stop, and miscellaneous function


#3003
~ complete wait I I
~ Control for feed hold, feedrate override, and exact stop I #3004 I
~ RS-232C data output I #3100 I
~ Modal information I #4000 to #4999 I
Position information #5000 to #5999
I

4-172
4,4 MACROPROGRAMS

(a) Interface input signals


● By entering system variables #1000to#l031 in the right s~.deof an operation
expression, it is possible to read the ON/CJFF state of each of 32-point input
signal exclusively used for a microprogram.

The relationship between the input signals and system variables is indicated
in Table 4.57.

Table 4.57 Interface Input Sigrlals and System Variables

System
#1 007 #1006 #1 005 #loo4 #loo3 #loo2 #lool #1000
Variables

Input UI 7 UI 6 UI 5 UI 4 UI 3 UI 2 UI 1 UI o
Signals 27 26 25 24 23 22 21 ’20

System
#lo15 #lo14 #lo13 #lo12 #loll #lolo #loo9 #1008
Variables

Input UI 15 UI 14 UI 13 UI 12 UI II UI 10 UI 09 UI 08
Signals 2]S 214 213 212 211 210 29 28

System
#1023 #lo22 #lo21 #lo20 #lo19 #1018 #lo17 #1016
Variables

Input UI 23 UI 22 UI 21 UI 20 UI 1!) UI18 UI 17 UI 16


Signal 223 222 22I ’220 I 219 218 217 216

System
#lo31 #lo30 #l 029 #1028 #l 027 #1026 #1025 #1024
Variables

Input U131 UI 30 UI 29 UI 28 UI 27 UI 26 UI 25 UI 24
Signals 231 230 229 228 227 , 226 225 224

4-173

._. —.— ..—.,.—-. —.... —-—


The value read to the system variables indicated above is either” 1.0” or “0.0” ac-
cording to the ON/OFF state of the corresponding input signals.

Table 4.58 Value of Variables

InputSignalState VariableValue

● By entering system variable #1032 in the right side of an operation expression,


it is possible to reaci the ON/OFF state of all of 32 points of input signals (U 10
to U131 ) collectively as a positive decimal value.

#1032 = $#[1000 + i] X 2i
L=()

● Note that it is not pc}ssible to enter a value by entering a system variable (#1 000
to #1032) in the right side of an operation expression.

4-’ 174
4.4 MACROPROGRAMS

(b) Interface output signals

● By entering system variables#1100to#113 1 in the right sicle of an operation


expression, it is possible to output the ON/OFF state to each of 32-point output
signal exclusive y used for ii microprogram .The relationship between the out-
put signals and system variables is indicated in Table 4.59.

Table 4.59 Interface Output Signals and System Variables

System
#1107 #1 106 #llo5 #llo4 #llo3 #llo2 #llol #1 100
Variables
output – Uo 7 UO 6 Uo 5 Uo 4 Uo 3 Uo 2 Uo I Uoo
Signals 21 26 25 24 23 22 21 20

System
#1115 #1114 #1113 #1112 #l Ill #lllo #lio9 #1 108
Variables

output
Signals

System
Variables

output
Signals

Uo 15
215

#1123

UO 23
223
Uo 14
214

#1122

Uo 22
222
Uo 13
213

#1121

U021
221
Uo 12
212

#l120

Uo 20
’220
~
Uoll
’211

#1119
—-—L’–—
Uo 19
219

UO10
210

;%1118

UO 18
218
UC)C19
29

#1117

Uo 17
217
UO 08
28

#1116

UO 16
216
u
A

System
#1131 #l130 #1129 #1128 #1127 ~ #1126 #1125 #1124
Variables
U. ,7+;,0 ,6 –
output U031 Uo 30 UO 29 UO 28 Uo 25 UO 24
Signals 231 230 229 228 227 226 225 224
J —

4-175

.—— .—-. .. —-—


By entering “’1.0” or ‘“0.0” to the system variables indicated in Table 4.59, the cor-
responding signals are output in the ON or OFF state.

Table 4.60 Value of Variables


Output Signal Variable Value

ON 1.0

= OFF 0.0

● If a value other than “1.0” or “0.0” is set for variables #1 100 to #1131, it is
treated as indicated below.

<empty> or less than 0.5: 0.0


Other than above: 1.0

● By entering system variable #1 132 in the left side of an operation expression,


it is possible to output the ON/OFF state to the 32 point output signals (UOO
to U031 ) collectively. In this case, a positive decimal value set for #1 132 is
output after converted into a binary 32-bit value.

#1132 = ~#[1100 + i] x 2’
izo

● By entering system variables #1 100 to #1 132 in the right side of an operation


expression, it is possible to read the ON/OFF state (1.0, 0.0, positive decimal
value) output last can be read.

(c) Offset amount and workpiece coordinate system distance

Tool offset amount can be read by entering system variables #1 2001 to#13 199 in
the right side an operation expression.

Workpiece coordinate system shift distance (and workpiece coordinate system


correction amount) can be read by entering system variables #5201 to #5327,
#7001 to #7947, and #1 7821 to #1 9987 in the right side an operation expression.

By entering the system variables indicated above in the left side of an operation ex-
pression, it is possible to update the offset values.

Example of Programming

#116 = #1 2016 : Enters the content of tool offset number 16 to common varial
#116.
#5321 = #4 : Clears the workpiece coordinate system shift distance of X-a.
and sets the content of local variable #4.

4-176
4.4 MACROPROGRAMS

(d) Correspondence between system variables and tool offset numbers

The correspondence between the tool offset numbers and the system variables is
indicated in Table 4.61.

Table 4.61 Tool Offset Numbers and System Variables

Basic 299-set Option 999-set Option 11‘99-set Option



System System System System
Offset No. Variables Offset No. Variables Offset No. Variables Offset .No. Variables

J300 Series J300 Series J300 Series J300 Series



H(D)O1 #12001 H(D)O1 #12001 H(D)O1 #12001 H(D)O1 #12001
H(D)02 #12002 H(D)02 #12002 H(D)02 #l 2002 H(D)02 #12002
H/D
(used in “
common)

H(D)99 #12099 H(D)299 #12299 H(D)999 # 12999 H(D) 1I99 #13199


HO1 #12001 HO1 #12001 HO1 #12001 Ho 1 #12001
H02 #120Q2 H02 #12002 H02 # i2002 H02 #l 2002

H/D
(used for H49 #12049 H149 #12149 H499 #12499 H599 #12599
individual DO1 #12051 DO1 #12151 Dol #12501 Dol #12601
functions) D02 #12052 D02 #12152 D02 #[2502 D02 #12602

D49 #12099 D149 #12299 D999 # :[2999 D1199 #13199

4-177
(e) Tool wear offset correspondence table

The correspondence between the tool wear offset numbers and the system variables
is indicated in Table 4.62 for the NC equipped with the tool wear offset option.

Table 4.62 Tool Offset Numbers and System Variables

Basic 299-set Option 999-set Option 1199-set Option


1
{ System System System
I I %%s offset ~o, Variables Variables Variables
Offset No. I Offset No. Offset No.
I
~J300 Series J300 Series J300 Series J300 Series
I I

H(D)OI ~ #12001 H(D)O1 #12001 H(D)O1 #12001 H(D)O1 #12001


I
Geom- “
etry

HID Ii(D)49 ~ # 12049 H(D) 149 I #I2“149 H(D)499 #12499 H(D)599 #12599
(used m

common) H(D)50 I #12050 H(D) 150 #12150 H(D)500 #12500 H(D)600 #12600
!.
,.
~ w~~~ .

H(D)99 #12099 H(D)299 # 12299 H(D)999 #12999 H(D) 1199 #13199

HOI #12001 HO1 #12001 HO1 #12001 HO1 #12001


~Geom- “
~ etry
H24 , #12024 H74 #12074 H249 #12249 H299 #12299
I
HOI ! #12026 HO1 # 12076 HO1 #12251 HO1 #12301

I ~~,, .1. . ~ ~

H/D ~ H24 1 # 12049 H74 #12149 H249 #12499 H299 #12599


(used for

ndwidua) #12501
DOI i #12051 DO1 #12151 DO1 ~ DOl #12601
‘unctions)

i Geom-
etry

D24 #12074 D74 #12224 D249 D299 1 #12899


#12749
,
#12226 DOI #12751 DOI ~ #12701
-D+*6 ’01
Wear 1“ 1
D24 # 12099 D74 #12299 D249 #12999 D299 i #13199

4.4 MACROPROGRAMS

(f) Correspondence between work coordinate system shift distance and sys-
tem variables

The correspondence between the workpiece coordinate system :shift distance and
the system variables is indicated in Table 4.63.

Table 4.63 Workpiece Coordinate Shift Distance and System Variables


(6-set Basic)

System Variables System Variables


. ——
J300 Series J:300 Series

x #5201 x — #5321
Y #5202 Y #5322
G59
Correction z #5203 z #5323
amount 4 #5204 4 #5324
JI
5 #5205 5 #5325
R #5207 — R #5327
x #5221
Y #5222
G54
z #5223
4 #5224
JI
5 #5225
R #5227
x #5241
Y #5242
G55 z #5243
4 #5244
J1
5 #5245
R #5247
x #5261
Y #5262
G56
z #5263
4 #5264
J1
5 #5265
R #5267 —
x #528 1
Y #5282
G57
z #5283
4 #5284
JI
5 #5285
R #5327
x #5301
Y #5302
G58 z #5303
4 #5304
J]
5 #5305
R #5307

4-179
Table 4.64 Workpiece Coordinate Shift Distance and System Variables
[54-set Opticm (6-set Basic+ Below)]

System Variables System Variables System Variables

J300 Series J300 Seri J300 Series

x #700 1 x #7121 x #7241


Y #7002 Y #71 22 Y #7242
G54 z #7003 G54 z #7 123 G54 z #7243

J2 4 #7004 J3 4 #7 124 J4 4 #7244


5 #7005 5 #7 125 5 #7245
R #7007 R #7 127 R #7247
x #702 1 x #7141 x #726 1
Y #7022 Y #7 142 Y #7262
G55 z #7023 G55 z #71 43 G55 z #7263

J2 4 #7024 J3 4 #7144 J4 4 #7264


5 #7025 5 #7145 5 #7265
R #7027 R #71 47 R #7267
x #7041 x #7161 x #728 1
Y #7042 Y #7 162 Y #7282
G56 z #7043 G56 z #7163 G56 z #7283

J2 4 #7044 J3 4 #7 164 J4 4 #7284


5 #7045 5 #7 165 5 #7285
R #7047 R #7 167 R #7287
——
x #706 1 x #7181 x #7301
Y #7062 Y #7182 Y #7302
G57 z #7063 G57 z #7183 G57 z #7303

J2 4 #7064 J3 4 #7184 J4 4 #7304


5 #7065 5 #7 185 5 #7305
R #7067 R #7 187 R #7307
x #708 1 x #7201 x #732 1
Y #7082 Y #7202 Y #7322
G58 z #7083 G58 z #7203 G58 z #7323

J2 4 #7084 J3 4 #7204 J4 4 #7324


5 #7085 5 #7205 5 #7325
R #7087 R #7207 R #7327
x #7101 x #722 1 x #7341
Y #71 02 Y #7222 Y #7342
G59 z #7103 G59 z #7223 G59 z #7343
4 #71 04 4 #7224 4 #7344
J2 J3 J4
5 #7105 5 #7225 5 #7345
R #71 07 R #7227 R #7347

4-180

.- —..
4.4 MACRC)PROGRAMS

Table 4.64 Workpiece Coordinate Shift Distance and System Variables


[54-set Oc)tion (6-set Basic+ Below)l
— ..
(cent’d)
System Variables System Variables System Variables
-
J300 Series J300 Series J300 Series
x #736 1 x #7481 — lx: #760 I
Y #7362 Y #7482 :Yi #7602
1
G54 z #7363 G54 z #7483 G54 izi #7603

J5 4 #7364 J6 4 #7484 .J7 14 #7604


5 #7365 5 #7485 5 #7605
R #7367 R #7487 R #7607
x #738 1 x #750 1 x #762 1
Y #7382 Y #7502 Y #7622
G55 z #7383 G55 z #7503 G55 z #7623

u
J5 4 #7384 J6 4 #7504 J7 4 #7624
5 #7385 5 #7505 5 #7625
R #7387 R #7507 R #7627 A

x #7401 x #752 1 x #7641


Y #7402 Y’ #7522 Y #7642
G56 z #7403 G56 z #7523 G56 z #7643

J5 4 #7404 J6 4 #7524 J7 4 #7644


5 #7405 5 #7525 5 #7645
R #7407 R #7527 R #7647
x #742 1 x #7541 x #766 1
Y #7422 Y #7542 Y #7662
G57 z #7423 G57 z #7543 G57 z #7663

J5 4 #7424 J6 4 #7544 J7 4 #7664


5 #7425 5 #7545 5 #7665
R #7427 R #7547 R #7667
~ x #7441 x #7561 — x #768 1
Y #7442 Y #7562 Y #7682
G58 z #7443 G58 z #7563 G58 z #7683

J5 4 #7444 J6 4 #7564 J7 4 #7684


5 #7445 5 #7565 5 #7685
R #7447 R #7567 R #7687
x #7461 x #758 1 x #770 1
Y #7462 Y #7582 Y #7702
G59 z #7463 G59 z #7583 G59 z #7703

J5 4 #7464 J6 4 #7584 J7 4 #7704


5 #7465 5 #7585 5 #7705
R #7467 R #7587 R #7707

4-181
Table 4.64 Workpiece Coordinate Shift Distance and System Variables
[54-set Option (6-set Basic + Below)] (cent’d)
System Variables System Variables

J300 Series J300 Series


——
x #7721 x #7841
Y #i’722 Y #7842
G54 z #7723 G54 z #7843
4 #7724 J9 4 #7844
J8
5 #7725 5 #7845
R #’727 R #7847
x #7741 x #7861 –
Y #’742 Y #7862
G55 z #7743 G55 z #7863
4 #7744 4 #7864
J8 J9
5 #’7745 5 #7865
R #1747 R #7867
x #7761 x #788 1
Y #7T(jz Y #7882
G56 z #lj’(j3 G56 z #7883

J8 4 ##7T(jb
J9 4 #7884
5 #’7T(jS 5 #7885
R %1767 R #7887
x #T781 x #7901
Y #T782 Y #7902
G57 z #’7783 G57 z #7903

J8 4 #7784 J9 4 #7904
5 #7785 5 #7905
R #’7787 R #7907
x #7801 x #792 1
Y #7802 Y #7922
G58 z #’7803 G58 z #7923

J8 4 #’7804 J9 4 #7924
5 #’7805 5 #7925
R #7807 R #7927
x #7821 x #7941
Y #’7822 Y #7942
G59 z #7823 G59 z #7943

J8 4 #7824 J9 4 #7944
5 #7825 5 #7945
R #7827 R #7947 1

4-182
Table 4.65 Work~iece Coordinate Shift Distance and System Variables
[162-set Option (54-set Option + Below)] -

System Variables System Variables System Variables



J300 Seri J300 Seri J300 Series
——
x #17821 x #17941 x #18061
Y #17822 Y #17942 Y #l 8062
G54 z #17823 G54 z #17943 G54 z #1 8063

J1O 4 #17824 Jll 4 #17944 J12 4 #1 8064


5 #17825 5 #17945 5 #1 8065
R #17827 R #17947 R #l 8067
—.
x #17841 x #17961 x #18081 —
Y #17842 Y #17962 Y #18082
G55 z #17843 G55 z #17963 G55 z #18083

u
4 #17844 Jll 4 #17964 J12 4 #18084
JIO
5 #17845 5 #17965 5 #18085 A
R #17847 R #17967 R # 18087
x #17861 x #17981 x #18101
Y #17862 Y #17982 Y #18102
G56 z #17863 G56 z #17983 G56 z #18103

JIO 4 #17864 Jli 4 #17984 J12 4 #18104


5 #17865 5 #17985 5 #18105
R #17867 R #17987 R #18107
x #17881 x #18001 x #18121
Y #17882 Y # 18002 Y #18122
G57 z #17883 G57 z # 18003 G57 z #18123
4 #17884 4 # 18004 4 #18124
J1O Jll J12
5 #17885 5 #18005 5 #18125
R #17887 R # 18007 R #18127
x #17901 x #18021 x #18141
Y #17902 Y # 18022 Y #18142
G58 z #17903 G58 z # 18023 G58 z #18143
4 #17904 Jll 4 #18024 J12 4 #18144
J1O
5 #17905 5 # 18025 5 #18145
R #17907 R # 18027 R #18147
x #17921 x # 18041 x #18161
Y #17922 Y # 18042 Y #18162
G59 z #17923 G59 z # 18043 G59 z #18163
4 #17924 4 # 18(M4 J12 4 #18164
JIO Jll
5 #17925 5 # 18045 5 #18165
R #17927 R #18047 R #18167

4-183

——.———
Table 4.65 Workpiece Coordinate Shift Distance and System Variables
[162-set
~. ——___ ODtion
_r..–. (54-set
\– ODtion
—,–-–. + Below)l
—.. (cent’d)
,,,___,
System Variables System Variables System Variables

J300 Series ‘ J300 Series J300 Series


#18181 #18301 x #18421
‘1
T ##,g,~~
YI #18302 Y #18422
G54 ~z G54 G54
#18183 Iz #18303 z #18423
4 #18184 14 #18304 4 #18424
Ji3 J14 J15
5 #18185 5 #18305 5 #18425
R #18187 R #18307 R #18427
x #18201 x #18321 x #18441
Y #18202 iY #18322 Y #18442
G55 z #18203 G55 ~ z #18323 G55 z #18443

u
J13 4 #18204 J14 4 #18324 J15 4 #18444
5 #18205 5 #18325 5 #18445
A R #18207 R #18327 R #18447
x #18221 x #18341 x #18461
Y #18222 ~Y #18342 Y #18462
G56 z #18223 G56 z #18343 G56 z #18463

J13 4 #18224 J14 :4 #18344 J15 4 #18ti’4


5 #18225 15 #18345 5 #l 8465
R #18227 ~R #18347 R #l 8467
~
x #18241 #18361 x #18481
Y #18242 ;Y #18362 Y #18482
G57 z #18243 G57 z #18363 G57 z #18483

J13 4 #18244 J14 4 #18364 J15 4 #18484


5 #18245 5 #18365 5 #18485
R #18247 R #18367 R #18487
x #18261 ,x #18381 x #18501
Y #18262 Y #18382 Y #18502
G58 z #18263 G58 z #18383 G58 z #18503

J13 4 #18264 J14 4 #18384 J15 4 #18504


5 #18265 5 #18385 5 #18505
R #18267 R #18387 R #18507
x #18281 #18401 x #18521
Y #18282 #18402 Y #18522
G59 z #18283 G59 #18403 G59 z #18523

J13 4 #18284 J14 #18404 J15 4 #i8524


5 #18285 #18405 5 #18525
R #18287 R #18407 R #18527

4.-184
4.4 MACROPROGRAMS

Table 4.65 Workpiece Coordinate Shift Distal?ceand System Variables


[162-set Option (54-set Option -+E3elow)] (cent’d)
System Variables System Variables System Variables

J300 Series J3,00 Series J300 Series

x #18541 x #18661 x— #18781


Y #18542 Y #18662 Y #18782
G54 z #18543 G54 z #18663 G54 z #18783
4 #18544 J17 4 #18664 J18 4 #18784
J16
5 #18545 5 #18665 5 #18785
R #18547 R #18667 R #18787
x #18561 x #18681 x #18801
Y #18562 Y #18682 Y #18802
G55 z #18563 G55 z #18683 G55 z #18803

J16 4 #18564 J17 4 #18684 J18 4 #18804


5 #18565 5 #18685 5 #18805
R #18567 R #18687 R #18807

x #18581 x #18701 — x #18821
Y #18582 Y #18702 Y #18822
G56 z #18583 G56 z #18703 G56 z #18823

J16 4 #18584 J17 4 #18704 J15 4 #18824


5 #18585 5 #18705 5 #18825
R #18587 R #18707 R #18827
x #18601 x #18721 x— #18841
Y #18602 Y #18722 Y #18842
G57 z #18603 G57 ZI #18723 G57 z: #18843
4 #18604 41 #18724 4; #18844
J16 J17 I J18
5 #18605 5 #18725 5 #18845
R #18607 R #18727 R #18847
x #18621 x #18741 — x #18861
Y #18622 Y #18742 Y #18862
G58 z #18623 G58 z #18743 G58 z #18863

J16 4 #18624 J17 4 #18744 J18 4 #18864


5 #18625 5 #18745 5 #18865
R #18627 R #18747 R #18867
x #18641 x #18761 x #18881
Y #18642 Y #18762 Y #18882
G59 z #18643 G59 z #18763 G59 z #18883

J16 4 #18644 J17 4 #18764 J18 4 #18884


5 #18645 5 #18765 5 #18885
R #18647 R #18767 R #18887

4-185

...—
Table 4.65 Workpiece Coordinate Shift Distance and System Variables
[162-set O@ion (54-set Option+ Below)] . (cent’d)
System Variables System ‘Variables System Variables

J300 Series J300 Series J300 Series


x #18921 ~x #19041 x #19161
I
Y #18922 Y #19042 Y #19162
G54 z #18923 G54 ~z #19043 G54 z #19163

J19 4 #18924 J20 14 #19044 J21 4 #19164


5 #18925 15 #19045 5 #19165
R #18927 IRI #19047 R #19167
x #18941 lx #19061 x #19181
Y #18942 Iy #19062 Y #19182
G55 z #18943 GG57J1354 ~ z ~ #19063 G55 z #19183
I

J19 14 #18944 J20!41 #19064 J2 1 4 #19184


5 #18945 i5\ #19065 51 #19185
R #18947 ‘R’ # 19067 R #19187
xl #18961 x #19081 x #19201
Y! #18962 Y #19082 Y #19202
G56 z! #18963 G56 z #19083 G56 z #19203

J19 4 #18964 J20 4 #19084 J21 4 #19204


5 # 18965 5 #19085 5 #l 9205
R #18967 R #19087 R #19207
x #18981 x #19101 x #19221
Y #18982 Y #19102 Y #19222
G57 z #18983 G57 z #19103 G57 z #19223
4 #18984 J20 4 #19104 J21 4 #19224
J19
5 #18985 #19105 5 #19225
R #18987 1; #19107 R #19227
#19001 ~x #19121 x #19241
x I
Y #19002 Y #19122 Y #19242
G58 z #19003 G58 z #19123 G58 z #19243
4 #19004 J20 4 #19124 J21 4 #19244
J19
5 #19005 #19125 ,5 #19245
R #19007 RI #19127 R #19247
x #19021 +’ #19141 ~x #19261
x]
~y,
IY #19022 #19142 Y #19262
G59 ~ z ~ G59 G59 ~ z
#19023 ‘z~ #19143 #19263
4, #19024 41 #19144 J21 ,4 #19264
J19 J20
5 #19025 5 I #19145 15 #19265
RI # 19027 R #19147 ~R #19267
1
4.4 tdACROPROGRAMS

Table 4.65 Workpiece Coordinate Shift Distance and System Variables


[162-set Option (54-set Option + Below)] . (cent’d)
. —
System Variables System Variables System Variables

J300 Series J3C)0 Series J300 Series

x #19281 x #19401 x #19521


Y #19282 Y ~f194j2 Y #19522
G54 z G54 z #19403 G54 z #19523
#19283
4 #19284 4 #l 9404 4 #19524
J22 J23 J24
5 #19285 5 #tl 9405 5 #19525
R #19287 R #~19407 R #19527

x #19301 x #t]9421 x #19541 —
Y #19302 Y #t19422 Y #19542
G55 z G54 z /119423 G55 z #19543
#19303
4 #19304 4 #119424 4 #19544
J22 J23 J24
i5 #19305 5 #t19425 5 #19545
~R #19307 R #~1
9427 R #19547
lx #19321 x #@l I — x #19561 —
~Y #19322 Y #t19442 Y #19562
G56 #19323 G56 z #/l9443 G56 z #19563
Iz
14 4 #119444 4
J22 #19324 J23 J24 #19564
15
#19325 5 #t19445 5 #19565
R #19327 R /119447 R #19567
x #19341 x #19461 — x #19581
Y. #19342 Y //19462 Y #19582
G57 z #19343 G57 z //19463 G57 z #19583
4 #19344 J23 4 //19464 J24 4 #19584
J22
5 #19345 5 #19465 5 #19585
R #19347 R #19467 R #19587
x #19361 x #19481 x #19601 —
Y #19362 Y #19482 Y #19602
G58 z #19363 G58 z #19483 G58 z #19603
4 #19364 J23 4 #19484 J24 4 #19604
J22
5 #19365 5 /#l9485 5 #19605
R #19367 R /#19487 R #19607
x #19381 x 4#19501 — x #19621
Y #19382 Y /#l9502 Y #19622
G59 z #19383 G59 z ~#19503 G59 z #19623
4 #19384 J23 4 #19504 J24 4 #19624
J22
5 #19385 5 i; 19505 5 #19625
R #19387 R J*19507 R #19627
1

4-187

.—— —— _ ._. c..


Table 4.65 Workpiece Coordinate Shift Distance and System Variables
~. -—--- C)ntirm
[I 62-set —r .....,- —-. C)ntion + Below)l (cent’d)
(54-set —1------ —- .-..,, \__ ..._,

System Variables System Variables System Variables

J300 Series J300 Series J300 Series

x #19641 :x #19761 x #19881


Y #19642 !Y #19762 Y #19882
G54 z #19643 G54 ‘z #19763 G54 z #19883
4 #19644 J26 4 #19764 J27 4 #19884
J25
5 #19645 5 #19765 5 #19885
R #19647 R #19767 R #19887
x #19661 x #19781 x #19901
Y #19662 Y #19782 Y #19902
G55 z #19663 G55 z #19783 G55 z #19903
4 #19664 J26 4 #19784 J27 4 #19904
J25
5
R
#19665
#19667
is
iR
#19785
#19787 R
5 #19905
#19907
x #19681 x #19801 x #19921
Y #19682 Y #19802 Y #19922
G56 z #19683 G56 z #19803 G56 z #19923

J25 4 #19684 J26 ‘ 4 #19804 J27 4 #19924


15 #19685 i5 #19805 5 #l 9925
R #19687 !R #19807 R #19927
x #19701 ~x #19821 x #19941
Y #19702 ~Y #19822 Y #19942
G57 z #19703 G57 ~ z #19823 G57 z #19943
4 #19704 14 #19824 4 #19944
J25 J27
5 #19705 ’26 ~ 5 #19825 5 #19945
R #19707 ~R #19827 R #19947
1
x #19721 IX #19841 x #19961
Y #19722 ~y #19842 Y #19962
G58 z #19723 G58 ~z #19843 G58 z #19963
I
J25 4 #19724 J26 14 #19844 J27 4 #19964
5 #19725 :5 #19845 5 #19965
R #19727 ,R #19847 R #19967
x , #19741 ‘x #19861 x #19981
Y #19742 ,Y #19862 #19982
G59 z! #19743 G59 z #19863 G59 ~: #19983

J25 4 #19744 J26 4 #19864 J27 ‘4 #19984


51 #19745 5 #19865 5 #19985
R: #19747 R #19867 R # 19987

4-188
4,4 MACROPROGRAMS

(9) Alarm message display

By specifying “#3000 = KAlarm-numbe~ (=d.larm-rnessage>); “, the NC can be


placed in the alarm state. The timing the NC is placed in the alalm state is after the
completion of the commands in the block immediately prececiin:g the block includ-
ing the commands indicated above.

KAlarm-numbe~ : A 4-digit alarm number not used by NC.


Use of a variable is allowed.
(Alarm number range: 5000 to 5999)
<Alarm-message> : ASCII character string with 32 or less characters
(alphanumerics and special charactem)

(h) Clock

It is possible to read time by entering the system variable used for the clock in the
right side of an operation expression. If such as ystem variable is entered in the left A
side of an operation expression, it is possible to preset the time. n
Table 4.66 System Variables Used for Clock Function

‘f “s’::” ~E~~I ‘3

(i) Control for single-block stop and waiting for completion of miscellaneous
function

By setting an appropriate number for system variable #3003, the following control
is possible:
● To make valid/invalid the SINGLE-BLOCK switch setting for the succeeding
blocks.
● To advance the program to the next block without waiting for the input of the
miscellaneous function (M, S, T, B) completion signal (I7IN).

4-189

_— -—.-.——. ..-._. .—.——— —,—. -—— _


——-—. ___ .__. .—————..— .. .——-. —. ———.—... ———
If a miscellaneous funct~,on is specified with the setting that the input of the comple-
tion signal (FIN) is not checked, the distribution complete signal (DEN) is not out-
put and the program advances to the next block without waiting for the input of the
FIN signal although the output of the M, S, T, or B code and M, S, T, or B read out-
put is executed as normal. When the block in which the setting is made for system
variable #3003 so that the state for checking the input of the miscellaneous function
complete signal is executed after that, the NC outputs DEN signal and waits for the
input of the FIN signal.

When M, S, T, or B is specified in the state that the miscellaneous function com-


plete is not checked, the first appearance of individual codes is recognized and
executed. Then, the second and later appearance are disregarded until the setting
is changed to the state in which the complete signal is checked. In the state that the
miscellaneous function complete signal is not checked, the program advances to
the next block without waiting for the input of the complete signal even when the
buffering stop M code (MOO, MO1, M02, M30) is specified.

When the NC is reset, the setting for #3003 is “0”.

Table 4.67 Control for Single-Block Stop and Miscellaneous Function


Completion Waiting
#3003 S1NGLE-BLOCK Switch Miscellaneous Function Complete Signal (FIN7

o Valid Checked

1 InvaIid Checked

‘~ 2 Valid Not checked

3 Invalid Not checked

Example of Programming

M1O; +- Ml O code: MF output, DEN output, FIN checked

#3003 = 3

M20; - M20 code: MF not output, FIN not checked --


Single-
block
M25; - Disregarded “M” on display
stop FIN ~
check not {

I’
made #3003 = O + DEN output, FIN checked

M40; - M40 code: MF output, DEN output, FIN checked

4-190

44MAcRoPRoGRAMs
——

(j) Setting for feed hold, feedrate override, and positioning completion control

For the control of feed hold, feedrate override, and positioning cc)mpletion, system
variable #3004 is provided and by setting an appropriate value for this system vari-
able, it is possible to make these functions valid or invalid.

When the NC is reset, the setting is reset to” #3004= 0“

Table 4.68 Control for Feed Hold, Feedrate Override, and Positioning
Completion Functions

7 Invalid
~Q. lnvalid J

4-191

.. -—. .—-.—-— ——.——.


.- ——.
—-— ..—. — —.. - .——.-— .—.... ..—.-—. --—. — .—— ——
--- ,., .,..

lmr the reect rIom 1uncuon

The feed hold function is invalid in the following blocks.

From the block where 1,3,5, or 7 is set for #3004

To the block whare O, 2, 4, or 6 is set for #3004

The blocks for which the feed hold is made invalid are not accepted and the
feed hold signal is not output.
● For feedrate override

The setting of feedrate override is disregarded in the following blocks.

From the block where 2,3,6, or 7 is set for #3004

To the block where O, 1,4, or 5 is set for #3004


● For the positioning completion function

The check is not made for the completion of positioning.

From the block where 4,5,6, or 7 is set for #3004

To the block where O, 1,2, or 3 is set for #3004

Example of Programming for Tapping Cycle (incremental mode)

Main program
G91;
G65P9601L. .R.Z. ;

‘TT

L ~ Designation

Designation
of argument for #26

of argument for#18

Microprogram
09601 ;
#3003 = 1; ‘— SINGLE-BLOCK switch made —
invalid
Gooz#18;
#3004 = 7 ‘— Feed hold
Feedrate override Made invalid
GO1 Z#26;
Exact stop +
M05 ; IT
M04; I
#3004 = o; ‘—
v II
Gooz-#18
M05;
M03;
1.
#3003 = o; -
M99;

4-192


4.4 MACROPROGRAMS

(k) RS-232C dataoutput l(#3”!OO)

By using system variable #3 100, it is possible to output a message and variable data
to an external device via the RS-232C data inputloutput interface.

● By specifying “#3100 = (.cmessage>);”, the message enclosed by the control


out and control in codes is cwtput to an external device. The CR and LF (carrier
return, line feed) codes are automatically output at the end of the message.

If no message is input, only the CR and LF (carrier return, line feed) codes are
output. The term message indicates the ASCII character string (alphanumer-
ics and special characters) consisting of less than 120 characters.

● By specifying “#3100 = [-variable>];”, the value of <va~iable>is output as


9-digit signed decimal data (decimal fraction: 4 digits, integer part: 5 digits).
The term variable includes local variables, common variables, and system
variables. If five or more digits are specified to the right clf a decimal point,
the number at the fifth place to the right of the decimal point is rounded off.
And if six or more digits are specified in the integer part, an asterisk (*) is out-
put for such digits.

4-193

.—. -—— — .. --—-—. .——.


——-— —.
(1) Special codes that can be used in a microprogram

The allowable special codes are indicated in Table 4.69. For the characters indi-
cated by note) in the table, the tape punch pattern in the EIA code is as indicated
in Table 4.66.

Table 4.69 Special Codes

Meaning of
Application
Code

SP Comment
+
note) ( Alarm messi
and
note) ) comment
+ Addition
— Subtraction
Commenl
I Division
note) # Variable
note) * Multiplicati
note) = Equal sigl
note) [
Brackets
note) ]
$
@ Commen
?

Decimal po
note) , Comma

By using the following parameters, a hole punch pattern different from the pattern
indicated above can be set. If the setting for these parameters is “O”, the patterns
indicated in Table 4.69 are used.

4-194
4.4 hlACROPROGRAMS

Table 4.70 Hole Punch Pattern Setting Parameters

I
pm4101 1[ I prn4107 I I
pm4102

L~b!EY!Ll
pm4103

pm4104

pm4105 : EEI ; -J
Note: For these parameters, read the requiredpunch hole pattern in a binary number and convert it into a decimal number
to set.
(Example) Toset’”152’’ forpunch holepattem.

El
8 7 6 5 4 3 21
0 0 0
(m) Modal information

By entering the system variables indicated below in the right sicle of an operation
expression, it is possible to read the modal value given in blocks up to the immedi-
ately preeeding block. Note that these system variables cannot be entered to the
left side of an operation expression.

Table 4.71 Modal Values and System Variables

G code (01-group) to (*-group)


=-=--
Extended workpiece coordinate system #4080

~+ ,4=
E----R++--
#41 07

,’$=

#41 15

~+- #’$119–
T code #41 20
~ . . . .
Note I: Since an M code is non–modal information, it is not possible to read M codes using system variables.
2: Concerning E (#4 108)and F (#4109),either the E or F command specified immediate y before the specification
of the system variable is saved. Therefore, system variables #4 108 and #4109 hold the same value.

4-195

.— ———.
.—— .. —.—..—.— .-—-——. .—. ——
(n) Position information

By specifying the system variables indicated below, it is possible to read the posi-
tion information.

Note that these system variables cannot be specified in the left side of an operation
expression.

Table 4.72 Position Infclrmation and System Variables

Position Information System Variable Reading during Operation

X-axis block end point position (ABSIO)


#500 I to #5005 ‘ Possible
5th-axis block end p%t position (ABS1O)
I
X-axis position in the machine coordinate
system (ABSMT)
to #502 1 to #5025 Possible (note)
5th-axis position in the machine coordinate
system (ABSMT)

X-axis POS.ABS position (ABSC)T)


to #5041 to #5045 Possible (note)
5th-axis POS.ABS position (ABSOT)

X-axis skip signal input position (AflSKP)


to #506 1 to #5065 Possible
5th-axis skip signal input position (A13SKP)

Z-axis offset #5083 Possible

X-axis servo position error


to #5101 to#5105 Possible (note)
5th-axis servo position error
L
Note: When the system variable indicated by (note) is specified, the position information is read after the completion
of the commands speciticdin rhe immediately preceding block

Table 4.73

Abbreviation ABSIO ABSMT ABSOT ABSKP


I !
Present position of
Present position of
the command (the The position where
End point position the command (the
same value as the the skip signal is
Description of the immediately same value as the
coordinate value in turned ON (G3 I
preceding block present position
the machine coordi- block)
data)
nate system)

Coordinate Workpiece coordi- Machine coordinate Workpiece coordi- Workpiece coordi-


system nate system system nate system nate system

Tool offset —
Not included 1Included Included
amount
Note: The unit of the position information is the specified mm or inch input unit.

4.-196
4.4 MACROPROGRAMS

Table 4.74

Unit

Microns Sub Microns

Input in mm O.CIO1
mm 0.0001 mm
-j inch
00001 O.COOOlinc.1
Input in inches

~ Input in degrees 0.0001 deg


-?!%d -—
Note: Iftheskip signal istumed ONduring tlecxezution of the G3l block, theendpoint position ofthisblock is the
skip signal input position.
Iftieskip signal isnotmmed ON, tieski~signal input position istheend point ol`tht G31 block.

(o) NCparameters and battery back-up memory

It is possible to read the contents of the NC parameters and the battery back-up me-
mory.

To read them, the system variable memory number to be specified is “50000 + NC A


parameter number/memory number”, u

(Example)

Battery back-up memory


L- #5-) 100 to #57999
-—J
Note: To read dse value saved at parameter pm6000, specify as indicated below,
#100 to #56000

(4) Expression of Variables

Variables are expressed by variable numbers or alphanumerics specified following #.

● Specifying a variable number directly


#i (i: variable number)

(Example) #1, #101, #501, #2001

● Specifying an expression as a variable number


# [<expression>]

(Example) # [#101], # [#501 -Fl], # [#1/2]

4-197

..—. —-.. .—. ..— ——— .. ..——-. —-— ——.——. ——


(5) Assigning Variables

A numeric value specified following an address can be replaced with a variable.

By specifying “<address> #i or <address> – #i”, the value of the specified variable or


its negative value (complement) can be taken as the command value of that address.

(Example)

G#30=l .0 Equivalent to GO1 ‘7

x#lol, #lol=[oo.

Z#lol, #lo3=300. ~–l

F#l 40, #l 40=0.3

● For the following addresses, it is not allowed to assign a variable,

(Example)

his not allowed to use a variable for ‘“n”of “/n” (n= I to 9).

It is not allowed to use a variable for O number (program number).

If it not allowed to use a variable for N number (sequence number).


‘f: I ~

● It is not allowed tc) use a variable to express a variable number.

When replacing” 10“ in #1 O with #20, for example, expression of ##20 is not
allowed. This must be written by # [#20].

● If a variable is used as the address data, values below the minimum input unit
are rounded off.

(Example)

X#l, #l = 45.2346 X45.235 mm (0.001 mm input unit)

F#2, #2 = 0.255 FO.26 m/rev (F32 format)

G04 P#4, #3 = 5.37672 G04 P5.377 sec

M#4, #4 = 2.7236 M03

FG#4, #4= 2.7236 G03

● It is possible to use <expression> instead of a numeric value to be assigned to


an address.

By specifying “<address> [<expression>], or <address> – [<expression>]”,


the value or negative value (complement) of the <expression> can be used as
the command value for that address.

● The constant used in [ ] without a decimal point is assumed to have a decimal


point at the end.

4-198
4.4 MACROPROGRAMS

Undefined Variables

Variables which have not been defined yet are called undefined variables, and their val-
ues are <empty>. The following variables are treated as undefined variables.
● Local variables and common variables (#1 00 to #299) when the power is
turned ON or the NC is reset.
● Local variables for which arguments are not specified wherl a microprogram
is called up.
● Local variables which belong to the level of the microprogram from which the
execution of program returns by the execution of M99.
● Local variables and commcm variables where no values have been set in a mi-
croprogram.
● Common variables where no values have been set at the NC operation panel.
● Variable “#O”. (This is always treated as< empty> and must not be entered
in the left side of an operation expression.)

(a) Meaning of <empty>

If an undefined variable is iassigned, the address itself for which it is assigned


is disregarded.

#2 = <empty> ~“ GOOX#2;is equivalent to GOO;.‘—7


#2=o ~
GOOX#2 is equivalent to GoOXO;.

If an undefined variable is used in an operation expression, it:is treated to have


the variable value of “O” with the exception that it is replaced with <empty>.

#2 = <empty> #3 = ##2;indicates #3 = <empty>.

#2 = <empty> #3 = # [#2+#2]; indicates #3 = #O =:<empty>.


* ~
#2 = <empty> #3 = #1*#2; indicates #3 = <empty>.

#2 = <empty> #3 = #2+#2; indicates #3 = <empty>.


* -d
I #2 = <empty> I #3 = #2/#2; indicates #3 = <empty:>. I
#2= <empty> #3 = 5*#2; indicates #3 = <empty>.

#2= <empty> #3 = 2-#2; indicates #3 =2.


I d
#2= <empty> #3 = 5/#2 causes division error.
~ —-1

4-199

.————
● If an undefined variable is used in a conditional expression, it is treated to have
the variable value of ‘-0” with an exception of EQ and NE.

I #3 = o, #2 = <empty:> \ #3EQ #2: No,szuisfied

I ##3=o,#2 =<ernpty:> I #3NE #2: Satisfied

I #3 = o, #2 = <empty:> I #3GE #2: Satisfied

kK!uzEE~ ‘2: ‘“’satisfied ~

4-200
4.4 MACROPROGRAMS

4.4.4 Operation Instructions

By performing general arithmetic operations in which local variables, common variables,


system variables, and constants are connected with operators and functions, it is possible to
set the result of operation to the given variable.

The variables used in the arithmetic operation read the required data from the internal vari-
able data area. The result of the operation is set to a variable to write the result of the operation
to the internal variable data area. The write cycle is completed when the execution of one
block is completed.

The basic formula of arithmetic operation is” #i = <expression>”. The following operations
and functions can be used.

(1) Definition and Setting of Variables

#i = #j Definition or setting 1
#i = # [#j = #k] Indirect designation
—-’

(2) Addition Type Operations

#i = #j OR #k Logical sum (for each bit in 32-bit binary)

#i = #i XOR #k Exclusive logical sum (for each bit in 32-bit binary) 4

(3) Multiplication Type Operation



T#i=#j*#k Product 7
#i = #j/#k Quotient

#i = #j AND #k Logical product (for each bit in 32-bit binary;l

Remainder
#i = #j MOD #k (With #j and #k, remainder is obtained after rounding the values
to an integer. If #j is negative, #i is also negative.)
I

4-201
_,._--—-—. —.—. .—— —
(4) Functions

#i = SIN[#j] Sine (in units of degrees) I

#i = COS [#j] Cosine (in units of degrees) I


#i = TAN [#j] Tangent (in units of degrees) I

#i = ATAN [#j] or
Arctangent
#i = ATAN [#j/#k]

#i = SQRT [#j] Square root I


#i = ABS [#j] Absolute value I
#i = BIN [#j] Conversion from BCD to binary

#i = BCD [#j] Conversion from binary to BCD

#i = ROUND [#j] Conversion into integer by rounding off I

#i = FIX [#jl Cutting off decimal fractions I


#i = FUP [#j] Rounding off decimal fractions I
#i = ASIN [#j] Arcsine I
#i = ACOS [#j] Arccosine I
#i = LN [#j] Natural logarithm

#i = EXP [#j] Exponent with e (= 2.718. ~) as a base

(5) Combination of Operations

It is possible to combine the operations and functions explained in items (1) to (4)
above.

In this case, the priority of operation is in the order of functions, multiplication type op-
eration and addition type operation.

(Example) #i = #j + #k * SIN [#l]


@@a

(6) Changing the Order of Operations by [ ]

By enclosing a part of an expression by brackets ([ ]), that part is given priority for cal-
culation.

The brackets can be nested in up to five levels including the brackets used in functions.

(Example) #i = SIN [ [ [#j+#k] * #l + #m] * #n]


@ @ @ @@

4-202
4.4 MACROPROG13AMS

(7) Supplements to the Operation Instructions


A constant used in <expression> without a decimal point is assumed to have
a decimal point at the end. The allowable range of the constant is
+ 99999999.99999999.
● Function ROUND converts a value into integer by rounding off processing.
This processing is executed at the digit indicated below.

If used in an operation instruction, conditional expression IF or WHILE,


decimal fractions are rounded off.

If used in address data, t!nevalue is rounded off at the digit one place below
the minimum input unit of the address.

(Example 1) When #10= 12.3758,


#1 = RC)UND [#10] -+ #l = 12.0
ROUND [#IO] in IF [#10 GT ROUND [#l O]] -12.0
(Example 2) When #10= 12.3758,
GOO X [ROUND [#lO]] is equivalent to GOO X12.376
(minimum input unit: 0.001 mm).

● Numerical values treated in microprograms are floating pclint type values.


M*2E M ; One sign bit + 52-bit binary data
E: One sign bit + 10-bit binary data

● With an operation instruction, whether the NC operation stops in the single-


block mode or not when the single block input (SKB) is ON is determined by
the setting for parameter pmOO07 D 1.
I pmOO07 D1 = O I DcIesnot stop in the single block mode. I
pmOO07 D] = 1 Stops in the single block mode.
-1

4.4.5 Control Instructions

To control the program flow of microprograms, the following two instructions are provided:
branch instruction and repetition instruction.

● Branch instruction

● Repetition instruction

4-203

—.—..—. — ..—.—..——. — .—-—. —— ——


(1) Branch Instruction

By specifying “IF [< conditional expression>] GOTO <sequence numbe~; ”, the pro-
gram jumps to the block of the specified sequence number in the same program if
<conditional expression> is satisfied.

If <conditional expression:, is not satisfied, the program advances to the next block.

<sequence number> should be placed at the beginning of a block. Even if it is not placed
at the beginning of a block, the commands in the block are executed from the beginning.
When branch occurs, branch in the reverse direction takes a longer time than branch in
the forward direction.

IF [<conditional expression>] GOTO <sequence numbers;


~$sfied E
Satistied

N <sequence number>. . ..- ;


*

<sequence numbe~ : 5-digit positive integer, variable, [<expression>]

Fig. 4.60 Branch Instruction (Conditional Expression Satisfied, Not


Satisfied)

It is possible to omit “IF [< conditional expression >]. In this case, the block indicates
a simple jump instruction.

~ GOTO <sequence number>;

Simple
jump

~ N <sequence numbec-. . ..- ;

Fig. 4.61 Branch Instruction (Simple Jump Instruction)

4-204
4.4 MACROPROGRAMS

Instead of “GOTO <sequence number>”, an NC statement or macro program statement


can be specified in one block. However, the following macroprograrn statements can-
not be used due to restrictions.

● Control instructions

● RS-232C data output 2

Q Status monitoring instruction

Satisfied
~—v
IF [<conditional expression>] NC statement or microprogram statement;
Not
satisfied E.

Fig. 4.62 Branch Instruction (1-Block Instruction)

The <conditional expression> includes those indicated in Table 4.75,

Table 4.75 Types of Conditional Expressions

I Conditional Expression 1 Description I


I #i EQ #j l#i=#j I
I #i NE #j l#i##j I

IA ORB I Logical sum of A and B I


AANDB Logical product of A and B

A XOR B Exclusive logical sum of A and B

Note: Constants and <expression> can be used instead of #i and #j

4-205

.—.———— ——.—~——. -—.. ..—..—. ——-—. —.—— —


(2) Repeat Instructions
WHILE [<conditional expression>] DO<numbe~;

END <number>; cnumbe~ = 1, 2, 3

With the commands indicated above, blocks between the block next to the DO block
and the END block are repeatedly executed while the <conditional expression> is satis-
fied.

If the <conditional expression> is not satisfied, the program jumps to the block next to
the END block. It is possible to omit “WHILE [<conditional expression>]. In this case,
the block between the DO and END blocks is continually repeated.

_ WHILE [<conditional expression>] DO<number>; —


;atisfied~ Repeated
while the
Not conditional
satisfied expression
is satisfied
Em) <number>;
D-

DO .:number>; I
4
1

Repeated continuously
END1’<number>; 11

Fig. 4.63 Repeat Instruction

. DO must be specified before END.

EE
~Ote: 0, Correct, X. brco~ec[

4-206
4.4 MACROPROGRAMS

c The <number> in “DO ammbep” and “END aumbe~” must be the same
number, and DO and END must be specified as a pair.

DO1 :DO1 DO 1 DO 1

END1 END2 DO 1 END 1


...
D02 END 1 END 1

END2

0 >’ 1’..
Note: O: Correct, x: Incorrect

● The same <number> can be used as many times as required. However, the
range of repetition must nclt overlap.

DO 1 DC}l DO 1 DO 1

END 1 DC)1 DO 1 D02


...
DO1 END 1 1 END 1 END 1
:1
END 1 1 1
END 3 1
END

o x
I -Q. x
Note: O: Correct, x : Incorrect

● Nesting of DO to END loop is allowed for up to three levels in a microprogram


or subprogram.
From the DO to END loop, it is possible to call up a microprogram or subpro-
gram. In the call up program, nesting of the DO to END loop is also allowed
for up to three levels.
——
DO1 DO1
DO1
D02 D02
/-
G65P***
D03 D03
M98P***
END3 1 END3 1
END 1
;]
END2 \:”] END2

END 1 END 1
0 0
Note: 0: Correct

4-207

———.——.. —..—.—-—...—,———
——.
● By specifying “GOTO <sequence numbe~”, it is possible to jump from the
DO to END loop to a block outside the loop. However, jump into the DO to
END loop by using “GOTO <sequence number>” is not possible.

- DO1 — GOTO <sequence numbe~


to
- GOTO <sequence numben=- ...
to
- END 1 DO 1

E
to
... N <sequence number=-
to
- N <sequence numbe~. ..; END1

o x

DO 1

1
to
IF [<conditional expression>] GOTO <sequence numbel>
to
END 1

...
I
k N sequence numbe~ -. ;

o
Note. C) Correct, x : Incorrect

.—..-.-.- .. ....- ——..-—... -..-..—-. —.”——-..—-— .= —...— —-——.——...-— —... -—.-. —. —..—.

@!EB For the execution of an operation instruction, operation stops or does not stop in the
single block stop mode if the single block input (SKB) is ON according to the setting
for parameter pmOO07 D 1.

pmOO07 D 1 = O Does not stop in the single-block mode.

pmOO07 D] = 1 Stops in the single-block mode.

-—— —-. —. ...—.-—-.. —.---. ———.. ———.—... — ————”.

4-208


4,4 MACROPROGRAMS

4.4.6 Registering the Microprogram

Microprograms can be registered and edited in entirely the same manner as registering and
editing normal NC programs and subprc)grams.

For this registration, there are no limits in the size of microprograms; NC programs, subpro-
grams and microprograms can be storecl to the limit of the memory capacity.
The program numbers to be used when registering microprograms are classified as indicated
in Table 4.76 according to their applications.

In addition to the classification indicated below, the program numbers tc~be used specially
for microprograms can be set to clear] y identify them from NC programs and subprograms.
Whether the program number range should be secured for microprograms or not can be set
by using a parameter.

Table 4.76 Classification of M.acroprograms

I==H-=7 -Y
Classification by Applications

There are no restrictions on registration, deletion or

Microprograms can be protected from edit and dis-


08000 to 08999 play; edit protect and display protect can be set in- Protect I
dependently by using a parameter.

Microprograms can be protected from edit and dis-


I 09000 to 09999 play; edit protect and display protect can be set col- 1 Protect 2 I
L 1
Iectively by using a parameter.

There are no restrictions on registration, deletion or


4 4
o I0000 to 099999
I editing. 1 I

● To disable all of edit, input/output, and display of 08000 LO08999:


pmO020 DO = 1
● To disable edit and output/input and enable display of 08000 to 08999:
pmO020 DO = O and pmO021 DO= 1
● To disable all of edit, input/output, and display of 09000 to 09999:
pm3004 DO = 1 and pmO022 DO = O
● To disable edit and output/input and enable display of 09000 to 09999:
pm3004 DO = O and pmO022 DO = 1

For 09000 to 09999, an option is provided to disable all of edit, input/ctttput, and display
always disregarding of the setting for prn3004 and pmO022.

4-209

-—— —.— .—. ——


4.4.7 RS-232C Data Output 2 (BPRNT, DPRNT)

The microprogram commands indicated below are possible in addition to the RS-232C data
output 1, explained in 4.4.3 (3), (k). These commands are used to output variables and char-
acters through the external device that has the RS-232C interface.

● Open command (POPEN)

“ Data output command (BPRNT or DPRNT)

“ Close command (PCLOS)

(1) Open Command (POEN)


POPEN [ a ] ;
L RS-232C
channelnumber

With the command indicated above, the DC2 control code is output from the NC.
This command should ‘be specified prior to the series of data output commands.
For the RS-232C channel number, either” 1” or ‘“2” (option) can be specified; if no
number is specified, No. 1 RS-232C channel is specified.

(Example)
POPEN; Opens the No. 1 RS-232C channel.
POPEN [2]; Opens the No. 2 RS-232C channel.

4 210
4.4 MACROPROGRAMS

(2) Data Output Command (BPRNT or DPRNT)

(a) BPRNT
BPRNT [a#b [c] ~. “ ];
L Numberofdigitsrighttothedecimalpoint
11
~ variable
I
-— Character

With the commands indicated above, the character and the variable are output from
the NC.

● Concerning characters, the specified characters are output in the ISO code.
The following characters can be specified: alphabets (A to Z), numbers, and
special characters (*, /, +, --). Note that “*” is output in a space code.

● Variable value is treated as the 2-word (32 bits) data with the number of digits
right to the decimal point taken into consideration, and the value is output in
the binary data from the higher byte. Since the values of all variables are saved
with the decimal point, it is necessary to specify the number of effective digits
right to the decimal point following the variable command in brackets. After
the output of the commancl data, the EOB code is output in the 1S0 code.

(Example)
With the designation of “BPRNT [POS**X#l 00 [2] Y#101 [1]];”, the following
is output if the values of the variables are “#100 = 1.2096” and “#1 01 = 2.623”.
50 CF 53 AO AO D8 00000079 59 000000 1A ——
0/4
5 6 G SpaceSpace ‘X’ — 121 ‘Y’ 26 ECIB

(3
Supple-
ment
When outputting the data using the BPRNT command, it is not influenced by the fol-
lowing parameters.

● Parameters other than pmOO04, pmOO06 D4 and D6, and pmOO09

To use the BPRNT command, set the communication control parameters as NO for
control code control and YES for RT!; control.
.——.— .. ..—. .— — ——

4-211

.—.. — .. .. ——.—.—.
(b) DPRNT
DPRNT[a#b [cd] ~~ ];
‘~ T
‘— Numberofdigitsrighttothedecimalpoint
~— Numberofdigitslefttothedecimalpoint
L — Variable
~_ character

With the commands indicated above, the character and the variable are output from
the NC.

Concerning characters, the specified characters are output in the ISO code as
with the BPRNT command.
● Concerning variable value, it is output in the 1S0 code digit by digit by the spe-
cified number of digits from the higher digit position. The decimal point is
also output in the 1S0 code. To output the variable value, specify the variable
number following the symbol of “#’ and then specify the numbers of effective
digits left and right to the decimal point individually in brackets. In this desig-
nation, the variable value is assumed to be a maximum of eight digits (c + d
S 8).

If the specified number of digits right to the decimal point is not “O”, the nu-
meric value is always specified by the specified number of digits. If it is “O”,
the decimal point is not output.

pm4090 D2 = O Space code is output. 1


I pm4090 D2 = I 1 Nothing is output. I

● After the output of the command data, the EOB code is output in the 1S0 code.

● The variable of< (empty > is regarded as ‘-O”.

(Example)
With the designation of “’DPRNT [POS X#l 00 [43] Y# 101 [43]];”, the following
is output if the values of the variables are “#100= 12.479” and “#101 = 1.568”.

0 If the parameter setting is “to output space code” (pm4009 D2 = O)


50 D8 AO AO B1 B2 2E B4 37 39 59
CF 53
‘P’ ‘X’ spacespace 1
‘o’ ‘s’ 2 4 7 9 CY
~ A~A~ ~213536B8~
Space SpaceSpace 1 5 6 ~ EOB

. If the parameter setting is “to output nothing” (pm4009 D2 = 1)


50 CF 53 D8 B1 B2 2E B4 37 39 59 B1 2E 35 36 B8 OA
‘P’ ‘o’ ‘s’ ‘x’ 1 2 4 7 YT17T5TTEoB

4-212
4.4 MACROPROGRAMS

(3) Close Command (PCLOS)


PCLOS [ a ];

t-- RS-232C channel number

With the command indicated above, the DC4 control code is output from the NC. For
the RS-232C channel number, either” 1” or “2” can be specified; if no number is speci-
fied, No. 1 RS-232C channel is specified.

(Example)
PCLOS; Closes the No. 1 RS-232C channel.
PCLOS [2]; Closes the No. 2 RS-232C channel.

(4) Supplements to RS-232C Data Output 2

● To output the data using the BPRNT or DPRNT command, set “O” for pmOO04
D5. If” 1” is set for pmOO04 D5, the data cannot be output correctly.

pmOO04D5 = O Parity bit output in tape punch in the 1S0 code

pmOO04D5 = i Parity bit not output in tape punch in the 1S0 code+

● Set the parameter so that the RS-232C is used as the output interface.

● It is not necessary to specify the open command (POPEN) and the close com-
mand (PCLOS) continuously. Once the open command is executed, the chan-
nel remains open until the close command is specified next.

● If the command being output by the data output command is reset, processing
stops and the succeeding data is lost. Therefore, if the NC is reset by the M30
command at the end of the program in which data is being (output, specify the
close command at the end of the program and execute the processing of such
as the M30 command only after all data has been output.

. The open and close commands must always be specified in a pair. It is not al-
lowed to specify the close (command although the open command is not speci-
fied.

4-213

-— ——.— .. .. —-- —-— ——.— .—-—


4.4.8 Microprogram Alarm Numbers

Alarm numbers related with microprograms and the cause of them are indicated in
Table 4.77.

Table 4.77 Macroprogralm Alarm Numbers


Alarm No. Description Alarm No. Description I
~ONSTANT DATA OUT OF RANGE 0 DIVIDE IN MACRO I
0210 In a microprogram, specified constant is out- 0221 In a microprogram, division by “O” is I
side the allowable range. executed.
UNMATCH G67 COMMAND ROOT VALUE NEGATIVE
0211 The number of G67 commands is greater than 0222 A negative value is specified for square root
the number of G65 and G66 commands. operation. +
MACRO FORMAT ERROR FLOATING DATA OUT OF RANGE
0212 0223 Floating point data exceed the allowable
There is an error in microprogram format
range.
—1
i:NDEF INED # NO, G66-M99 PROG ERROR
~~
0213 ~ value not defined as a variable number is 0224 An axis move command is speclfled w}th
used. M99 in the modal call (G66) mode.
ILL LEFT SIDE # NO. MACRO SYSTEM ERROR +
0214 A variable that cannot be used is set in the left 0225
Overflow with operation stack.
side of operation expression. 1
[ ] LIMIT OVER I
0215 0226 The result of function operation (ASIN,
Nesting level of brackets [ ] exceeds the limit. -ACOS, LN, SQRT) is outside the allowable
range.
MACRO CALL LIMIT OVER EXCHANG OVERFLOW
0216 fiacroprogram call up nesting level exceeds 0227 I

the limit.
Ovefflow during conversion into integer.
I
fiO-END FORMAT ERROR BCD INPUT DATA OVERRFLOW I
0217 ~0 and END instructions are not specified in 0228
pairs.
Overflow of input data for BCD function.
I
~] UNMATCH BIN FORMAT ERROR
0218 The numbers of left parentheses [ and right 0229 There is an error in format with the BIN func-
blacket ] do not match. tion.
DO-END NO.OUT OF RANCE EXP OUTPUT DATA OVERFLOW
-–+
0219 In “DO m“ command, ‘“m”is not in the range 0230
Ovreflow with the EXP function.
ofl SmS3.
~OTO NO.FORMAT ERROR

0220 ‘me value of ““n”in the “GOTO n“ command I


is outside the allowable range, or the specified
“n” is not found.

4-214
4.4 h!ACROPROGRAMS

4.4.9 Examples of Microprograms

Some examples of microprograms are explained below.

(1) Microprogram in a Canned Cycle

(a) Canned cycle with G82

Example of Programming (PI)

G91;
G82X1OO. Y50. R-80. Z-40. P3.O F250;

The commands indicated above are executed according to the following processing
in the NC.
Example of Programming (P2) +Z
(i)
A o----q
G91;
(i) GOOW1OO.Y50.; (ii) ; ?
I
(ii) GOOZ-80.; 8 I
I
(iii) GO IZ-40. F250; / (v)
(iv) G04P3.; (dwell) I
(iii)
(V) GOOZ- ( (-80) + (-40));
i I
J-J
*
i
Dwell
(iv)

All axis move distances shcmld be replaced with variables (local variables: #1
to #33).

For local variables, type I and type II variables are provided. ‘When the number
of local variables to be handled is small, it is recommended to use type I local
variables which allow the use of X, Y, and Z, thus facilitating assigning of ar-
guments.

By using type I local variables, local variables are assigned to address charac-
ters as indicated below.
X1OO.Y50. R-80. Z-4. P3.O F250
TT7T-~~
#24 #25 #18 #26 ? #9
Here, address P cannot be used for assigning argument. Therefore, address P
should be replaced with another address.

4-215

-—. —-—. — .—-—


@ Since the dwell is a timer function, it can be replaced with address U.
P3.O - U3.O

t
#21

@ By using these variables, the example program (P2) can be written in the fol-
lowing manner. To carry out operations by using the variables used as the ad-
dress data, the data must first be rounded off to a number that meets the mini-
mum input unit.

In this example, when returning the Z-axis to the start point, the axis move
amount specified in the axis return block must be 120.002 if the contents of
#18 and #26 are –80.0006 and –40.0006, respectively with a minimum setting
unit being 0.001 mm. Otherwise the Z-axis cannot be returned to the start
point.
If ROUND function is not used, rounding off is executed for the result of op-
eration; that means the Z-axis move distance in the return block is calculated
to be “120.001”.
Example of Programming (P3)
#24, #25
G91; o--–--y o
GOOX#24, Y#25; If
GOOZ#l 8; #18 ~ 1
GOlZ#26 F#9; Ii
G04P#21 ;
/
GOOZ- [ROUND [#l 8] + [ROUND [#26] ] ;
#26 I
M99 ;
L
Dwell time
#21

4-216
4.4 MACROPROGRAMS
——

(b) Calling up a microprogram by using G65

Example of Microprogram Call Up Program (P4)

G91;
G65 P9082 X 100. Y50. R–80 . Z–40.
U3.O F250.;

Use the example program (P4) as the macrc)program and assign program num-
ber “09082” to this macroprograrn.

09082;
GOOX#24 Y#25;
Gooz#18;
GOlZ#26 F#9;
G04P#21 ;
GOOZ- [ROUND [#l 8] + ROUND [#26] ] ;
M99;
With the microprogram indicated above, it is necessary to specify the R-point
and Z-point levels for each execution of the microprogram. Therefore, anoth-
er microprogram should be written which specifies the position of the R-point
E
A

and Z-point levels.

09000;
#100 = #18;
#101 = #26;
#lo2 = #21;
#lo3 = #9 ;
M99;

09082;
GOOX#24 Y#25;
GOOZ#l OO;
GOIZ#lOl FI03 ;
G04P#l 02;
GOIZ- [ROUND [#100]+ ROUND [#101] ] ;
M99;

The program used to call the microprograms indicated in item @ above is in-
dicated below.

G91;
G65 P9000 R-80. Z–40. IJ3.O F250.;
G65 P9082 X1OO. Y50.;
G65 P9082 X. . . Y. . . ;
.....

4-217

—-——..——.—,
_———.—..—. -—
(c) Example of control instructions using modal information

With the programs indicated above, the Z-axis returns to the initial point level.
When giving the commands for initial point level return (G98) and R-point level
return (G99), it is possible to change the command that specifies the tool return lev-
el according to the present mode (G98 or G99); the present mode is found by check-
ing the modal informaticm. For this check, modal information variable can be used.

System variable #401 O should be used since G98 and G99 are G code of
10-group.

To change the tool return level command, use “IF o “ “ GOTO o “ “ “ com-
mand.

It is possible to retain the G code of 01 -group, which is valid before the execu-
tion of a microprogram, after the execution of the microprogram. “G codes
of 01-group” means GOO, GO1, G02, G03.

Example of macroprograrn call up program

G91 G99;
G65 P9000 R–80. ;L–40. U3.O F250;
G65 P9082 X-1OO Y50.;
G65P9082X . . .. Y...-..
.....
G98;
G65P9082X . . . .. Y.......

4-218

——
. ----- . . .
4,4 lMACROPR~~RAMS .
P—

@ Exampleofmacroprogran~

09000
#100 = #18:
#101 = #26;
#lo2 =#21;
#lo3 = #9; \
#lo4=o;
----- ------ ----- -—. - . ---- ---
09082;
#lo4= #lo4+l;
#1 = #4001” GO to G3
#2 =#4010~ . ””’””””””
......... G981G99
GOOX#24 Y#25;
IF [#104 NEl] GOTCJ1;
GOOZ#lOO;
N1 GO1 ‘2X1O1F#103;
G04 P#102;
IF [#2 EQ98] GOT~!;
GOOZ- [#101] ;
GOT03;
N2 GOOZ- [ROUND [#100] + ROUND [#101] ] ;
N3 G#l; . . . . . . . . . Recovering the G code
M99;

4-219

—.. - .——-.
Ozz b
66Pi I
[ [01#] CINflOEl +
[ool#l aNnoHl -z 009 ha]
I A
1
665/86!3 oLot’# = z# 1
I
( )
Iatel lu!od-~ Z8060
o = bol#
4.4 MACROPROGRAMS

(2) Example of Pocket Milling

The following gives an explanation on a microprogram used for executing pocket mill-
ing as shown below.
(Allowance for roughing)

\\\\\\\\\\.\\\ y 4

+Y
7
Width of cut
+
L
g ~

Start point -lL


I
t
_———— --i ~ 1mm (Allowance for roughing)
+Z
Q Depth of cut) q A
3
z
u
— x
‘ X? . . . . . . . . ..p $
Allowance for finishing Specified pocket

4-221

.—. ——
Microprogram call up is specified as indicated below.

E, . . . . where,

x, Y Absolute coordinate value of start point (lower left end of


pocket)
z Absolute position of the bottom of pocket

R Absolute position (level) for tool return at rapid traverse

I, J Length, of pocket in the X- and Y-axis direction (unsigned)

K Allowance for finishing (allowance to be left, unsigned)


“O” if not specified.
T Width of cut ratio (in % of tool diameter)
Width of cut= Tool diameter X T/100

u
A
Q
D
F
E
Depth of cut per cycle (unsigned)
Tool oFfset number
Feedrate in the XY plane
Feedrate for Z-axis cut-in

t
(Up to a level 1 mm above the previously cut level, “E X 4“)

~h .
4xE

li+ ET
L,..

4-222

.-.—...
— .. ———
_.._ ___
4.4 MACROPROGRAMS

@ Inthefinal process, allowallce forroughing (lmmwidth), !eftont heallow-


ante for finishing, is removed in one cycle inside the pocket. After that the
axes return to the start point to end the microprogram.

Projection left uncut

Start point (
Allowance for roughing (1 mm)

4-223

.—. ——.—....
-...—.——. —-..—.—. ——— ——.—.. —-—
The microprogram is indicated below. Refer to the supplemental explanation
given for each block.
09061;
#’lo = # [2000+#7] Radius of cutting tool
#11 = #6+1 .O+#lO;
#12 = #5-2*#10;
#13 = ‘2*#lo*#20/loo Width of cut
#14 = FUP [#l2/#113] Number of cuts (X-axis direction) – 1
#27 = #24+##ll; Start point of machining
#28 = #25+#11 ; X and Y coordinate values
#29 = #26+#6; – Z coordinate value of bottom level
#30 = #24+#4-#11 ;
#15 = #4003 — Reading ofG90/G91
G90; Designation of absolute mode

GOO X#27 Y#28;


GOO Z#18;
#32 = #18; — #32: Bottom of present cutting
DO1;
#32 = #32417;
IF [#32 GT#29] GOTOl ;
#32 = #29;
N1 GOl Z#32 F#8;
GO1 X#30 F#9;
#33 = 1;
WHILE [#33 LE#14] D02;
IF [#33 EQ #14] GOT02;
GOIY [#28+#33*#13] F#9; _
GOT03;
N2 GO1 Y [#25+#5+11] ;
N3 IF [#33 AND 1 EQ O] GOT04;
GO1 X#27; Cutting pattern in this loop
GOT05; r
N4 GOI X#30;
N5 #33 = #33+l;
END2;

4-224

..— —..-
44 MACROPROGRAMS

GOO Z#18;

IF [#32 LE#29] GOT06;


GOOX#27 Y#28;
GOl Z [#32+1 .0] F [4*#8] ;
END 1:
N6#ll =#11-1.o;
#27 = #27-1 .0;
#28 = #28-1 .0:
#30 = #30-1 .0;
#31 = #25+#5--#l 1
GOO X#27 Y#28;
Rough finishing cycle
GOl Z#32 F#8;

Golx#30Y#9;
Y#31;
X#27;
Y#28;
J
GOOZ#18;
GOO X#24 Y#25; — Return to the start point.
G#15; — RecoveringG90/G91
M99;

4-225

.—-— —
G CODE TABLE

Appendix 1 describes the G code and the functions.

1.1 G CODE TABLE . . . . . . . . . . . . . . . . . . . . Al-2

Al-1

—..-——
APPENDIX 1.1 G CODE TABLE

Appendix Table 1.1 G Code Table

G Code Group Function I Refer to



GOO #1 Positioning (rapid traverse) 2,1.1

GCII #1 Line<irinterpolation 2.1.2 ~


01
G02 :ircular interpolation CW, helical interpolation CW 2.1.3,2.1.4
~
G03 ~ircu]ar interpolation CCW, helical interpolation CCW 2,1.3, 2.1,4

G04 Dwell 3.3.1

G06 positioning (error detect OFF) 2,1.1

G09 Sxact stop 3.3.2 i


*
GIO programmable data input 4.1.6

G12 :ircle cutting CW 4,1,4 ~

G13 ~ircle cutting CCW 4.I.4 I


+
G17 #2 ‘lane selection (XY) 3,1.6

G18 02 %mc selection (ZX) 3.I.6

G19 ~larm selection (YZ) 3.1.6


4
j
G20 !npu[ unit system designation (inch) 3.2.2
06 +
G21 [npw unit system designation (mm) 3.2.2
_

G22 stored stroke limit ON 4.2.3 ;


04 I
G23 Storedstroke limit OFF 4.2.3
I
G~5 %ogram copy 4.2. I
—1
G27 Reference point return check + 2.2.2
-~
(328 Automatic reference point return 2.2.1
*
G29 Retum from reference point 2.2.3

G30 Second, third, and fourth reference point return 2.2.4

G3 I Skip function 4.3.1

Tool radius offset, cancel 3.4.4


G40 #1
Ttm-dimensional tool radius offset, cancel 3.4,5

Tool radius offset, left 3.4,4


G41 07
Thre,:-dimensional tool radius offset, left 3.4,5

Tool radius offset, right 3.4.4
G42
Thre,>-dimensionaltool radius offset, right 3.4.5

G43 #2 Too}length offset, + 3.4.2 ,

G44 #2 08 Tool length offset, –

G49 #2 Tool length offset, cancel


3

Al -2
Appendix Table 1.1 G Code Table (cent’d)

I GCode I Group Function I Refer to I


I G45

G46
I

* Tool position offset, extension

Tool position offset, reduction


I
I
3.4.3

3.4.3
I

H
I
G47 Tool position offset, double-extension I 3.4.3 I

G48 Tool position offset, double-reduction I 3.4,3 I

H
I G52 #2 1
08
12
Scaling OFF

Scaling ON

Local coordinate system


I

I
I
3.2.3

3.?.3

3.1.3
I

I
Machine coordinate system

Shift toworkpicce coordinate system I -+ ::::4
Shift to workpiece coordinate system 2 I 3.1.2 I
Shift to workpiece coordinate system 3 I 3.1.2 I
t-%---i ‘2 Shift to workpiece coordinate system 4 I 3.1.2 I
I G58 I Shift to workpiece coordinate system 5 I 3.1.2 I
I G59 I Shift to workpiece coordinate system 6 I 3.1.2 I
I G60 I 01 Unidirectional positioning
— I 2.1.1 I

w
I G65 I*
‘3
Exact stop mode
Exact stop mode, cancel
Microprogram simple call
3.3.3
3.3.3
4.4. I
Microprogram modal call 4.4. I
t---%%- 14 Microprogram modal call, cancel

4.4. I
Coordinate rotalion ON 3.1.5
H&--i ‘8 Coordinate rotaiion OFF 3.1.5

w. G72
Bolt-hole circle
Arc
Line-at-angle

4,1.2
4,1.2
———
4.1.2
G73 Canned cycle (high-speed deep hole drilling) 4.1.1
G74 Canned cycle (reverse tapping) 4.1.1,4,1.3

G76 Canned cycle (boring) 4.1.1
G77 Canned cycle (back boring) 4.1,1
G80 #1 Canned cycle, cancel 4.1.1
G81 Urrrrredcycle (drilling), external operation function 4.1,1
G82 Canned cycle (spot facing) 4.1.1
09
G83 Cannedcycle (deep hole drilling) 4.1,1
G84 :anrred cycle (tapping) 4.1.1,4.1,3
G85 Dannedcycle (boring) 4.I.1

G86 :armed cycle (boring) 4.1.1
G87 2mred cycle (boring) 4.1.1

G88 Dannedcycle (boring) 4.1.1
G89 2umed cycle (boring) 4.1.1

Al-3
Appendix Table 1.1 G Code Table (cent’d)
1 1 1

G Code Group Function Refer to


G90 #2 Absoluteprogramming 3.2.1
03 ~
G91 #2 ~Incrementalprogramming 3.2.1 i
-. —-F- --~: — — #
I G9? 1Coordinatesystemsetting 3.1.1 i
1 1

- G93 ~ Solid tap mode 1,2.5


G94 #1 Feed per minute mode, solid tap mode cancel 1.2,4
G98 #2 % Canned cycle, initial level return 4.1.1
10 ~
G99 ~Canned cycle, R-point level return 4.1.1
k
I
I
“06 J ‘ Automatic comer override 4.2.2
GI07 I* ~Comer cutting feedrate designation 4.2.8
GI08 Corner cutting feedrate designation cancel 4.2.8
G126 I Polar coordinate mode 4.1.8
23
GI~7 Polar coordinate mode cancel 4.1.8
G128 Cylindrical interpolation 4. I.9
22
G129 Cylindrical interpolation cancel 4.1.9
G174 Deep hole solid tap 4.1.4
G181 Canned cycle (2-step drilling) 4.1.1
~Canned cycle (2-step spot facing)
.A~
I G184 ~~hole solid tap cancel
~ G185 ~ 09 ~
_Canned cycle (2-step boring)
*a
G186 Canned cycle (2-step boring)
~–d

Note 1: The NC establishes the G code modes, identified by #l, when the power Mturned ON or when the NC is reset.
2. The NC establishes the G code modes, identified by #2, when the power is turned ON.
3: If both #1 and #2 are indicated in the same G code group, the G codes which should be valid when the power
is turned ON can be selected Ibythe setting for the appropriate parameters.
c)
APPENDIX ~

INDEX
A

m
In Appendix 2, technical terms specific to NC and .1300M are
arranged in alphabetical order.
Please use this index when looking for descriptions using the
technical term as the key code.

A2-1

.—. ———
A DETERMINING THE COORDINATE VALUE INPUT
MODE S . . . . . . . . . . . . . . . . . . .,. .,, , . . . . . . ...3-22
Absolute, Incremental Designation 3-22 DPRNT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-210
Absolute/Incremental Designation Commands 4-20 dummy block..........,.. .. 3-64
Acceleration and Decele]-ation for Cutting Feed ....... I -36 Dwell . . . . . . ...3-31
Accelem[icrn and Deceleration in S-cume Pattern I -35
Addition Type Operations ., . . . . . . . . . . . . . ...4-201 E
Address Characters . . . . . . . ...1-16
Alarm message display . .,..........,............4-189 Endof Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-100
Arc Command . . . . . . . . . . ...4-36 Endof Tape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-100
argument specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4 -164 entry prohibited area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4 -109
Automatic Acceleration and Deceleration 1-34 Error Detecticnr OFF Mode,,.,.,,.. . .,, . . . . . . . . . . . . . . . . . . ...3-32
Automatic Comer Ovemide, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-104 Ecror Detection ON Mode,,,,,,,, ,, ., . ., . . . . . . . . . . . . . . . . ...3-32
Automatic Reference Point Return for Rotaty Axes ., ., 2-18 Ecror Detection ON/OFF for Rapid Traverse Operation ., 3-32
Automatic Retumto Reference Point ., . . . . . . . . . . . . . . . . . . . . . ...2- 16 Exact Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-31
AUTOMATING SUPPORT FUN~IONS . . . . . . . . . . . . . . . . . . . ..4-l38 Exact Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-32
Examples of Microprograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-215

B
F

G
G CODE TABLE, . . . . . . . . . . . . . . . . . ,., ... ... ,,, ,,. AI. . . . . .. AI-2

c H
Helical hrterpolaticrn , .,, ,, .,, , .,, ., ., . . . . . . ...2-14
High-speed Cutting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-116
High-Speed Deep Hole Drilling . . . . . . . . . . . . . . . . . . . . . . . ...4-22
High-speed reference point return.... . . . . . . . . . . . . . . . . . . . . . . ...2-17
Hole Machining Pattern Cycles. . ..4-34
Hole Punch Pattern Setting Parameters . . . . . . . . . . . . . . . . . . . . . . . . 4-195

I
hrch/Metric Input Designation.,..,.. . .,, .,, ,, . ., .,, . ., . . . . ...3-24
Initial Point Level . . . . . . . . . ...4-8
Input Fomnat . . . . . . . . . . ...1-20
Interface input signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-173
Interference Check . . . . . . . . . . . . . . . . .,, ,, . ., . . . . . . . . . . . . . ...3-79
IntermediatePositioningPoint ,.. ,, . . . . . . . . . ...2-25
lntemally Processed MCedes ..... . . . . . . . . . . . . . . . . . . . . ...3-101
D INTERPOLATION COMMANDS. ., . . . . . . . . . . . . . . . . . . . . . . ...2-2

Deep Hcrle Dr)llmg ,. ,. 4-22


Deep-hole Solid Tap Function,. .,. . . . . . . ...4-50
Definitmn and Setting of Variables 4-2ot

A2 -2
Positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...2-2
L
Positioninginthe Emor13etectOFF Mode .. .. . . . 2-4
Positioningirrthe Error DetectON Mode . . . . . . . . . . . . . . . . . . . . . ...2-3
ProgramCopy . . . . . . . . . . . . . . . . . . . . . . .4- 101
ProgramCopyNesting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-102
ProgramEnd . . . . . . . . . . . . . . . . . . . . .. 1-12
Prof;ramFoonat . . . . . . . . . . . . . . . . . . . . . .. 1-13
,, Pro~raminterruptFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-141
Profyamnumbcr ... .. . . . . . . . . . . . . . ...1-14
ProgramPatt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...1-13
ProgramStart . . . . . . . . . . . . . . . . . . . 1-12
PrOgramStOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-100
M PROGRAMSUPPORTFUNCTIONS 4-3,4-101
Pro~rammableData hrput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-76
M Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-100
Machine Ccadinate System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3- 15
Microprogram Alarm Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-214
R
Microprogram Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-156 Rapid Traverse . . . . . . . . . . . . .. . .. 1-26
Microprogram Call Up by BCode .... . . . . . . . . ...4-161 Reciprocal feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..$-10
Microprogram Call Up by MCodes ... . . . . . . . . . . . . . . . . . ...4-158 REFERENCE POINT RETURN . . . . . . . . . . . . . . . . . . . . . . . . . . . ...2-16
Microprogram Call Up by TCode .... . . . . . . . . . . . . . . . . . ...4-161 RefwencePointR
etumCheck . . . ... . . . . . . . . . . . . . . . . . . . . . . . . .. ’2-22
MICROPROGRAMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-154 Registering the Macropr’ogram 4-209
Maximum Cumulative Values.. . . . . . . . . . . . . . . . . . . . . . . . . . . ...1- 10 Repeat [nstructicrns . . . . .4- 206
Maximum Programmable Values for Axis Movement I -9 Retamfrom Reference Point Return.... . . . . . . . . . . . . . . . . . . . . ...2-24
Mid-retract command . . . . . ...4-25 Reverse tapping command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-28
Mirror Image External Input Function . . . . . ...4-73 Reunionof WorkpieceCoordinateSystem 3-7
Miscellaneous Function . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-100 RS-232Cdataoutput l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-193
Modal Call Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-157 RS-232CDataOutpctt2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-210
Modal call up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-163
Modal reformatio n. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-195
Multi-actlve Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...1-25
s
Multiplication Type Operation ..,.... . . . . . . . . . . . . . . . . . . . . . ...4-201 Sanction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...1-98
Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-26
SecondMiscellaneousFunction(B Function) . ... . . . . 3-102
N
Sec[]ndto FountlReferencePoint Return . . . . . . . . . . . . . . . . . . . . ...2-28
NCparameters . . . . . . . . . . . . . . . . . . . , . . . . . . . . . . . . . . . . . . . . ...4-197 Selectingthe CoordinateSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-3
Nesting of Macroprogmm Call Up . . . . . . . . . . . . . . . . . . . . . . . . ...4-162 Seq~encenumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. I-14
Normal hole-machming camred cycles . . .. 4-3,4-II SimpleCall Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-156
Number of Simultaneously Controllable Axes I -2 SkipFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-138
Numerically Controlled Axes . . . . . . . . .,.......................1-2 SolidTapFunction . . . . . . . . . . . . . . . . ., . . . . . . . . . . . . . . . . . . . . ...4-39
SolidTapMode . . . . . . . . 1-33
o Solid tap mode 4-39
Special codes 4-194
Spir)dle Function . . . . . . . ...3-98
Stored Stroke Limit A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-113
Stored Stroke Limit Band C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-109
Sys!em Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-172

T
P

A2-3
.——. ———.
—. ———
Tape Fomna( . . . . . . . . . . . . . . ...1-10
w
Tape Stafi . . . . . . . . . . . . . . 1-11
Tapping command . . . . . . . . . . . . . . . . . . . . ...4-29 W-point level retur n. . . . . . . . . . . . . . . ...4-9
3-Dimensmnal Tool Offset Function .,. . . . . . . . . . . . . . . . . . . . . . ...3-90 Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...1-15
T{me Constant for S-curve Pauem Control 1-36 Workpiece Cmrdinate System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-5
Tool Funcuon . . . . . . . . . . . . . . . . . . . ...3-99 Workpiece Coordinate System Shift Distance 3-9
Tod Length Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3 -34 Workpiece coordinate system shift distance ., .. ... ... . . . 4-176
Tool Life Control Function .4 -144
Tboloffset amount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4- 176
Tml Offset Data Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3-33
TOOL OFFSET FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3- 33
Tool Position Offset . . . . . . . . . . . . . . . . . . . . . . . . . ...3-38
Tod Radius Offset CFunc[ion . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...3- 48
2-step feed... .4-10
2-step hole drilling command ...... .4 -30
2-step hole-machining canned cycles 4-5.4-16

v
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...4-169

A2-4

——— —. ._,.. ___ —.


._..
YASNAC J300M
PROGRAMMING MANUAL
TOKYO OFFICE New Pier Takesiba South Tower 1-16-1, Kalgan, Mlnatoku, Tokyo 105 Japan
Phone 81-3-5402-4511 Fax 81-3-5402-4580
YASKAWA ELECTRIC AMERICA, INC.
ChicagoGrporate Headquarters 2942 MacArthur Blvd North brook, IL 60062-2028, U SA
Phone 1-847-291-2340 Fax 1-847-498-2430
Chicago-Technical Center 3160 MacArthur Blvd Northbrook, IL 60062-1917, U S A
Phone 1-847-291-0411 Fax 1-847-291-1018
MOTOMAN INC.
805 Liberty Lane West Carrollton, OH 45449 U S.4
Phone 1-513 -8?7-6200 Fax l-513 -847 -6j?77
YASKAWA ELETRICO DO BRASIL COMERCICJ LTDA.
Avemda Bngadelro Farla Ljma 1664 -.YCJ 504/511, S2.O Paulo, Brazil
Phone 55-tl-815-7723 Fax 55-11-870-3849
YASKAWA ELECTRIC EUROPE GmbH
Am Kronberger Hang 2, 65824 Schwalbach Germany
Phone 49-6196-569-300 Fax 49-6196-888-301
Motoman Robotics AB
Box 504 S38525 Tors$.s, Sweden
Phone 46-486-10575 Fax 46-486-41410
Motoman Robotec GmbH
Kammerfeldstrap’e 1, 85391 Allershausen, German!
Phone 49-8166-900 Fax 49-8166-9039
YASKAWA ELECTRIC UK LTD.
3 Drum Mains Park Orchardton Woods Cumbemeuld, Scotland, G68 9LD U K
Phone 44-1236-735000 Fax 44-1236-458182
YASKAWA ELECTRIC KOREA CORPOFWTION
Paik Nam Bldg 901 188-3, l-Ga EulIIro, Joong-Gu Seoul, Korea
Phone 82-2-776-7844 Fax 82-2-753-2639
YASKAWA ELECTRIC (SINGAPORE) PTE. LTD.
151 Lorong Chuan, #04-01, New Tech Park Singapore 556741, Singapore
Phone 65-282-3003 Fax 65-289-3003
YATEC ENGINEERING CORPORATION
Shen Hsang Tang Sung Chlang Building 10F 146 Sung Chiang Road, Ta!pel Taiwan
Phone 886-2-563-0010 Fax 886-2-567-4677
BEIJING OFFICE Room No 301 Office Bwldlng of Belpng International Club 21 Jlanguomenwai Avenue Belpng 100020, Ch(na
Phone 86-10-532-1850 Fax 86-10-532-1851
SHANGHAI OFFICE Room No 8B Wan Zhong Buildlng 1303 Yan An Road (West), Shanghai 200050, China
Phone 8621-6212-1015 Fax 86-21-6212-1326
YASKAWA JASON (HK) COMPANY LIMITED
Rm 2916, Hong Ko;g Plaza, 186-191 Connaught Road West, Hong Kong
Phone 852-2858 -322o Fax 852-2547-5773
TAIPEI OFFICE Shen Hslang Tang Sung Chlang Elulldlng 10F 146 Sung Chlang Road, Talpel, Tawan
Phone 886-2-563-0010 Fax 886-2-567-4677

YASKAWA ELECTF?ICCORPORATION

Y
YASKAWA

MANUAL NO. TOE-C843-13.31 B


@ Printed in Japan August 1996 96-3@

..— .— ———. —. —_ . ... — —._. __ .....-.___.,...—-—-—. ———.... .. . -

You might also like