M60 - M60S Series - MELDASMAGIC64 Programming Manual (Machining
M60 - M60S Series - MELDASMAGIC64 Programming Manual (Machining
60/60S Series
64
PROGRAMMING MANUAL
(MACHINING CENTER TYPE)
BNP-B2182E(ENG)
MELDAS and MELDASMAGIC are registered trademarks of Mitsubishi Electric Corporation.
Other company and product names that appear in this manual are trademarks or registered
trademarks of the respective company.
Introduction
This manual is a guide for using the MELDAS 60/60S Series, MELDASMAGIC64.
Programming is described in this manual, so read this manual thoroughly before starting
programming. Thoroughly study the "Precautions for Safety" on the following page to
ensure safe use of this NC unit.
CAUTION
For items described in "Restrictions" or "Usable State", the instruction manual issued by the
machine maker takes precedence over this manual.
An effort has been made to note as many special handling methods in this user's manual. Items
not described in this manual must be interpreted as "not possible".
This manual has been written on the assumption that all option functions are added.
Refer to the specifications issued by the machine maker before starting use.
Refer to the Instruction Manual issued by each machine maker for details on each machine
tool.
Some screens and functions may differ depending on the NC system or its version, and some
functions may not be possible. Please confirm the specifications before use.
General precautions
(1) Refer to the following documents for details on handling
MELDAS 60/60S Series Operation Manual ........ BNP-B2180
Precautions for Safety
Always read the specifications issued by the machine maker, this manual, related manuals
and attached documents before installation, operation, programming, maintenance or
inspection to ensure correct use.
Understand this numerical controller, safety items and cautions before using the unit.
This manual ranks the safety precautions into "DANGER", "WARNING" and "CAUTION".
When the user may be subject to injuries or when physical damage may
CAUTION occur if handling is mistaken.
Note that even items ranked as " CAUTION", may lead to major results depending on the
situation. In any case, important information that must always be observed is described.
DANGER
Not applicable in this manual.
WARNING
Not applicable in this manual.
CAUTION
Turn the mirror image ON and OFF at the mirror image center.
If the tool offset amount is changed during automatic operation (including during single
block stop), it will be validated from the next block or blocks onwards.
I
7. Feed Functions ...................................................................................................................... 85
7.1 Rapid traverse rate ........................................................................................................ 85
7.2 Cutting feed rate ............................................................................................................ 85
7.3 F1-digit feed ................................................................................................................... 86
7.4 Synchronous feed; G94, G95 ....................................................................................... 88
7.5 Feedrate designation and effects on control axes ........................................................ 90
7.6 Exact stop check; G09 .................................................................................................. 93
7.7 Exact stop check mode; G61 ........................................................................................ 96
7.8 Deceleration check.......................................................................................................... 96
7.8.1 G1→G0 deceleration check .................................................................................. 98
7.8.2 G1→G1 deceleration check .................................................................................. 99
7.9 Automatic corner override; G62 .................................................................................... 100
7.10 Tapping mode; G63 ....................................................................................................... 105
7.11 Cutting mode; G64 ........................................................................................................ 105
II
12.3.4 Interrupts during tool radius compensation ........................................................... 167
12.3.5 General precaution for tool radius compensation ................................................. 169
12.3.6 Changing of offset No. during compensation mode .............................................. 170
12.3.7 Start of tool radius compensation and Z axis cut in operation .............................. 172
12.3.8 Interference check ................................................................................................. 174
12.4 Programmed offset input; G10 ...................................................................................... 181
12.5 Tool position offset; G45 to G48 ................................................................................... 186
12.6 Inputting the tool life management data ........................................................................ 193
III
14. Coordinates System Setting Functions.............................................................................. 370
14.1 Coordinate words and control axes .............................................................................. 370
14.2 Basic machine, work and local coordinate systems ..................................................... 371
14.3 Machine zero point and 2nd, 3rd, 4th reference points (Zero point) ............................ 372
14.4 Basic machine coordinate system selection; G53.......................................................... 373
14.5 Coordinate system setting; G92 .................................................................................... 374
14.6 Automatic coordinate system setting ............................................................................ 375
14.7 Reference (zero) point return; G28, G29 ...................................................................... 376
14.8 2nd, 3rd, and 4th reference (zero) point return; G30 .................................................... 380
14.9 Simple zero point return ................................................................................................ 383
14.10 Reference point check; G27 ........................................................................................ 388
14.11 Work coordinate system setting and offset ; G54 to G59 (G54.1) .............................. 389
14.12 Local coordinate system setting; G52 ......................................................................... 400
14.13 Workpiece coordinate system preset; G92.1 .............................................................. 404
IV
1. Control Axes
1.1 Coordinate word and control axis
1. Control Axes
1.1 Coordinate word and control axis
Function and purpose
In the standard specifications, there are 3 control axes, but, by adding an additional axis, up to 4
axes can be controlled.
The designation of the processing direction responds to those axes and uses a coordinate word
made up of alphabet characters that have been decided beforehand.
X-Y table
+Z
+Z
+Y
+X
Program coordinates
Workpiece
X-Y table +X
+Y
Direction of Bed Direction of
table movement table movement
+Z
Workpiece +Y +C
+X
Direction of table +C +X
movement +Y Direction of table Program coordinates
revolution
1
1. Control Axes
1.2 Coordinate systems and coordinate zero point symbols
: Reference point
-X Machine
Basic machine coordinate system zero point
x1
y1
y3 y2
1st reference
point
Work coordinate Work coordinate Work coordinate
system 3 (G56) system 2 (G55) system 1 (G54)
x2
x3
Local
coordinate
y5 x system
(G52)
Work -Y
coordinate
Work coordinate Work coordinate system 4 y
system 6 (G59) system 5 (G58) (G57)
x5
2
2. Input Command Units
2.1 Input command units
These are the units used for the movement amounts in the program as commanded by the MDI
input and command tape. They are expressed in millimeters, inches or degrees (°).
These are the units of setting data which are used, as with the compensation amounts, in common
for all axes.
The input setting units and input command units can be selected from the following types for each
axis with the parameters. (For further details on settings, refer to the Operation Manual.)
Linear axis
Input unit parameters Rotary axis (°)
Millimeter Inch
#1015 cunit = 10000 1.0 0.1 1.0
Input command = 1000 0.1 0.01 0.1
unit = 100 0.01 0.001 0.01
= 10 0.001 0.0001 0.001
#1003 iunit = B 0.001 0.0001 0.001
Input setting unit
=C 0.0001 0.00001 0.0001
(Note 1) Inch/metric conversion is performed in either of 2 ways: conversion from the parameter
screen ("#1041 I_inch: valid only when the power is switched on) and conversion using
the G command (G20 or G21).
However, when a G command is used for the conversion, the conversion applies only to
the input command units and not to the input setting units.
Consequently, the tool offset amounts and other compensation amounts as well as the
variable data should be preset to correspond to inches or millimeters.
(Note 2) The millimeter and inch systems cannot be used together.
(Note 3) During circular interpolation on an axis where the input command units are different, the
center command (I, J, K) and the radius command (R) can be designated by the input
setting units. (Use a decimal point to avoid confusion.)
3
3. Data Formats
3.1 Tape codes
3. Data Formats
3.1 Tape codes
Function and purpose
The tape command codes used for this controller are combinations of alphabet letters (A, B, C, ...
Z), numbers (0, 1, 2 ... 9) and signs (+, –, / ...). These alphabet letters, numbers and signs are
referred to as characters. Each character is represented by a combination of 8 holes which may, or
may not, be present.
These combinations make up what is called codes.
This controller uses, the ISO code (R-840).
(Note 1) If a code not given in the tape code table in Fig. 1 is assigned during operation, program
error (P32) will result.
(Note 2) For the sake of convenience, a semicolon " ; " has been used in the CNC display to
indicate the end of a block (EOB/IF) which separates one block from another. Do not use
the semicolon key, however, in actual programming but use the keys in the following
table instead.
CAUTION
" ; " "EOB" and " %" "EOR" are explanatory notations. The actual codes are "Line feed" and
"%" for ISO, and "End of block" and "End of Record" for EIA.
Detailed description
4
3. Data Formats
3.1 Tape codes
• • •• • • •• •• • • • • ••
•• •• • • • • • •• • •
•• •• •• • • ••• •••• ••• • ••
••••••••••••••••••••••••••••••••••••••••••••••••
•• •••• •• • •••••
••••• ••• ••• •••••• ••••• ••• • • •••
••••• ••• •• •••••• ••••••• • • •
• • • • • •••••• •••••• •
• • •• • • • • • •••••••• • • •
Operator information print-out example
Information in this section is ignored and nothing is executed.
If a tape handler is not used, there is no need for the 2-meter dummy at both ends of the tape
and for the head EOR (%) code.
5
3. Data Formats
3.1 Tape codes
•• ••
••
•
• •
• 1
•• • ••
2
• •• ••
3
•• •• •
4
•• • ••
5
•• •• • •••
6
•••
7
•
••• •
8
•
••
9
•
• •
0
•
••••
• •
A
• ••
B
••
C
•• •• •
D
••• • ••
E
• •••
F
• •
G
•
••
••• •• •• ••••
•
H
• I
J
••• •• •• •• •
K
L
•••• • •• •• ••
M
•
•••
N
O
••
••• ••• •• ••••
P
• Q
R
••• •• •• •• •
S
T
• •• •• ••
U
•• •• •• ••••
V
••• ••
W
X
• • ••• •• •••
Y
Z
•• •• •• ••• •
+
-
•• •• •• •• ••••
.
,
• • •• •• • • •
/
%
• ••••••• •• • •
LF(Line Feed) or NL
• ( (Control Out)
) (Control In)
•• •• • •• ••
:
•
#
••• ••• •• •
*
•• • ••
=
••
•• • • •• •• ••
••
[
• ]
SP(Space)
CR(Carriage Return)
• •• •• • BS(Back Space)
• •• •• •• •
HT(Horizontal Tab)
&
•• •• ••••
!
$
• ••• • ••
’ (Apostrophe)
A
••• ••
;
• ••• • ••
<
•• • •• •••
•••
>
• ?
•
@
••••• •• •••
”
DEL(Delete)
••••• •• •••
NULL
DEL(Delete) B
• Under the ISO code, IF or NL is EOB and % is EOR.
• • Under the ISO code, CR is meaningless, and EOB will not occur.
Code A are stored on tape but an error results (except when they are used in the comment
section) during operation.
The B codes are non-working codes and are always ignored. Parity V check is not executed.
Table of tape codes
6
3. Data Formats
3.2 Program formats
The prescribed arrangement used when assigning control information to the controller is known as
the program format, and the format used with this controller is called the "word address format".
Detailed description
Word
*
Numerals
Alphabet (address)
Word configuration
The alphabet letter at the head of the word is the address. It defines the meaning of the
numerical information which follows it.
For details of the types of words and the number of significant digits of words used for this
controller, refer to the "format details".
(2) Blocks
A block is a collection of words. It includes the information which is required for the machine to
execute specific operations. One block unit constitutes a complete command. The end of each
block is marked with an EOB (end-of-block) code.
(Example 1:)
G0X - 1000 ; 2 blocks
G1X - 2000F500 ;
(Example 2:)
(G0X - 1000 ; ) Since the semicolon in the parentheses will not result
G1X - 2000F500 ; in an EOB, it is 1 block.
(3) Programs
A program is a collection of several blocks.
7
3. Data Formats
3.2 Program formats
G00 X45.123 ;
3 digits below the decimal point
5 digits above the decimal point, so it's +00045, but the leading
zeros and the mark (+) have been omitted.
G0 is possible, too.
(Note 5) If an arc is commanded using a rotary axis and linear axis while inch commands are being used, the
degrees will be converted into 0.1 inches for interpolation.
(Note 6) While inch commands are being used, the rotary axis speed will be in increments of 10 degrees.
Example: With the F1. (per-minute-feed) command, this will become the 10 degrees/minute command.
(Note 7) The decimal places below the decimal point are ignored when a command, such as an S command,
with an invalid decimal point has been assigned with a decimal point.
(Note 8) This format is the same for the value input from the memory, MDI or setting and display unit.
(Note 9) Command the program No. in an independent block. Command the program No. in the head block of
the program.
8
3. Data Formats
3.3 Program address check function
The program can be checked in word units when operating machining programs.
Detailed description
Example of program
9
3. Data Formats
3.4 Tape memory format
This function selectively ignores specific blocks in a machining program which starts with the "/"
(slash) code.
Detailed description
(1) Provided that the optional block skip switch is ON, blocks starting with the "/" code are ignored.
They are executed if the switch is OFF.
Parity check is valid regardless of whether the optional block skip switch is ON or OFF.
When, for instance, all blocks are to be executed for one workpiece but specific block are not
to be executed for another workpiece, the same command tape can be used to machine
different parts by inserting the "/" code at the head of those specific blocks.
(1) Put the "/" code for optional block skip at the beginning of a block. If it is placed inside the block,
it is assumed as a user macro, a division instruction.
Example : N20 G1 X25./Y25. ;..... NG (User macro, a division instruction; a program error
results.)
/N20 G1 X25. Y25. ; .... OK
(2) Parity checks (H and V) are conducted regardless of the optional block skip switch position.
(3) The optional block skip is processed immediately before the pre-read buffer.
Consequently, it is not possible to skip up to the block which has been read into the pre-read
buffer.
(5) All blocks with the "/" code are also input and output during tape storing and tape output,
regardless of the position of the optional block skip switch.
10
3. Data Formats
3.6 Program/sequence/block numbers ; O, N
These numbers are used for monitoring the execution of the machining programs and for calling
both machining programs and specific stages in machining programs.
(1) Program numbers are classified by workpiece correspondence or by subprogram units, and
they are designated by the address "0" followed by a number with up to 8 digits.
(2) Sequence numbers are attached where appropriate to command blocks which configure
machining programs, and they are designated by the address "N" followed by a number with
up to 5 digits.
(3) Block numbers are automatically provided internally. They are preset to zero every time a
program number or sequence number is read, and they are counted up one at a time unless
program numbers or sequence numbers are commanded in blocks which are subsequently
read.
Consequently, all the blocks of the machining programs given in the table below can be
determined without further consideration by combinations of program numbers, sequence
numbers and block numbers.
Monitor display
Machining program
Program No. Sequence No. Block No.
O12345678 (DEMO, PROG) ; 12345678 0 0
G92 X0 Y0 ; 12345678 0 1
G90 G51 X-150. P0.75 ; 12345678 0 2
N100 G00 X-50. Y-25. ; 12345678 100 0
N110 G01 X250. F300 ; 12345678 110 0
Y-225. ; 12345678 110 1
X-50. ; 12345678 110 2
Y-25.; 12345678 110 3
N120 G51 Y-125. P0.5 ; 12345678 120 0
N130 G00 X-100. Y-75. ; 12345678 130 0
N140 G01 X-200. ; 12345678 140 0
Y-175. ; 12345678 140 1
X-100. ; 12345678 140 2
Y-75. ; 12345678 140 3
N150 G00 G50 X0 Y0 ; 12345678 150 0
N160 M02 ; 12345678 160 0
%
11
3. Data Formats
3.7 Parity H/V
Parity check provides a mean of checking whether the tape has been correctly perforated or not.
This involves checking for perforated code errors or, in other words, for perforation errors. There
are two types of parity check: Parity H and Parity V.
(1) Parity H
Parity H checks the number of holes configuring a character and it is done during tape
operation, tape input and sequence number search.
A parity H error is caused in the following cases.
• • •• • • • •• •• ••• • • •• •
• • •• • • • • • • • • •• •
• • •• • • ••• •• • •• • • •• •
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
• •• • ••• • ••• •• •• ••••
•• ••••••• •••••••••• •• •• ••••• •••
•• • ••••• •••• •••• •• • •••••• •••
• • • • • • • • •
• • •••• • • • • • • •
This character causes a parity H error.
When a parity H error occurs, the tape stops following the alarm code.
(2) Parity V
A parity V check is done during tape operation, tape input and sequence number search when
the I/O PARA #9n15 (n is the unit No.1 to 5) parity V check function is set to "1". It is not done
during memory operation.
A parity V error occurs in the following case: when the number of codes from the first
significant code to the EOB (;) in the significant data section in the vertical direction of the tape
is an odd number, that is, when the number of characters in one block is odd.
When a parity V error is detected, the tape stops at the code following the EOB (;).
(Note 1) Among the tape codes, there are codes which are counted as characters for parity
and codes which are not counted as such. For details, refer to the "Table of tape
codes" in "3.1 Tape Codes".
(Note 2) Any space codes which may appear within the section from the initial EOB code to
the address code or "/" code are counted for parity V check.
12
3. Data Formats
3.8 G code lists
13
3. Data Formats
3.8 G code lists
14
3. Data Formats
3.8 G code lists
15
3. Data Formats
3.8 G code lists
(Note 1) Codes marked with * are codes that must be or are selected in the initial state.
The codes marked with ∆ are codes that should be or are selected in the initial state by
the parameters.
(Note 2) If two or more G codes from the same code are commanded, the latter G code will be
valid.
(Note 3) This G code list is a list of conventional G codes. Depending on the machine, movements
that differ from the conventional G commands may be included when called by the G
code macro. Refer to the Instruction Manual issued by the machine maker.
(Note 4) Whether the modal is initialized or not depends on each reset input.
(1) "Reset 1"
The modal is initialized when the reset initial parameter "#1151 rstinit" turns ON.
(2) "Reset 2" and "Reset & rewind"
The modal is initialized when the signal is input.
(3) Resetting when emergency stop is canceled
Follows "Reset 1".
(4) When modal is automatically reset at the start of individual functions such as
reference point return.
Follows "Reset & rewind".
CAUTION
The commands with “no value after G" will be handled as "G00".
CAUTION
When creating the machining program, select the appropriate machining conditions so that the
machine, NC performance, capacity and limits are not exceeded. The examples do not allow
for the machining conditions.
Carry out dry operation before actually machining, and confirm the machining program, tool
offset and workpiece offset amount.
16
4. Buffer Register
4.1 Input buffer
4. Buffer Register
4.1 Input buffer
Function and purpose
When the pre-read buffer is empty during a tape operation or RS232C operation, the contents of
the input buffer are immediately transferred to the pre-read buffers and, provided that the data
stored in the input buffer do not exceed 250 × 4 characters, the following data (Max. 250
characters) are read and loaded into the input buffer.
This buffer is designed to eliminate the operational delay originating in the readout time of the tape
reader and to smooth out the block joints.
The pre-reading effects are lost, however, when the block execution time is shorter than the tape
readout time of the following block.
Analysis processing
(Buffer size : 250 × 5 characters)
Max. 5 execution blocks
Tape Pre-read
Input buffer buffer 5
Buffer 4
Buffer 3
Memory
Buffer 2
Mode
Keyboard switching Arithmetic
Buffer 1 processing
MDI data
Note : Data equivalent to 1 block are stored in 1 pre-read buffer.
The input buffer has a memory capacity of 250 × 5 characters (including the EOB code).
(1) The contents of the input buffer register are updated in 250-character units.
(2) Only the significant codes in the significant data section are read into the input buffer.
(3) When codes (including "(" and ")") are sandwiched in the control in or control out mode and the
optional block skip function is ON, the data extending from the "/" (slash) code up to the EOB
code are read into the input buffer.
(4) The input buffer contents are cleared with resetting.
(Note 1) The input buffer size (250 characters) differs according to the model.
17
4. Buffer Register
4.2 Pre-read buffers
During automatic processing, the contents of 1 block are normally pre-read so that program
analysis processing is conducted smoothly. However, during tool radius compensation, a
maximum of 5 blocks are pre-read for the intersection point calculation including interference
check.
The specifications of the data in 1 block are as follows:
Other precautions
(1) Depending on whether the program is executed continuously or by single blocks, the timing of
the valid/invalid for the external control signals for the block skip and others will differ.
(2) If the external control signal such as optional block skip is turned ON/OFF with the M
command, the external control operation will not be effective on the program pre-read with the
buffer register.
(3) According to the M command that operates the external controls, it prohibits pre-reading, and
the recalculation is as follows:
The M command that commands the external controls is distinguished at the PLC, and the
"recalculation request" for PLC -> NC interface table is turned ON.
(When the "recalculation request" is ON, the program that has been pre-read is reprocessed.)
18
5. Position Commands
5.1 Position command methods
5. Position Commands
5.1 Position command methods ; G90, G91
Function and purpose
By using the G90 and G91 commands, it is possible to execute the next coordinate commands
using absolute values or incremental values.
The R-designated circle radius and the center of the circle determined by I, J, K are always
incremental value commands.
Command format
Detailed description
(2) For the next block, the last G90/G91 command that
Y 200.
was given becomes the modal.
(G90) N 3 X100. Y100.;
19
5. Position Commands
5.1 Position command methods
(3) Since multiple commands can be issued in the same block, it is possible to command specific
addresses as either absolute values or incremental
values. Y 200.
N 4 G90 X300. G91 Y100.;
N4
The X axis is treated in the absolute 100.
(4) When the power is turned ON, it is possible to select whether you want absolute value
commands or incremental value commands with the #1073 I_Absm parameter.
(5) Even when commanding with the manual data input (MDI), it will be treated as a modal from
that block.
20
5. Position Commands
5.2 Inch/metric command change
These G commands are used to change between the inch and millimeter (metric) systems.
Command format
G20/G21;
G20 : Inch command
G21 : Metric command
Detailed description
G20 and G21 selection is meaningful only for linear axes and it is meaningless for rotary axes.
The input unit for G20 and G21 will not change just by changing the command unit.
In other words, if the machining program command unit changes to an inch unit at G20 when the
initial inch is OFF, the setting unit of the tool offset amount will remain metric. Thus, take note to the
setting value.
Input command Command Metric output (#1016 iout=0) Inch output (#1016 iout=1)
Axis
unit type (cunit) example G21 G20 G21 G20
X 10 X100; 0.100mm 0.254mm 0.0039inch 0.0100inch
Y 10 Y100; 0.100mm 0.254mm 0.0039inch 0.0100inch
Z 100 Z100; 1.00mm 2.54mm 0.039inch 0.100inch
B 1000 B100; 10.0° 10.0° 10.0° 10.0°
(Note 1) When changing between G20 and G21 with program commands, it is necessary in
advance, to convert the parameters, variables, and the offsets for the tool diameter, tool
position, tool length, to the units in the input settings of the input setting unit system (for
each axis) that have inch or metric commands, and make the settings using the
parameter tape.
(Note 2) Since the data before the change will be executed at the command unit after the change,
command the F speed command for the change so that it is the correct speed command
for the command unit system applied after the change.
21
5. Position Commands
5.2 Inch/metric command change
Select whether to issue the counter or parameter setting and display unit as a command unit
determined by the G20/G21 command modal, or as the internal unit determined by parameter
"#1041 I_inch". If the command unit setting display is selected when initial metric (internal unit
metric) is set with the base specification parameter "#1226 aux10/bit6", the counter and
parameters will be displayed as metric units during the G21 command mode. The internal unit
metric data will be converted into an inch unit and displayed during the G20 command mode. The
command unit for when the power is turned ON and reset can be selected regardless of the
internal unit by setting the base specification parameter "#1152 I_G20".
NC axis
Initial inch OFF (metric internal unit) Initial inch ON (inch internal unit)
#1041 I_inch=0 #1041 I_inch=1
Item #1226 aux10/bit6=0 #1226 aux10/bit6=1 #1226 aux10/bit6=0 #1226 aux10/bit6=1
Follows internal unit Follows command unit Follows internal unit Follows internal unit
G21 G20 G21 G20 G21 G20 G21 G20
Movement/
Metric Inch Metric Inch Metric Inch
speed command
Counter display Metric Metric Metric Inch Inch Inch
Speed display Metric Metric Metric Inch Inch Inch The "#1226 aux10/bit6"
parameter is invalid
User parameter
Metric Metric Metric Inch Inch Inch when initial inch is ON.
setting/display
Even if 1 is set, the
Workpiece/ setting and display will
tool offset Metric Metric Metric Inch Inch Inch follow the internal unit in
setting/display the same manner as
Handle feed when 0 is set.
Metric Metric Metric Inch Inch Inch
command
Setup parameter
Follows "#1040 M_inch"
setting/display
PLC axis
#1042 pcinch=0 #1042 pcinch=1
Item
(metric) (inch)
Movement/
Metric Inch
speed command
Counter display Metric Inch
User parameter
Metric Inch
setting/display
Setup parameter
Follows "#1040 M_inch"
setting/display
When using both the NC axis and PLC axis as rotation axes, three digits below the decimal point
will be displayed for the coordinate data, etc., even for the inch command.
22
5. Position Commands
5.2 Inch/metric command change
Usage examples
The screen display will change in the following manner according to the parameter settings.
Parameter #1041 I_inch 0 Initial metric #1041 I_inch 0 Initial metric
setting #1152 I_G20 0 G21 (metric) mode at #1152 I_G20 0 G21 (metric) mode at
reset reset
Program #1226 Setting and display #1226 Setting and display
command/ unit is internal unit unit is command unit
aux10/bit6 0 aux10/bit6 1
screen operation
[POSITION] [POSITION]
X 0.000 X 0.000
Y 0.000 Y 0.000
Z 0.000 Z 0.000
mm. mm.
Internal data
[TOOL OFFSET] [TOOL OFFSET]
# # #10.1(mm)
1 0.100 11 0.000 1 0.0039 11 0.0000
2 0.200 12 0.000 2 0.0078 12 0.0000
3 0.300 13 0.000 3 0.0118 13 0.0000
in. in.
23
5. Position Commands
5.2 Inch/metric command change
[POSITION] [POSITION]
X 25.400 X 25.400
Y 50.800 Y 50.800
Z 76.200 Z 76.200
mm. mm.
Precautions
(1) If the tool and workpiece offset data are added with an inch command unit and metric internal
unit, an error may occur.
(2) The internal unit is a unit that follows #1041 I_inch.
Internal unit when #1041 I_inch=0 : mm
Internal unit when #1041 I_inch=1 : inch
(3) The parameters are input and output with an internal unit.
(4) If the tool data input/output unit selection (#1220 aux04/bit4:1) is valid, the tool data will be
input and output with the "#1152 I_G20" setting unit. However, in all other cases, the data will
be input/output with the internal unit.
24
5. Position Commands
5.3 Decimal point input
This function enables the decimal point command to be input. It assigns the decimal point in
millimeter or inch units for the machining program input information that defines the tool paths,
distances and speeds. A parameter “#1078 Decpt2” selects whether type I (minimum input
command unit) or type II (zero point) is to apply for the least significant digit of data without a
decimal point.
Command format
. : Metric command
. : Inch command
Detailed description
(1) The decimal point command is valid for the distances, angles, times, speeds and scaling rate,
in machining programs. (Note, only after G51)
(2) In decimal point input type 1 and type 2, the values of the data commands without the decimal
points are shown in the table below.
Command Command unit system Type 1 Type 2
cunit = 10000 1000 (µm, 10–4 inch, 10–3 °) 1 (mm, inch, °)
cunit = 1000 100 1
X1 ;
cunit = 100 10 1
cunit = 10 1 1
(3) The valid addresses for the decimal points are X, Y, Z, U, V, W, A, B, C, I, J, K, E, F, P, Q, and
R. However, P is valid only during scaling. For details, refer to the list.
(4) See below for the number of significant digits in decimal point commands. (Input command
unit cunit = 10)
Movement Movement
Feed rate Dwell
command (linear) command (rotary)
Decimal Decimal Decimal Decimal
Integer Integer Integer Integer
part part part part
MM
0. to .000 to 0. to .000 0. to 0. to .000 to
(milli- .00 to .99
99999. .999 99999. to.999 60000. 99999. .999
meter)
INCH .0000 to 99999. .000 to .000 to
0. to 9999. .0 to .999 0. to 2362. .0 to .99
(inch) .9999 (359.) .999 .999
(5) The decimal point command is valid even for commands defining the variable data used in
subprograms.
(6) While the smallest decimal point command is validated, the smallest unit for a command
without a decimal point designation is the smallest command input unit set in the
specifications (1µm, 10µm, etc.) or mm can be selected. This selection can be made with
parameter “#1078 Decpt2”.
(7) Decimal point commands for decimal point invalid addresses are processed as integer data
only and everything below the decimal point is ignored. Addresses which are invalid for the
decimal point are D, H, L, M, N, O, S and T. All variable commands, however, are treated as
data with decimal points.
25
5. Position Commands
5.3 Decimal point input
Example of program
If a command does not use a decimal point at an address where a decimal point command is valid
in the table on the following page, it is handled differently between decimal point input I and II
modes as explained below.
A command using a decimal point is handled the same way in either the decimal point input I or II
mode.
(Note) When a four rules operator is contained, the data will be handled as that with a decimal
point.
(Example) When the min. input command unit is 1µm :
G0 x 123 + 0 ; ... X axis 123mm command. It will not be 123µm.
26
5. Position Commands
5.3 Decimal point input
27
5. Position Commands
5.3 Decimal point input
Decimal point
Address Application Remarks
command
N Invalid Sequence numbers
Invalid Program parameter input, data numbers
O Invalid Program numbers
P Invalid/Valid Dwell time Parameter
Invalid Subprogram program call No.
Invalid/Valid Dwell at tap cycle hole base Parameter
Invalid Number of holes of the special fixed cycle
Invalid Amount of helical pitch
Invalid Offset number (G10)
Invalid Constant surface speed control axis number
Invalid Program parameter input, broad classification number
Invalid Multi-skip function 2 signal command
Invalid Subprogram return destination sequence No.
Invalid 2nd, 3rd, 4th reference point return number
Q Valid Cut amount of deep hole drill cycle
Valid Shift amount of back boring
Valid Shift amount of fine boring
Invalid Minimum spindle clamp speed
Valid Starting shift angle for screw cutting
R Valid R-point in the fixed cycle
Valid R-specified arc radius
Valid Corner rounding arc radius ,R
Valid Offset amount (G10)
Invalid Synchronous tap/asynchronous tap changeover
Valid Automatic tool length measurement, deceleration range r
Valid Rotation angle
S Invalid Spindle function codes
Invalid Maximum spindle clamp speed
Invalid Constant surface speed control, surface speed
Invalid Program parameter input, word type data 2 bytes
T Invalid Tool function codes
U Valid Coordinate position data
V Valid Coordinate position data
W Valid Coordinate position data
X Valid Coordinate position data
Valid Dwell time
Y Valid Coordinate position data
Z Valid Coordinate position data
(Note 1) All decimal points are valid for the user macro arguments.
28
6. Interpolation Functions
6.1 Positioning (Rapid traverse)
6. Interpolation Functions
6.1 Positioning (Rapid traverse); G00
Function and purpose
This command is accompanied by coordinate words. It positions the tool along a linear or
non-linear path from the present point as the start point to the end point which is specified by the
coordinate words.
Command format
Detailed description
(1) Once this command has been issued, the G00 mode is retained until it is changed by another
G function or until the G01, G02, G03 or G33 command in the 01 group is issued. If the next
command is G00, all that is required is simply that the coordinate words be specified.
(2) In the G00 mode, the tool is always accelerated at the start point of the block and decelerated
at the end point. Refer to (Note 4) of “Example program”.
(3) Any G command (G72 to G89) in the 09 group is cancelled (G80) by the G00 command.
(a) Linear path..........: This is the same as linear interpolation (G01), and the speed is limited
by the rapid traverse rate of each axis.
(b) Non-linear path ...: The tool is positioned at the rapid traverse rate independently for each
axis.
CAUTION
The commands with “no value after G" will be handled as "G00".
29
6. Interpolation Functions
6.1 Positioning (Rapid traverse)
Example of program
Tool +300
End point
(-120,+200,+300)
+150
Start point -100
(+150,-100,+150)
-120 Unit : mm
+150
+200
X Y
G91 G00 X-270000 Y300000 Z150000 ; (For input setting unit: 0.001mm)
(Note 1) When parameter "#1086 G0Intp" is set to "0", the path along which the tool is positioned
is the shortest path connecting the start and end points. The positioning speed is
automatically calculated so that the shortest distribution time is obtained in order that the
commanded speeds for each axis do not exceed the rapid traverse rate.
When for instance, the Y-axis and Z-axis rapid traverse rates are both 9600mm/min, the
tool will follow the path in the figure below if the following is programmed:
G91 G00 X-300000 Y200000 ; (With an input setting unit of 0.001mm)
End point
Actual Y axis rate : 6400mm/min
Y
200
fy
X
Start point
300 (Unit : mm)
fx
30
6. Interpolation Functions
6.1 Positioning (Rapid traverse)
(Note 2) When parameter "#1086 G0Intp" is set to 1, the tool will move along the path from the
start point to the end point at the rapid traverse rate of each axis.
When, for instance, the Y-axis and Z-axis rapid traverse rates are both 9600mm/min, the
tool will follow the path in the figure below if the following is programmed:
G91 G00 X-300000 Y200000 ; (With an input setting unit of 0.001mm)
200
fy
X
Start point
300 (Unit : mm)
fx
31
6. Interpolation Functions
6.1 Positioning (Rapid traverse)
(Note 3) The rapid traverse rate for each axis with the G00 command differs according to the
individual machine and so reference should be made to the machine specifications.
(Note 4) Rapid traverse (G00) deceleration check
There are two methods for the deceleration check at rapid traverse; commanded
deceleration method and in-position check method. Select a method with the parameter
“#1193 inpos”.
Ts : Acceleration/deceleration
Ts time constant
Td : Deceleration check time
Td Td = Ts + (0 ~ 14ms)
2 × Ts
Td Ts
Ts : Acceleration/deceleration
time constant
Td : Deceleration check time
Td = 2 × Ts + (0 ~ 14ms)
32
6. Interpolation Functions
6.1 Positioning (Rapid traverse)
Ts : Acceleration/deceleration
Ts time constant
Td : Deceleration check time
Td Td = 2 × Ts + (0 ~ 14ms)
33
6. Interpolation Functions
6.1 Positioning (Rapid traverse)
This command commands the in-position width for the positioning command from the machining
program.
In-position width
Positioning coordinate value of each axis
Execution of the next block starts after confirming that the position error amount of the positioning
(rapid traverse: G00) command block and the block that carries out deceleration check with the
linear interpolation (G01) command is less than the in-position width issued in this command.
The in-position width in this command is valid only in the command block, so the deceleration
check method set in base specification parameter "#1193 inpos" is used for blocks that do not have
the in-position width command.
When there are several movement axes, the system confirms that the position error amount of
each movement axis in each system is less than the in-position width issued in this command
before executing the next block.
The differences of when the in-position check is validated with the parameter (base specification
parameter "#1193 inpos" set to 1; refer to next page for in-position width) and when validated with
this command are shown in the following drawing.
Differences between in-position check with this command and in-position check with parameter
In-position check with ",I" address command In-position check with parameter
After starting deceleration of the command After starting deceleration of the command
system, the position error amount and system, the servo system's position error amount
commanded in-position width are compared. and the parameter setting value (in-position
width) are compared.
Servo Command
Servo Command
In-position width In-position width
(Error amount of command (Servo system position
end point and machine error amount)
Block being Block being
position)
executed executed
Ts Ts
Td Td
Start of in-position
check with parameter
Start of in-position
check with ",I" address command
34
6. Interpolation Functions
6.1 Positioning (Rapid traverse)
When the servo parameter "#2224 SV024" setting value is smaller than the setting value of the G0
in-position width "#2077 G0inps" and the G1 in-position width "#2078 G1inps", the in-position
check is carried out with the G0 in-position width and the G1 in-position width.
In-position check using the
“G0inps” value Command to motor
G0 in-position
sv024
G1 in-position
sv024
(Note 1) When the in-position width check is carried out, the in-position width commanded in the
program takes place the in-position width set with the parameters such as SV024,
G0inps, or G1inps.
(Note 2) When the SV024 setting value is larger than the G0 in-position width/G1 in-position width,
the in-position check is carried out with the SV024 value.
(Note 3) When the error detect is ON, the in-position check is forcibly carried out.
35
6. Interpolation Functions
6.2 Linear interpolation
Command format
Detailed description
(1) Once this command is issued, the mode is maintained until another G function (G00, G02,
G03, G33) in the 01 group which changes the G01 mode is issued. Therefore, if the next
command is also G01 and if the feedrate is the same, all that is required to be done is to specify
the coordinate words. If no F command is given in the first G01 command block, program error
(P62) results.
(2) The feedrate for a rotary axis is commanded by °/min (decimal point position unit). (F300 =
300°/min)
(3) The G functions (G70 - G89) in the 09 group are cancelled (G80) by the G01 command.
36
6. Interpolation Functions
6.2 Linear interpolation
Example of program
P2 P3
30
P1 Unit: mm
P4 Input setting unit: 0.001mm
20 20
20
P0
This command commands the in-position width for the linear interpolation command from the
machining program.
The commanded in-position width is valid in the linear interpolation command only when carrying
out deceleration check.
• When the error detect switch is ON.
• When G09 (exact stop check) is commanded in the same block.
• When G61 (exact stop check mode) is selected.
In-position width
Feedrate
Linear interpolation coordinate value of each axis
(Note 1) Refer to section "6.1 Positioning (rapid traverse); G00" for details on the in-position
check operation.
37
6. Interpolation Functions
6.3 Plane selection
The plane to which the movement of the tool during the circle interpolation (including helical
cutting) and tool diameter compensation command belongs is selected.
By registering the basic three axes and the corresponding parallel axis as parameters, a plane can
be selected by two axes that are not the parallel axis. If the rotary axis is registered as a parallel
axis, a plane that contains the rotary axis can be selected.
The plane selection is as follows:
• Plane that executes circular interpolation (including helical cutting)
• Plane that executes tool diameter compensation
• Plane that executes fixed cycle positioning.
Command format
Parameter entry
As shown in the above example, the basic axis and its parallel axis can be registered.
The basic axis can be an axis other than X, Y and Z.
Axes that are not registered are irrelevant to the plane selection.
38
6. Interpolation Functions
6.3 Plane selection
In Table 1,
I is the horizontal axis for the G17 plane or the vertical axis for the G18 plane
J is the vertical axis for the G17 plane or the horizontal axis for the G19 plane
K is the horizontal axis for the G18 plane or the vertical axis for the G19 plane
In other words,
G17 ..... IJ plane
G18 ..... KI plane
G19 ..... JK plane
(1) The axis address commanded in the same block as the plane selection (G17, G18, G19)
determines which basic axis or parallel axis is used for the plane selection.
For the parameter registration example in Table 1.
G17X__Y__ ; XY plane
G18X__V__ ; VX plane
G18U__V__ ; VU plane
G19Y__Z__ ; YZ plane
G19Y__V__ ; YV plane
(2) The plane will not changeover at a block where a plane selection G code (G17, G18, G19) is
not commanded.
G17X__Y__ ; XY plane
Y__Z__ ; XY plane (plane does not change)
(3) If the axis address is omitted in the block where the plane selection G code (G17, G18, G19) is
commanded, it will be viewed as though the basic three axes address has been omitted.
For the parameter registration example in Table 1.
G17 ; XY plane
G17U__ ; UY plane
G18U__ ; ZU plane
G18V__ ; VX plane
G19Y__ ; YZ plane
G19V__ ; YV plane
(4) The axis command that does not exist in the plane determined by the plane selection G code
(G17, G18, G19) is irrelevant to the plane selection.
For the parameter registration example in Table 1.
G17U__Z__ ;
(5) If the above is commanded, the UY plane will be selected, and Z will move regardless of the
plane.
If the basic axis and parallel axis are commanded in duplicate in the same block as the plane
selection G code (G17, G18, G19), the plane will be determined in the priority order of basic
axis and parallel axis.
For the parameter registration example in Table 1.
G17U__Y__W__-;
If the above is commanded, the UY plane will be selected, and W will move regardless of the plane.
(Note 1) The plane set with parameter "#1025 I_plane" will be selected when the power is turned
ON or reset.
39
6. Interpolation Functions
6.4 Circular interpolation
Command format
40
6. Interpolation Functions
6.4 Circular interpolation
Detailed description
(1) G02 (or G03) is retained until another G command (G00, G01 or G33) in the 01 group that
changes its mode is issued.
The arc rotation direction is distinguished by G02 and G03.
G02 Clockwise (CW)
G03 Counterclockwise (CCW)
G2 G3
G3
G3
Y
G2
G2
X
Y X Z
X Z Y
(2) An arc which extends for more than one quadrant can be executed with a single block
command.
(3) The following information is needed for circular interpolation.
(a) Plane selection................... : Is there an arc parallel to one of the XY, ZX or YZ planes?
(b) Rotation direction ............... : Clockwise (G02) or counterclockwise (G03)?
(c) Arc end point coordinates .. : Given by addresses X, Y, Z
(d) Arc center coordinates ....... : Given by addresses I, J, K (incremental commands)
(e) Feed rate ............................ : Given by address F
41
6. Interpolation Functions
6.4 Circular interpolation
Example of program
(Example 1)
Y axis +Y
X axis +X
Start point/end point
(Example 2)
Y axis +Y
X axis +X
Start point
42
6. Interpolation Functions
6.4 Circular interpolation
Plane selection
The planes in which the arc exists are the following three planes (refer to the detailed drawings),
and are selected with the following method.
XY plane
G17; Command with a (plane selection G code)
ZX plane
G18; Command with a (plane selection G code)
YZ plane
G19; Command with a (plane selection G code)
(1) The terms "clockwise" (G02) and "counterclockwise" (G03) used for arc operations are
defined as a case where in a right-hand coordinate system, the negative direction is viewed
from the position direction of the coordinate axis which is at right angles to the plane in
question.
(2) When all the end point coordinates are omitted or when the end point is the same position as
the start point, a 360° arc (full circle) is commanded when the center is commanded using I, J
and K.
(3) The following occurs when the start and end point radius do not match in an arc command :
(a) Program error (P70) results at the arc start point when error ∆R is greater than parameter
"#1084 RadErr".
(G91) G02X9.899I 5. ; #1084 RadErr parameter value 0.100
Start point radius = 5.000
End point radius = 4.899
Error ∆R = 0.101
Alarm stop
(b) Spiral interpolation in the direction of the commanded end point results when error ∆R is
less than the parameter value.
(G91) G02X9.9I 5. ; Spiral interpolation
43
6. Interpolation Functions
6.5 R-specified circular interpolation
Along with the conventional circular interpolation commands based on the arc center coordinate (I,
J, K) designation, these commands can also be issued by directly designating the arc radius R.
Command format
G02 (G03) Xx Yy Rr Ff ;
x : X-axis end point coordinate
y : Y-axis end point coordinate
r : Arc radius
f : Feedrate
The arc radius is commanded with an input setting unit. Caution is required for the arc command of
an axis for which the input command value differs. Command with a decimal point to avoid
confusion.
Detailed description
The arc center is on the bisector line which is perpendicular to the line connecting the start and end
points of the arc. The point, where the arc with the specified radius whose start point is the center
intersects the perpendicular bisector line, serves as the center coordinates of the arc command.
If the R sign of the commanded program is plus, the arc is smaller than a semisphere; if it is minus,
the arc is larger than a semisphere.
02 End point
Center
point
Center point
Arc path when
R sign is plus
Center point
L 01
Start point r
The following condition must be met with an R-specified arc interpolation command:
L/(2xr) ≤ 1 An error will occur when L/2 - r > (parameter : #1084 RadErr)
44
6. Interpolation Functions
6.5 R-specified circular interpolation
Example of program
(Example 1)
G02 Xx1 Yy1 Rr1 Ff1 ; XY plane R-specified arc
(Example 2)
G03 Zz1 Xx1 Rr1 Ff1 ; ZX plane R-specified arc
(Example 3)
G02 Xx1 Yy1 Ii1 Jj1 Rr1 Ff1 ; XY plane R-specified arc
(When the R specification and I, J, (K)
specification are contained in the same block,
the R specification has priority in processing.)
(Example 4)
G17 G02 Ii1 Jj1 Rr1 Ff1 ; XY plane This is an R-specified arc, but as
this is a circle command, it is already
completed.
45
6. Interpolation Functions
6.6 Helical interpolation
While circular interpolating with G02/G03 within the plane selected with the plane selection G code
(G17, G18, G19), the 3rd axis can be linearly interpolated.
Normally, the helical interpolation speed is designated with the tangent speed F' including the 3rd
axis interpolation element as shown in the lower drawing of Fig. 1. However, when designating the
arc plane element speed, the tangent speed F on the arc plane is commanded as shown in the
upper drawing of Fig. 1.
The NC automatically calculates the helical interpolation tangent speed F' so that the tangent
speed on the arc plane is F.
Start point
X End point
F’
Z End point
Start point
Y
X
Fig. 1 Designation of helical interpolation speed
Command format
G17 G02 (G03) Xx1 Yy1 Zz1 Ii1 Jj1 Pp1 Ff1 ;
G17 G02 (G03) Xx2 Yy2 Zz2 Rr2 Ff2 ;
Xx1 Yy1 Xx2 Yy2 : Arc end point coordinate
Zz1 Zz2 : Linear axis end point coordinate
Ii1 Jj1 : Arc center coordinate
Pp1 : Pitch No.
Ff1 Ff2 : Feedrate
Rr2 : Arc radius
The arc center coordinate value and arc radius value are commanded with an input setting input.
Caution is required for the helical interpolation command of an axis for which the input command
value differs.
Command with a decimal point to avoid confusion.
46
6. Interpolation Functions
6.6 Helical interpolation
For the MELDASMAGIC64, the arc plane element speed designation and normal speed
designation can be selected with the parameter.
#1235 set07/bit0 Meaning
1 Arc plane element speed designation is selected.
0 Normal speed designation is selected.
Y
θ
Z axis
θe
P1 time
End point
Z1
Y axis Second time θs X
First time
l Start point
X axis
(1) For this command, command a linear axis (multiple axes can be commanded) that does not
contain a circular axis in the circular interpolation command.
(2) For feedrate F, command the X, Y Z axis composite element directions speed.
(3) Pitch l is obtained with the following expression.
Z1
l=
(2π • P1 + θ) / 2π
–1 ye ys
θ = θE − θs = tan – tan–1 (0 ≤ θ < 2π)
xe xs
Where xs, ys are the start point coordinates from the arc center
xe, ye are the end point coordinates from the arc center
47
6. Interpolation Functions
6.6 Helical interpolation
The plane for an additional axis can be selected as with circular interpolation.
In addition to the basic command methods above, the command methods following the
program example can be used. Refer to the section 6.4 plane selection for the arc planes
selected with these command methods.
Example of program
(Example 1)
Z axis
Y axis z1
X axis
G17 ; XY plane
G03 Xx1 Yy1 Zz1 Ii1 Jj1 P0 Ff1 ; XY plane arc, Z axis linear
(Note) If pitch No. is 0, address P can be omitted.
Z axis
Y axis
z1
r1
X axis
(Example 2)
G17 ; XY plane
G02 Xx1 Yy1 Zz1 Rr1 Ff1 ; XY plane arc, Z axis linear
(Example 3)
Z axis
Y axis
U axis
z1
G17 G03 Uu1 Yy1 Zz1 Ii1 Jj1 P2 Ff1 ; UY plane arc, Z axis linear
48
6. Interpolation Functions
6.6 Helical interpolation
(Example 4)
u1
U axis X axis
x1
Z axis z1
G18 G03 Xx1 Uu1 Zz1 Ii1 Kk1 Ff1 ; ZX plane arc, U axis linear
(Note) If the same system is used, the standard axis will perform circular interpolation
and the additional axis will perform linear interpolation.
(Example 5)
G18 G02 Xx1 Uu1 Yy1 Zz1 Ii1 Jj1 Kk1 ZX plane arc, U axis, Y axis linear
Ff1 ; (The J command is ignored)
(Note) Two or more axes can be designated for the linear interpolation axis.
If arc plane element speed designation is selected, the F command will be handled as modal data
in the same manner as the normal F command. This will also apply to the following G01, G02 and
G03 commands.
For example, the program will be as follows.
(Example)
G17 G91 G02 X10. Y10. Z-4. I10, F100 ; Helical interpolation at speed at which arc plane
element is F100
G01 X20. ; Linear interpolation at F100
G02 X10. Y-10. Z4. J10. ; Helical interpolation at speed at which arc plane
element is F100
G01 Y-40. F120 ; Linear interpolation at F120
G02 X-10. Y-10. Z-4. I10. ; Helical interpolation at speed at which arc plane
element is F120
G01 X-20. ; Linear interpolation at F120
When the arc plane element speed designation is selected, only the helical interpolation speed
command is converted to the speed commanded with the arc plane element. The other linear and
arc commands operate as normal speed commands.
(1) The actual feedrate display (Fc) indicates the tangent element of the helical interpolation.
(2) The modal value speed display (FA) indicates the command speed.
(3) The speed data acquired with DDB or API functions follows the Fc and FA display.
(4) During the high-speed mode, the normal helical interpolation speed command is issued.
(5) This function is valid only when feed per minute (asynchronous feed: G94) is selected. If feed
per revolution (synchronous feed: G95) is selected, the arc plane element speed will not be
designated.
(6) The helical interpolation option is required to use this function.
49
6. Interpolation Functions
6.7 Thread cutting
The G33 command exercises feed control over the tool which is synchronized with the spindle
rotation and so this makes it possible to conduct constant-lead straight thread-cutting and tapered
thread-cutting. Multiple thread screws, etc., can also be machined by designating the thread
cutting angle.
Command format
Detailed description
(1) The E command is also used for the number of ridges in inch thread cutting, and whether the
ridge number or precision lead is to be designated can be selected by parameter setting.
(Precision lead is designated by setting the parameter "#1229 set 01/bit 1" to 1.)
(2) The lead in the long axis direction is commanded for the taper thread lead.
Z
LX X
50
6. Interpolation Functions
6.7 Thread cutting
(Note 1) It is not possible to assign a lead where the feed rate as converted into per-minute
feed exceeds the maximum cutting feed rate.
(3) The thread cutting will start by the one rotation synchronous signal from the encoder installed
on the spindle.
(4) The spindle speed should be kept constant throughout from the rough cutting until the
finishing.
(5) If the feed hold function is employed during thread cutting to stop the feed, the thread ridges
will lose their shape. For this reason, feed hold does not function during thread cutting.
If the feed hold switch is pressed during thread cutting, block stop will result at the end point of
the block following the block in which thread cutting is completed (no longer G33 mode).
(6) The converted cutting feedrate is compared with the cutting feed clamp rate when thread
cutting starts, and if it is found to exceed the clamp rate, an operation error will result.
(7) In order to protect the lead during thread cutting, a cutting feed rate which has been converted
may sometimes exceed the cutting feed clamp rate.
(8) An illegal lead is normally produced at the start of the thread and at the end of the cutting
because of servo system delay and other such factors.
Therefore, it is necessary to command a thread length which is determined by adding the
illegal lead lengths to the required thread length.
(9) The spindle speed is subject to the following restriction :
Maximum feedrate
1≤R≤
Thread lead
Where R ≤ Permissible speed of encoder (r/min)
R : Spindle speed (r/min)
Thread lead : mm or inches
Maximum feedrate : mm/min or inch/mm (This is subject to the restrictions imposed
by the machine specifications).
(10) The thread cutting start angle is designated with an integer or 0 to 360.
51
6. Interpolation Functions
6.7 Thread cutting
Example of program
10
50
10
X
Y
N110 G90 G0 X-200. Y-200. S50 M3 ; The spindle center is positioned to the workpiece
N111 Z110. ; center, and the spindle rotates in the forward direction.
N112 G33 Z40. F6.0 ; The first thread cutting is executed. Thread lead =
6.0mm
N113 M19 ; Spindle orientation is executed with the M19
command.
N114 G0X-210. ; The tool is evaded in the X axis direction.
N115 Z110. M0 ; The tool rises to the top of the workpiece, and the
program stops with M00.
Adjust the tool if required.
N116 X-200. ; Preparation for second thread cutting is done.
M3 ;
N117 G04 X5.0 ; Command dwell to stabilize the spindle rotation if
necessary.
N11 G33 Z40. ; The second thread cutting is executed.
52
6. Interpolation Functions
6.7 Thread cutting
If the number of ridges per inch in the long axis direction is assigned in the G33 command, the feed
of the tool synchronized with the spindle rotation will be controlled, which means that constant-lead
straight thread-cutting and tapered thread-cutting can be performed.
Command format
G33 Zz Ee Qq ;
Zz : Thread cutting direction axis address (X, Y, Z, α) and thread length
Ee : Number of ridges per inch in direction of long axis (axis which moves
most) (decimal point command can also be assigned)
Qq : Thread cutting start shift angle, 0 to 360°.
Detailed description
(1) The number of ridges in the long axis direction is assigned as the number of ridges per inch.
(2) The E code is also used to assign the precision lead length, and whether the ridge number of
precision lead length is to be designated can be selected by parameter setting. (The number
of ridges is designated by setting the parameter "#1229 set01/bit1" to 0.)
(3) The E command value should be set within the lead value range when the lead is converted.
53
6. Interpolation Functions
6.7 Thread cutting
Example of program
δ1
50.0mm
δ2
X
Y
The G60 command can position the tool at a high degree of precision without backlash error by
locating the final tool position from a single determined direction.
54
6. Interpolation Functions
6.8 Uni-directional positioning
Command format
G60 Xx Yy Zz αα ;
α : Optional axis
Detailed description
(1) The creep distance for the final positioning as well as the final positioning direction is set by
parameter.
(2) After the tool has moved at the rapid traverse rate to the position separated from the final
position by an amount equivalent to the creep distance, it move to the final position in
accordance with the rapid traverse setting where its positioning is completed.
Start point
Stop once
G60-a
[G60creep distance]
(3) The above positioning operation is performed even when Z-axis commands have been
assigned for Z-axis cancel and machine lock. (Display only)
(4) When the mirror image function is ON, the tool will move in the opposite direction as far as the
intermediate position due to the mirror image function but the operation within the creep
distance during its final advance will not be affected by mirror image.
(5) The tool moves to the end point at the dry run speed during dry run when the G0 dry run
function is valid.
(6) Feed during creep distance movement with final positioning can be stopped by resetting,
emergency stop, interlock, feed hold and rapid traverse override zero.
The tool moves over the creep distance at the rapid traverse setting. Rapid traverse override
is valid.
(7) Uni-directional positioning is not performed for the drilling axis during drilling fixed cycles.
(8) Uni-directional positioning is not performed for shift amount movements during the fine boring
or back boring fixed cycle.
(9) Normal positioning is performed for axes whose creep distance has not been set by
parameter.
(10) Uni-directional positioning is always a non-interpolation type of positioning.
(11) When the same position (movement amount of zero) has been commanded, the tool moves
back and forth over the creep distance and is positioned at its original position from the final
advance direction.
(12) Program error (P61) results when the G60 command is assigned with an NC system which
has not been provided with this particular specification.
55
6. Interpolation Functions
6.9 Circular interpolation
This function develops a shape with a cylindrical side (shape in cylindrical coordinate system) into
a plane. When the developed shape is programmed as the plane coordinates, that is converted
into the linear axis and rotation axis movement in the cylindrical coordinates and the contour is
controlled during machining.
Y
X
Z
r
As programming can be carried out with a shape with which the side on the cylinder is developed,
this is effective for machining cylindrical cams, etc. When programmed with the rotation axis and its
orthogonal axis, slits, etc., can be machined on the cylinder side.
0°
Develop-
ment 2πr
360°
56
6. Interpolation Functions
6.9 Circular interpolation
Command format
(Note) The above format applies when the name of the rotation axis is "C". If the name is not "C",
command the name of the rotation axis being used instead of "C".
(1) The coordinates commanded in the interval from the start to cancellation of the cylindrical
interpolation mode will be the cylindrical coordinate system.
G07.1 C Cylinder radius value; Cylindrical interpolation mode start
: (Cylindrical interpolation will start)
: (The coordinate commands in this interval will be
: the cylindrical coordinate system)
G07.1 C0 ; Cylindrical interpolation mode cancel
(Cylindrical interpolation will be canceled)
(2) G107 can be used instead of G07.1.
(3) Command G07.1 in an independent block. A program error (P33) will occur if this command is
issued in the same block as another G code.
(4) Program the rotation axis with an angle degree.
(5) Linear interpolation or circular interpolation can be commanded during the cylindrical
interpolation mode. Note that the plane selection command must be issued just before the
G07.1 block.
(6) The coordinates can be commanded with either an absolute command or incremental
command.
(7) Tool radius compensation can be applied on the program command. Cylindrical interpolation will
be executed on the path after tool radius compensation.
(8) Command the segment feed in the cylinder development with F. The F unit is mm/min or
inch/min.
Detailed description
57
6. Interpolation Functions
6.9 Circular interpolation
58
6. Interpolation Functions
6.9 Circular interpolation
G07.1 C100. ;
:
G07.1 C0 ;
Y X Z
Basic
coordinate G17 G18 G19
system
X, Y, Z X Z Y
Y C
Cylindrical
coordinate system
C, Y, Z
G17 G18
(Rotation axis is X
axis' parallel axis)
#1029 C Z
C Z
Cylindrical
coordinate system
X, C, Z G17 G19
(Rotation axis is Y
axis' parallel axis) X C
#1030
X C
Cylindrical
coordinate system
X, Y, C
(Rotation axis is Z G18 G19
axis' parallel axis)
#1031 C Y
(Note) Depending on the model or version, the Z-C plane (Y-Z cylinder plane) will be automatically
selected with G07.1 and G19.
The circular interpolation and tool radius compensation, etc., can be designated on that
plane.
Cylindrical G19
coordinate system
59
6. Interpolation Functions
6.9 Circular interpolation
60
6. Interpolation Functions
6.9 Circular interpolation
61
6. Interpolation Functions
6.9 Circular interpolation
(1) The following G code commands can be used during the cylindrical interpolation mode.
G code Details
G00 Positioning
G01 Linear interpolation
G02 Circular interpolation (CW)
G03 Circular interpolation (CWW)
G04 Dwell
G09 Exact stop check
G40-42 Tool nose R compensation
G61 Exact stop check mode
G64 Cutting mode
G65 Macro call (simple call)
G66 Macro modal call A (modal call)
G66.1 Macro modal call B (block call per macro)
G67 Macro modal call cancel (modal call cancel)
G80-89 Hole drilling fixed cycle
G90/91 Absolute/incremental value command
G94 Asynchronous feed
G98 Hole drilling cycle initial return
G99 Hole drilling cycle R point return
A program error (P481) may occur if a G code other than those listed above is commanded
during cylindrical interpolation.
(2) The cylindrical interpolation mode is canceled when the power is turned ON or reset.
(3) A program error (P484) will occur if any axis commanded for cylindrical interpolation has not
completed zero point return.
(4) Tool radius compensation must be canceled before the cylindrical interpolation mode can be
canceled.
(5) When the cylindrical interpolation mode is canceled, the mode will change to the cutting mode,
and the plane will return to that selected before cylindrical interpolation.
(6) The program of the block during the cylindrical interpolation cannot be restarted (program
restart).
(7) A program error (P486) will occur if the cylindrical interpolation command is issued during the
mirror image.
(8) When the cylindrical interpolation mode is started or canceled, the deceleration check is
performed.
(9) A program error (P486) will occur if the cylindrical interpolation or the pole coordinate
interpolation is commanded during the cylindrical interpolation mode.
62
6. Interpolation Functions
6.9 Circular interpolation
Example of program
<Program>
<Parameter>
N01 G28XZC; #1029 aux_I
N02 T02; #1030 aux_J C
N03 G97S100M23; #1031 aux_K
N04 G00X50.Z0.;
N05 G94G01X40.F100.;
N06 G19C0Z0; Command of plane selection for cylindrical interpolation
and command of two interpolation axes
N07 G07.1C20.;
Cylindrical interpolation start
N08 G41;
N09 G01Z-10.C80.F150;
N10 Z-25.C90.;
N11 Z-80.C225;
N12 G03Z-75.C270.R55.;
N13 G01Z-25;
N14 G02Z-20.C280.R80.;
N15 G01C360.
N16 G40;
N17 G07.1C0;
Cylindrical interpolation cancel
N18 G01X50.;
N19 G0X100.Z100.;
-80 -60 -40 -20 (Unit: mm)
N20 M25;
Z
N21 M30;
50
N10
N09
100
150
200
N11
250
N13
N12 N14
300
350°
N15
63
6. Interpolation Functions
6.10 Pole coordinate interpolation
This function converts the commands programmed with the orthogonal coordinate axis into linear
axis movement (tool movement) and rotation axis movement (workpiece rotation), and controls the
contour.
The plane that uses the linear axis as the plane's 1st orthogonal axis, and the intersecting
hypothetical axis as the plane's 2nd axis (hereafter "pole coordinate interpolation plane") is
selected. Pole coordinate interpolation is carried out on this plane. The workpiece coordinate
system zero point is used as the coordinate system zero point during pole coordinate interpolation.
Linear axis
X axis
C axis
Z axis
Rotation axis
(hypothetical axis)
Pole coordinate interpolation plane (G17 plane)
This is effective for cutting a notch section on a linear section of the workpiece diameter, and for
cutting cam shafts, etc.
64
6. Interpolation Functions
6.10 Pole coordinate interpolation
Command format
(1) The coordinates commanded in the interval from the start to cancellation of the pole
coordinate interpolation mode will be the pole coordinate interpolation.
G12.1 ; Pole coordinate interpolation mode start
: (Pole coordinate interpolation will start)
: (The coordinate commands in this interval will be the pole coordinate
: interpolation)
G13.1 ; Pole coordinate interpolation mode cancel
(Pole coordinate interpolation is canceled)
(2) G112 and G113 can be used instead of G12.1 and G13.1.
(3) Command G12.1 and G13.1 in an independent block. A program error (P33) will occur if this
command is issued in the same block as another G code.
(4) Linear interpolation or circular interpolation can be commanded during the pole coordinate
interpolation mode.
(5) The coordinates can be commanded with either an absolute command or incremental
command.
(6) Tool radius compensation can be applied on the program command. Pole coordinate
interpolation will be executed on the path after tool radius compensation.
(7) Command the segment feed in the pole coordinate interpolation plane (orthogonal coordinate
system) with F. The F unit is mm/min or inch/min.
(8) When the G12.1 and G13.1 commands are issued, the deceleration check is executed.
Detailed description
65
6. Interpolation Functions
6.10 Pole coordinate interpolation
66
6. Interpolation Functions
6.10 Pole coordinate interpolation
67
6. Interpolation Functions
6.10 Pole coordinate interpolation
(7) Hole drilling axis in the hole drilling fixed cycle command during the pole coordinate
interpolation
Hole drilling axis in the hole drilling fixed cycle command during the pole coordinate
interpolation is determined with the linear axis parameter (# 1533).
#1533 setting value Hole drilling axis
X Z (pole coordinate plane is interpreted as XY plane)
Y X (pole coordinate plane is interpreted as YZ plane)
Z Y (pole coordinate plane is interpreted as ZX plane)
Blank (no setting) Z (pole coordinate plane is interpreted as XY plane)
(8) Shift amount in the G76 (fine boring) or G87 (back boring) command during the pole
coordinate interpolation
Shift amount in the G76 (fine boring) or G87 (back boring) command during the pole
coordinate interpolation is determined with the linear axis parameter (#1533).
#1533 setting value Center designation command
X I, J (pole coordinate plane is interpreted as XY plane)
Y J, K (pole coordinate plane is interpreted as YZ plane)
Z K, I (pole coordinate plane is interpreted as ZX plane)
Blank (no setting) I, J (pole coordinate plane is interpreted as XY plane)
68
6. Interpolation Functions
6.10 Pole coordinate interpolation
(1) The following G code commands can be used during the pole coordinate interpolation mode.
G code Details
G00 Positioning
G01 Linear interpolation
G02 Circular interpolation (CW)
G03 Circular interpolation (CWW)
G04 Dwell
G09 Exact stop check
G40-42 Tool nose R compensation
G61 Exact stop check mode
G64 Cutting mode
G65 Macro call (simple call)
G66 Macro modal call A (modal call)
G66.1 Macro modal call B (block call per macro)
G67 Macro modal call cancel (modal call cancel)
G80-89 Hole drilling fixed cycle
G90/91 Absolute/incremental value command
G94 Asynchronous feed
G98 Hole drilling cycle initial return
G99 Hole drilling cycle R point return
A program error (P481) may occur if a G code other than those listed above is commanded
during pole coordinate interpolation.
(2) The program cannot be restarted (resumed) for a block in pole coordinate interpolation.
(3) Before commanding pole coordinate interpolation, set the workpiece coordinate system so
that the center of the rotation axis is at the coordinate system zero point. Do not change the
coordinate system during the pole coordinate interpolation mode. (G50, G52, G53, relative
coordinate reset, G54 to G59, etc.)
(4) The feedrate during pole coordinate interpolation will be the interpolation speed on the pole
coordinate interpolation plane (orthogonal coordinate system).
(The relative speed with the tool will be converted with pole coordinate conversion.)
When passing near the center of the rotation axis on the pole coordinate interpolation plane
(orthogonal coordinate system), the rotation axis side feedrate after pole coordinate
interpolation will be very high.
(5) The axis movement command outside of the plane during pole coordinate interpolation will
move unrelated to the pole coordinate interpolation.
(6) The current position displays during pole coordinate interpolation will all indicate the actual
coordinate value. However, the "remaining movement amount" will be the movement amount
on the pole coordinate input plane.
(7) The pole coordinate interpolation mode will be canceled when the power is turned ON or
reset.
(8) A program error (P484) will occur if any axis commanded for pole coordinate interpolation has
not completed zero point return.
(9) Tool radius compensation must be canceled before the pole coordinate interpolation mode
can be canceled.
(10) When the pole coordinate interpolation mode is canceled, the mode will change to the cutting
mode, and the plane will return to that selected before pole coordinate interpolation.
(11) A program error (P486) will occur if the pole coordinate interpolation command is issued
during the mirror image.
(12) A program error (P486) will occur if the cylindrical interpolation or the pole coordinate
interpolation is commanded during the pole coordinate interpolation mode.
69
6. Interpolation Functions
6.10 Pole coordinate interpolation
Example of program
Hypothetical C axis
X axis
C axis
Z axis
Hypothetical C axis
C axis
N04
N01
N03 N02
X axis
N10 N11
N07
N08 N09
<Program>
:
:
N00 T01;
:
:
N01 G17 G90 G0 X40.0 C0 Z0; Setting of start position
N02 G12.1; Pole coordinate interpolation mode: Start
N03 G1 G42 X20.0 F2000; Actual machining start
N04 C10.0;
N05 G3 X10.0 C20.0 R10.0;
N06 G1 X-20.0; Shape program
N07 C-10.0;
N08 G3 X-10.0 C-20.0 I10.0 J0; (Follows orthogonal coordinate values on X-C
N09 G1 X20.0; hypothetical axis plane.)
N10 C0;
N11 G40 X40.0;
N12 G13.1; Pole coordinate interpolation mode: Cancel
:
:
M30 ;
70
6. Interpolation Functions
6.11 Exponential function interpolation
Exponential function interpolation changes the rotation axis into an exponential function shape in
respect to the linear axis movement.
At this time, the other axes carry out linear interpolation between the linear axis.
This allows a machining of a taper groove with constant torsion angle (helix angle) (uniform helix
machining of taper shape).
This function can be used for slotting or grinding a tool for use in an end mill, etc.
Z axis (G00)
(G01)
(G01)
(G02.3/G03.3)
A axis
(Rotation axis)
J1 J2 J3
X axis
(Linear axis)
A axis
(Rotation axis)
71
6. Interpolation Functions
6.11 Exponential function interpolation
Command format
(Note 4) The command unit and command range is the same as the normal F code. (Command
as a per minute feed.)
Command the composite feedrate that includes the rotation axis.
The normal F modal value will not change by the address F command.
A program error (P33) will occur if there is no address F command.
A program error (P35) will occur if the address F command value is 0.
72
6. Interpolation Functions
6.11 Exponential function interpolation
Z axis Z axis
i1
r1 A axis
x0 j1 x1
Linear axis ... X axis, rotation axis ... A axis, linear axis (X axis) start point ... x0
The exponential function relational expression of the linear axis (X) and rotation axis (A) in the
G02.3/G03.3 command is defined in the following manner.
73
6. Interpolation Functions
6.11 Exponential function interpolation
Machining example
Z axis
i1
z1
z2 p1
z0 A axis
X axis
x0 x2 j1 x1
r2 r1
74
6. Interpolation Functions
6.11 Exponential function interpolation
The taper gradient angle (i1) and torsion angle (j1) are each issued with the command address I
and J.
Note that if the shape is a reverse taper shape, the taper gradient angle (i1) is issued as a negative
value.
The torsion direction (ω) is changed with the G code. (Forward rotation when G02.3 is commanded,
negative rotation when G03.3 is commanded)
The above settings allow uniform helix machining of a taper shape (or reverse taper shape).
r1 r1 X r1 X r1
X X
A A A A
Operation
X X X X
N20 G91G0 X100. Z100.; N20 G91G0 X100. Z200.; N20 G91G0 X-100. Z100.; N20 G91G0 X-100. Z200.;
Machining
N30 G2.3 X100. Z100. N30 G2.3 X100. Z-100. N30 G2.3 X-100. Z100. N30 G2.3 X-100. Z-100.
I50. J80. R105. F500.; I-50. J80. R105. F500.; I50. J80. R105. F500.; I-50. J80. R105. F500.;
N40 M30; N40 M30; N40 M30; N40 M30;
point
point point point
Start End Start End
point j1 j1 point j1 point point j1
r1 r1 r1 X r1
X X X
A A A A
Operation
X X X X
N20 G91G0 X100. Z100.; N20 G91G0 X100. Z200.; N20 G91G0 X-100. Z100.; N20 G91G0 X-100. Z200.;
Machining
N30 G3.3 X100. Z100. N30 G3.3 X100. Z-100. N30 G3.3 X-100. Z100. N30 G3.3 X-100. Z-100.
I50. J80. R105. F500.; I-50. J80. R105. F500.; I50. J80. R105. F500.; I-50. J80. R105. F500.;
N40 M30; N40 M30; N40 M30; N40 M30;
75
6. Interpolation Functions
6.11 Exponential function interpolation
(1) When G02.3/G03.3 is commanded, interpolation takes place with the exponential function
relational expression using the start position of the linear axis and rotation axis as 0.
(2) Linear interpolation will take place in the following cases, even if in the G02.3/G03.3 mode.
The feedrate for linear interpolation will be the F command in that block. (Note that the normal
F modal is not updated.)
• The linear axis designated with the parameter (#1514 expLinax) is not commanded, or the
movement amount for that axis is 0.
• The rotation axis designated with the parameter (#1515 expRotax) is commanded.
(3) Tool length offset and tool radius compensation cannot be used during the G02.3/G03.3 mode.
Note that the tool length offset started before interpolation is started before the G02.3/G03.3
mode will normally continue.
(4) A program error will occur if commands are issued during the pole coordinate interpolation,
cylindrical interpolation or milling interpolation modes.
(5) G02.3/G03.3 will function with asynchronous feed even during the synchronous feed mode.
(6) If the parameter "#1515 expRota" setting is the same axis name as the initial C axis, the axis
selected with the C axis selection signal will interpolate as the rotation axis.
76
6. Interpolation Functions
6.12 Polar coordinate command
With this function, the end point coordinate value is commanded with the polar coordinate of the
radius and angle.
Command format
Commanded position
x1
Plus
X
For G90/G17(X-Y plane)
77
6. Interpolation Functions
6.12 Polar coordinate command
(8) When the radius is commanded with the incremental value command, considering the end
point of the previous block as the polar coordinate center, command the incremental value
from that end point. The angle is commanded with the incremental value of the angle from the
previous block.
(9) When the radius is commanded with the negative value, the same operation as the command
that the radius command value is changed to the absolute value and 180° is added to the
angle command value.
Command position
(1) When the zero point in the workipiece coordinate system is applied to the polar
coordinate center
The zero point in the workipiece coordinate system is applied to the polar coordinate center by
commanding the radius value with the absolute value. Note that the zero point in the local
coordinate system is applied to the polar coordinate center if the local coordinate system
(G52) is used.
Present Present
Angle Angle
position position
When the angle is the absolute When the angle is the incremental
value command value command
Command position when the zero point in the workipiece coordinate system is applied to
the polar coordinate center
(2) When the present position is applied to the polar coordinate center
The present position is applied to the polar coordinate center by commanding the radius value
with the incremental value.
Radius Angle
Radius
Angle
Present Present
position position
When the angle is the absolute When the angle is the incremental
value command value command
Command position when the present position is applied to the polar coordinate center
78
6. Interpolation Functions
6.12 Polar coordinate command
Present
Angle Present
position Angle position
Radius Radius
When the angle is the absolute When the angle is the incremental
value command value command
Angle
Angle
Radius Radius
When the radius is the absolute When the radius is the incremental
value command value command
79
6. Interpolation Functions
6.12 Polar coordinate command
The axis command with the following command is not interpreted as the polar coordinate
command during the polar coordinate command mode. The movement command that has no axes
commands for the 1st axis and 2nd axis in the selected plane mode is also not interpreted as polar
coordinate command during the polar coordinate command mode.
Function G code
Dwell G04
Program parameter G10
input/compensation input
Local coordinate system setting G52
Machine coordinate system setting G92
Machine coordinate system selection G53
Coordinate rotation by program G68
Scaling G51
G command mirror image G51.1
Reference point check G27
Reference point return G28
Start point return G29
2nd to 4th reference point return G30
Tool change position return 1 G30.1
Tool change position return 2 G30.2
Tool change position return 3 G30.3
Tool change position return 4 G30.4
Tool change position return 5 G30.5
Tool change position return 6 G30.6
Automatic tool length measurement G37
Skip G31
Multi-skip function 1 G31.1
Multi-skip function 2 G31.2
Multi-skip function 3 G31.2
Linear angle command G01 Aa1
80
6. Interpolation Functions
6.12 Polar coordinate command
Example of program
When the zero point in the workpiece coordinate system is the polar coordinate zero point
N2
120°
30°
270° X
200mm
N4
(1) When the radius value and angle are the absolute value command
N1 G17 G90 G16 ; Polar coordinate command, X-Y plane selection
The polar coordinate zero point is the zero point
in the workpiece coordinate system.
N2 G85 X200. Y30. Z-20. F200. ; Radius 200mm, angle 30°
N3 Y120. ; Radius 200mm, angle 120°
N4 Y270. ; Radius 200mm, angle 270°
N5 G15 G80 ; Polar coordinate command cancel
(2) When the radius value is the absolute value command and the angle is the incremental
value command
N1 G17 G90 G16 ; Polar coordinate command, X-Y plane selection
The polar coordinate zero point is the zero point
in the workpiece coordinate system.
N2 G85 X200. Y30. Z-20. F200. ; Radius 200mm, angle 30°
N3 G91 Y90. ; Radius 200mm, angle + 90°
N4 Y150. ; Radius 200mm, angle +150°
N5 G15 G80 ; Polar coordinate command cancel
81
6. Interpolation Functions
6.12 Polar coordinate command
Precautions
(1) If the following commands are carried out during the polar coordinate command mode, or if the
polar coordinate command is carried out during the following command mode, an program
error (P34) will occur.
Function G code
High-speed machining mode 3 G05 P3
High-speed high-accuracy G05.1 Q1
control I
High-speed high-accuracy G05 P10000
control II
Spline G05.1 Q2
(2) When the mirror image (G code/parameter/external signal) is canceled anywhere except at
the mirror image center during the polar coordinate command mode, the absolute value and
machine position will deviate. The mirror center is set with an absolute value and so if another
mirror center is assigned in this state, the center may be set at an unforeseen position.
Cancel the mirror image above the mirror center or, after cancellation, assign a positioning
command using absolute value command that the radius and angle of the polar coordinate
command are designated.
82
6. Interpolation Functions
6.13 Spiral Interpolation
This function carries out interpolation that smoothly joins the start and end points in a spiral. This
interpolation is carried out for arc commands such as those in which the start point and end point
are not on the same circumference.
Command format
G17 G02.1/G03.1 Xx Yy Ii Jj Pp Ff ;
G17 :Rotation plane
G02.1/G03.1 :Arc rotation direction
Xx Yy :End point coordinates
Ii Jj :Arc center value
Pp :Number of pitches (number of rotations)
Ff :Feedrate (tool path direction speed)
Circular interpolation operations are carried out at the f1 speed by the commands above.
The path is toward the end point, following a spiral arc path centered at the position designated by
distance i (X axis direction) and distance j (Y axis direction) in respect to the start point.
(3) P designates the number of pitches (number of rotations). p1 = 0 is less than one rotation and
can be omitted. p1 = 1 is more than one rotation and less than two rotations. The command
range is from 0 to 9999.
Detailed description
(1) The arc rotation direction G02.1 is the same as G02, and G03.1 is the same as G03.
(2) There are no R-designated arcs in spiral interpolation.
(3) Conical cutting, tapered thread-cutting and other such machining operations can be
conducted by changing the start point and end point radius and commanding the linear axis
simultaneously.
(4) Normally the spiral interpolation is automatically enabled with the arc commands (G02, G03)
when the difference between the start point radius and the end point radius is less than the
parameter setting value.
(5) The axis combination that can be simultaneously commanded depends on the specifications.
The combination within that range is random.
(6) The feedrate is the constant tangential speed.
(7) Simultaneous control by combining with tool radius compensation (G41, G42) is not possible.
83
6. Interpolation Functions
6.13 Spiral Interpolation
(8) The arc plane always follows G17, G18 and G19. The plane arc control is carried out by G17,
G18 and G19, even if designated by two addresses that do not match the plane.
(9) When an axis designation other than the spiral interpolation plane is simultaneously
designated, other axes are also interpolated in synchronization with the spiral interpolation.
Example of program
(Example 1)
G91 G17 G01 X60. F500 ; Y
Y140. ;
G02.1 X60. Y0 I100. P1 F300 ; End
G01 X−120 ; 140.
point Center
Start
G90 point
(Example 2)
G91 G17 G01 X60. F500 ;
Y140. ;
G02.1 X60.0 Z100.0 I100. P1 F300 ;→ Because this is the G17 plane, arc control
G01 X−120 ; is not carried out by X-Z.
Arc control is carried out by X-Y.
XY
plane
X
W
Z Z
XZ
plane
X
X
W
84
7. Feed Functions
7.1 Rapid traverse rate
7. Feed Functions
7.1 Rapid traverse rate
Function and purpose
The rapid traverse rate can be set independently for each axis. The available speed ranges are
from 1 mm/min to 1,000,000 mm/min for input setting unit of 1µm. The upper limit is subject to the
restrictions imposed by the machine specifications.
Refer to the specifications manual of the machine for the rapid traverse rate settings.
The feedrate is valid for the G00, G27, G28, G29, G30 and G60 commands.
Two paths are available for positioning: the interpolation type where the area from the start point to
the end point is linearly interpolated or the non-interpolation type where movement proceeds at the
maximum speed of each axis. The type is selected with parameter "#1086 G0Intp". The positioning
time is the same for each type.
The cutting feedrate is assigned with address F and 8 digits (F8-digit direct designation).
The F8 digits are assigned with a decimal point for a 5-digit integer and a 3-digit fraction. The
cutting feedrate is valid for the G01, G02, G03, G02.1 and G03.1 commands.
(Examples)
Feedrate
G1 X100. Y100. F200 ; 200.0mm/min F200 or F200.000 gives the same rate.
G1 X100. Y100. F123.4 ; 123.4mm/min
G1 X100. Y100. F56.789 ; 56.789mm/min
Speed range that can be commanded (when input setting unit is 1µm or 10µm)
Command mode F command range Feed rate command range Remarks
mm/min 0.001 to 1000000.000 0.01 to 1000000 mm/min
inch/min 0.0001 to 39370.0787 0.001 to 100000 inch/min
°/min 0.001 to 1000000.000 0.01 to 1000000 °/min
(Note 1) A program error (P62) results when there is no F command in the first cutting command
(G01, G02, G03) after the power has been switched on.
(Note 2) Depending on the model, the speed range may be 0.001 to 240000.000mm/min, 0.0001
to 9448.8188inch/min or 0.001 to 240000.000°/min.
85
7. Feed Functions
7.3 F1-digit feed
By setting the F1-digit feed parameter, the feedrate which has been set to correspond to the 1-digit
number following the F address serves as the command value.
When F0 is assigned, the rapid traverse rate is established and the speed is the same as for G00.
(G modal does not change.)
When F1 to F5 is assigned, the feedrate set to correspond to the command serves as the
command value.
The command greater than F6 is considered to be the normal cutting feedrate.
The F1-digit command is valid in a G01, G02, G03, G02.1 or G03.1 modal.
The F1-digit command can also be used for fixed cycle.
Detailed description
The override function of the feedrate which is set in accordance to the F1-digit is performed by
using the manual handle.
The amount by which the feedrate can be increased or reduced is determined by the following
formula.
FM
±∆F = × (±number of manual handle pulse generator pulses)
K
Where "+" means increase, and "–" means reduction.
K : Operation constant (This is the number of FM divisions, and is the calculated constant of
the increment/decrement speed per scale of the manual handle pulse generator.)
This is set with the base specification parameter "#1507 F1_K".
FM : This is the clamp speed of F1 to F5
This is set with the base specification parameter "#1506 F1_FM".
Set the corresponding speed of F1 to F5 with the base specification parameters "#1185 spd_F1" to
"#1189 spd_F5" respectively.
The increase/reduction range is from "0" to the set value of the parameter "#1506 F1_FM".
Operation alarm "104" will occur when the feedrate is 0.
(a) Make the F1-digit command valid. (Set the base specification parameter "#1079 F1digt" to
1.)
(b) Set FM and K.
Setting range
K : 1 to 32767 (Base specification parameter "#1507 F1_K")
FM : 0 to Fmax (mm/min) (Base specification parameter "#1506 F1_FM")
(c) Set F1 to F5. (Base specification parameter "1185 spd_F1" to "#1189 spd_F5")
86
7. Feed Functions
7.3 F1-digit feed
(a) Use of both the F1-digit command and normal cutting feedrate command is possible when
the F1-digit is valid.
(Example 1)
F0 Rapid traverse rate
F1 to F5 F1-digit
F6 or more Normal cutting feedrate command
(b) F1 to F5 are invalid in the G00 mode and the rapid traverse rate is established instead.
(c) If F0 is used in the G02 or G03 mode, a program error (P121) will result.
(d) When F1. to F5. (with decimal point) are assigned, the 1mm/min to 5mm/min direct
commands are established instead of the F1-digit command.
(e) When the commands are used with the millimeter or degree units, the feedrate set to
correspond to F1 to F5 serves as the assigned speed mm (°)/min.
(f) When the commands are used with inch units, one-tenth of the feedrate set correspond to
F1 to F5 serves at the assigned speed inch/min.
(g) The number of manual handle pulses is 1 pulse per scale unit regardless of the scaling
factor.
(h) During a F1-digit command, the F1-digit number and F1-digit command signal are output
as the PLC signals.
(b) F1-digit and unmodal commands may be assigned in the same block. In this case, the
unmodal command is executed and at the same time the F1-digit modal command is
updated.
87
7. Feed Functions
7.4 Synchronous feed
Using the G95 command, it is possible to assign the feed amount per rotation with an F code.
When this command is used, the rotary encoder must be attached to the spindle.
When the G94 command is issued the per-minute feed rate will return to the designated per-minute
feed (asynchronous feed) mode.
Command format
G94;
G95;
G94 : Per-minute feed (mm/min) (asynchronous feed) (F1 = 1mm/min)
G95 : Per-revolution feed (mm/rev) (synchronous feed) (F1 = 0.01mm/rev)
The G95 command is a modal command and so it is valid until the G94 command (per-minute
feed) is next assigned.
Metric input
Input unit
B (0.001mm) C (0.0001mm)
system
Command
Feed per minute Feed per rotation Feed per minute Feed per rotation
mode
Command
F (mm/min) E (mm/rev) F (mm/min) E (mm/rev)
address
Minimum 1 (= 1.00), 1 (= 0.01), 1 (= 1.000), 1 (= 0.01),
command unit (1. = 1.00) (1. = 1.00) (1. = 1.000) (1. = 1.00)
Command
0.01 to 1000000.00 0.001 to 999.999 0.001 to 100000.000 0.0001 to 99.9999
range
Inch input
Input unit
B (0.0001inch) C (0.00001inch)
system
Command
Feed per minute Feed per rotation Feed per minute Feed per rotation
mode
Command
F (inch/min) E (inch/rev) F (inch/min) E (inch/rev)
address
Minimum 1 (= 1.000), 1 (= 0.001), 1 (= 1.0000), 1 (= 0.001),
command unit (1. = 1.000) (1. = 1.000) (1. = 1.0000) (1. = 1.000)
Command 0.0001 to
0.001 to 100000.0000 0.0001 to 999.9999 0.00001 to 99.99999
range 10000.00000
(2) The effective speed (actual movement speed of machine) under per-revolution feed
conditions is given in the following formula (Formula 1).
FC = F × N × OVR ..... (Formula 1)
Where FC = Effective rate (mm/min, inch/min)
F = Commanded feedrate (mm/rev, inch/rev)
N = Spindle speed (r/min)
OVR = Cutting feed override
When a multiple number of axes have been commanded at the same time, the effective rate
FC in formula 1 applies in the vector direction of the command.
88
7. Feed Functions
7.4 Synchronous feed
(Note 1) The effective rate (mm/min or inch/min), which is produced by converting the
commanded speed, the spindle speed and the cutting feed override into the
per-minute speed, appears as the FC on the monitor 1. Screen of the setting and
display unit.
(Note 2) When the above effective rate exceeds the cutting feed clamp rate, it is clamped at
that clamp rate.
(Note 3) If the spindle speed is zero when synchronous feed is executed, operation alarm
"105" results.
(Note 4) During machine lock high-speed processing, the rate will be 60,000mm/min (or
2,362 inch/min, 60,000 °/min) regardless of the commanded speed and spindle
speed. When high-speed processing is not undertaken, the rate will be the same as
for non-machine lock conditions.
(Note 5) Under dry run conditions, asynchronous speed applies and movement results at the
externally set rate (mm/min, inch/min, °/min).
(Note 6) The fixed cycle G84 (tapping cycle) and G74 (reverse tapping cycle) are executed to
the feed mode that is already designated.
89
7. Feed Functions
7.5 Feedrate designation and effects on control axes
It has already been mentioned that a machine has a number of control axes. These control axes
can be divided into linear axes which control linear movement and rotary axes which control rotary
movement. The feedrate is designed to assign the displacement speed of these axes, and the
effect exerted on the tool movement speed which poses problems during cutting differs according
to when control is exercised over the linear axes or when it is exercised over the rotary axes.
The displacement amount for each axis is assigned separately for each axis by a value
corresponding to the respective axis. The feedrate is not assigned for each axis but assigned as a
single value. Therefore, when two or more axes are to be controlled simultaneously, it is necessary
to understand how this will work for each of the axes involved.
The assignment of the feedrate is described with the following related items.
Even when only one machine axis is to be controlled or there are two or more axes to be controlled
simultaneously, the feed rate which is assigned by the F code functions as a linear speed in the
tool advance direction.
(Example) When the feedrate is designated as "f" and linear axes (X and Y) are to be controlled.
Y
x
Feedrate for X axis = f x 2 2
P2 (Tool end point) x +y
y
y
Feedrate for Y axis = f x 2 2
Speed in this x +y
direction is "f"
P (Tool start point) x X
When only linear axes are to be controlled, it is sufficient to designate the cutting feed in the
program. The feedrate for each axis is such that the designated rate is broken down into the
components corresponding to the movement amounts.
(Note) When the circular interpolation function is used and the tool is moved along the
circumference of an arc by the linear control axis, the rate in the tool advance
direction, or in other words the tangential direction, will be the feedrate designated in
the program.
P2
y
Linear speed is "f"
P1
x i X
90
7. Feed Functions
7.5 Feedrate designation and effects on control axes
(Example) When the feedrate is designated as "f" and the linear axes (X and Y) are to be
controlled using the circular interpolation function.
In this case, the feed rate of the X and Z axes will change along with the tool
movement. However, the combined speed will always be maintained at the constant
value "f".
When rotary axes are to be controlled, the designated feedrate functions as the rotary speed of the
rotary axes or, in other words, as an angular speed.
Consequently, the cutting feed in the tool advance direction, or in other words the linear speed,
varies according to the distance between the center of rotation and the tool. This distance must be
borne in mind when designating the feedrate in the program.
(Example) When the feedrate is designated as "f" and rotary axis (CA) is to be controlled ("f"
units = °/min)
In this case, in order to make the cutting feed (linear feed) in the tool advance
direction "fc" :
fc = f × π • r
180
When linear and rotary axes are to be controlled at the same time
The controller proceeds in exactly the same way whether linear or rotary axes are to be controlled.
When a rotary axis is to be controlled, the numerical value assigned by the coordinate word (A, B,
C) is the angle and the numerical values assigned by the feedrate (F) are all handled as linear
speeds. In other words, 1° of the rotary axis is treated as being equivalent to 1mm of the linear axis.
Consequently, when both linear and rotary axes are to be controlled simultaneously, the
components for each axis of the numerical values assigned by F will be the same as previously
described "When controlling linear axes". However, although in this case both the size and
direction of the speed components based on linear axis control do not vary, the direction of the
speed components based on rotary axis control will change along with the tool movement (their
size will not change). This means, as a result, that the combined tool advance direction feedrate
will vary along with the tool movement.
91
7. Feed Functions
7.5 Feedrate designation and effects on control axes
(Example) When the feed rate is designated as "f" and Linear (X) and rotary © axes are to be
controlled simultaneously.
In the X-axis incremental command value is "x" and the C-axis incremental command
values is "c":
ft
fc Size and direction are fixed for fx.
Size is fixed for fc but direction varies.
P2 fx Both size and direction vary for ft.
fc
r θ
ft
P1
c fx
x
θ
Rotation center
X-axis feedrate (linear speed) "fx" and C-axis feedrate (angular speed) "ω" are expressed as:
fx = f × x ........................................................................................ (1)
x2 + c2
If the speed in the tool advance direction at start point P1 is "ft" and the component speeds in the
X-axis and Y-axis directions are "ftx" and "fty", respectively, then these can be expressed as:
π π
ftx = −rsin ( θ)× ω + fx .............................................................. (4)
180 180
π π
fty = −rcos ( θ)× ω ..................................................................... (5)
180 180
Where r is the distance between center of rotation and tool (in mm units), and θ is the angle
between the P1 point and the X axis at the center of rotation (in units °).
The combined speed "ft" according to (1), (2), (3), (4) and (5) is:
2 2
ft = ftx + fty
2 π π π • r • c )2
x – x • c • rsin ( θ) +(
=f× 180 90 180 ................... (6)
2 2
x +c
Consequently, feedrate "f" designated by the program must be as follows:
2 2
f = ft × x +c .................... (7)
2 π π π•r•c 2
x – x • c • rsin ( θ) +( )
180 90 180
"ft" in formula (6) is the speed at the P1 point and the value of θ changes as the C axis rotates,
which means that the value of "ft" will also change.
Consequently, in order to keep the cutting feed "ft" as constant as possible the angle of rotation
which is designated in one block must be reduced to as low as possible and the extent of the
change in the θ value must be minimized.
92
7. Feed Functions
7.6 Exact stop check
In order to prevent roundness during corner cutting and machine shock when the tool feedrate
changes suddenly, there are times when it is desirable to start the commands in the following block
once the in-position state after the machine has decelerated and stopped or the elapsing of the
deceleration check time has been checked. The exact stop check function is designed to
accomplish this purpose.
Either the deceleration check time or in-position state is selected with parameter "#1193 inpos".
In-position check is valid when "#1193 inpos" is set to 1.
The in-position width is set with parameter "#2224 sv024" on the servo parameter screen by the
machine manufacturer.
Command format
G09 ;
The exact stop check command G09 has an effect only with the cutting command (G01 - G03) in its
particular block.
Example of program
N001 G09 G01 X100.000 F150 ; The following block is started once the deceleration
check time or in-position state has been checked after
the machine has decelerated and stopped.
N002 Y100.000 ;
Tool
With G09
f (Commanded speed)
N001
X axis N001
N002
Without G09
Time
Y axis
N002
93
7. Feed Functions
7.6 Exact stop check
Detailed description
Next block
Previous block
Ts
Lc (in-position width)
Ts Ts
In Figs. 2 and 3:
Ts = Cutting feed acceleration/deceleration time constant
Lc = In-position width
As shown in Fig. 3, the in-position width "Lc" can be set into the servo parameter "#2224
SV024" as the remaining distance (shaded area in Fig. 3) of the previous block when the next
block is started.
The setting unit for the servo parameter "#2224 SV024" is 0.0005mm or 0.00005inch.
The in-position width is designed to reduce the roundness at the workpiece corners to below
the constant value.
Lc Next block
Previous block
To eliminate corner roundness, set the servo parameter "#2224 SV024" to zero and perform
an in-position check or assign the dwell command (G04) between blocks.
94
7. Feed Functions
7.6 Exact stop check
2 x Ts
Td Ts
Ts : Acceleration/deceleration time constant
Td : Deceleration check time
Td = 2 × Ts + ( 0 ~ 14ms)
The time required for the deceleration check during cutting feed is the longest among the
cutting feed deceleration check times of each axis determined by the cutting feed
acceleration/deceleration time constants and by the cutting feed acceleration/
deceleration mode of the axes commanded simultaneously.
(Note 1) To execute exact stop check in a fixed cycle cutting block, insert command G09
into the fixed cycle subprogram.
95
7. Feed Functions
7.7 Exact stop check mode
Whereas the G09 exact stop check command checks the in-position status only for the block in
which the command has been assigned, the G61 command functions as a modal. This means that
deceleration will apply at the end points of each block to all the cutting commands (G01 to G03)
subsequent to G61 and that the in-position status will be checked. G61 is released by
high-accuracy control (G61.1), automatic corner override (G62), tapping mode (G63), or cutting
mode (G64).
Command format
G61 ;
In-position check is executed in the G61 block, and thereafter, the in-position check is executed at
the end of the cutting command block is executed until the check mode is canceled.
The deceleration check is a function that determines the method of the check at the completion of
the axis movement block's movement.
The deceleration check includes the in-position check and commanded speed check method.
The G0 and G1 deceleration check method combination can be selected.
(Refer to section "Deceleration check combination".)
With this function, the deceleration check in the reverse direction of G1 → G0 or G1 → G1 can be
changed by changing the parameter setting.
96
7. Feed Functions
7.8 Deceleration check
97
7. Feed Functions
7.8 Deceleration check
Detailed description
(1) In G1 → G0 continuous blocks, the parameter "#1502 G0Ipfg" can be changed to change the
deceleration check in the reverse direction.
Same direction Reverse direction
G0Ipfg: 0 G1 G0
G1 G0
G1 G0
G0Ipfg: 1
G1 G0
Command deceleration
Example of program
(2) G91 G1 X100. Y-100. F4000 ; A deceleration check is carried out, because the Y axis
G0 X80. Y100. ; moves in the reverse direction in the program above.
(3) G90 G1 X100. Y100. F4000 ; A deceleration check is carried out, because the X axis
G0 X80. Y120. ; moves in the reverse direction in the program above.
(When the program start position is X0 Y0)
(4) G91 G1 X100. Y100. F4000 ; A deceleration check is not carried out, because both
G0 X100. Y100. ; the X axis and the Y axis move in the same direction in
the program above.
(5) G91 G1 X100. Y80. F4000 ; A deceleration check is not carried out, because the X
G0 X80. ; axis moves in the same direction, and there is no Y axis
movement command in the program above.
98
7. Feed Functions
7.8 Deceleration check
Detailed description
(1) In G1 → G1 continuous blocks, the parameter "#1503 G1Ipfg" can be changed to change the
deceleration check of the reverse direction.
Same direction Reverse direction
G1Ipfg: 0
G1 G1 G1 G1
G1Ipfg: 1 G1 G1
G1 G1
Command deceleration
Example of program
(2) G91 G1 X100. Y-100. F4000 ; A deceleration check is carried out, because the Y axis
G1 X80. Y100. ; moves in the reverse direction in the program above.
(3) G90 G1 X100. Y100. F4000 ; A deceleration check is carried out, because the X axis
G1 X80. Y120. ; moves in the reverse direction in the program above.
(When the program start position is X0 Y0)
(4) G91 G1 X100. Y100. F4000 ; A deceleration check is not carried out, because both the
G1 X100. Y100. ; X axis and the Y axis move in the same direction in the
program above.
(5) G91 G1 X100. Y80. F4000 ; A deceleration check is not carried out, because the X
G1 X80. ; axis moves in the same direction, and there is no Y axis
movement command in the program above.
99
7. Feed Functions
7.9 Automatic corner override
With tool radius compensation, this function reduces the load during inside cutting of automatic
corner R, or during inside corner cutting, by automatically applying override to the feed rate.
Automatic corner override is valid until the tool radius compensation cancel (G40), exact stop
mode (G61), high-accuracy control mode (G61.1), tapping mode (G63), or cutting mode (G64)
command is issued.
Command format
G62 ;
When cutting an inside corner as in Fig. 1, the machining allowance amount increases and a
greater load is applied to the tool. To remedy this, override is applied automatically within the
corner set range, the feedrate is reduced, the increase in the load is reduced and cutting is
performed effectively.
However, this function is valid only when finished shapes are programmed.
S
Workpiece surface shape
(3)
(1) (2)
Tool center path
Machining
allowance
Deceleratio
range
Ci
Tool
Fig.1
100
7. Feed Functions
7.9 Automatic corner override
(1) Operation
(a) When automatic corner override is not to be applied :
When the tool moves in the order of (1) → (2) → (3) in Fig. 1, the machining allowance at
(3) increases by an amount equivalent to the area of shaded section S and so the tool
load increases.
Automatic corner R
Work surface
Programmed
Tool center
shape
path
path
Machining
allowance
Corner R center
Workpiece Corner
R section
Ci
Machining
allowance
(1) The override set in the parameter is automatically applied at the deceleration range Ci and
corner R section for inside offset with automatic corner R. (There is no angle check.)
101
7. Feed Functions
7.9 Automatic corner override
Application example
Tool
Ci
Tool
Program θ
Ci
Tool center
Tool Tool
N1 θ
N2
Program
Ci
Tool center
102
7. Feed Functions
7.9 Automatic corner override
103
7. Feed Functions
7.9 Automatic corner override
Precautions
(1) Automatic corner override is valid only in the G01, G02, and G03 modes; it is not effective in
the G00 mode. When switching from the G00 mode to the G01 (or G02 or G03) mode at a
corner (or vice versa), automatic corner override will not be applied at that corner in the G00
block.
(2) Even if the automatic corner override mode is entered, the automatic corner override will not
be applied until the tool diameter compensation mode is entered.
(3) Automatic corner override will not be applied on a corner where the tool diameter
compensation is started or canceled.
(4) Automatic corner override will not be applied on a corner where the tool diameter
compensation I, K vector command is issued.
Program
Tool center
Block containing
I, K vector command Automatic corner override
will not be applied
(G41X_Z_I_K_;)
(5) Automatic corner override will not be applied when intersection calculation cannot be
executed.
Intersection calculation cannot be executed in the following case.
(a) When the movement command block does not continue for four or more times.
(6) The deceleration range with an arc command is the length of the arc.
(7) The inside corner angle, as set by parameter, is the angle on the programmed path.
(8) Automatic corner override will not be applied when the maximum angle in the parameter is set
to 0 or 180.
(9) Automatic corner override will not be applied when the override in the parameter is set to 0 or
100.
104
7. Feed Functions
7.10 Tapping mode
The G63 command allows the control mode best suited for tapping to be entered, as indicated
below :
1) Cutting override is fixed at 100%.
2) Deceleration commands at joints between blocks are invalid.
3) Feed hold is invalid.
4) Single block is invalid.
5) In-tapping mode signal is output.
G63 is released by the exact stop mode (G61), high-accuracy control mode (G61.1), automatic
corner override (G62), or cutting mode (G64).
Command format
G63 ;
The G64 command allows the cutting mode in which smooth cutting surfaces are obtained to be
established. Unlike the exact stop check mode (G61), the next block is executed continuously with
the machine not decelerating and stopping between cutting feed blocks in this mode.
G64 is released by the exact stop mode (G61), high-accuracy control mode (G61.1), automatic
corner override (G62), or tapping mode (G63).
This cutting mode is established in the initialized status.
Command format
G64 ;
105
8. Dwell
8.1 Per-second dwell
8. Dwell
The G04 command can delay the start of the next block.
The machine movement is temporarily stopped by the program command to make the waiting time
state. Therefore, the start of the next block can be delayed. The waiting time state can be canceled
by inputting the skip signal.
Command format
G04 X_ ; or G04 P_ ;
X, P ・・・・ Dwell time
The input command unit for the dwell time depends on the parameter.
Detailed description
(1) When designating the dwell time with X, the decimal point command is valid.
(2) When designating the dwell time with P, the availability of the decimal point command can be
selected with the parameter (#8112). When the decimal point command is invalid in the
parameter setting, the command below the decimal point issued with P is ignored.
(3) When the decimal point command is valid or invalid, the dwell time command range is as
follows.
Command range when the decimal point Command range when the decimal point
command is valid command is invalid
0.001 ~ 99999.999 (s) 1 ~ 99999999 (ms)
(4) The dwell time setting unit applied when there is no decimal point can be made 1s by setting 1
in the parameter #1078 Decpt2. This is effect only for X and P for which the decimal command
is valid.
(5) When a cutting command is in the previous block, the dwell command starts calculating the
dwell time after the machine has decelerated and stopped. When it is commanded in the same
block as an M, S, T or B command, the calculation starts simultaneously.
(6) The dwell is valid during the interlock.
(7) The dwell is valid even for the machine lock.
(8) The dwell can be canceled by setting the parameter #1173 dwlskp beforehand. If the set skip
signal is input during the dwell time, the remaining time is discarded, and the following block
will be executed.
106
8. Dwell
8.1 Per-second dwell
Previous block
cutting command
Next block
Dwell command
Dwell time
Example of program
(Note 1) The above examples are the results under the following conditions.
• Input setting unit 0.001mm or 0.0001inch
• #100 = 1000 ;
(Note 3) If the input setting unit is 0.0001inch, the X before G04 will be multiplied by 10. For
example for "X5. G04 ;", the dwell time will be 50 sec.
(1) When using this function, command X after G04 in order to make sure that the dwell is based
on X.
107
9. Miscellaneous Functions
9.1 Miscellaneous functions (M8-digits BCD)
9. Miscellaneous Functions
9.1 Miscellaneous functions (M8-digits BCD)
Function and purpose
The miscellaneous (M) functions are also known as auxiliary functions, and they include such
numerically controlled machine functions as spindle forward and reverse rotation, operation stop
and coolant ON/OFF.
These functions are designated by an 8-digit number (0 to 99999999) following the address M with
this controller, and up to 4 groups can be commanded in a single block.
(Example) G00 Xx Mm1 Mm2 Mm3 Mm4 ;
When five or more commands are issued, only the last four will be valid.
The output signal is an 8-digit BCD code and start signal.
The eight commands of M00, M01, M02, M30, M96, M97, M98 and M99 are used as
auxiliary commands for specific objectives and so they cannot be used as general
auxiliary commands. This therefore leaves 94 miscellaneous functions which are
usable as such commands. Reference should be made to the instructions issued by
the machine manufacturer for the actual correspondence between the functions and
numerical values.
When the M00, M01, M02, and M30 functions are used, the next block is not read into
the pre-read buffer due to pre-read inhibiting.
If the M function is designated in the same block as a movement command, the
commands may be executed in either of the following two orders. Which of these
sequences actually applies depends on the machine specifications.
(1) The M function is executed after the movement command.
(2) The M function is executed at the same time as the movement command.
Processing and completion sequences are required in each case for all M commands
except M96, M97, M98 and M99.
The 8M functions used for specific purposes will now be described.
When the tape reader has read this function, it stops reading the next block. As far as the NC
system's functions are concerned, only the tape reading is stopped. Whether such machine
functions as the spindle rotation and coolant supply are stopped or not differs according to the
machine in question.
Re-start is enabled by pressing the automatic start button on the machine operation board.
Whether resetting can be initiated by M00 depends on the machine specifications.
108
9. Miscellaneous Functions
9.1 Miscellaneous functions (M8-digits BCD)
If the tape reader reads the M01 command when the optional stop switch on the machine operation
board is ON, it will stop and the same effect as with the M00 function will apply.
If the optional stop switch is OFF, the M01 command is ignored.
(Example)
:
Optional stop switch status and operation
N10 G00 X1000 ;
Stops at N11 when switch is ON
N11 M01 ;
Next command (N12) is executed without
N12 G01 X2000 Z3000 F600 ;
stopping at N11 when switch is OFF
:
This command is normally used in the final block for completing the machining, and so it is
primarily used for tape rewinding. Whether the tape is actually rewound or not depends on the
machine specifications.
Depending on the machine specifications, the system is reset by the M02 or M30 command upon
completion of tape rewinding and any other commands issued in the same block.
(Although the contents of the command position display counter are not cleared by this reset action,
the modal commands and compensation amounts are canceled.)
The next operation stops when the rewinding operation is completed (the in-automatic operation
lamp goes off). To restart the unit, the automatic start button must be pressed or similar steps must
be taken.
When the program is restarted after M02 and M30 are completed, if the first movement command
is designated only with a coordinate word, the interpolation mode will function when the program
ends. It is recommended that a G function always be designated for the movement command
designated first.
(Note 1) Independent signals are also output respectively for the M00, M01, M02 and M30
commands and these outputs are each reset by pressing the reset key.
(Note 2) M02 or M30 can be assigned by manual data input (MDI). At this time, commands can be
issued simultaneously with other commands just as with the tape.
M96 and M97 are M codes for user macro interrupt control.
The M code for user macro interrupt control is processed internally, and is not output externally.
To use M96 and M97 as an auxiliary code, change the setting to another M code with the
parameter (#1109 subs_M and #1110 M96_M, #1111 M97_M).
These commands are used as the return instructions from branch destination subprograms and
branches to subprograms.
M98 and M99 are processed internally and so M code signals and strobe signals are not output.
Internal processing suspends pre-reading when the M00, M01, M02 or M30 command has been
read. Other tape rewinding operations and the initialization of modals by resetting differ according
the machine specifications.
109
9. Miscellaneous Functions
9.2 Secondary miscellaneous functions (B8-digits, A8 or C8-digits)
These serve to assign the indexing table positioning and other such functions. In this controller,
they are assigned by an 8-digit number from 0 to 99999999 following address A, B or C. The
machine maker determines which codes correspond to which positions.
If the A, B or C function is designated in the same block as a movement command, the commands
may be executed in either of the following two orders. The machine specifications determine which
sequence applies.
(1) The A, B or C function is executed after the movement command.
(2) The A, B or C function is executed simultaneously with the movement command.
Processing and completion sequences are required for all secondary miscellaneous functions.
The table below given the various address combinations. It is not possible to use an address which
is the same for the axis name of an additional axis and secondary miscellaneous function.
Additional axis name
A B C
Secondary miscellaneous function
A
B
C
(Note) When A has been assigned as the secondary miscellaneous function address, the
following commands cannot be used.
(1) Linear angle commands (,A can be used.)
(2) Geometric commands
110
9. Miscellaneous Functions
9.3 Index table indexing
Index table indexing can be carried out by setting the index axis. The indexing command only
issues the indexing angle to the axis set for indexing. It is not necessary to command special M
codes for table clamping and unclamping, thus simplifying the program.
Detailed description
The axis that was designated as the index axis with parameter "#2076
index x".
(1) Set the "index_x" parameter (#2076) for the axis in which index table indexing will be carried
out to "1".
(2) The movement command (either absolute or incremental) for the selected axis is executed
with the program command.
(3) An unclamp process are carried out before the axis movement.
(4) The commanded axis movement starts after the unclamp process completes.
(5) The clamp process is carried out after the movement is completed.
(6) The next block is processed after the unclamp process completes.
<Operation time chart>
Unclamp
command
Unclamp
completed
B axis movement
111
9. Miscellaneous Functions
9.3 Index table indexing
Precautions
112
10. Spindle Functions
10.1 Spindle functions (S2-digits BCD)
The spindle functions are also known simply as S functions and they assign the spindle speed. In
this controller, they are assigned with a 2-digit number following the address S ranging from 0 to 99,
and 100 commands can be specified. Note that how many of these 100 types can be used, and
which value corresponds to the actual rotation speed differs for each machine. Refer to the
Instruction Manual issued by the machine maker for more details. When a number exceeding 2
digits is assigned, the last 2 digits will be valid.
If the S function is designated in the same block as a movement command, the commands may be
executed in either of the following two orders. The machine specifications determine which
sequence applies.
(1) The S function is executed after the movement command.
(2) The S function is executed simultaneously with the movement command.
Processing and completion sequences are required for all S commands from S00 through S99.
When the S6-digits function is added, a 6-digit value (0 to 999999) can be designated after the S
code.
By assigning a 6-digit number following the S code, these functions enable the appropriate gear
signals, voltages corresponding tot he commanded spindle speed (r/min) and start signals to be
output.
If the gear step is changed manually other than when the S command is being executed, the
voltage will be obtained from the set speed at that gear step and the previously commanded speed,
and then will be output.
The analog signal specifications are given below.
(1) Output voltage.............. 0 to 10V
(2) Resolution .................... 1/4096 (2–12)
(3) Load conditions............ 10kΩ
(4) Output impedance........ 220Ω
If the parameters for up to 4 gear stages are set in advance, the gear stage corresponding to the S
command will be selected and the gear signal will be output. The analog voltage is calculated in
accordance with the input gear signal.
(1) Parameters corresponding to individual gears .......Limit rotation speed, maximum rotation
speed, shift rotation speed, tap rotation
speed.
(2) Parameters corresponding to all gears ..................Minimum rotation speed, orientation
rotation speed
These functions are assigned with an 8-digit (0 to 99999999) number following the address S, and
one group can be assigned in one block.
The output signal is a 32-bit binary data with sign and start signal. Processing and completion
sequences are required for all S commands.
113
10. Spindle Functions
10.4 Constant surface speed control
These commands automatically control the spindle speed in line with the changes in the radius
coordinate values as cutting proceeds in the diametrical direction, and they serve to keep the
cutting point speed constant during the cutting.
Command format
Detailed description
(1) The constant surface speed control axis is set by parameter “#1181 G96_ax”.
0 : Fixed at 1st axis (P command invalid)
1 : 1st axis
2 : 2nd axis
3 : 3rd axis
(2) When the above-mentioned parameter is not zero, the constant surface speed control axis
can be assigned by address P.
(Example) With G96_ax (1)
Program Constant surface speed control axis
G96 S100 ; 1st axis
G96 S100 P3 ; 3rd axis
114
10. Spindle Functions
10.5 Spindle clamp speed setting
The maximum clamp speed of the spindle can be assigned by address S following G92 and the
minimum clamp speed by address Q.
Command format
G92 Ss Qq;
Ss : Maximum clamp speed
Qq : Minimum clamp speed
Detailed description
Besides this command, parameters can be used to set the rotational speed range up to 4 stages in
1 r/min units to accommodate gear selection between the spindle and spindle motor.
The lowest upper limit and highest lower limit are valid among the rotational speed ranges based
on the parameters and based on G92 Ss Qq ;
Set in the parameter “#1146 Sclamp” or “#1227 aux11/bit5” whether to carry out rotation speed
clamp only in the constant surface speed mode or even when the constant surface speed is
canceled.
115
10. Spindle Functions
10.6 Spindle/C axis control
This function enables one spindle (MDS-A/B-SP and later) to also be used as a C axis (rotation
axis) by an external signal.
Detailed description
Spindle
forward run Orientation Orientation
C axis
Motor speed movement
Servo ON
Servo READY
∗1 Servo OFF ∗2
Servo ON Servo ON
C axis command C axis command Program error
recalculation Spindle (P430 AXIS NOT
Program error because the reverse
reference point return is Reference point return run RET.)
incomplete at this calculation. complete at recalculation
(Note) For axis commands, the reference point return complete is checked at calculation.
Thus, when the C axis servo ON command and C axis command are continuous, the
program error (P430) occur as shown above in ∗2.
In response to this kind of situation, the following two processes must be carried out
on user PC, as shown above in ∗1.
• Input the recalculation request signal with a servo ON command.
• Wait for the completion of the servo ON command until the C axis enters a servo
READY state.
116
10. Spindle Functions
10.6 Spindle/C axis control
Non-cutting gain
Selected gain Non-cutting gain Cutting gain Cutting stop gain Non-cutting gain
C axis command G0 G1 G0
X axis command
(C axis part system) G0 G1
Z axis command
(other part system) G1 G0 G1
(Note 1) The cutting feed of other systems does not affect the C axis gain selection.
(Note 2) There are 1st to 3rd cutting gains, which are selected with the ladder.
(Note 1) When G1 command is issued, the in-position check is performed regardless of the
deceleration check parameter.
(Note 2) XX expresses all commands.
117
10. Spindle Functions
10.6 Spindle/C axis control
(1) A reference point return cannot be executed by the orientation when there is no Z phase in the
detector (PLG, ENC, other).
Replace the detector with one having a Z phase, or if using the detector as it is, set the position
control changeover to "After deceleration stop" in the parameters (Spindle parameters, SP129
bitE: 1), and set the axis to "Axis without zero point" (Zero point return parameters, noref: 1).
(2) The program error (P430) will occur if a C axis command is issued during servo OFF or during
orientation.
(4) If servo ON is executed during spindle rotation, the rotation will stop and C axis control will
occur.
(5) Dog-type reference point return are not possible for the C axis.
Set the reference point return to the orientation method in the parameters (Spindle parameters,
SP129 bitE: 0), or set the axis to "Axis without zero point" (Zero point return parameters, noref:
1).
118
10. Spindle Functions
10.7 Spindle synchronization control II
In a machine having two or more spindles, this function controls the rotation speed and phase of
one spindle (synchronous spindle) in synchronization with the rotation of the other spindle (basic
spindle).
The function is used if a workpiece grasped by the basic spindle is to be grasped by a synchronous
spindle, or if the spindle rotation speed has to be changed when one workpiece is grasped by both
spindles.
Selection of the synchronized spindle and synchronization start, etc., are all designated from the
PLC.
Select the basic spindle and synchronous spindle for synchronization control from the PLC.
Device No. Signal name Abbrev. Explanation
R446 Basic spindle – Select a serially connected spindle to be
selection controlled as the basic spindle.
(0: 1st spindle), 1: 1st spindle, 2: 2nd spindle, 3:
3rd spindle, 4: 4th spindle
(Note 1) Spindle synchronization control will
not take place if a spindle not
connected in serial is selected.
(Note 2) If "0" is designated, the 1st spindle will
be controlled as the basic spindle.
R447 Synchronous – Select a serially connected spindle to be
spindle controlled as the synchronous spindle.
selection (0: 2nd spindle), 1: 1st spindle, 2: 2nd spindle, 3:
3rd spindle, 4: 4th spindle
(Note 3) Spindle synchronization control will
not take place if a spindle not
connected in serial is selected or if the
same spindle as the basic spindle is
selected.
(Note 4) If "0" is designated, the 2nd spindle
will be controlled as the synchronous
spindle.
119
10. Spindle Functions
10.7 Spindle synchronization control II
The spindle synchronization control mode is entered by inputting the spindle synchronization
control signal (SPSYC). The synchronous spindle will be controlled in synchronization with the
rotation speed commanded for the basic spindle during the spindle synchronization control mode.
When the difference of the basic spindle and synchronous spindle rotation speeds reaches the
spindle synchronization rotation speed reach level setting value (#3050 sprlv), the spindle rotation
speed synchronization complete signal (FSPRV) will be output.
The synchronous spindle's rotation direction is designated with the spindle synchronization
rotation direction designation as the same as the basic spindle or the reverse direction.
120
10. Spindle Functions
10.7 Spindle synchronization control II
Spindle phase synchronization starts when the spindle phase synchronization control signal
(SPPHS) is input during the spindle synchronization control mode. The spindle phase
synchronization complete signal is output when the spindle synchronization phase reach level
setting value (#3051 spplv) is reached.
The synchronous spindle's phase shift amount can also be designated from the PLC.
Device No. Signal name Abbrev. Explanation
Y399 Spindle phase SPPHS Spindle phase synchronization starts when this
synchronization signal is turned ON during the spindle
control signal synchronization control mode.
(Note 1) If this signal is turned ON in a mode
other than the spindle synchronization
control mode, it will be ignored.
X30A Spindle phase FSPPH This signal is output when the spindle
synchronization synchronization phase reach level is reached
complete signal after starting spindle phase synchronization.
R448 Phase shift – Designate the synchronous spindle's phase shift
amount setting amount.
Unit: 360°/4096
Spindle synchronization
control signal (Y398)
In spindle synchronization
control signal (X308)
(Note 2)
Spindle synchronization
complete signal (X309)
Spindle phase
synchronization complete ON
Spindle phase Spindle synchronization
synchronization control ON control OFF
Spindle synchronization
complete ON
Spindle synchronization Spindle synchronization
control ON control OFF
(Note 2) Turns OFF temporarily to change the rotation speed during phase synchronization.
121
10. Spindle Functions
10.7 Spindle synchronization control II
Calculating the spindle synchronization phase shift amount and requesting phase offset
The spindle phase shift amount calculation function obtains and saves the phase difference of the
basic spindle and synchronous spindle by turning the PLC signal ON during spindle
synchronization. When calculating the spindle phase shift, the synchronous spindle can be rotated
with the handle, so the relation of the phases between the spindles can also be adjusted visually.
If the spindle phase synchronization control signal is input while the phase offset request signal
(SSPHF) is ON, the phases will be aligned using the position shifted by the saved phase shift
amount as a reference.
This makes aligning of the phases easier when re-grasping profile materials.
Device No. Signal name Abbrev. Explanation
Y39B Phase shift SSPHM If spindle synchronization is carried out while
calculation this signal is ON, the phase difference of the
request basic spindle and synchronous spindle will be
obtained and saved.
Y39C Phase offset SSPHF If spindle phase synchronization is carried out
request while this signal is ON, the phases will be
aligned using the position shifted by the saved
phase shift amount as a basic position.
R474 Phase – The delay of the synchronous spindle in
difference respect to the basic spindle is output.
output Unit: 360°/4096
(Note 1) If either the basic spindle or
synchronous spindle has not
passed through the Z phase, etc.,
and the phase cannot be
calculated, –1 will be output.
(Note 2) This data is output only while
calculating the phase shift or during
spindle phase synchronization.
R490 Phase offset – The phase difference saved with phase shift
data calculation is output.
Unit: 360°/4096
(Note 3) This data is output only during
spindle synchronization control.
Spindle synchronization
control signal (Y398)
In spindle synchronization
control signal (X308)
Spindle synchronization
complete signal (X309)
(Note 4) The phases cannot be aligned while calculating the phase shift.
(Note 5) The synchronous spindle cannot be rotated with the handle when the manual operation
mode is set to the handle mode.
122
10. Spindle Functions
10.7 Spindle synchronization control II
The synchronous spindle side carries out droop compensation while the chuck is opened, and
aligns itself with the basic spindle. However, when the chuck is closed, the droop compensation is
added, and the synchronization error with the base increases. Droop compensation is prevented
with the chuck close signal and the position where the chuck is grasped is maintained with position
compensation.
Device No. Signal name Abbrev. Explanation
Y2E9 Chuck close – This turns ON when the chuck is closed.
signal When this signal turns ON, the compensation
between the basic spindle and synchronous
spindle will change from droop compensation
to position compensation.
X30E Chuck close – This turns ON when the chuck close signal is
confirmation received during the spindle synchronization
signal control mode.
Chuck open
Basic spindle chuck Chuck close Chuck close confirmation Chuck open
Chuck close
Synchronous spindle chuck Chuck open confirmation Chuck close Chuck close
Spindle synchronization
control signal (Y398)
In spindle synchronization
control signal (X308)
Spindle synchronization
complete signal (X309)
(Note 1) Use the error temporary cancel only when there is still an error between the spindle and
synchronization with the chuck close signal.
When spindle synchronization is carried out while grasping the workpiece with the basic spindle
and rotating, if the chuck is closed to grasp the workpiece with the synchronous spindle, the speed
will fluctuate due to external factors and an error will occur. If spindle synchronization is continued
without compensating this error, the workpiece will twist.
This torsion can be prevented by temporarily canceling this error.
Device No. Signal name Abbrev. Explanation
Y39D Error temporary SPDRP0 The error is canceled when this signal is ON.
cancel signal
123
10. Spindle Functions
10.7 Spindle synchronization control II
Multi-speed acceleration/deceleration
Rotation speed
Sptc3
(1) Time required from stopped state to sptc1 setting rotation
speed
spt ∗ (sptc1/maximum rotation speed)
Sptc2 (2) Time required from sptc1 to sptc2 setting rotation speed
spt ∗ ((sptc2–sptc1)/maximum rotation speed) ∗ spdiv1
(3) Time required from sptc2 to sptc3 setting rotation speed
spt ∗ ((sptc3–sptc2)/maximum rotation speed) ∗ spdiv2
Sptc1
Time
124
10. Spindle Functions
10.7 Spindle synchronization control II
(1) When carrying out spindle synchronization, a rotation command must be issued to both the
basic spindle and synchronous spindle. The synchronous spindle's rotation direction will
follow the basic spindle rotation direction and spindle synchronization rotation direction
designation regardless of whether a forward or reverse run command is issued.
(2) The spindle synchronization control mode will be entered even if the spindle synchronization
control signal is turned ON while the spindle rotation speed command is ON. However,
synchronous control will not actually take place. Synchronous control will start after the rotation
command has been issued to the basic spindle, and then the spindle synchronization complete
signal will be output.
(3) The spindle rotating with spindle synchronization control will stop when emergency stop is
applied.
(4) An operation error will occur if the spindle synchronization control signal is turned ON while
the basic spindle and synchronous spindle designations are illegal.
(5) The rotation speed clamp during spindle synchronization control will follow the smaller clamp
value set for the basic spindle or synchronous spindle.
(6) Orientation of the basic spindle and synchronous spindle is not possible during the spindle
synchronization. To carry out orientation, turn the spindle synchronization control signal OFF
first.
(7) The rotation speed command is invalid for the synchronous spindle during the spindle
synchronization. The commanded rotation speed will be validated after spindle
synchronization is canceled.
(8) The constant surface speed control is invalid for the synchronous spindle during the spindle
synchronization.
(9) If the phase offset request signal is turned ON before the phase shift is calculated and then
spindle phase synchronization is executed, the shift amount will not be calculated.
(10) The spindle Z-phase encoder position parameters are invalid when phase offset is carried out.
(11) If spindle phase synchronization is started while the phase shift calculation request signal is
ON, the error "M01 operation error 1106" will occur.
(12) Turn the phase shift calculation request signal ON when the basic spindle and synchronous
spindle are both stopped. If the phase shift calculation request signal is ON while either of the
spindles is rotating, the error "M01 operation error 1106" will occur.
(13) The phase shift amount saved in the NC is held until the next phase shift is calculated. (This
value is saved even when the power is turned OFF.)
125
10. Spindle Functions
10.8 Multiple spindle control
Multiple spindle control is a function used to control the sub-spindle in a machine tool that has a
main spindle (1st spindle) and a sub-spindle (2nd spindle to 4th spindle).
The spindle control method differs between multiple spindle control I and multiple spindle control II.
Whether to use multiple spindle control I or multiple spindle control II depends on the parameter
(#1300 ext36/bit0) setting.
Tool spindle
(3rd spindle)
2nd spindle
1st spindle
Turret
1
126
10. Spindle Functions
10.8 Multiple spindle control
In addition to the S∗∗∗∗∗ command, the 1st to 4th spindles can be identified and commanded with
the S =∗∗∗∗∗ command.
Command format
S =∗∗∗∗∗ ;
Designate the spindle number with one numeric character (1: 1st
spindle/2: 2nd spindle/3: 3rd spindle/4: 4th spindle). A variable can be
designated.
∗∗∗∗∗ Rotation speed or constant surface speed command. A variable can be
designated.
(Note 1) A program error (P35) will occur if the value is not 1 to 4.
(Note 2) A program error (P33) will occur if G47.1 is issued in a modal.
Detailed description
1st spindle
2nd spindle
400r/min 100r/min 300r/min
Rotation speed
(5) The commands for each spindle can be commanded from the machining program for either
system 1 or system 2.
127
10. Spindle Functions
10.8 Multiple spindle control
The following S commands (S∗∗∗∗) can be changed for the 1st spindle to 4th spindle by issuing the
spindle selection command (G43.1, etc. [G group 20]).
Command format
Detailed description
(1) The selected spindle No. is set with the parameter (#1534 SnG44.1).
(2) The spindle selection command is a modal G code.
(3) A program error (P33) will occur if the spindle selection command is issued while the multiple
spindle control II mode is valid.
(4) The spindle control mode entered when the power is turned ON or reset can be set with the
parameters for each system. The state when the power is turned ON or reset is as follows.
G group 20 modal state Set with setup parameter "#1199 Sselect".
0:G43.1
1:G44.1
2:G47.1
G44.1 spindle No. Set with setup parameter "#1534 SnG44.1".
0:2nd spindle
1:1st spindle
2:2nd spindle
3:3rd spindle
4:4th spindle
(5) If the S command is issued in the same block as the spindle selection command, it will be valid
for the spindle switched to with the spindle selection command.
Example)
G43.1 S100 ; → Command 100 rotations for 1st spindle
S200 G44.1 S300 ; → After commanding 200 rotations for 1st spindle, command
(SnG44.1=2) 300 rotations for 2nd spindle
If a spindle that does not exist is set, the 2nd spindle will be used. Note that if there is only one
spindle, the 1st spindle will be used.
128
10. Spindle Functions
10.8 Multiple spindle control
1st spindle control 2nd spindle 1st spindle control 2nd spindle
control control
In G43.1 mode
System 2 Execution G96 S200 S100 G44.1 S300 S1=1000
program
If spindle other than the current mode is commanded with S =∗∗∗∗∗, the spindle rotation
speed command designated with will have the priority.
(Example)
S2=∗∗∗∗ in G43 system mode .......................................2nd spindle rotation speed
command
S1=∗∗∗∗ in G44 system 2nd spindle selection mode ....1st spindle rotation speed
command
Note that the constant surface speed command in the constant surface speed control (G96)
will be modal information independent from the rotation speed command.
When G44.1 spindle No. is 2
System 1
Execution S1=200 S2=300 G43.1 G90 G0 X100. G96 S300 G01 X50. F200 G97 G44.1 G96 S300 G01 X20. F200 G97
program
1st spindle
Rotation speed 200r/min 300m/min 300×1000/(50×3.14)r/min
2nd spindle
Rotation speed 300r/min 300m/min 300×1000/(20×3.14)r/min
129
10. Spindle Functions
10.8 Multiple spindle control
If the constant surface speed control, S command and spindle related M command are
commanded randomly from each system to one spindle, the spindle may not operate correctly. For
example, if S is commanded (per minute feed) during constant surface speed control with system 1,
the rotation speed will not change from the system 1 side, and the actual rotation speed will relay
on system 2 from which S was commanded last. These commands must be commanded from only
one system, or commanded simultaneously while using standby, etc.
System 2 Execution G43.1 G0 X50. G01 X30. S200 G01 X10. ...
program
System 1 Execution G43.1 G97 S1000 G44.1 S500 G43.1 S3000 S2=3000
program
System 2 Execution G43.1 G0 X50. G96 S200 S100 G44.1 S300 S1=1000
program
(2) If different S commands are executed simultaneously in both systems, system 2 will have the
priority. In addition, system 2 will have the control rights.
1st spindle
rotation speed 200r/min 300r/min 200r/min
130
10. Spindle Functions
10.8 Multiple spindle control
Multiple spindle control II is a function that designates which spindle to select with the signals from
PLC. The command is issued to the spindle with one S command.
Detailed description
Encoder selection
R124
Encoder input $1
Encoder input $2
R324
(Note) Refer to the PLC Interface Manual for details on each signal.
131
10. Spindle Functions
10.8 Multiple spindle control
132
10. Spindle Functions
10.8 Multiple spindle control
Restrictions
(1) The S manual value command is invalid when multiple spindle control II is valid.
(2) Setup parameter "#1199 Sselect" is invalid when multiple spindle control II is valid.
(3) The spindle control mode changeover G code cannot be used when multiple spindle control II
is valid. A program error (P34) will occur.
(4) The "S1=∗∗∗" and "S2=∗∗∗" commands are invalid when multiple spindle control II is valid. A
program error (P33) will occur.
(5) The spindle gear shift command output signal (GR1/GR2) is not output when multiple spindle
control II is valid.
133
11. Tool Functions
11.1 Tool functions (T8-digit BCD)
The tool functions are also known simply as T functions and they assign the tool numbers and tool
offset number. They are designated with a 8-digit number following the address T, and one set can
be commanded in one block. The output signal is an 8-digit BCD signal and start signal.
If the T function is designated in the same block as a movement command, the commands may be
executed in either of the following two orders. The machine specifications determine which
sequence applies.
(1) The T function is executed after the movement command.
(2) The T function is executed simultaneously with the movement command.
134
12. Tool Offset Functions
12.1 Tool offset
The basic tool offset function includes the tool length offset and tool diameter compensation. Each
offset amount is designated with the tool offset No. Each offset amount is input from the setting and
display unit or the program.
Reference
point
Tool length
Tool length offset
(Side view)
Right
compensation
(Plane view)
Left compensation
135
12. Tool Offset Functions
12.1 Tool offset
There are two types of tool offset memories for setting and selecting the tool offset amount. (The
type used is determined by the machine maker specifications.)
The offset amount or offset amount settings are preset with the setting and display unit.
Type 1 is selected when parameter "#1037 cmdtyp" is set to "1", and type 2 is selected when set to
"2".
Classification of length
Type of tool offset Classification of shape offset,
offset, diameter
memory wear compensation
compensation
Type 1 Not applied Not applied
Type 2 Applied Applied
Reference
Reference
tool
136
12. Tool Offset Functions
12.1 Tool offset
Type 1
One offset amount corresponds to one offset No. as shown on the right. Thus, these can be
used commonly regardless of the tool length offset amount, tool diameter offset amount,
shape offset amount and wear offset amount.
(D1) = a1 , (H1) = a1
(D2) = a2 , (H2) = a2
: :
(Dn) = an , (Hn) = an
Type 2
The shape offset amount related to the tool length, wear offset amount, shape offset related to
the tool diameter and the wear offset amount can be set independently for one offset No. as
shown below.
The tool length offset amount is set with H, and the tool diameter offset amount with D.
(H1) = b1 + c1, (D1) = d1 + e1
(H2) = b2 + c2, (D2) = d2 + e2
: :
(Hn) = bn + cn, (Dn) = dn + en
Tool diameter(D)/
Tool length (H)
Offset (Position offset)
No. Shape offset Wear offset Shape offset Wear offset
amount amount amount amount
1 b1 c1 d1 e1
2 b2 c2 d2 e2
3 b3 c3 d3 e3
• • • • •
• • • • •
n bn cn dn en
CAUTION
If the tool offset amount is changed during automatic operation (including during single block
stop), it will be validated from the next block or blocks onwards.
137
12. Tool Offset Functions
12.1 Tool offset
(1) H is used for the tool length offset, and D is used for the tool position offset and tool diameter
offset.
(2) The tool offset No. that is designated once does not change until a new H or D is designated.
(3) The offset No. can be commanded once in each block. (If two or more Nos. are commanded,
the latter one will be valid.)
(4) The No. of offset sets that can be used will differ according to the machine.
For 40 sets: Designate with the H01 to H40 (D01 to D40) numbers.
(5) If a value larger than this is set, the program error (P170) will occur.
(6) The setting value ranges are as follows for each No.
The offset amount for each offset No. is preset with the setting and display unit.
Input setting Shape offset amount Wear offset amount
unit Metric system Inch system Metric system Inch system
#1015 cunit=100 ±99999.99mm ±9999.999 inch ±9999.99 mm ±999.999 inch
#1015 cunit=10 ±9999.999mm ±999.9999 inch ±999.999 mm ±99.9999 inch
138
12. Tool Offset Functions
12.2 Tool length offset/cancel
The end position of the movement command can be offset by the preset amount when this
command is used. A continuity can be applied to the program by setting the actual deviation from
the tool length value decided during programming as the offset amount using this function.
Command format
Detailed description
Regardless of the absolute value command or incremental value command, the actual end
point will be the point offset by the offset amount designated for the programmed movement
command end point coordinate value.
The G49 (tool length offset cancel) mode is entered when the power is turned ON or when
M02 has been executed.
-50.000
139
12. Tool Offset Functions
12.2 Tool length offset/cancel
Table
Type 2 R
G43 Hh1 ;
When the above is commanded, the offset Wear compensation
amount lh1 commanded with offset No. h1 will amount
be as follows.
lh1: Shape offset (Note) + wear offset amount lh1 Shape offset
Workpiece
Table
(b) The valid range of the offset No. will differ according to the specifications (No. of offset
sets).
(c) If the commanded offset No. exceeds the specification range, the program error (P170)
will occur.
(d) Tool length cancel will be applied when H0 is designated.
(e) The offset No. commanded in the same block as G43 or G44 will be valid for the following
modals.
(Example 3)
G43 Zz1 Hh1 ; ........... Tool length offset is executed with h1.
:
G45 Xx1 Yy1 Hh6 ;
:
G49 Zz2 ; ................... The tool length offset is canceled.
:
G43 Zz2 ; ................... Tool length offset is executed again with h1.
(f) If G43 is commanded in the G43 modal, an offset of the difference between the offset No.
data will be executed.
(Example 4)
G43 Zz1 Hh1 ; ........... Becomes the z1 + (lh1) movement.
:
G43 Zz2 Hh2 ; ........... Becomes the z2 + (lh2 - lh1) movement.
:
The same applies for the G44 command in the G44 modal.
140
12. Tool Offset Functions
12.2 Tool length offset/cancel
(Example 5)
G43 Xx1 Hh1 ; ................+ offset to X axis
:
G49 Xx2 ;
:
G44 Yy1 Hh2 ; ................−offset to Y axis
:
G49 Yy2 ;
:
G43 αα1 Hh3 ; ................+ offset to additional offset
:
G49 αα1 ;
:
G43 Xx3 Yy3 Zz3 ; .........Offset is applied on Z axis
:
G49 ;
The handling of the additional axis will follow the parameters “#1029 to 1031 aux_I, J and
K” settings.
If the tool length offset is commanded for the rotary axis, set the rotary axis name for one
of the parallel axes.
(c) If H (offset No.) is not designated in the same block as G43, the Z axis will be valid.
(Example 6)
G43 Hh1 ; .........................Offset and cancel to X axis
:
49 ;
(Example 7)
G43 Zz1 Hh1 ;
:
G28 Zz2 ; ........................ Canceled when reference point is reached.
:
G43 Zz2 Hh2 ; (Same as G49)
:
G49 G28 Zz2 ; ................ After the Z axis is canceled, reference point
return is executed.
(b) The movement is commanded to the G53 machine coordinate system, the axis will move
to the machine position when the tool offset amount is canceled. When the G54 to G49
workpiece coordinate system is returned to, the position returned to will be the
coordinates shifted by the tool offset amount.
141
12. Tool Offset Functions
12.3 Tool radius compensation
This function compensates the radius of the tool. The compensation can be done in the random
vector direction by the radius amount of the tool selected with the G command (G38 to G42) and
the D command.
Command format
Detailed description
The No. of compensation sets will differ according to the machine model.
(The No. of sets is the total of the tool length offset, tool position offset and tool radius
compensation sets.)
The H command is ignored during the tool radius compensation, and only the D command is valid.
The compensation will be executed within the plane designated with the plane selection G code or
axis address 2 axis, and axes other than those included in the designated plane and the axes
parallel to the designated plane will not be affected. Refer to the section on plane selection for
details on selecting the plane with the G code.
142
12. Tool Offset Functions
12.3 Tool radius compensation
The tool radius compensation cancel mode is established by any of the following conditions.
(1) After the power has been switched on
(2) After the reset button on the setting and display unit has been pressed
(3) After the M02 or M30 command with reset function has been executed
(4) After the tool radius compensation cancel command (G40) has been executed
The offset vectors are zero in the compensation cancel mode, and the tool nose point path
coincides with the programmed path.
Programs including tool radius compensation must be terminated in the compensation cancel
mode.
Tool radius compensation starts when all the following conditions are met in the compensation
cancel mode.
(1) The movement command is issued after G41 or G42.
(2) The tool radius compensation offset No. is 0 < D ≤ max. offset No.
At the start of compensation, the operation is executed after at least three movement command
blocks (if three movement command blocks are not available, after five movement command
blocks) have been read regardless of the continuous operation or single block operation.
During compensation, 5 blocks are pre-read and the compensation is arithmetically processed.
Control mode transition diagram
G01_; G02_;
There are two ways of starting the compensation operation: type A and type B.
The type can be selected with bit 2 of parameter “#1229 set 01”. This type is used in common with
the compensation cancel type.
In the following explanatory figure, "S" denotes the single block stop point.
143
12. Tool Offset Functions
12.3 Tool radius compensation
θ Program path θ
r = Compensation amount r Program
path
Tool center path s
s
Start point
Start point Center of circular Program
path
144
12. Tool Offset Functions
12.3 Tool radius compensation
Center
of circular
θ Program path θ
G41 G41
θ Program path θ
r r
G41 G41
(Note 1) If there is axis movement command in the same block as G41 or G42, compensation is
performed perpendicularly to the next block's direction.
145
12. Tool Offset Functions
12.3 Tool radius compensation
Relative to the program path (G00, G01, G02, G03), the tool center path is found from the straight
line/circular arc to make compensation.
Even if the same compensation command (G41, G42) is issued in the compensation mode, the
command will be ignored.
When 4 or more blocks not accompanying movement are commanded continuously in the
compensation mode, overcutting or undercutting will result.
When the M00 command has been issued during tool radius compensation, pre-reading is
prohibited.
s
Point of intersection Tool center path
146
12. Tool Offset Functions
12.3 Tool radius compensation
Center of circular
Program path
θ Program path
r θ
r
Tool center r r
s path Tool center path
Point of
intersection
Center of circular Center of circular s Center of circular
147
12. Tool Offset Functions
12.3 Tool radius compensation
θ
Program path θ r Program path
r
s s
Point of Tool center path
r Tool center path
intersection
θ
Program path Program path Center of
r θ circular
s s
Tool center path Point of Tool center path
intersection Point of r
r
intersection
Center of circular
θ
Center of circular
Program path
θ Program path
s
s Tool center path
Point of
r Point of intersection
intersection r Tool center path
Center of circular
148
12. Tool Offset Functions
12.3 Tool radius compensation
r
θ
Center of
Program path s
Tool center
Center of Center of Point of
path
circular circular intersection
r
Program path
Hypothetical circle
Tool center path
s
r
R
Center of circular
r
Program path
A B
Line intersecting
circulars A, B
149
12. Tool Offset Functions
12.3 Tool radius compensation
If either of the following conditions is met in the tool radius compensation mode, the compensation
will be canceled. However, the movement command must be a command which is not a circular
command.
If the compensation is canceled by a circular command, program error (P151) results.
(1) The G40 command has been executed.
(2) The D00 tool number has been executed.
The cancel mode is established once the compensation cancel command has been read, 5-block
pre-reading is suspended an 1-block pre-reading is made operational.
θ Program path θ
G40 G40
Tool center
path
End point End point
Center of circular
150
12. Tool Offset Functions
12.3 Tool radius compensation
r = Compensation amount r
Tool center path
G40 G40
Program path
θ θ
Program
path
End point End point
Center of circular
151
12. Tool Offset Functions
12.3 Tool radius compensation
Center of circular
s Tool center path
End point
End point
G40 G40
152
12. Tool Offset Functions
12.3 Tool radius compensation
An arc that uses the compensation amount as the radius is inserted without calculating the point of
intersection at the workpiece corner when G39 (corner arc) is commanded.
Point of
Inserted intersection Inserted
circular s Tool center path circular Program path
r = Compensation
r = Compensation amount amount
s
Program path Tool center path
Point of
intersection
(With G39 command) (No G39 command) (With G39 command) (No G39 command)
The compensation vector can be changed or held during tool diameter compensation by using the
G38 command.
(1) Holding of vector: When G38 is commanded in a block having a movement command,
the point of intersection will not be calculated at the program end point,
and instead the vector of the previous block will be held.
G38 Xx Yy ;
This can be used for pick feed, etc.
(2) Changing of vector: A new compensation vector direction can be commanded with I, J
and K, and a new offset amount with D.
(These can be commanded in the same block as the movement
command.)
G38 Ii Jj Dd ; (I, J and K will differ according to the selected
plane.)
153
12. Tool Offset Functions
12.3 Tool radius compensation
2 2
i +j
r2 = ×r1
j
r1
Tool center path j
r1 N15 i
N13
N14 N16
Program path
N12
N11
N11G1Xx11;N12G38Yy12;N13G38Xx13;N14G38Xx14Yy14;N15G38Xx15IiJjDd2;N16G40Xx16Yy16;
The compensation direction is determined by the tool diameter compensation commands (G41,
G42) and compensation amount sign.
Compensation amount
sign + −
G code
G41 Left-hand compensation Right-hand compensation
G42 Right-hand compensation Left-hand compensation
The compensation direction can be changed by changing the compensation command in the
compensation mode without the compensation having to be first canceled. However, no change is
possible in the compensation start block and the following block.
Refer to section 12.3.5 "Precautions for tool diameter compensation" for the movement when the
symbol is changed.
Linear Linear
r
r
154
12. Tool Offset Functions
12.3 Tool radius compensation
Linear ↔ Circular
r
r
Program path
r r
Linear return
G41
Tool center path
G42
r
Program path
Arc exceeding 360° due to compensation In the case below, it is possible that the arc
G42 may exceed 360°
a. With offset direction selection based on
G41/G42
b. I, J, K was commanded in G40.
Program
Tool center path
In cases like this the tool center path will pass
path through a section where the arc is doubled
due to the compensation and a section will be
left uncut.
G41
G42
Uncut section
155
12. Tool Offset Functions
12.3 Tool radius compensation
When the following command is issued in the compensation mode, the offset vectors are
temporarily eliminated and a return is then made automatically to the compensation mode.
In this case, the compensation is not canceled, and the tool goes directly from the intersection
point vector to the point without vectors or, in other words, to the programmed command point.
When a return is made to the compensation mode, it goes directly to the intersection point.
Intermediate point
N5 N6 N7 N8
~
(G41)
N5 G91 G01 X60. Y30. ; Temporarily no compensation vectors at intermediate
N6 G28 X50. Y-40. ; point.
(Reference point when there is no intermediate point)
N7 X30. Y-60. ;
N8 X70. Y40. ;
~
Program path
(3) The compensation vector will be eliminated temporarily with the G53 command (basic
machine coordinate system selection).
(Note 1) The offset vectors do not change with the coordinate system setting (G92)
command.
156
12. Tool Offset Functions
12.3 Tool radius compensation
If four or more blocks containing no move command continue or if there is a pre-read inhibit M
code, no compensation vector is generated.
N1 X30. Y60. ; N2, 3, 4, 5, 6
N2 G41 D10 ;
N3 G4 X1000 ; N7
Block without Point of
N4 F100 ; intersection
movement N1
N5 S500 ;
N8
N6 M3 ;
N7 X20. Y-50. ;
N8 X50. Y-20. ;
N2 N5
N1 G41 X30. Y60. D10 ;
N6
N2 G4 X1000 ;
Point of
N3 F100 ; Block without N1 intersection
N4 S500 ; movement N7
N5 M3 ;
N6 X20. Y-50. ;
N7 X50. Y-20. ;
157
12. Tool Offset Functions
12.3 Tool radius compensation
Block N7 is executed
N6 here.
When 4 or more blocks without movement follow in succession or if there is a pre-read inhibit
M code, the offset vectors are created perpendicularly at the end point of the previous block.
N11
N8 F100 ;
Block without N6
N9 S500 ; movement
N10 M4 ;
N11 W100. ;
In this case, a cut results.
158
12. Tool Offset Functions
12.3 Tool radius compensation
N8
N6 X100. Y200. ;
N7 G40 M5 ; N7
N8 X100. Y50. ;
N6
(1) If the final movement command block in the four blocks before the G40 block is the G41 or
G42 mode, it will be assumed that the movement is commanded in the vector I, J or K direction
from the end point of the final movement command. After interpolating between the
hypothetical tool center path and point of intersection, it will be canceled. The compensation
direction will not change.
(a,b) Hypothetical tool center path
(i,j)
N1 (G41) G1X_ ;
N2 A
Tool center path N2 G40XaYbIiJj;
G41 r r
N1
Program path
In this case, the point of intersection will always be obtained, regardless of the compensation
direction, even when the commanded vector is incorrect as shown below.
(a,b)
N2
Tool center path A
G41 When the I and j symbols
N1 r
in the above program
Program path r example are incorrect
(i,j)
159
12. Tool Offset Functions
12.3 Tool radius compensation
If the compensation vector obtained with point of intersection calculation is extremely large, a
perpendicular vector will be created in the block before G40.
(a,b)
G40
Tool center path A
G41
r
Program path
(i,j) r
Hypothetical tool center path
(2) If the arc is 360° or more due to the details of I, J and K at G40 after the arc command, an
uncut section will occur.
r
Uncut section
N2 N1 (G42,G91) G01X200. ;
(i,j) N2 G02 J150. ;
N1 r N3 G40 G1X150. Y-150. I-100. J100. ;
Program path
r
Tool center path
G42
G40
N3
Corner movement
When a multiple number of offset vectors are created at the joints between movement command
blocks, the tool will move in a straight line between those vectors.
This action is called corner movement.
When the vectors do not coincide, the tool moves in order to machine the corner although this
movement is part and parcel of the joint block. Consequently, operation in the single block mode
will execute the previous block + corner movement as a single block and the remaining joining
movement + following block will be executed as a single block in the following operation.
Program path N1
N2
θ
r
Tool center path
r
Center of circular
This movement and feedrate
fall under block N2.
160
12. Tool Offset Functions
12.3 Tool radius compensation
The compensation direction can be intentionally changed by issuing the G41/G42 command and
I, J, K in the same block.
Command format
The new I, J type vector (G17 plane) created by this command is now described. (Similar
descriptions apply to vector I, K for the G18 plane and to J, K for the G19 plane.)
As shown in the figures, the vectors with a size equivalent to the offset amount are made to serve
as the I, J type compensation vector perpendicularly to the direction designated by I, J without the
intersection point of the programmed path being calculated. the I, J vector can be commanded
even in the mode (G41/G42 mode in the block before) and even at the compensation start (G40
mode in the block before).
Y
N3
(G40)
X
N2
N1 G41 I150. D1 ;
N2 G91 X100. Y100. ;
D1 N1
N3 X150. ;
161
12. Tool Offset Functions
12.3 Tool radius compensation
(3) When I, J has been commanded in the G41/G42 mode (G17 plane)
(I,J)N110
(2)
(G17 G41 G91)
N100 D1
N120 N100 G41 G00X150. J50. ;
(1)
(2) N110 G02 I150. ;
N120 G00 X−150. ;
(N120)
Y
X
(1) I, J type vector
Program path (2) Intersection point calculation
type vector
Tool center path
Tool path after interrupt
(Reference)
(a) G18 plane
(K,I) N110
(J,K) N110
(G19 G41 G91)
N100
N100 G41 G00 Y150. K50. ;
N120
N110 G02 J50. ;
N120 G00 Y−150. ;
(N120)
162
12. Tool Offset Functions
12.3 Tool radius compensation
N3 N4
N5
(I,J) N1 G41 D1 G01 F1000 ;
N2
N2 G91 X100. Y100. ;
N3 G41 I50. ;
N4 X150. ;
N5 G40 ;
N1
D1
(100, 0 IJ direction)
Offset vector direction
163
12. Tool Offset Functions
12.3 Tool radius compensation
The offset amounts are determined by the offset number (modal) in the block with the I, J
designation.
< Example 1>
(G41 D1 G91)
D1 A D1
(I,J) N100 G41 X150. I50. ;
Y N100 N110 X100. Y-100. ;
N110
X
Vector A is the offset amount entered in offset number modal D1 in the N200 block.
Vector B is the offset amount entered in offset number modal D2 in the N200 block.
164
12. Tool Offset Functions
12.3 Tool radius compensation
Precautions
(1) Issue the I, J type vector in a linear mode (G0, G1). If it is issued in an arc mode at the start of
compensation, program error (P151) will occur.
An IJ designation in an arc mode functions as an arc center designation in the offset mode.
(2) When the I, J type vector has been designated, it is not deleted (avoidance of interference)
even if there is interference.
Consequently, overcutting may arise in such a case.
Y
N1 G28 X0Y0 ;
X Cut section
N2 G42 D1 F1000 ;
(I,J)
N3 G91 X100. ;
N4 G42 X100. Y100. I10. ;
N5 X100. Y-100. ;
N6 G40 ;
N6 N7 M02 ;
N2 N4 N5
N3
(3) The vectors differ for the G38 I _J_ (K_) command and the G41/G42 I_J_(K_) command.
G38 G41/G42
~
~
(G41) (G41)
~
~
G38 G91 X100. I50. J50. ; G41 G91 X100. I50. J50. ;
Example
(I J)
(I J)
(Offset amount) (Offset amount)
165
12. Tool Offset Functions
12.3 Tool radius compensation
(4) Refer to the following table for the offset methods based on the presence and/or absence of
the G41 and G42 commands and I, J, (K) command.
N3 A
N1 G91 G01 G41 X200. D1 F1000 ;
N2 X-150. Y150. ;
N3 G41 X300. I50. ;
(I,J) N4 X-150. Y-150. ;
N4 N5 G40 X-200. ;
N2
Y
During the I, J type vector compensation,
the A insertion block will not exist.
N1 X
N5
166
12. Tool Offset Functions
12.3 Tool radius compensation
MDI interrupt
Tool radius compensation is valid in any automatic operation mode-whether tape, memory or MDI
operation.
An interrupt based on MDI will give the result as in the figure below after block stop during tape or
memory operation.
N2 N3
S
N1 G41D1;
N2 X20. Y50. ; MDI interrupt
X30. Y50. ;
N2
N3
N1 G41 D1 ; S
N2 X20. Y50. ; MDI interrupt
N3
N2
167
12. Tool Offset Functions
12.3 Tool radius compensation
Manual interrupt
(1) Interrupt with manual absolute OFF. Tool path after interrupt
The tool path is shifted by an amount
equivalent to the interrupt amount.
Tool path after
Interrupt compensation
Program path
Interrupt
Interrupt
168
12. Tool Offset Functions
12.3 Tool radius compensation
Precautions
Workpiece
G41 offset amount (+) or G42 offset amount (−) G41 offset amount (−) or G42 offset amount (+)
(a) (b)
169
12. Tool Offset Functions
12.3 Tool radius compensation
As a principle, the offset No. must not be changed during the compensation mode. If changed, the
movement will be as shown below.
When offset No. (offset amount) is changed:
r1
N102
N101 r2
N103
Program path
r1
Program path
r1
r1
r2
r2
170
12. Tool Offset Functions
12.3 Tool radius compensation
N101
Center of circular
Center of circular
Center of circular
r1
r1
r1
r1
r2
Tool center path
Program path Center of circular
Center of circular
171
12. Tool Offset Functions
12.3 Tool radius compensation
Often when starting cutting, a method of applying a radius compensation (normally the XY plane)
beforehand at a position separated for the workpiece, and then cutting in with the Z axis is often
used. When using this method, create the program so that the Z axis movement is divided into the
two steps of rapid traverse and cutting feed after nearing the workpiece.
Example of program
With this program, at the start of the N1 compensation the program will be read to the N6 block.
The relation of N1 and N6 can be judged, and correct compensation can be executed as shown
above.
If the above program's N4 block is divided into two
N1
In this case, the four blocks N2 to N5 do not have a command in the XY plane, so when the N1
compensation is started, the program cannot be read to the N6 block.
As a result, the compensation is done based only on the information in the N1 block, and the
compensation vector is not created at the start of compensation. Thus, an excessive cut in occurs
as shown above.
172
12. Tool Offset Functions
12.3 Tool radius compensation
In this case, consider the calculation of the inner side, and before the Z axis cutting, issue a
command in the same direction as the direction that the Z axis advances in after lowering, to
prevent excessive cutting.
N5 G01 Z-50. F1 ; N2
N5
N6 Y 100. F2 ; N2
Y N1 Y
N1
X Z
The movement is correctly compensated as the same direction as the N6 advance direction is
commanded in N2.
173
12. Tool Offset Functions
12.3 Tool radius compensation
(1) Outline
A tool, whose radius has been compensated with the tool radius compensation function by the
usual 2-block pre-read, may sometimes cut into the workpiece. This is known as interference,
and interference check is the function which prevents this from occurring.
There are three types of interference check, as indicated below, and each can be selected for
use by parameter.
Function Parameter Operation
Interference check #8102 : OFF A program error results before the execution of the
alarm function #8103 : OFF block in which the cut arises, and operation stops.
Interference check #8102 : ON The tool path is changed so that workpiece is not
avoidance function #8103 : OFF cut into.
Interference check #8103 : ON Cutting proceeds unchanged even when it occurs.
invalid function Use this for microscopic segment programs.
(Note) #8102 COLL. ALM OFF (interference check avoidance)
#8103 COLL. CHK OFF (interference check invalid)
Detailed description
(Example)
Avoidance path
Outer diameter
of tool
(G41)
N1 G90 G1 X50. Y-100.;
N1 N3
N2 X70. Y-100.;
N3 X120. Y0;
N2
Cutting with N2
Cutting with N2
174
12. Tool Offset Functions
12.3 Tool radius compensation
(4) (1)'
N1
N2
With the above process, the vectors (1), (2), (3)' and (4)' will remain as the valid vectors, and
the path that connects these vectors will be executed as the interference avoidance path.
175
12. Tool Offset Functions
12.3 Tool radius compensation
If there is a movement command in three of the five pre-read blocks, and if the compensation
calculation vectors created at the contacts of each movement command intersect, it will be viewed
as an interference.
N1 N3
Vectors intersect
N2
Program path
N6
N1
N5
N2 Interference check is not possible
N3
N4
176
12. Tool Offset Functions
12.3 Tool radius compensation
The movement will be as shown below when the interference avoidance check is used.
Tool center path
Program path
N1 N3
N2
Tool center path when interference is avoided Solid line vector : Valid
Dotted line vector : Invalid
Tool center path without interference check
Program path
N2 N3
N1
r
Program path
N2 N3
N1 r Center of circular
177
12. Tool Offset Functions
12.3 Tool radius compensation
Avoidance
N3 vector
N2
Avoidance vector 1
Tool center path 2 Avoidance vector 2 N2
r2 r1
Tool center path 1
N1
Program path
In the case of the figure below, the groove will be left uncut.
Interference
avoidance path
Tool center path
Program path
178
12. Tool Offset Functions
12.3 Tool radius compensation
(1) When the interference check alarm function has been selected
(a) When all the vectors at the end block of its own block have been deleted.
When, as shown in the figure,
vectors 1 through 4 at the end
N1
point of the N1 block have all
been deleted, program error
(P153) results prior to N1
execution.
1
N2
23
N3
4
(2) When the interference check avoidance function has been selected
(a) When there are valid vectors at the end point of the following block even when all the
vectors at the end point of its own block have been deleted.
(i) When, in the figure, the N4
N2 interference check is
conducted, the N2 end 3 4
N3
point vectors are all
deleted but the N3 end Alarm stop
point vectors are 2 N2
1
regarded as valid.
Program error (P153) now N1
occurs at the N1 end
point.
N1 N4
N2 N3
179
12. Tool Offset Functions
12.3 Tool radius compensation
N3
Alarm stop
N1
N2
N4
N3
Angle of
intersection
(c) When the program advance direction and the advance direction after compensation are
reversed
In the following case, interference is still regarded as occurring even when there is
actually no interference.
When grooves which are narrower than the tool radius or which have parallel or widening
walls are programmed
180
12. Tool Offset Functions
12.4 Programmed offset input
The tool offset and workpiece offset can be set or changed on the tape using the G10 command.
During the absolute value (G90) mode, the commanded offset amount will become the new offset
amount, and during the incremental value (G91) mode, the commanded offset amount will be
added to the currently set offset amount to create the new offset amount.
Command format
181
12. Tool Offset Functions
12.4 Programmed offset input
Detailed description
(1) Program error (P171) will occur if this command is input when the specifications are not
available.
(2) G10 is an unmodal command and is valid only in the commanded block.
(3) The G10 command does not contain movement, but must not be used with G commands
other than G21, G22, G54 to G59, G90 or G91.
(4) If an illegal L No. or offset No. is commanded, the program errors (P172 and P170) will occur
respectively.
If the offset amount exceeds the maximum command value, the program error (P35) will
occur.
(5) Decimal point inputs can be used for the offset amount.
(6) The offset amounts for the external workpiece coordinate system and the workpiece
coordinate system are commanded as distances from the basic machine coordinate system
zero point.
(7) The workpiece coordinate system updated by inputting the workpiece coordinate system will
follow the previous modal (G54 to G59) or the modal (G54 to G59) in the same block.
(8) L2 can be omitted when the workpiece offset is input.
(9) Do not command G10 in the same block as the fixed cycle and sub-program call command.
This will cause malfunctioning and program errors.
Example of program
182
12. Tool Offset Functions
12.4 Programmed offset input
Subprogram O1111
N1 G01 G91 G43 Z0 H10 F100 ; c1, c2, c3, c4
G01 X1000 ; d1, d2, d3, d4
#1 = #1 − 1000 ;
G90 G10 L10 P10 R#1 ;
M99;
Subprogram
O1111 N1
G01 G91 G43 Z0 H10 F100 ;
N2 G01 X1000 ;
N3 G10 L10 P10 R−1000 ;
N4 M99 ;
183
12. Tool Offset Functions
12.4 Programmed offset input
-X -20. -10. M
N100
-Y -20.
-Y
-Y
184
12. Tool Offset Functions
12.4 Programmed offset input
(4) When using one workpiece coordinate system as multiple workpiece coordinate
systems
#1 = −50. #2 = 10. ;
M98 P200 L5 ;
Main program
M02 ;
%
N1 G90 G54 G10 L2 P1 X#1 Y#1 ;
N2 G00 X0 Y0 ;
N3 X−5. F100 ;
N4 X0 Y−5. ;
Subprogram N5 Y0 ;
O200 N6 #1 = #1 + #2 ;
N7 M99 ;
%
Precautions
(1) Even if this command is displayed on the screen, the offset No. and variable details will not be
updated until actually executed.
N1 G90 G10 L10 P10R−100 ;
N2 G43 Z−10000 H10 ;
N3 G0 X–10000 Y−10000 ;
N4 G90 G10 L10 P10 R−200 ; .. The H10 offset amount is updated when the N4 block is
executed.
185
12. Tool Offset Functions
12.5 Tool position offset
Using the G45 to G46 commands, the movement distance of the axes specified in the same block
can be extended or reduced by a preset offset length. Furthermore, the offset amount can be
similarly doubled (× 2 expansion) or halved (× 2 reduction) with commands G47 and G48.
The number of sets for the offset differ according to machine specification. Refer to Specifications
Manual.
D01 to Dn
(The numbers given are the total number of sets for tool length offset, tool position offset
and cutter compensation.)
G45 command G46 command G47 command G48 command
Expansion by offset Reduction by offset × 2 expansion by offset × 2 reduction by offset
amount only amount only amount amount
± =
(Program command value) (Offset amount) (Movement amount after offset)
Command format
186
12. Tool Offset Functions
12.5 Tool position offset
Detailed description
187
12. Tool Offset Functions
12.5 Tool position offset
G47
1/2 circle
G47 for compensation outside
the circle
G48 G48 for compensation inside
the circle
Programmed path
188
12. Tool Offset Functions
12.5 Tool position offset
G45
3/4 circle
G46
G45 for compensation outside
the circle
G46 for compensation inside
the circle
Programmed path
Example of program
(Example 1)
Y
End point
Tool nose center path
Programmed
1000
path 200
Tool
X
Start point
1000
Programmed arc
center
189
12. Tool Offset Functions
12.5 Tool position offset
When a command for “n” number of simultaneous axes is given, the same offset will
be applied to all axes. It is valid even for the additional axes (but it must be within the
range of the number of axes which can be controlled simultaneously.)
G01 G45X220. Y60. D20 ;
(D20) = +50. 000
Y End point after offset
110.
50.
60.
50.
Start point Programmed end point
X
220. 270.
(Note 1) If offset is applied to two axes, over-cutting or under-cutting will result, as shown in the
figures below. In cases like this, use the cutter compensation commands (G40 to G42).
Workpiece
Machined Y
shape
G01 Xx1 ;
Machined shape G45 Xx2 Yy2 Dd2 ;
Yy3 ;
Y
l “l”:offset amount setting
Over-cutting X
Tool
190
12. Tool Offset Functions
12.5 Tool position offset
(Example 2)
Y N2
N1
X
(Example 3)
When the G45 to G48 command is assigned, the offset amount for each pass is the
amount assigned by the offset number, and the tool does not move for the difference
from the previous offset as it would do with the tool length offset command (G43).
40
N115 10R
30 10 30 30 40 10
Start point
191
12. Tool Offset Functions
12.5 Tool position offset
192
12. Tool Offset Functions
12.6 Inputting the tool life management data
Using the G10 command, the tool life management data can be registered, changed and
added to, and preregistered groups can be deleted.
Command format
193
12. Tool Offset Functions
12.6 Inputting the tool life management data
Example of operation
Program
Operation
example
Data G10 L3 ; 1. After deleting all group data, the registration starts.
registration P10 L10 Q1 ; 2. Group No. 10 is registered.
T10 H10 3. Tool No. 10 is registered in group No. 10.
D10 ; 4. The registration ends.
G11 ; 5. The program ends.
M02 ;
Group G10 L3 P1 ; 1. Changing and addition of the group and tool starts.
change, P10 L10 Q1 ; 2. The change and addition operation takes place in the
addition T10 H10 following manner.
D10 ; (1) When group No. 10 has not been registered.
G11 ; 1) Group No. 10 is additionally registered.
M02 ; 2) Tool No. 10 is registered in group No. 10.
(2) When group No. 10 has been registered, but tool No. 10
has not been registered.
1) Tool No. 10 is additionally registered in group No. 10.
(3) When group No. 10 and tool No. 10 have been both
registered.
1) The tool No. 10 data is changed.
3. The group and tool change and addition ends.
4. The program ends.
Group G10 L3 P2 ; 1. The group deletion starts.
deletion P10 ; 2. The group No. 10 data is deleted.
G11 ; 3. The group deletion ends.
M02 ; 4. The program ends.
Command range
194
12. Tool Offset Functions
12.6 Inputting the tool life management data
Precautions
(1) The tool life data is registered, changed, added to or deleted by executing the program in the
memory or MDI mode.
(2) The group No. and tool No. cannot be commanded in duplicate.
(3) When two or more addresses are commanded in one block, the latter address will be valid.
(4) If the life data (L_) is omitted, the life data for that group will be "0".
(5) If the control method (Q_) is omitted, the control method for that group will follow the base
specification parameter "#1106 Tcount".
Note that when carrying out the No. of cutting times control method, command the method
from the program.
(6) If the length compensation No. (H_) is omitted, the length compensation No. for that group will
be "0".
(7) If the radius compensation No. (D_) is omitted, the radius compensation No. for that group will
be "0".
(8) Programming with a sequence No. is not possible between G10 L3 and G11.
(9) If the usage data count valid signal (Y2CA) is ON, G10 L3 cannot be commanded.
(10) The registered data is held even if the power is turned OFF.
(11) When G10 L3 is commanded, the commanded group and tool will be registered after all of the
registered data is erased.
(12) The change and addition conditions in the G10L3P1 command are as follows.
(a) Change conditions
1) Both the commanded group No. and tool No. are registered.
→Change the commanded tool No. data.
(b) Additional conditions
1) Neither the commanded group No. nor tool No. is registered.
→Additionally register the commanded group No. and tool No. data.
2) The commanded group No. is registered, but the commanded tool No. is not
registered.
→Additionally register the commanded tool No. data to the commanded group No.
195
13. Program Support Functions
13.1 Canned cycles
These standard canned cycles are used for predetermined sequences of machining operations
such as positioning, hole drilling, boring, tapping, etc. which are specified in a block. The various
sequences in the table below are provided for the standard canned cycles.
By editing the standard canned cycle subprogram, the canned cycle sequence can be changed by
the user. The user can also register and edit an original canned cycle program. For the standard
canned cycle subprogram, refer to the list of the canned cycle subprogram in the appendix of the
operation manual. The list of canned cycle functions for this control unit is shown below.
Hole machining Operation at hole bottom Return
G code start operation Application
(−Z direction) Dwell Spindle (+Z direction)
G80 ⎯ ⎯ ⎯ ⎯ Cancel
Drill, spot drilling
G81 Cutting feed ⎯ ⎯ Rapid feed
cycle
Drill, counter
G82 Cutting feed Yes ⎯ Rapid feed
boring cycle
Deep hole drilling
G83 Intermittent feed ⎯ ⎯ Rapid feed
cycle
Reverse
G84 Cutting feed Yes Cutting feed Tapping cycle
rotation
G85 Cutting feed ⎯ ⎯ Cutting feed Boring cycle
G86 Cutting feed Yes Stop Rapid feed Boring cycle
Forward
G87 Cutting feed ⎯ Cutting feed Back boring cycle
rotation
G88 Rapid traverse Yes Stop Rapid feed Boring cycle
G89 Cutting feed Yes ⎯ Cutting feed Boring cycle
G73 Cutting feed Yes ⎯ Rapid feed Stepping cycle
Forward Reverse tapping
G74 Intermittent feed Yes Cutting feed
rotation cycle
Oriented
G76 Cutting feed — Rapid feed Fine boring cycle
spindle stop
A canned cycle mode is canceled when the G80 or any G command in (G00, G01, G02, G03) is
issued. The various data will also be cleared simultaneously to zero.
196
13. Program Support Functions
13.1 Canned cycles
Command format
Detailed description
(2) If M00 or M01 is commanded in the same block as the canned cycle or during the canned cycle
mode, the canned cycle will be ignored. Instead, M00 and M01 will be output after positioning.
The canned cycle will be executed if X, Y, Z or R is commanded.
197
13. Program Support Functions
13.1 Canned cycles
(3) There are 7 actual operations which are each described in turn below.
Operation 1 Operation 2
Initial point
Operation 3 Operation 7
R point
Operation 4 Operation 6
Operation 5
Operation 1 : This indicates the X and Y axes positioning, and executes positioning with G00.
Operation 2 : This is an operation done after positioning is completed (at the initial hole), and
when G87 is commanded, the M10 command is output from the control unit to
the machine. When this M command is executed and the finish signal (FIN) is
received by the control unit, the next operation will start. If the single block stop
switch is ON, the block will stop after positioning.
Operation 3 : The tool is positioned to the R point by rapid traverse.
Operation 4 : Hole machining is conducted by cutting feed.
Operation 5 : This operation takes place at the hole bottom position and it differs according to
the canned cycle mode. Possible actions include spindle stop (M05) spindle
reverse rotation (M04), spindle forward rotation (M03), dwell and tool shift.
Operation 6 : The tool is retracted to the R point.
Operation 7 : The tool is returned to the initial pint at the rapid traverse rate.
Whether the canned cycle is to be completed at operation 6 or 7 can be selected by the
following G commands.
G98 ............ Initial level return
G99 ............ R point level return
These are modal commands, and for example, if G98 is commanded once, the G98 mode will
be entered until G99 is designated. The initial state when the NC is ready is the G98 mode.
The hole machining data will be ignored if X, Y, Z or R is not commanded. This function is
mainly used with the special canned cycled.
(4) Canned cycle addresses and meanings
Address Significance
G Selection of hole machining cycle sequence (G80 to G89, G73, G74, G76)
X Designation of hole drilling position (absolute value or incremental value)
Y Designation of hole drilling position (absolute value or incremental value)
Z Designation of hole bottom position (absolute value or incremental value)
Designation of dwell time at hole bottom position (decimal points will be
P
ignored)
Designation of cut amount for each cutting pass with G73 or G83, or
Q
designation of the shift amount at G76 or G87 (incremental value)
R Designation of R point position (absolute value or incremental value)
F Designation of feed rate for cutting feed
L Designation of number of repetitions. 0 to 9999
Designation of shift amount at G76 or G87 (incremental value)
I, J, K (The shift amount is designated with the Q address depending on the
parameter setting.)
S Spindle rotation speed command
,S Spindle rotation speed designation for synchronous tap return
,R Synchronous/asynchronous tap cycle selection
198
13. Program Support Functions
13.1 Canned cycles
(5) Difference between absolute value command and incremental value command
For absolute value For incremental value
-r
R point +r R point
-z
-z
Workpiece Workpiece
199
13. Program Support Functions
13.1 Canned cycles
The canned cycle has basic control elements for the positioning plane and hole drilling axis. The
positioning plane is determined by the G17, G18 and G19 plane selection command, and the hole
drilling axis is the axis perpendicular (X, Y, Z or parallel axis) to the above plane.
Plane selection Positioning plane Hole drilling axis
G17 (X − Y) Xp − Yp Zp
G18 (Z − X) Zp − Xp Yp
G19 (Y − Z) Yp − Zp Xp
Xp, Yp and Zp indicate the basic axes X, Y and Z or an axis parallel to the basic axis.
A random axis other than the hole drilling axis can be commanded for positioning.
The hole drilling axis is determined by the axis address of the hole drilling axis commanded in the
same block as G81 to G89, G73, G74 or G76. The basic axis will be the hole drilling axis if there is
no designation.
(Example 1) When G17 (XY plane) is selected, and the axis parallel to the Z axis is set as the W
axis.
G81 ... W__; The W axis is used as the hole drilling axis.
G81 ... Z __; The Z axis is used as the hole drilling axis.
G81 ... ; (No Z or W) The Z axis is used as the hole drilling axis.
(Note 1) The hole drilling axis can be fixed to the Z axis with parameter #1080 Dril_Z.
(Note 2) Change over the hole drilling axis in the canned cycle canceled state.
In the following explanations on the movement in each canned cycle mode, the XY plane is used
for the positioning plane and the Z axis for the hole drilling axis.
Note that all command values will be incremental values, the positioning plane will be the XY plane
and the hole drilling axis will be the Z axis.
This command commands the in-position width for the fixed cycle from the machining program.
The commanded in-position width is valid only in the G81 (drill, spot drill), G82 (drill, counter
boring), G83 (deep drill cycle), G84 (tap cycle), G85 (boring), G89 (boring), G73 (step cycle) and
G74 (reverse tap cycle) fixed cycles. The ", I" address is commanded in respect to the positioning
axis, and the ",J" address is commanded in respect to the drilling axis.
Command range
Address Meaning of address Remarks
(unit)
In-position width
,I When a value exceeding the
(position error amount)
0.001 to 999.999 command range is issued, a
In-position width for drilling (mm) program error will occur.
,J axis in fixed cycle (position (P35 CMD-VALUE OVER)
error amount)
200
13. Program Support Functions
13.1 Canned cycles
When the number of repetitions L is designated as two or more times in the fixed cycle, the
commanded in-position width will be valid in the repetition block (operation 5 to operation 8).
:
G81 X–50. Z–50. R–50. L2 F2000, I0.2, J0.3 ;
:
Operation
Operation1 Operation5 ,I ,J
-50. pattern
-50.
Operation 1 Valid –
Operation2 Operation6 Operation 2 – Invalid
Operation 3 – Invalid
Operation 4 – Valid
Operation3 Operation7 Operation 5 Valid –
Operation4 Operation8 Operation 6 – Invalid
Operation 7 – Invalid
Operation 8 – Valid
Fig. 1 Operation when number of repetitions
L is designated
In the following machining program, the commanded in-position width is valid for the Fig. 2 block.
In the (B) block, the in-position width (, I) commanded for positioning in the previous block (A) is
invalid (operation 5). However, when returning from the hole bottom, the in-position width (, J)
commanded in the previous block (A) is valid (operation 8).
To validate the in-position width for positioning, command again as shown in block (C) (Operation
9).
:
G81 X–50. Z–50. R–50. F2000, I0.2, J0.3 ;.....(A)
X–10. ; ...................................................................(B)
X–10., I0.2 ; ...........................................................(C)
:
Operation
,I ,J
pattern
Operation 1 Valid –
Operation5 Operation9 Operation 2 – Invalid
Operation1 -10. -10. Operation 3 – Invalid
-50.
Opera- Operation 4 – Valid
Opera-
tion6 tion10 Operation 5 Invalid –
Operation2
Operation 6 – Invalid
Operation 7 – Invalid
Opera- Opera- Operation 8 – Valid
Operation3
tion7 tion11 Operation 9 Valid –
Opera-
Operation 10 – Invalid
Operation4 Operation8 tion12
Operation 11 – Invalid
Operation 12 – Valid
201
13. Program Support Functions
13.1 Canned cycles
Setting values of synchronous tap in-position check parameters and tap axis movement
202
13. Program Support Functions
13.1 Canned cycles
(2) Relation between the in-position width and tap axis movement for a synchronous tap
in-position check
FIN
R point (1) Section in which the in-
Hole bottom
position check is carried
out by the sv024 value.
↑ (2) Section in which the in-
Speed position check is carried
Time T → out by the TapInp value.
(3) Section in which the in-
Start of
G0 feed position check is carried
In-position to the R
completion of out by the G1inps value.
G1 point →
the G0 feed deceleration G1 deceleration (4) Section in which the in-
from the R start at tap start at tap return →
point → position check is carried
cut-in →
out by the G0inps value.
(4) (2) (3) (1)
R point : In-position check by the G1inps value.
I point : In-position check by the G0inps value.
Hole bottom : In-position check by the Tapinps value.
203
13. Program Support Functions
13.1 Canned cycles
(3) Relation between the parameter setting values and tap axis movement for a synchronous tap
in-position check
Synchronous In-position In-position In-position Operation at
tap check at check at check at Hole bottom Operation at Operation at I point →
improvement hole bottom R point I point → wait time hole bottom R point R point
R point
Time designated Operation Operation Operation
by "P". determined by determined by determined by
‘0’ — — — Processing time setting of inpos setting of inpos setting of inpos
is several 10ms (#1193) and aux (#1193) and aux (#1193) and aux
when no "P". 07 (#1223): bit 1 07 (#1223): bit 1 07 (#1223): bit 1
parameters. parameters. parameters.
Larger value of Wait until time in Wait until
"P" and TapDwl left column has completion of
‘1’ Not Not Executed (#1313) is valid. elapsed. in-position check
executed executed No dwell by G0inps value.
executed if both
values are 0.
Larger value of Wait until time in Wait until Wait until
"P" and TapDwl left column has completion of completion of
‘1’ Not Executed Executed (#1313) is valid. elapsed. in-position check in-position check
executed No dwell by G1inps value. by G0inps value.
executed if both
values are 0.
Larger value of Wait until dwell Wait until
"P" and TapDwl time in left completion of
‘1’ Executed Not Executed (#1313) is valid. column has in-position check
executed No dwell elapsed after by G0inps value.
executed if both completion of
values are 0. in-position check.
Larger value of Wait until dwell Wait until Wait until
"P" and TapDwl time in left completion of completion of
(#1313) is valid. column has in-position check in-position check
‘1’ Executed Executed Executed Processing time elapsed after by G1inps value. by G0inps value.
is several 10ms if completion of
both values are in-position check.
0.
Larger value of Wait until time in
“P” and TapDwl left column has
‘1’ Not Not Not executed (#1313) is valid. elapsed.
executed executed No dwell
executed if both
values are 0.
Larger value of Wait until time in Wait until
“P” and TapDwl left column has completion of
‘1’ Not Executed Not executed (#1313) is valid. elapsed. in-position check
executed No dwell by G1inps value.
executed if both
values are 0.
Larger value of Wait until dwell
“P” and TapDwl time in left
‘1’ Executed Not Not executed (#1313) is valid. column has
executed No dwell elapsed after
executed if both completion of
values are 0. in-position check.
Larger value of Wait until dwell Wait until
"P" and TapDwl time in left completion of
(#1313) is valid. column has in-position check
‘1’ Executed Executed Not executed Processing time elapsed after by G1inps value.
is several 10ms if completion of
both values are in-position check.
0.
Remarks: The processing time is several 10ms when an in-position check is not carried out at the
hole bottom.
The processing time is between 0 to 14.2ms when an in-position check is not carried
out at the R point.
The processing time is the spindle gain changeover time when an in-position check is
not carried out at I point → R point.
204
13. Program Support Functions
13.1 Canned cycles
(1) x1 , y1
(1) G0 Xx1 Yy1
(2) G0 Zr1
(2) r1 (3) G1 Zz1 Ff1
(4) G98 mode G0Z − (z1+r1)
G99 mode G0Z − z1
(3) (4)
z1
(4)
G98 G99
mode mode
The operation stops at after the (1), (2) and (4) commands during single block operation.
Operation
i1 j1
pattern
(1) Valid –
(2) – Invalid
(3) – Invalid
(4) – Valid
(1) x1 , y1
Operation
i1 j1
pattern
(1) Valid –
(2) – Invalid
(3) – Invalid
(4) – –
(5) – Valid
The operation stops at after the (1), (2) and (5) commands during single block operation.
205
13. Program Support Functions
13.1 Canned cycles
(1) x1,y1
(2) r1
Operation
i1 j1
pattern
(1) Valid –
(2) – Invalid
(3) – Invalid
(4) – Invalid
(5) – Invalid
(6) – Invalid
(7) – Invalid
(8) – Invalid
(9) – Invalid
(10) – Invalid
:
:
n-1 – Invalid
n – Valid
When executing a second and following cutting in the G83 as shown above, the
movement will change from rapid traverse to cutting feed several mm before the position
machined last. When the hole bottom is reached, the axis will return according to the G98
or G99 mode.
m will differ according to the parameter “#8013 G83 return”. Program so that q1>m.
The operation stops at after the (1), (2) and n commands during single block operation.
206
13. Program Support Functions
13.1 Canned cycles
Operation
i1 j1
pattern
(1) Valid –
(2) – Invalid
(3) – Invalid
(4) – –
(5) – –
(6) – Invalid
(7) – –
(8) – –
(9) – Valid
• When r2 = 1, the synchronous tapping mode will be entered, and when r2 = 0, the
asynchronous tapping mode will be entered.
• When G84 is executed, the override will be canceled and the override will automatically
be set to 100%.
• Dry run is valid when the control parameter "G00 DRY RUN" is on and is valid for the
positioning command. If the feed hold button is pressed during G84 execution, and the
sequence is at (3) to (6), the movement will not stop immediately, and instead will stop
after (6). During the rapid traverse in sequence (1), (2) and (9), the movement will stop
immediately.
• The operation stops at after the (1), (2) and (9) commands during single block
operation.
• During the G84 modal, the "Tapping" NC output signal will be output.
• During the G84 synchronous tapping modal, the M3, M4, M5 and S code will not be
output.
207
13. Program Support Functions
13.1 Canned cycles
(i) When tap rotation speed < spindle rotation speed during return ≤ synchronous tap
changeover spindle rotation speed 2
Smax
S2
S(S1)
T2
T1 T1
T1 T1
S1
S'
S2
Smax T2
208
13. Program Support Functions
13.1 Canned cycles
(ii)When synchronous tap changeover spindle rotation speed 2 < spindle rotation speed
during return
Smax
S2
S(S1)
T3
T2
T1 T1
T1 T1
S1
S2
S'(Smax)
T2
T3
209
13. Program Support Functions
13.1 Canned cycles
(1) x1 , y1
(1) G0 Xx1 Yy1
(2) G0 Zr1
(2) (5) r1 (3) G1 Zz1 Ff1
(4) G1 Z − z1 Ff1
(5) G98 mode G0Z − r1
G99 mode No movement
(3) (4) (4) z1
G98 G99
mode mode
Operation
i1 j1
pattern
(1) Valid –
(2) – Invalid
(3) – Invalid
(4) – Invalid
(5) – Valid
The operation stops at after the (1), (2), and (4) or (5) commands during single block
operation.
(1) x1 , y1 (7)
(1) G0 Xx1 Yy1
(2) G0 Zr1
(2) r1 (3) G1 Zz1 Ff1
(7) (4) G4 Pp1
(5) M5 (Spindle stop)
(3) (6) (6) G98 mode G0Z − (z1+r1)
z1 (6)
G99 mode G0Z − z1
(7) M3 (Spindle forward rotation)
210
13. Program Support Functions
13.1 Canned cycles
The operation stops at after the (1), (4), (6) and (11) commands during single block
operation.
When this command is used, high precision drilling machining that does not scratch the
machining surface can be done.
(Positioning to the hole bottom and the escape (return) after cutting is executed in the
state shifted to the direction opposite of the cutter.)
The shift amount is designated as shown below with addresses I, J and K.
Machining hole
Shift amount
The shift amount is executed with linear interpolation, and the feed rate follows the F
command.
Command I, J, and K with incremental values in the same block as the hole position data.
I, J and K will be handled as modals during the canned cycle.
(Note) If the parameter “#1080 Dril_Z” which fixes the hole drilling axis to the Z axis is
set, the shift amount can be designated with address Q instead of I and j. In this
case, whether to shift or not and the shift direction are set with parameter
“#8207 G76/87 No shift” and “#8208 G76/87 Shift (−)”. The symbol for the Q
value is ignored and the value is handled as a positive value.
The Q value is a modal during the canned cycle, and will also be used as the
G83, G73 and G76 cutting amount.
211
13. Program Support Functions
13.1 Canned cycles
The operation stops at after the (1), (2), (6) and (9) commands during single block
operation.
(1) x1 , y1
Operation
i1 j1
pattern
(1) Valid –
(2) – Invalid
(3) – Invalid
(4) – –
(5) – Invalid
(6) – Valid
The operation stops at after the (1), (2) and (5) or (6) commands during single block
operation.
212
13. Program Support Functions
13.1 Canned cycles
(1) x1 , y1
(2) r1
q (3) m
(5) (6)
q (4) (n)
q z1
(n)
(1) G0 Xx1 Yy1
(2) G0 Zr1
(3) G1 Zq1 Ff1 (n) -1
(4) G4 Pp1
(5) G0 Z−m G98 G99
(6) G1 Z (q1 + m) Ff1 mode mode
:
(n) G98 mode G0Z − (z1+r1)
G99 mode G0Z − z1
Operation
i1 j1
pattern
(1) Valid –
(2) – Invalid
(3) – Invalid
(4) – –
(5) – Invalid
(6) – Invalid
:
:
(n) -1 – Invalid
(n) – Valid
When executing a second and following cutting in the G73 as shown above, the
movement will return several m mm with rapid traverse and then will change to cutting
feed.
The return amount m will differ according to the parameter “#8012 G73 return”.
The operation stops at after the (1), (2) and (n) commands during single block operation.
213
13. Program Support Functions
13.1 Canned cycles
x1 ,y1
(1) (1) G0 Xx1 Yy1
(2) G0 Zr1
(2) (3) G1 Zz1 Ff1
(9) r1 (4) G4 Pp1
(7)(8)
(7) (8) (5) M3 (Spindle forward rotation)
(6) G1 Z – z1 Ff1
(7) G4 Pp1
(3) (6) (6) z1 (8) M4 (Spindle reverse rotation)
(9) G98 mode G0Z − r1
G99 mode No movement
G98 G99
(4)(5)
mode mode
Operation
i1 j1
pattern
(1) Valid –
(2) – Invalid
(3) – Invalid
(4) – –
(5) – –
(6) – Invalid
(7) – –
(8) – –
(9) – Valid
When r2 = 1, the synchronous tapping mode will be entered, and when r2 = 0, the
asynchronous tapping mode will be entered.
When G74 is executed, the override will be canceled and the override will automatically
be set to 100%. Dry run is valid when the control parameter “#1085 G00Drn” is set to "1"
and is valid for the positioning command. If the feed hold button is pressed during G74
execution, and the sequence is at (3) to (6), the movement will not stop immediately, and
instead will stop after (6). During the rapid traverse in sequence (1), (2) and (9), the
movement will stop immediately.
The operation stops at after the (1), (2) and (9) commands during single block operation.
During the G74 and G84 modal, the "Tapping" NC output signal will be output.
During the G74 synchronous tapping modal, the M3, M4, M5 and S code will not be
output.
214
13. Program Support Functions
13.1 Canned cycles
(i) When tap rotation speed < spindle rotation speed during return ≤ synchronous tap
changeover spindle rotation speed 2
Smax
S2
S(S1)
T2
T1 T1
T1 T1
S1
S'
S2
Smax T2
215
13. Program Support Functions
13.1 Canned cycles
(ii)When synchronous tap changeover spindle rotation speed 2 < spindle rotation speed
during return
Smax
S2
S(S1)
T3
T2
T1 T1
T1 T1
S1
S2
S'(Smax)
T2
T3
216
13. Program Support Functions
13.1 Canned cycles
x1 , y1 (7)
(1) (1) G0 Xx1 Yy1
(8)
(2) G0 Zr1
r1 (3) G1 Zz1 Ff1
(2) (4) M19 (Spindle orient)
(7)
(5) G1 Xq1 (Yq2) Ff1 (Shift)
(8)
G98 mode G0Z − (z1+r1)
(6)
G99 mode G0Z − z1
(3) (6) (6) z1 (7) G0 X − q1 (Y − q2) Ff1
(Shift)
(8) M3 (Spindle forward rotation)
(4)(5) G98 G99
mode mode
The operation stops at after the (1), (2) and (7) commands during single block operation.
When this command is used, high precision drilling machining that does not scratch the
machining surface can be done.
(Positioning to the hole bottom and the escape (return) after cutting is executed in the
state shifted to the direction opposite of the cutter.)
Tool during cutting
Tool after cutting The shift amount is designated as
shown below with addresses I, J
and K.
Cutter
For G17 : I, J
Cancel For G18 : K, I
Spindle Cancel
orient For G19 : J, K
position The shift amount is executed with
ShiftShift linear interpolation, and the feed
rate follows the F command.
Machining hole
Shift amount
Command I, J, and K with incremental values in the same block as the hole position data.
I, J and K will be handled as modals during the canned cycle.
(Note) If the parameter “#1080 Dril_z” which fixes the hole drilling axis to the Z axis is
set, the shift amount can be designated with address Q instead of I and J. In this
case, whether to shift or not and the shift direction are set with parameter
"#8207 G76/87 IGNR" and "#8208 G76/87 (−)". The symbol for the Q value is
ignored and the value is handled as a positive value.
The Q value is a modal during the canned cycle, and will also be used as the
G83, G87 and G73 cutting amount.
217
13. Program Support Functions
13.1 Canned cycles
(1) Before the canned cycle is commanded, the spindle must be rotating in a specific direction
with an M command (M3 ; or M4 ;).
Note that for the G87 (back boring) command, the spindle rotation command is included in the
canned cycle so only the rotation speed command needs to be commanded beforehand.
(2) If there is a basic axis, additional axis or R data in the block during the canned cycle mode, the
hole drilling operation will be executed. If there is not data, the hole will not be drilled.
Note that in the X axis data, if the data is a dwell (G04) time command, the hole will not be
drilled.
(3) Command the hole machining data (Q, P, I, J, K) in a block where hole drilling is executed.
(Block containing a basic axis, additional axis or R data.)
(4) The canned cycle can be canceled by the G00 to G03 or G33 command besides the G80
command. If these are designated in the same block as the canned cycle, the following will
occur.
(Where, 00 to 03 and 33 are m, and the canned cycle code is n)
Gm Gn X___Y___Z___R___Q___P___L___F___;
Execute Ignore Execute Ignore Record
Gm Gn X___Y___Z___R___Q___P___L___F___;
Ignore Execute Ignore Record
Note that for the G02 and G03 commands, R will be handled as the arc radius.
(5) If an M function is commanded in the same block as the canned cycle command, the M code
and MF will be output during the initial positioning. The next operation will be moved to with
FIN (finish signal).
If there is a No. of times designated, the above control will be executed only on the first time.
(6) If another control axis (ex., rotary axis, additional axis) is commanded in the same block as the
canned cycle control axis, the canned cycle will be executed after the other control axis is
moved first.
(7) If the No. of repetitions L is not designated, L1 will be set. If L0 is designated in the same block
as the canned cycle G code command, the hole machining data will be recorded, but the hole
machining will not be executed.
(Example) G73X___Y___Z___R___Q___P___F___L0___;
Execute Record only code having an address
(8) When the canned cycle is executed, only the modal command commanded in the canned
cycle program will be valid in the canned cycle subprogram. The modal of the program that
called out the canned cycle will not be affected.
(9) Other subprograms cannot be called from the canned cycle subprogram.
(10) Decimal points in the movement command will be ignored during the canned cycle
subprogram.
(11) If the No. of repetitions L is 2 or more during the incremental value mode, the positioning will
also be incremented each time.
(Example) G91G81X10. Z−50.R−20.F100.L3 ;
218
13. Program Support Functions
13.1 Canned cycles
(12) If the spindle rotation speed value during return is smaller than the spindle speed, the spindle
rotation speed value is valid even during return.
(13) If the 2nd and 3rd acceleration/deceleration stage inclinations following the spindle rotation
speed and time constants set in the parameters are each steeper than the previous stage's
inclination, the previous stage's inclination will be valid.
(14) If the values set in the spindle base specification parameter "stap1-4" (tap rotation speed) and
"taps21-24" (synchronous tap changeover spindle rotation speed 2) exceed the maximum
rotation speed, the spindle rotation speed will be clamped at the maximum rotation speed.
(15) If the spindle rotation speed during return is not 0, the tap return override value will be invalid.
(16) In a block where the movement direction of any axis reverses as shown below, the servo
system load will greatly increase so do not command the in-position width in the machining
program.
G0 X100., I10.0 ;
X–200. ;
(17) If the in-position width commanded with the programmable in-position width command is
increased, the positioning time and linear interpolation time can be reduced. However, the
position error amount of the previous block will also increase before the next block starts, so
the actual machining could be obstructed.
(18) The in-position width and the position error amount are compared at a set time, so the position
error amount at the point to be judged as in-position will be smaller than the commanded
in-position width.
(19) If the in-position width commanded with the programmable in-position command is small, the
commanded deceleration check or in-position check following the parameters may be carried
out first.
(20) Synchronous and asynchronous tap can be selected with the M function.
The synchronous and asynchronous tap will follow the combination shown below.
Combination
Program command (,R0/1) 0 0 0 0 1 1 1 1 No command
#1229 (bit4)
0 0 1 1 0 0 1 1 0 0 1 1
(Synchronous tap valid)
M function code (M**)
Synchronous/ asynchronous
A A A A S S S S A S S S
selection
: Does not command A : Asynchronous tap
: Commands S : Synchronous tap
219
13. Program Support Functions
13.1 Canned cycles
Whether to use R point or initial level for the return level in the final sequence of the canned cycle
can be selected.
Command format
G98 ;
G99 ;
G98 ; Initial level return
G99 ; R point level return
Detailed description
The relation of the G98/G99 mode and No. of repetition designation is as shown below.
G98
No. of hole Program At power ON, at cancel
G99
drilling example with M02, M30, and reset
button
G81X100.
Y100. Initial point Initial point
Z−50.
Only one R25. R point R point
execution F1000;
G81X100.
Y100.
Z−50.
R25.
Second and
L5F1000;
following
executions
First Second Final First Second Final
time time time time time time
Example of program
(Example 1)
Record only the hold machining data
G82 Zz1 Rr1 Pp1 Ff1 L0 ;
(Do not execute)
Execute hole drilling operation with
Xx1 Yy1 ;
G82 mode
The No. of canned cycle repetitions is designated with L. If L1 is designated or L not designated,
the canned cycle will be executed once. The setting range is 1 to 9999.
If L0 is commanded, only the hole machining data will be recorded.
G8∆ (7∆) Xx1 Yy1 Zz1 Rr1 Pp1 Qq1 Ff1 Ll1 ;
220
13. Program Support Functions
13.1 Canned cycles
The ideology of the data differs between the absolute value mode (G90) and incremental value
mode (G91) as shown below.
Z axis
R absolute R
R point value R point
Z zero point
Z
Designate a command value with a symbol for X, Y and Z. R indicates the coordinate value from
the zero point in the absolute value mode, so a symbol must always be added. However, in the
incremental value the symbol will be ignored and will be viewed as the same symbol as for Z. Note
that the symbols will be viewed in reverse for G87.
The hole machining data is held as shown below in the canned cycle. The hole machining data is
canceled when the G80 command or G commands (G00, G01, G02, G03, G2.1, G3.1, G33) in the
01 group are reached.
(Example 2)
N001 G81 Xx1 Yy1 Zz1 Rr1 Ff1 ;
N002 G81 ; Only selection of canned cycle sequence
N003 Xx2 Yy2 ; Change of positioning point, and execution of canned cycle
N004 M22 ; Execution of only M22
N005 G04 Xx3 ; Execution of only dwell
N006 G92 Xx4 Yy4 ; Execution of only coordinate system setting
N007 G28 (G30) Z0 ; Execution of only reference point (zero point) return
N008 ; No work
N009 G99 Zz2 Rr2 Ff2 L0 ; Execution of only hole machining data recording
N010 Xx5 Yy5 Ll5 ; Change of positioning point, and execution of R point return canned
cycle for I5 times
N011 G98 Xx6 Yy6 Zz6 Rr6 ; Change of positioning point, and execution of canned cycle
N012 Ww1 ; Execute W axis according to 01 group modal before N001, and then
execute canned cycle
(Note) When the workpiece coordinates are changed over for address Z and R, re-program
even if the values are the same.
(Example)
G54 Xx1 Yy1 Zz1 ;
G81 Xx2 Yy2 Zz2 Rr2 ;
G55 Xx3 Yy3 Zz2 Rr2 ; Re-command even if Z and R are the same as the previous
value.
Xx4 Yy4 ;
Xx5 Yy5 ;
221
13. Program Support Functions
13.2 Special canned cycle
The special canned cycle is used with the standard canned cycle. Before using the special canned
cycle, program the canned cycle sequence selection G code and hole machining data to record
the hole machining data. (If there is no positioning data, the canned cycle will not be executed, and
only the data will be recorded.)
The axis is positioned to the hole machining position when the special canned cycle is executed.
The hole machining operation is executed with the canned cycle for hole machining.
Even after the special canned cycle is executed, the recorded standard canned cycled will be held
until canceled.
If the special canned cycle is designated when not in the canned cycle mode, only positioning will
be executed, and the hole drilling operation will not be done.
If the special canned cycle is commanded without commanding the canned cycle for hole
machining, positioning will be executed following the current 01 group modal G code.
222
13. Program Support Functions
13.2 Special canned cycle
G34 X x1 Y y1 I r J θ K n ;
X, Y :Positioning of bolt hole cycle center. This will be affected by G90/G91.
I :Radius r of the circle. The unit follows the input setting unit, and is given with a
positive number.
J :Angle θ of the point to be drilled first. The CCW direction is positive.
(The decimal point position will be the degree class. If there is no decimal point,
the unit will be 0.001°.)
K :No. of holes n to be drilled. 1 to 9999 can be designated, but 0 cannot be
designated. When the value is positive, positioning will take place in the CCW
direction, and when negative, will take place in the CW direction. If 0 is
designated, the alarm P221 Special Canned Holes Zero will occur.
Drilling of n obtained by dividing the circumference by n will start at point created by the Z axis and
angle θ. The circumference is that of the radius R centering on the coordinates designated with XX
and Y. The hole drilling operation at each hole will hold the drilling data for the standard canned
cycle such as G81.
The movement between hole positions will all be done in the G00 mode. G34 will not hold the data
even when the command is completed.
(Example)
When input setting unit is 0.001mm
N001 G91 ;
N002 G81 Z − 10000 R5000 L0 F200 ;
N003 G90 G34 X200000 Y100000 I100000 J20000 K6 ;
N004 G80 ; ............... (Cancel of G81)
N005 G90 G0 X500000 Y100000 ;
x1=200mm
n = 6 holes
20°
I=100mm
y1=100mm
(500mm, 100mm)
Position before N005 G0 command
G34 is executed
As shown in the example, the tool position after the G34 command is completed is over
the final hole. When moving to the next position, the coordinate value must be
calculated to issue the command with an incremental value. Thus, use of the absolute
value mode is handy.
(Note 1) If an address other than the selected plane's vertical axis, horizontal axis, G,
N, I, J, K, H, O, P, F, M, S or 2nd auxiliary function is issued in the same block
as the G34 command, a program error (P32) will occur.
223
13. Program Support Functions
13.2 Special canned cycle
G35 X x1 Y y1 I d J θ K n ;
X, Y :Designation of start point coordinates. This will be affected by G90/G91.
I :Interval d. The unit follows the input setting unit. If d is negative, the drilling will
take place in the direction symmetrical to the point that is the center of the start
point.
J :Angle θ. The CCW direction is positive.
(The decimal point position will be the degree class. If there is no decimal point,
the unit will be 0.001°.)
K :No. of holes n to be drilled. 1 to 9999 can be designated, and the start point is
included.
Using the position designated by X and Y as the start point, the Zn holes will be drilled with interval
d in the direction created by X axis and angle θ. The hole drilling operation at each hole position will
be determined by the standard canned cycle, so the hole drilling data (hole machining mode and
hole machining data) must be held beforehand. The movement between hole positions will all be
done in the G00 mode. G35 will not hold the data even when the command is completed.
(Example)
When input setting unit is 0.001mm
G91 ;
G81 Z − 10000 R5000 L0 F100 ;
G35 X200000 Y100000 I100000 J30000 K5 ;
d=100mm
n = 5 holes
θ=30°
y1=100mm
x1=200mm
Position before
G35 is executed
(Note 1) If the K command is K0 or if there is no K command, the program error (P221)
will occur.
(Note 2) If the K value is more than four digits, the last four digits will be valid.
(Note 3) If an address other than the selected plane's vertical axis, horizontal axis, G, N,
I, J, K, H, O, P, F, M, S or 2nd auxiliary function is issued in the same block as
the G35 command, a program error (P32) will occur.
(Note 4) If a group 0 G command is issued in the same block as the G35 command, the
command issued later is the priority.
(Example) G35 G28 Xx1 Yy1 Ii1 Jj1 Kk1 ;
G35 is ignored G 28 is executed as Xx1 Yy1
(Note 5) If there is a G72 to G89 command in the same block as the G35 command, the
canned cycle will be ignored, and the G35 command will be executed.
224
13. Program Support Functions
13.2 Special canned cycle
Arc (G36)
G36 X x1 Y y1 I r J θ P ∆θ K n ;
X, Y :Center coordinates of arc. This will be affected by G90/G91.
I :Radius r of arc. The unit follows the input setting unit, and is given with a positive
No.
J :Angle θ of the point to be drilled first. The CCW direction is positive. (The decimal
point position will be the degree class. If there is no decimal point, the unit will be
0.001°.)
P :Angle interval ∆θ. When the value is positive, the drilling will take place in the CCW
direction, and in the CW direction when negative. (The decimal point position will
be the degree class. If there is no decimal point, the unit will be 0.001°.)
K :No. of holes n to be drilled. 1 to 9999 can be designated.
The n holes aligned at the angle interval ∆θ will be drilled starting at point created by the X axis and
angle θ. The circumference is that of the radius R centering on the coordinates designated with XX
and Y. As with the bolt hole circle, the hole drilling operation at each hole will depend on the
standard canned cycle.
The movement between hole positions will all be done in the G00 mode. G36 will not hold the data
even when the command is completed.
(Example)
When input setting unit is 0.001mm
N001 G91 ;
N002 G81 Z − 10000 R5000 F100 ;
N003 G36 X300000 Y100000 I300000 J10000 P15000 K6 ;
n = 6 holes
∆θ=
15°
Position before
G36 is executed θ=10°
y1=100mm
x1=300mm
(Note 1) If an address other than the selected plane's vertical axis, horizontal axis, G, N,
I, J, K, H, O, P, F, M, S or 2nd auxiliary function is issued in the same block as
the G36 command, a program error (P32) will occur.
225
13. Program Support Functions
13.2 Special canned cycle
Grid (G37.1)
G37.1 X x1 Y y1 I Dx P nx J Dy K ny ;
X, Y :Designation of start point coordinates. This will be affected by G90/G91.
I :Interval Dx of the X axis. The unit will follow the input setting unit. If Dx is positive,
the interval will be in the forward direction looking from the start point, and when
negative, will be in the reverse direction looking from the start point.
P :No. of holes nx in the X axis direction. The setting range is 1 to 9999.
J :Interval Dy of the Y axis. The unit will follow the input setting unit. If Dy is positive,
the interval will be in the forward direction looking from the start point, and when
negative, will be in the reverse direction looking from the start point.
K :No. of holes ny in the Y axis direction. The setting range is 1 to 9999.
The nx points on a grid are drilled with an interval ∆x parallel to the X axis, starting at the position
designated with X, Y. The drilling operation at each hole position will depend on the standard
canned cycle, so the hole drilling data (hole machining mode and hole machining data) must be
held beforehand.
The movement between hole positions will all be done in the G00 mode. G37.1 will not hold the
data even when the command is completed.
(Example)
When input setting unit is 0.01mm
G91 ;
G81 Z − 10000 R5000 F20 ;
G37.1 X300000 Y−100000 I50000 P10 J100000 K8 ;
y1=100mm ∆y=
100mm
∆x=50mm
x1=300mm nx = 10 holes
(Note 1) If the P and K commands are P0 or K0, or if there is no P or K command, the
program error (P221) will occur.
If the P or K value is more than four digits, the last four digits will be valid.
(Note 2) If an address other than the selected plane's vertical axis, horizontal axis, G, N,
I, J, K, H, O, P, F, M, S or 2nd auxiliary function is issued in the same block as
the G37.1 command, a program error (P32) will occur.
(Note 3) If a group 0 G command is issued in the same block as the G37.1 command,
the command issued later is the priority.
(Note 4) If there is a G72 to G89 command in the same block as the G37.1 command,
the canned cycle will be ignored, and the G37.1 command will be executed.
(Note 5) If the G22/G23 command is programmed in the same block as the G37.1
command, the G22/G23 command will be ignored, and the G37.1 command
will be executed.
226
13. Program Support Functions
13.3 Subprogram control
Fixed sequences or repeatedly used patterns can be stored in the memory as subprograms which
can then be called from the main program when required. M98 serves to call subprograms and
M99 serves to return operation from the subprogram to the main program. Furthermore, it is
possible to call other subprograms from particular subprograms and the nesting depth can include
as many as 8 levels.
N20 ;
227
13. Program Support Functions
13.3 Subprogram control
Command format
Subprogram call
M98 P H L ;
P :Program number of subprogram to be called (own program if omitted)
P can only be omitted during memory operation and MDI operation.
(Numerical value with up to 8 digits)
H :Sequence number in subprogram to be called (head block if omitted)
(Numerical value with up to 5 digits)
L :Number of subprogram repetitions (When omitted, this is interpreted at
L1, and is not executed when L0)
(1 to 9999 with numerical value up to 4 digits)
For instance
Subprograms have the same format as machining programs for normal memory operation except
that the subprogram completion instruction M99 (P__) is entered as an independent block at the
last block.
O∆∆∆∆∆∆∆∆ ; Program number as subprogram
................................ ;
................................ ;
: ; Main body of subprogram
:
................................ ;
M99 ; Subprogram return command
% (EOR) Entry completion code
(1) The above program is entered by editing operations at the setting and display unit. For further
details, refer to the section on program editing in the Control Instructions.
228
13. Program Support Functions
13.3 Subprogram control
(2) Only those subprogram numbers ranging from 1 through 99999999 designated by the optional
specifications can be used. When there are no program numbers on the tape, they are entered
as the setting number for "program input."
(3) Up to 4 nesting levels can be used for calling subprograms, and program error (P230) results if
this number is exceeded.
(4) No distinction between main programs and subprograms is made since they are entered in the
sequence in which they were read. This means that main programs and subprograms should
not be given the same numbers. (If they are, error "E11" appears during entry.)
Registration example
;
O ;
................................ ;
: Subprogram A
M99 ;
%
O∆∆∆∆ ;
................................ ;
: Subprogram B
M99 ;
%
O**** ;
................................ ;
: Subprogram C
M99 ;
%
(5) Main programs can be entered during memory, tape, MDI or BTR operation but subprograms
must be entered in the memory.
(6) Besides the M98 command, subprogram nesting is subject to the following commands:
• G65 Macro call
• G66 Modal call
• G66.1 Modal call
• G code call
• Miscellaneous function call (M, S, T, etc.)
• Macro interrupt
• MDI interrupt
• Automatic tool length measurement
• Multi-stage skip function
(7) Subprogram nesting is not subject to the following commands which can be called even
beyond the 4th nesting level.
• Canned cycles
(8) To repeatedly use the subprogram, it can be repeated l1 times by programming M98 Pp1 Ll1;.
229
13. Program Support Functions
13.3 Subprogram control
Example of program
(1) For nesting, the M98 and M99 commands should always be paired off on a 1:1 basis, (1)' for
(1), (2)' for (2), etc.
(2) Modal information can be rewritten according to the execution sequence without distinction
between main programs and subprograms. This means that after calling a subprogram,
attention must be paid to the modal data status when programming.
230
13. Program Support Functions
13.3 Subprogram control
Example of program 2
The M98H__; M99P__; commands designate the sequence numbers in a program with a call
instruction.
O123;
M98H3; N100___;
M98P123;
N200_;
N300___;
N3___; N400___;
Search
M99; M99P200;
Other cautions
(1) Program error (P232) results when the designated program number (P) is not located.
(2) Single block stop does not occur with the M98P__; M99; block. If any address except O, N, P,
L or H is used, single block stop can be executed. (With X100. M98 P100;, operation branches
to O100 after X100. Is executed.)
(3) When M99 is commanded by the main program, operation returns to the head. (This is same
for MDI.)
(4) Operation can branch from tape or BTR operation to a subprogram by M98P__ but the
sequence number of the return destination cannot be designated with M99P__;, (P__ is
ignored.)
(5) Bear in mind that the search operation will take time when the sequence number is designated
by M99P__; .
231
13. Program Support Functions
13.3 Subprogram control
Programs saved in the IC card can be called as subprograms. To call a program in the IC card as
a subprogram, command in the main program as shown below.
Command format
M198 P H L ;
P :Number of program in IC card to be called as subprogram. (Max. 8 digits)
H :Sequence number in subprogram to be called out (head block when omitted).
(Max. 5 digits)
L :Number of subprogram repetitions. (Max. 4 digits)
This can be omitted. (In this case, the subprogram will be called once.)
When "L0" is designated, the subprogram call will not be executed.
Detailed description
The subprograms that can be called from the main program are shown below. The subprogram
can be called with the M198 command once in the subprogram nest.
Sub
Operation mode Memory IC card Tape
Main
Memory and MDI mode Memory
IC card
Tape mode
Tape
(Note1) This command functions only with the M65/M66.
232
13. Program Support Functions
13.4 Variable commands
Command format
Detailed description
233
13. Program Support Functions
13.4 Variable commands
(Note 1) A variable cannot be defined in the same block as an address. It must be defined in a
separate block.
Incorrect Correct
X#1 = #3 + 100; → #1 = #3 + 100;
X#1;
234
13. Program Support Functions
13.4 Variable commands
235
13. Program Support Functions
13.5 User macro specifications
By combining the user macros with variable commands, it is possible to use macro program call,
arithmetic operation, data input/output with PLC, control, decision, branch and many other
instructions for measurement and other such applications.
....... ; ....... ;
M30 ; M99 ;
Macro programs use variables, arithmetic instructions and control instructions to create
subprograms which function to provide special-purpose control.
These special-purpose control functions (macro programs) are called by the macro call
instructions exactly when required from the main program.
The following G codes are available for the macro call commands.
G code Function
G65 User macro Simple call
G66 User macro Modal call A (Movement command call)
G66.1 User macro Modal call B (Per-block call)
G67 User macro Modal call cancel
Detailed description
(1) When the G66 (or 66.1) command is entered, the specified user macro subprogram will be
called after each block has been executed (or after the movement command in the block) with
the movement commands has been executed until the G67 (cancel) command is entered.
(2) The G66 (or G66.1) and G67 commands must be paired in the same program.
236
13. Program Support Functions
13.5 User macro specifications
Included among the macro call commands are the simple calls which apply only to the instructed
block and also modal calls (types A and B) which apply to each block in the call modal.
Format
G65 P___ L___ <argument> ;
When the <argument> must be transferred as a local variable to a user macro subprogram, the
actual value should be designated after the address.
Regardless of the address, a sign and decimal point can be used in the argument. There are 2
ways in which arguments are designated.
237
13. Program Support Functions
13.5 User macro specifications
Detailed description
(a) Arguments can be designated using any address except G, L, N, O and P.
(b) Except for I, J and K, there is no need for designation in alphabetical order.
(c) I, J and K must be designated in alphabetical order.
I__ J__ K__ ................... Correct
J__ I__ K__ ................... Incorrect
(d) Address which do not need to be designated can be omitted.
(e) The following table shows the correspondence between the addresses which can be
designated by argument designation I and the variable numbers in the user macro main
body.
238
13. Program Support Functions
13.5 User macro specifications
Detailed description
(a) In addition to address A, B and C, up to 10 groups of arguments with I, J, K serving as 1
group can be designated.
(b) When the same address is duplicated, designate the addresses in the specified order.
(c) Addresses which do not need to be designated can be omitted.
(d) The following table shows the correspondence between the addresses which can be
designated by argument designation II and the variable numbers in the user macro main
body.
Argument Argument
Variable within Variable within
designation II designation II
macro macro
address address
A #1 J5 #17
B #2 K5 #18
C #3 I6 #19
I1 #4 J6 #20
J1 #5 K6 #21
K1 #6 I7 #22
I2 #7 J7 #23
J2 #8 K7 #24
K2 #9 I8 #25
I3 #10 J8 #26
J3 #11 K8 #27
K3 #12 I9 #28
I4 #13 J9 #29
J4 #14 K9 #30
K4 #15 I10 #31
I5 #16 J10 #32
K10 #33
(Note 1) The numbers 1 through 10 accompanying I, J and K denote the sequence of the
commanded groups and they are not required for the actual instructions.
(Example 1)
In the above example, the last I7.7 argument is valid when both arguments D3.3 and
I7.7 are commanded for the #7 variable.
239
13. Program Support Functions
13.5 User macro specifications
When the block with a movement command is commanded between G66 and G67, the movement
command is first executed and then the designated user macro subprogram is executed. The
number of times the subprogram is executed is l1 times with each call.
The <argument> is the same as for a simple call.
Format
G66 P___ L___ <argument> ;
P___ : Program No.
L___ : No. of repetitions
Detailed description
(1) When the G66 command is entered, the specified user macro subprogram will be called after
the movement command in the block with the movement commands has been executed until
the G67 (cancel) command is entered.
(2) The G66 and G67 commands must be paired in the same program.
A program error will result when G67 is issued without the G66 command.
Argument F
Y
(Note 1) After the axis command is executed in the main program, the subprogram is
executed.
(Note 2) The subprogram is not executed in the blocks following G67.
240
13. Program Support Functions
13.5 User macro specifications
The specified user macro subprogram is called unconditionally for each command block which is
assigned between G66.1 and G67 and the subprogram is executed the specified number of times.
Format
G66.1 P___ L___ <argument> ;
P___ : Program No.
L___ : No. of repetitions
Detailed description
(1) In the G66.1 mode, everything except the O, N and G codes in the various command blocks
which are read are handled as the argument without being executed. Any G code designated
last or any N code commanded after anything except O and N will function as the argument.
(2) The same applies as when G65P__ is assigned at the head of a block for all significant blocks
in the G66.1 mode.
(Example 1)
N100 G01 G90 X100. Y200. F400 R1000; in the G66.1 P1000; mode is the
same as: N100 G65 P1000 G01 G90 X100. Y200. F400 R1000;
(Note 1) The Call is performed even in the G66.1 command block in the G66.1 mode and
the correspondence between the argument address and the variable number is
the same as for G65 (simple call).
(3) The range of the G and N command values which can be used anew as variables in the G66.1
mode is subject to the restrictions applying to values as normal NC command values.
(4) Program number O, sequence numbers N and modal G codes are updated as modal
information.
User macro subprogram with prescribed program numbers can be called merely by issuing the G
code command.
Format
G <argument> ;
G :G code for macro call
Detailed description
(1) The above instruction functions in the same way as the instructions below, and parameters
are set for each G code to determine the correspondence with the instructions.
a. M98P∆∆∆∆ ;
b. G65P∆∆∆∆∆ <argument> ;
c. G66P ∆∆∆∆∆ <argument> ;
d. G66.1P∆∆∆∆∆ <argument> ;
When the parameters corresponding to c and d above are set, issue the cancel command
(G67) either in the user macro or after the call code has been commanded so as to cancel the
modal call.
241
13. Program Support Functions
13.5 User macro specifications
(2) The correspondence between the "XX" which conducts the macro call and the program
number P∆∆∆∆ of the macro to be called is set by parameter.
(3) Up to 10 G codes from G100 to G255 can be used with this instruction. (G01 to 99 can also be
used with parameter “#1081 Gmac_P”).
(Note 1) G101 to G110 and G200 to G202 are user macro I codes, but if the parameters
are set as the G code call codes, the G code call will be the priority, and these
codes cannot be used for user macro I.
(4) These commands cannot be issued during a user macro subprogram which has been called
by a G code.
M99 ;
The user macro subprogram of the specified program number can be called merely by issuing an
M (or S, T, B) code. (Only entered codes apply for M but all S, T and B codes apply.)
Format
Mm ; (or Ss ;, Tt ;, Bb ;)
Mm M code for macro call (or S, T, B code)
Detailed description
(1) The above instruction functions in the same way as the instructions below, and parameters
are set for each M code to determine the correspondence with the instructions. (Same for S, T
and B codes)
a: M98 P∆∆∆∆ ;
M98, Mm are not output
b: G65 P∆∆∆∆ Mm ;
c: G66 P ∆∆∆∆ Mm ;
d: G66. 1P∆∆∆∆ Mm ;
When the parameters corresponding to c and d above are set, issue the cancel command
(G67) either in the user macro or after the call code has been commanded so as to cancel the
modal call.
(2) The correspondence between the "Mm" which conducts the macro call and the program
number P∆∆∆∆ of the macro to be called is set by parameter. Up to 10 M codes from M00 to
M95 can be entered. Note that the codes to be registered are the codes basically required for
the machine, and codes excluding M0, M1, M2, M30 and M96 to M99.
(3) As with M98, it is displayed on the screen display of the setting and display unit but the M
codes and MF are not output.
242
13. Program Support Functions
13.5 User macro specifications
(4) Even if the miscellaneous command entered above is issued during a user macro subprogram
called by the M code, macro call will not result and it will be handled as an ordinary
miscellaneous command.
(5) All S, T and B codes call the subprograms in the prescribed program numbers of the
corresponding S, T and B functions.
(6) A maximum of 10 M codes can be set. However when not setting all 10. Set the parameters as
shown below.
[ MACRO ]
(1) The argument can be designated for G65 but not for M98.
(2) The sequence number can be designated for M98 but no for G65, G66 and G66.1.
(3) M98 executes a subprogram after all the commands except M, P, H and L in the M98 block
have been executed, but G65 branches to the subprogram without any further operation.
(4) When any address except O, N, P, H or L is included in the M98 block, single block stop
results. This is not the case with G65.
(5) The level of the M98 local variables is fixed but it can be varied in accordance with the nesting
depth for G65. (#1, for instance, has the same significance either before or after M98 but a
different significance in each case with G65.)
(6) The M98 nesting depth extends up to 8 levels in combination with G65, G66 and G66.1. The
G65 nesting depth extends up to only 4 levels in combination with G66 and G66.1.
Up to 4 nesting levels are available for macro subprogram calls based on simple call or modal call.
The argument with a macro call instruction is valid only on the called macro level. Since the nesting
depth for macro calls extends up to 4 levels, the argument can be used as a local variable for the
program with each respective macro call.
(Note 1) When a G65, G66, G66.1 G code macro call or miscellaneous command macro call
is conducted, this is regarded as nesting level 1 and the level of the local variables is
also incremented by one.
(Note 2) The designated user macro subprogram is called every time the movement
command is executed with modal call A. However, when the G66 command has
been duplicated, the next user macro subprogram is called every time an axis is
moved even with movement commands in the macro.
User macro subprograms are called in sequence from the subprogram commanded
last.
243
13. Program Support Functions
13.5 User macro specifications
(Example 1)
Main program
User macro operation
G66Pp1; (p1 call) Macro p1
x1 y1 x2 M99
Zz1 ; After Z1 execution
Macro p2
G66Pp2; (p2 call)
x1 y1 x2 M99
Zz2 ; After Z2 execution
(p2 cancel)
G67 ; Macro p1 Macro p1 Macro p1
Macro p1
Zz3 ; x1 y1 x2 M99
After Z3 execution
Zz4 ;
Zz5 ;
13.5.3 Variables
Both the variable specifications and user macro specifications are required for the variables which
are used with the user macros.
The offset amounts of the local, common and system variables among the variables for this
MELDAS NC system except #33 are retained even when the unit's power is switched off.
(Common variables can also be cleared by parameter “#1129 PwrVC1”.)
When the user macro specifications applied, variable numbers can be turned into variables
(multiple use of variables) or replaced by <formula>. Only one of the four basic arithmetic rule (+, –,
×, ÷) operations can be conducted with <formula>.
244
13. Program Support Functions
13.5 User macro specifications
Undefined variables
Variables applying with the user macro specifications such as variables which have not been used
even once after the power was switched on or local variables not quoted by the G65, G66 or G66.1
commands can be used as <vacant>. Also, variables can forcibly be set to <vacant>. Variable #0 is
always used as the <vacant> variable and cannot be defined in the left-side member.
245
13. Program Support Functions
13.5 User macro specifications
Common variables
Common variables can be used commonly from any position. Number of the common variables
sets depends on the specifications. Refer to "13.4 Variable commands" for details.
These can be defined as an <argument> when a macro subprogram is called or used locally within
main programs and subprograms. They can be duplicated regardless of the relationship existing
between macros (up to 4 levels).
G65 Pp1 Ll1 <argument> ;
P1 : Program number
l1 : Number of repetitions
The following table shows the correspondences between the addresses designated by
<argument> and the local variable numbers used in the user macro main bodies.
[Argument specification I]
Call command Local Call command Local
Argument Argument
G65 variable G65 variable
G66.1 address G66.1 address
G66 number G66 number
A #1 Q #17
B #2 R #18
C #3 S #19
D #7 T #20
E #8 U #21
F #9 V #22
∗ G #10 W #23
H #11 X #24
I #4 Y #25
J #5 Z #26
K #6 − #27
∗ L #12 − #28
M #13 − #29
∗ N #14 − #30
O #15 − #31
∗ P #16 − #32
− #33
" " in the above table denotes an argument address which cannot be used. However, provided
that the G66.1 mode has been established, an argument address denoted by the asterisk can be
added for use.
246
13. Program Support Functions
13.5 User macro specifications
(1) Local variables in subprograms can be defined by means of the <argument> designation
during macro call.
Main program Subprogram (9900)
G91 G01 X [#19∗COS [#1] ]
G65 P9900 A60. S100. F800; Y [#19∗SIN [#1] ] F#9;
To subprogram
M02; M99;
F(#9)= 800
Local variable
S(#19)= 100.000
data table
247
13. Program Support Functions
13.5 User macro specifications
#30=FUP [#2/#5/2] ;
G65 P1 A100. B50. J10. F500;
To subprogram #5=#2/#30/2 ;
M98 H100 L#30 ;
X#1 ;
M99 ;
Example of front surface milling N100 G1 X#1 F#9 ;
Y#5 ;
X-#1 ;
Y#5 ; The local variables
can be changed in
the subprogram.
B M99 ;
J
The local variables
Local variables set by argument can be changed in
the subprogram.
A
Local variable data table
A (#1) 100.000
B (#2) 50.000
F (#9) 500
J (#5) 10.000 8.333
(#30) 3
In the front surface milling example, argument J is programmed as the milling pitch 10.mm.
However, this is changed to 8.333mm to create an equal interval pitch.
The results of the No. of reciprocation data calculation is set in local variable #30.
248
13. Program Support Functions
13.5 User macro specifications
(3) Local variables can be used independently on each of the macro call levels (4 levels).
Local variables are also provided independently for the main program (macro level 0).
Arguments cannot be used for the level 0 local variables.
Main (level 0) O1 (macro level 1) O10 (macro level 2) O100 (macro level 3)
#1=0.1 #2=0.2 #3=0.3;
Local variables (0) Local variables (1) Local variables (2) Local variables (3)
#1 0.100 A (#1) 1.000 A (#1) 10.000 A (#1) 100.000
#2 0.200 B (#2) 2.000 B (#2) 20.000 B (#2) 200.000
#3 0.300 C (#3) 3.000 C (#3) 30.000 C (#3)
D (#7) D (#7)
The status of the local variables appear on the setting and display unit.
Refer to the Operation Manual for details.
249
13. Program Support Functions
13.5 User macro specifications
The status of the interface input signals can be ascertained by reading out the values of variable
numbers #1000 to #1035, #1200 to #1295. A variable value which has been read out can be only
one of 2 values: 1 or 0 (1: contact closed, 0: contact open). All the input signals from #1000 to
#1031 can be read at once by reading out the value of variable number #1032.
Similarly, the input signals #1200 to #1231, #1232 to #1263, and #1264 to #1295 can be read by
reading the values of the variable numbers #1033 to #1035.
Variable numbers #1000 to #1035, #1200 to #1295 are for readout only, and cannot be placed in
the left side member of their arithmetic formula. Input here refers to input to the control unit.
System No. of Interface System No. of Interface
variable points input signal variable points input signal
#1000 1 Register R72 bit 0 #1016 1 Register R73 bit 0
#1001 1 Register R72 bit 1 #1017 1 Register R73 bit 1
#1002 1 Register R72 bit 2 #1018 1 Register R73 bit 2
#1003 1 Register R72 bit 3 #1019 1 Register R73 bit 3
#1004 1 Register R72 bit 4 #1020 1 Register R73 bit 4
#1005 1 Register R72 bit 5 #1021 1 Register R73 bit 5
#1006 1 Register R72 bit 6 #1022 1 Register R73 bit 6
#1007 1 Register R72 bit 7 #1023 1 Register R73 bit 7
#1008 1 Register R72 bit 8 #1024 1 Register R73 bit 8
#1009 1 Register R72 bit 9 #1025 1 Register R73 bit 9
#1010 1 Register R72 bit 10 #1026 1 Register R73 bit 10
#1011 1 Register R72 bit 11 #1027 1 Register R73 bit 11
#1012 1 Register R72 bit 12 #1028 1 Register R73 bit 12
#1013 1 Register R72 bit 13 #1029 1 Register R73 bit 13
#1014 1 Register R72 bit 14 #1030 1 Register R73 bit 14
#1015 1 Register R72 bit 15 #1031 1 Register R73 bit 15
250
13. Program Support Functions
13.5 User macro specifications
251
13. Program Support Functions
13.5 User macro specifications
The interface output signals can be sent by substituting values in variable numbers #1100 to #1135,
#1300 to #1395. An output signal can be only 0 or 1.
All the output signals from #1100 to #1131 can be sent at once by substituting a value in variable
number #1132.
Similarly, the output signals #1300 to #1311, #1332 to #1363, and #1364 to #1395 can be sent by
assigning values to the variable numbers #1133 to #1135. (20 to 231)
The status of the writing and output signals can be read in order to offset the #1100 to #1135,
#1300 to #1395 output signals. Output here refers to the output from the NC side.
System No. of Interface System No. of Interface
variable points output signal variable points output signal
#1100 1 Register R172 bit 0 #1116 1 Register R173 bit 0
#1101 1 Register R172 bit 1 #1117 1 Register R173 bit 1
#1102 1 Register R172 bit 2 #1118 1 Register R173 bit 2
#1103 1 Register R172 bit 3 #1119 1 Register R173 bit 3
#1104 1 Register R172 bit 4 #1120 1 Register R173 bit 4
#1105 1 Register R172 bit 5 #1121 1 Register R173 bit 5
#1106 1 Register R172 bit 6 #1122 1 Register R173 bit 6
#1107 1 Register R172 bit 7 #1123 1 Register R173 bit 7
#1108 1 Register R172 bit 8 #1124 1 Register R173 bit 8
#1109 1 Register R172 bit 9 #1125 1 Register R173 bit 9
#1110 1 Register R172 bit 10 #1126 1 Register R173 bit 10
#1111 1 Register R172 bit 11 #1127 1 Register R173 bit 11
#1112 1 Register R172 bit 12 #1128 1 Register R173 bit 12
#1113 1 Register R172 bit 13 #1129 1 Register R173 bit 13
#1114 1 Register R172 bit 14 #1130 1 Register R173 bit 14
#1115 1 Register R172 bit 15 #1131 1 Register R173 bit 15
252
13. Program Support Functions
13.5 User macro specifications
253
13. Program Support Functions
13.5 User macro specifications
254
13. Program Support Functions
13.5 User macro specifications
#1000 #1100
#1031 #1131
Macro instructions
#1200 #1300
#1231 #1331
#1232 #1332
#1263 #1363
#1264 #1364
#1295 #1395
255
13. Program Support Functions
13.5 User macro specifications
Tool offset
Tool data can be read and values substituted using the variable numbers.
Either the numbers in the #10000 order or #2000 order can be used.
The last 3 digits of the variable numbers correspond to the tool offset number.
n corresponds to the No. of tool offset sets.
If there are 400 tool offset sets and type 2 is being used, avoid variable Nos. in the #2000 order,
and instead use the #10000 order.
The tool offset data are configured as data with a decimal point in the same way as for other
variables. Consequently, this decimal point must be commanded when data below the decimal
point is to be entered.
Programming example Common variables Tool offset data
#101=1000; #101=1000.0
#10001=#101; After
execution
H1=1000.000
#102=#10001; #102=1000.0
(Note) In this example, no consideration is given to the delay in the skip sensor signal.
#5003 is the Z-axis start point position and #5063 is the Z-axis skip coordinates, and
indicated is the position at which the skip signal is input while G31 is being executed.
256
13. Program Support Functions
13.5 User macro specifications
By using variable numbers #5201 to #532n, it is possible to read out the work coordinate system
offset data or to substitute values.
(Note) The number of axes which can be controlled differs according to the specifications.
The last digit of the variable No. corresponds to the control axis No.
Axis No.
Axis 1 Axis 2 Axis 3 Axis 4 . . Axis n Remarks
Axis name
External work offset #5201 #5202 #5203 #5204 . . #520n External workpiece offset
specifications are required.
G54 #5221 #5222 #5223 #5224 . . #522n
G55 #5241 #5242 #5243 #5244 . . #524n
G56 #5261 #5262 #5263 #5264 . . #526n
G57 #5281 #5282 #5283 #5284 . . #528n
G58 #5301 #5302 #5303 #5304 . . #530n
G59 #5321 #5322 #5323 #5324 . . #532n
(Example 1)
N1
N1 G28 X0 Y0 Z0 ; -90. -20.
N2 #5221=-20. #5222=-20. ;
N3 G90 G00 G54 X0 Y0 ; N3
-10.
W1 N11 -20.
W1
N10 #5221=-90. #5222=-10. ; G54 work coordinate
N11 G90 G00 G54 X0Y0 ; system defined by
N10 G54 work coordinate
system defined by
N2
M02 ;
Coordinate system
W2 (G55)
before change
W1 (G54)
N100 #5221=#5221+#5201 ;
#5222=#5222+#5202 ;
#5241=#5241+#5201 ;
#5242=#5242+#5202 ;
Base machine coordinate system
#5201=0 #5202=0;
M
G55
G54
Coordinate system
after change
W2 (G55)
W1 (G54)
This is an example where the external workpiece offset values are added to the work coordinate
(G54, G55) system offset values without changing the position of the work coordinate systems.
257
13. Program Support Functions
13.5 User macro specifications
Alarm (#3000)
The NC system can be forcibly set to the alarm state by using variable number #3000.
Format
#3000 = 70 (CALL#PROGRAMMER#TEL#530) :
70 : Alarm number
CALL#PROGRAMMER#TEL#530 : Alarm message
CALL#PROGRAMMER#TEL#530 70
(Note 1) Alarm number 0 is not displayed and any number exceeding 9999 cannot be indicated.
(Note 2) The characters following the first alphabet letter in the right member is treated as the
alarm message. Therefore, a number cannot be designated as the first character of an
alarm message. It is recommended that the alarm messages be enclosed in round
parentheses.
258
13. Program Support Functions
13.5 User macro specifications
The integrating (run-out) time can be read during automatic operation or automatic start or values
can be substituted by using variable numbers #3001 and #3002.
Contents when
Variable Initialization of
Type Unit power is switched Count condition
number contents
on
Integrating At all times while
3001
(run-out) time 1 Same as when Value substituted power is ON
ms
Integrating power is switched off for variable
3002 In-automatic start
(run-out) time 2
The integrating run time returns to zero in about 2.44 × 1011 ms (approximately 7.7 years).
O9010
#3001=0 ;
(allowable WHILE [#3001LE#20] DO1 ;
G65P9010 T time) ms; To
subprogram
END1 :
M99 ;
Entered in local
Local variable
Allowable time portion :
variable #20 DO1-END is repeated and when
T#20
allowable time is reached, operations
jumps to M99.
Suppression of single block stop and miscellaneous function finish signal waiting
By substituting the values below in variable number #3003, it is possible to suppress single block
stop in the subsequent blocks or to advance to the next block without waiting for the miscellaneous
function (M, S, T, B) finish (FIN) signal.
#3003 Single block stop Miscellaneous function finish signal
0 Not suppressed Awaited
1 Suppressed Awaited
2 Not suppressed Not awaited
3 Suppressed Not awaited
(Note 1) #3003 is cleared to zero by NC reset.
259
13. Program Support Functions
13.5 User macro specifications
By substituting the values below in variable number #3004, it is possible to make the feed hold,
feedrate override and G09 functions either valid or invalid in the subsequent blocks.
#3004 Bit 0 Bit 1 Bit 2
Contents (value) Feed hold Feedrate override G09 check
0 Valid Valid Valid
1 Invalid Valid Valid
2 Valid Invalid Valid
3 Invalid Invalid Valid
4 Valid Valid Invalid
5 Invalid Valid Invalid
6 Valid Invalid Invalid
7 Invalid Invalid Invalid
(Note 1) Variable number #3004 is set to zero by NC reset.
(Note 2) The functions are valid when the above bits are 0 and invalid when they are 1.
By using variable number #3006, the execution is stopped after the previous block has been
executed and, if message display data have been commanded, then the corresponding message
will be indicated.
Format
#3006 = 1 ( TAKE FIVE ) :
TAKE FIVE Message
The message should not be longer than 31 characters and it should be enclosed within round ( )
parentheses.
Mirror image
By reading variable number #3007, it is possible to ascertain the status of mirror image at a
particular point in time for each axis.
The axes correspond to the bits of #3007.
When the bits are 0, it means that the mirror image function is not valid; when they are 1, it means
that it is valid.
#3007
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
nth axis 6 5 4 3 2 1
260
13. Program Support Functions
13.5 User macro specifications
G command modals
Using variable numbers #4001 to #4021, it is possible to read the G modal commands which have
been issued up to the block immediately before.
Similarly, it is possible to read the modals in the block being executed with variable numbers #4201
to #4221.
Variable number
Pre-read Execution Function
block block
Interpolation mode : G00:0, G01:1, G02:2, G03:3,
#4001 #4201
G33:33
#4002 #4202 Plane selection : G17:17, G18:18, G19:19
#4003 #4203 Absolute/incremental : G90:90, G91:91
#4004 #4204 No variable No.
#4005 #4205 Feed designation : G94:94, G95:95
#4006 #4206 Inch/metric : G20:20, G21/21
#4007 #4207 Tool nose R compensation : : G40:40, G41:41, G42:42
#4008 #4208 Tool length offset : G43:43, G44:44, G49:49
Canned cycle : G80:80, G73 to 74, G76:76,
#4009 #4209
G81 to G89:81 to 89
#4010 #4210 Return level : G98:98, G99:99
#4011 #4211
#4012 #4212 Work coordinate system : G54 to G59:54 to 59
Acceleration/deceleration : G61 to G64:61 to 64,
#4013 #4213
G61.1:61.1
#4014 #4214 Macro modal call : G66:66, G66.1:66.1, G67:67
#4015 #4215
#4016 #4216
#4017 #4217 Constant surface speed control : G96:96, G97:97
#4018 #4218 No variable No.
#4019 #4219 Mirror image : G50.1:50.1, G51.1:51.1
#4020 #4220
#4021 #4221 No variable No.
(Example)
G28 X0 Y0 Z0 ;
G90 G1 X100. F1000;
G91 G65 P300 X100. Y100.;
M02;
O300;
#1 = #4003; → Group 3G modal (pre-read) #1 = 91.0
#2 = #4203; → Group 3G modal (now being executed) #2 = 90.0
G#1 X#24 Y#25;
M99;
%
261
13. Program Support Functions
13.5 User macro specifications
Other modals
Using variable numbers #4101 to #4120, it is possible to read the model commands assigned up to
the block immediately before.
Similarly, it is possible to read the modals in the block being executed with variable numbers #4301
to #4320.
Variable number Variable number
Modal
Executio Executio Modal information
Pre-read information Pre-read
n n
#4101 #4301 #4111 #4311 Tool length offset No. H
#4102 #4302 #4112 #4312
#4103 #4303 #4113 #4313 Miscellaneous function M
#4104 #4304 #4114 #4314 Sequence number N
#4105 #4305 #4115 #4315 Program number O
#4106 #4306 #4116 #4316
Tool radius
#4107 #4307 compensation No. D
#4117 #4317
#4108 #4308 #4118 #4318
#4109 #4309 Feedrate F #4119 #4319 Spindle function S
#4110 #4310 #4120 #4320 Tool function T
Position information
Using variable numbers #5001 to #5104, it is possible to read the servo deviation amounts, tool
position offset amount, skip coordinates, work coordinates, machine coordinates and end point
coordinates in the block immediately before.
Position End point Tool
information coordinate Servo
Machine Work Skip position
of block deviation
immediately coordinate coordinate coordinate offset amount
Axis No. before amount
1 #5001 #5021 #5041 #5061 #5081 #5101
2 #5002 #5022 #5042 #5062 #5082 #5102
3 #5003 #5023 #5043 #5063 #5083 #5103
4 #5004 #5024 #5044 #5064 #5084 #5104
: : : : : : :
n #5000+n #5020+n #5040+n #5060+n #5080+n #5100+n
Remarks (reading
Yes No No Yes No Yes
during movement)
(Note 1) The number of axes which can be controlled differs according to the specifications.
(Note 2) The last digit of the variable No. corresponds to the control axis No.
262
13. Program Support Functions
13.5 User macro specifications
G00
G01
Read
command
[End point
coordinates]
W Work coordinate
system
[Work
coordinates]
Machine coordinate
system
[Machine M
coordinates]
(1) The positions of the end point coordinates and skip coordinates are positions in the work
coordinate system.
(2) The end point coordinates, skip coordinates and servo deviation amounts can be read even
during movement. However, it must first be checked that movement has stopped before
reading the machine coordinates and the work coordinates.
(3) The position where the skip signal is turned ON in the G31 block is indicated for the skip
coordinates. The end point position is indicated when the skip signal has not been turned ON.
(For further details, refer to the section on tool length measurement.)
Read
command
Gauge, etc.
Skip coordinates
263
13. Program Support Functions
13.5 User macro specifications
(4) The tool nose position where the tool offset and other such factors are not considered is
indicated as the end point position. The tool reference point position with consideration given
to tool offset is indicated for the machine coordinates, work coordinates and skip coordinates.
Skip signal
G31
F (feedrate)
W
Work coordinate
system
[Input coordinates [Work
of skip signal] coordinates]
Machine coordinate
system
M
[Machine coordinates]
The position of the skip signal input coordinates is the position in the work coordinate system.
The coordinates in variable numbers #5061 to #5064 memorize the moments when the skip
input signal during movement was input and so they can be read at any subsequent time. For
further details, reference should be made to the section on the skip function.
264
13. Program Support Functions
13.5 User macro specifications
265
13. Program Support Functions
13.5 User macro specifications
Any name (variable name) can be given to common variables #500 to #519. It must be composed
of not more than 7 alphanumerics and it must begin with a letter. Do not use "#" in variable names.
It causes an alarm when the program is executed.
Format
SETVN n [ NAME1, NAME2, • • • • • • • ] :
n : Head number of variable to be named
NAME1 : #n name (variable name)
NAME2 : #n + 1 name (variable name)
Detailed description
(1) Once variable names have been set, they will not be cleared even when the power is switched
off.
(2) Variables in programs can be quoted by their variable names. In cases like this, the variables
should be enclosed in square parentheses.
(Example 1) G01X [#POINT1] ;
[#NUMBER] = 25 ;
(3) The variable numbers, data and variable names appear on the screen of the setting and
display unit.
(Example 2)
Program ...... SETVN500 [A234567, DIST, TOOL25] ;
[Common variables]
#500 -12345.678 A234567
#501 5670.000 DIST
#502 -156.500 TOOL25
(Note) At the head of the variable name, do not use the characters determined by the NC for
use in arithmetic commands, etc. (e.g. SIN, COS).
The workpiece coordinate system shift amount can be read using variables #2501 and #2601.
By substituting a value in these variables, the workpiece coordinate system shift amount can be
changed.
Axis Workpiece coordinate
No. system shift amount
1 #2501
2 #2601
266
13. Program Support Functions
13.5 User macro specifications
The number of workpiece machining times can be read using variables #3901 and #3902.
By substituting a value in these variables, the number of workpiece machining times can be
changed.
Type Variable No. Data setting range
Number of workpiece
#3901
machining times
0 to 999999
Maximum workpiece
#3902
value
(Note) Always substitute a positive value for the number of workpiece machining times.
# ? ? ? ? ?
267
13. Program Support Functions
13.5 User macro specifications
268
13. Program Support Functions
13.5 User macro specifications
Absolute value
compensation
amount
±99999.999
Increment value
compensation
amount
±99999.999
269
13. Program Support Functions
13.5 User macro specifications
Absolute value
compensation
amount
±99999.999
Increment value
compensation
amount
±99999.999
64500 Auxiliary data Spare data 0 to 65535
+***
(3) When non-registered group No. is designated. (Group 9999 does not exist.)
#60000 = 9999 ; ........... Designates the group No.
#104 = #60004 ; ........... #104 = –1.
(4) When registration No. not used is designated. (Group 10 has 15 tools)
#60000 = 10 ; ............... Designates the group No.
#111 = #61016 ; ........... #101 = –1.
270
13. Program Support Functions
13.5 User macro specifications
(6) When tool life management data is registered with G10 command after group No. is
designated.
#60000 = 10 ; ..............Designates the group No.
G10 L3 ; .......................Starts the life management data registration.
P10 LLn NNn ; ............10 is the group No., Ln is the life per tool, The group 10 life data
Nn is the method. is registered.
TTn ; ............................Tn is the tool No.
:
G11 ; ...........................Registers the group 10 data with the G10
command.
#111 = #61001 ; ..........Reads the group 10, #1 tool No.
G10 L3 ; .......................Starts the life management data registration.
P1 LLn NNn ; ..............1 is the group No., Ln is the life per tool,
Nn is the method.
The life data other than
TTn ; ............................Tn is the tool No. group 10 is registered.
:
G11 ; ............................Registers the life data with the G10
command.
(The registered data is deleted.)
#111 = 61001 ; ............Group 10 does not exist. #201 = –1.
(1) If the tool life management system variable is commanded without designating a group No.,
the data of the group registered at the head of the registered data will be read.
(2) If a non-registered group No. is designated and the tool life management system variable is
commanded, "-1" will be read as the data.
(3) If an unused registration No. tool life management system variable is commanded, "-1" will be
read as the data.
(4) Once commanded, the group No. is valid until NC reset.
271
13. Program Support Functions
13.5 User macro specifications
The parameter values are read in with the following four blocks using these four system variables.
#100000 = 1001 ; ..........Designates the parameter #.
#100001 = 1 ; ................Designates the system No.
#100002 = 1 ; ................Designates the axis No./spindle No.
#100 = #100010 ; ..........Reads the parameter value.
272
13. Program Support Functions
13.5 User macro specifications
273
13. Program Support Functions
13.5 User macro specifications
<Macro specifications>
Q341 A_. Q_ . ;
A_. ...... Storage common variable Designates the common variable No. for storing the
data read in.
Q_....... Parameter # designation For an axis/spindle parameter, designates the
axis/spindle No. with one digit after the decimal point.
<Macro contents>
#100000 = FIX [#17] ; .......... Designates parameter #.
#100002 = FIX [#17∗10] MOD 10 ; .......... Designates axis/spindle No.
#[#1] = #100010 ; ........... Reads parameter data.
M99 ;
(1) The number of axes and spindles is the maximum number in the specifications determined by
the model.
(2) The inch/metric changeover function for the setting and display is valid even for the data read
in.
274
13. Program Support Functions
13.5 User macro specifications
The PLC data is read in with the following five blocks using these five system variables.
#100100 = 1 ; ............ Designates the device type.
#100101 = 0 ; ............ Designates the device No.
#100102 = 1 ; ............ Designates the number of bytes.
#100103 = 2 ; ............ Designates the bit. (Valid only when reading word device bits.)
#100 = #100110 ; ...... Reads in the PLC data.
275
13. Program Support Functions
13.5 User macro specifications
0 to 4 are designated without a sign, and 101 to 104 are designated with a sign.
276
13. Program Support Functions
13.5 User macro specifications
277
13. Program Support Functions
13.5 User macro specifications
278
13. Program Support Functions
13.5 User macro specifications
<Macro specifications>
G340 F_. A_. Q_. H_. ;
F_. ...........Number of bytes designation F0 ..... Designates bit.
F1 ..... Designates one byte.
F2 ..... Designates two bytes.
A_. ............Device designation A0 ..... Designates M.
A1 ..... Designates D.
A2 ..... Designates C.
A3 ..... Designates G.
A4 ..... Designates X.
A5 ..... Designates Y.
A6 ..... Designates R.
A7 ..... Designates T.
Q_.............Device No. designation For a bit, designates the bit with two digits
after the decimal point.
For a byte, a decimal value is not designated.
H_............. Storage common variable Designates the common variable No. for
storing the read data.
<Macro contents>
#100100 = #1 ; ...... Designates device.
#100101 = FIX [#17] ; ...... Designates device No.
#100102 = #9 ; ...... Designates number of bytes.
#100103 = FIX [#17∗100] MOD 100 ; ...... Designates bit.
#[#11] = #100110 ; ...... Reads PLC data.
M99 ;
(1) As the PLC data is read asynchronously from the ladder execution, the data is not necessarily
from the running program. Take care when reading devices that change.
(2) If reading of a device that does not exist is attempted by designating the device No. and
number of bytes, the 0 value will be read in only for the sections that do not exist.
279
13. Program Support Functions
13.5 User macro specifications
The following operations can be carried out using the system variable extension for the user macro
time.
(1) By adding time information system variable #3011 and #3012, the current date (#3011) and
current time (#3012) can be read and written.
(2) By adding parameter #1273/bit1, the unit (millisecond unit/hour unit) of the cumulative time
during system variable #3002 automatic start can be changed.
Variable No. Details
#3001 The cumulative time during power ON can be read and the value can be
substituted.
The unit is a millisecond unit.
#3002 The cumulative time during automatic start can be read and the value can
be substituted.
The unit can be changed between millisecond and hour with parameter
#1273/bit1.
#3011 The current date can be read and written.
YYYY/MM/DD is read as a YYYYMMDD value.
When a YYYYMMDD value is written in, it will be set as YY/MM/DD (the
last two digits of the year are displayed).
Command range for year/month/date setting
Year (YYYY) : 2000 to 2099
Month (MM) : 1 to 12
Date (DD) : 1 to maximum number of days in month
#3012 The current time can be read and written.
HH/MM/SS is read as a HHMMSS value.
When an HHMMSS value is written in, it will be set as HH/MM/DD.
Command range for hour/minute/second setting
Hour (HH) : 0 to 23 (24-hour system)
Minute (MM) : 0 to 59
Second (SS) : 0 to 59
(3) The cumulative time returns to 0 at approx. 2.44 × 1011 milliseconds (approx. 7.7 years).
(4) If a negative value or a value exceeding 244335917226 milliseconds (67871.08811851 hours
for #3002 time designation) is set for the cumulative time, a program error (P35) will occur.
(5) If a value exceeding the command range is set for the date or time, a program error (P35) will
occur.
(6) Always set the month/date/hour/minute/second as a two-digit value when setting the date and
time.
If the value only has one digit, always add 0. (February 14, 2001 ⇒ #3001= 20010214 ;, etc.)
280
13. Program Support Functions
13.5 User macro specifications
(Example 1) To read the current date (February 14, 2001) in common variable #100
#100 = #3011 ; (20010214 is inserted in #100)
(Example 2) To write current time (18 hours, 13 minutes, 6 seconds) into system variable #3012
#3012 = 181306 ; (The command value cumulative time #2: time is set to 18:13:06.)
(Example 3) By setting the following type of program, the machining start/end time
(year/month/date/hour/minute/second) can be viewed.
(1) #3011 reads the date as an eight-digit value, so the difference of the two dates read in will not
be the difference of days.
(2) #3012 reads the time as a six-digit value, so the difference of the two times read in will not be
the difference of hours.
281
13. Program Support Functions
13.5 User macro specifications
Command format
#i = <formula>
<Formula> is a combination of constants, variables, functions and operators.
Constants can be used instead of #j and #k below.
(1) Definition and
#i = #j Definition, substitution
substitution of variables
(2) Addition arithmetic #i = #j + #k Addition
#i = #j – #k Subtraction
#i = #j OR #k Logical sum (at every bit of 32 bits)
#i = #j XOR #k Exclusive OR (at every bit of 32 bits)
(3) Multiplication arithmetic #i = #j ∗ #k Multiplication
#i = #j / #k Division
#i = #j MOD #k Remainder
#i = #j AND #k Logical product (at every bit of 32 bits)
(4) Functions #i = SIN [#k] Sine
#i = COS [#k] Cosine
#i = TAN [#k] Tangent (sin/cos used for tan)
#i = ASIN [#k] Arcsine
#i = ATAN [#j] Arctangent (ATAN or ATN may be used)
#i = ACOS [#j] Arc-cosine
#i = SQRT [#k] Square root (SQRT or SQR may be used)
#i = ABS [#k] Absolute value
#i = BIN [#k] Conversion from BCD to BIN
#i = BCD [#k] Conversion from BIN to BCD
#i = ROUND [#k] Rounding off
(ROUND or RND may be used)
#i = FIX [#k] Discard fractions less than 1
#i = FUP [#k] Add for fractions less than 1
#i = LN [#k] Natural logarithm
#i = EXP [#k] Exponent with e (=2.718 .....) as bottom
(Note 1) A value without a decimal point is basically treated as a value with a decimal point at the
end (1 = 1.000).
(Note 2) Offset amounts from #10001 and work coordinate system offset values from #5201 are
handled as data with a decimal point. Consequently, data with a decimal point will be
produced even when data without a decimal point have been defined in the variable
numbers.
(Example)
Common variables
#101 = 1000 ; after execution
#101 1000.000
#10001 = #101 ;
#102 1000.000
#102 = #10001 ;
(Note 3) The <formula> after a function must be enclosed in the square parentheses.
282
13. Program Support Functions
13.5 User macro specifications
(1) The sequence of the arithmetic operations (1) through (3) is, respectively, the functions
followed by the multiplication arithmetic followed in turn by the addition arithmetic.
(2) The part to be given priority in the operation sequence should be enclosed in square
parentheses. Up to 5 pairs of such parentheses including those for the functions may be used.
283
13. Program Support Functions
13.5 User macro specifications
284
13. Program Support Functions
13.5 User macro specifications
285
13. Program Support Functions
13.5 User macro specifications
Arithmetic accuracy
As shown in the following table, errors will be generated when performing arithmetic operations
once and these errors will accumulate by repeating the operations.
Arithmetic format Average error Maximum error Type of error
a=b+c
2.33 × 10−10 5.32 × 10−10 Min. |ε/b|, |ε/c|
a=b−c
a = b∗c 1.55 × 10−10 4.66 × 10−10
Relative error
a = b/c 4.66 × 10−10 1.86 × 10−9
|ε/a|
a= b 1.24 × 10−9 3.73 × 10−9
a = SIN [b]
5.0 × 10−9 1.0 × 10−8 Absolute error
a = COS [b]
|ε|°
a = ATAN [b/c] 1.8 × 10−6 3.6 × 10−6
(Note) SIN/COS is calculated for the function TAN.
286
13. Program Support Functions
13.5 User macro specifications
Branching
Format
IF [conditional expression] GOTO n; (n = sequence number in the program)
When the condition is satisfied, control branches to "n" and when it is not satisfied, the next block is
executed.
IF [conditional expression] can be omitted and, when it is, control passes to "n" unconditionally.
The following types of [conditional expressions] are available.
#i EQ #j = When #i and #j are equal
#i NE #j ≠ When #i and #j are not equal
#i GT #j > When #i is greater than #j
#i LT #j < When #i is less than #j
#i GE #j ≥ When #i is #j or more
#i LE #j ≤ When #i is #j or less
"n" of GOTO n must always be in the same program. Program error (P231) will result if it is not. A
formula or variable can be used instead of #i, #j and "n".
In the block with sequence number "n" which will be executed after a GOTO n command, the
sequence number must always be at the head of the block.
Otherwise, program error (P231) will result.
If "/" is at the head of the block and Nn follows, control can be branched to the sequence number.
search
#23=#21-#4; content of #2 is 1
With
N100 N10
N100 X#22 Y#23;
#1=#1+1;
To
head
(Note 1) When the sequence number of the branch destination is searched, the search is
conducted up to the end of the program (% code) from the block following IF············; and
if it is not found, it is then conducted from the top of the program to the block before
IF··········;. Therefore, branch searches in the opposite direction to the program flow will
take longer to execute compared with branch searches in the forward direction.
(Note 2) EQ and NE should be used only for integers. For comparison of numeric values with
decimals, GE, GT, LE, and LT should be used.
287
13. Program Support Functions
13.5 User macro specifications
Iteration
Format
WHILE [conditional expression] DOm ; (m = 1, 2, 3 ..... 127)
~
END m ;
While the conditional expression is established, the blocks from the following block to ENDm are
repeatedly executed; when it is not established, execution moves to the block after ENDm. DOm
may come before WHILE, WHILE [conditional expression] DOm and ENDm must be used as a pair.
IF WHILE [conditional expression] is omitted, these blocks will be repeatedly ad infinitum. The
repeating identification numbers range from 1 through 127 (DO1, DO2, DO3, ....... DO127). Up to
27 nesting levels can be used.
(1) Same identifier number can be used any number (2) Any number may be used for the WHILE −DOm
of times. identifier number.
WHILE ~ DO1 ;
~
END1 ;
WHILE ~ DO1 ;
~
Possible WHILE ~ DO3 ;
~
END1 ;
END3 ;
~
Possible
WHILE ~ DO1 ; WHILE ~ DO2 ;
~
Possible END2 ;
END1 ;
~
WHILE ~ DO1 ;
~
END1 ;
(3) Up to 27 nesting levels for WHILE− DOm. "m" is (4) The number of WHILE − DOm nesting levels
any number from 1 to 127 for the nesting depth. cannot exceed 27.
DO1
WHILE ~ DO1 ;
WHILE ~ DO1 ;
DO2
~
WHILE ~ DO2 ;
WHILE ~ DO2 ;
: :
Possible
Not possible
WHILE ~ DO28;
~
:
END 3 ;
END 2 ; :
END 2 ;
~
END 1 ; END 1 ;
288
13. Program Support Functions
13.5 User macro specifications
(5) WHILE − DOm must be designated first and (6) WHILE − DOm and ENDm must correspond on
ENDm last. a 1:1 (pairing) basis in the same program.
WHILE ~ DO1 ;
END 1 ;
Not Not
possible WHILE ~ DO1 ;
possible
WHILE ~ DO1 ;
END 1 ;
(7) Two WHILE − DOm's must not overlap. (8) Branching externally is possible from the WHILE
− DOm range.
Not
possible WHILE ~ DO2 ; IF ~ GOTOn ;
END 1 ; END 1 ;
Possible
~
END 2 ;
Nn
(9) No branching is possible inside WHILE − DOm. (10) Subprograms can be called by M98, G65 or
G66 between WHILE − DOm's.
WHILE~DO1;
IF~GOTOn;
Not possible
G65
WHILE~DO1; To subprogram
Nn; P100;
END2;
Nn;
END1;
END1; END1;
M02; M99;
(11) Calls can be initiated by G65 or G66 between (12) A program error will occur at M99 if WHILE and
WHILE − DOm's and commands can be issued END are not paired in the subprogram
again from 1. Up to 27 nesting levels are (including macro subprogram).
possible for the main program and
Main program Subprogram
subprograms.
WHILE
Main program Subprogram M98 To subprogram ~DO1;
P100;
WHILE ~ DO1 ; WHILE ~ DO1 ;
~
M99;
M02;
Possible
END 1 ; constitutes
illegal usage.
END 1 ;
~
M02 ; M99 ;
(Note) As the canned cycles G73 and G83 and the special canned cycle G34 use WHILE, these
will be added multiple times.
289
13. Program Support Functions
13.5 User macro specifications
Besides the standard user macro commands, the following macro instructions are also available
as external output commands. They are designed to output the variable values or characters via
the RS-232C interface.
Command format
Command sequence
(1) The command is issued before the series of data output commands.
(2) The DC2 control code and % code are output from the NC system to the external output
device.
(3) Once POPEN; has been issued, it will remain valid until PCLOS; is issued.
(1) This command is issued when all the data outputs are completed.
(2) The DC4 control code and % code are output from the NC unit to the external output device.
(3) This command is used together with the open command and it should not be issued unless the
open mode has been established.
(4) Issue the close command at the end of the program even when operation has been
suspended by resetting or some other operation during data output.
290
13. Program Support Functions
13.5 User macro specifications
DPRNT [ l1 # v1 [ d1 c1 ] l 2 # v2 [ d2 c2 ] • • • • • • • • • • • ]
l1 : Character string
v1 : Variable number
d1 : Significant digits above decimal point
c1 : Significant digits below decimal point c+d≤8
(1) The character output and decimal output of the variable values are done with ISO codes.
(2) The commanded character string is output as is by the ISO code.
Alphanumerics (A to Z, 0 to 9) and special characters (+, −, ∗, /) can be used.
(3) The required significant digits above and below the decimal point in the variable values are
commanded within square parentheses. As a result, the variable values equivalent to the
commanded number of digits including the decimal point are output in ISO code in decimal
notation from the high-order digits. Trailing zeroes are not omitted.
(4) Leading zeroes are suppressed.
The leading zeroes can also be replaced by blank if so specified with a parameter. This can
justify printed data on the last column.
(Note) A data output command can be issued even in dual-system mode. In this case,
however, note that the output channel is shared for both systems. So, take care not
to execute data output in both systems simultaneously.
291
13. Program Support Functions
13.5 User macro specifications
13.5.8 Precautions
Precautions
When the user macro commands are employed, it is possible to use the M, S, T and other NC
control commands together with the arithmetic, decision, branching and other macro commands
for preparing the machining programs. When the former commands are made into executable
statements and the latter commands into macro statements, the macro statement processing
should be accomplished as quickly as possible in order to minimize the machining time, because
such processing is not directly related to machine control.
As a result, the parameter "#8101 macro single" can be set and the macro statements can be
processed in parallel with the execution of the executable statement.
(The parameter can be set OFF during normal machining to process all the macro statements
together or set ON during a program check to execute the macro statements block by block. This
enables the setting to be made in accordance with the intended objective in mind.)
Example of program
G91G28X0Y0Z0 ; • • • • • (1)
G92X0Y0Z0 ; • • • • • (2)
G00X-100.Y-100. ; • • • • • (3)
#101=100.∗ COS [210.] ; • • • • • (4)
Macro statement
#102=100.∗ SIN [210.] ; • • • • • (5)
G01X#101Y#102F800 ; • • • • • (6)
292
13. Program Support Functions
13.5 User macro specifications
-X x1
W
Main program
a1 ;
Start angle a1
b1 ;
No. of holes y1
G81Z–100.R50.F300L0 To subprogram
r1 ;
Radius
G65P9920Aa1Bb1Rr1Xx1Yy1 ; x1 ;
X axis center
position -Y
y1 ; Y axis center
position
295
13. Program Support Functions
13.5 User macro specifications
-X -500. W
To subprogram
To subprogram
-500.
To subprogram
-Y
296
14. Coordinates System Setting Functions
14.9 Simple zero point return
Accuracy
G0 G0 G28
G28
G0 G0
(-30,30,30) (30,30,30) (-30,30,30) (30,30,30)
385
14. Coordinates System Setting Functions
14.9 Simple zero point return
G0 G0
G28 G2 The accuracy drops.
386
14. Coordinates System Setting Functions
14.9 Simple zero point return
Precautions
(1) Even when this function's parameter is ON and the improvement function is validated, if an
inclined axis is validated, this function's parameter will be forcibly turned OFF, and this
function will be invalidated.
(2) If this function's parameter is turned ON while an inclined axis is valid, a "setting error" will
occur, and this function will be invalidated.
(3) If parameters which "validate this function" and "validate the inclined axis" are input, this
function's parameter will be forcibly turned OFF, and this function will be invalidated.
(4) When the improvement function is valid, the accuracy of the rapid feed command, cutting feed
command, and movement command to the intermediate point before G28 may drop.
If the rapid feed command and cutting feed command before G28 must be accurate, use one
of the following methods.
•Invalidate this function.
•Carry out an in-position check in the block before G28/G29/G30, and confirm the accuracy.
(G09: Exact stop check, etc.)
•Input the required dwell command (time) in the block before G28/G29/G30.
387
14. Coordinates System Setting Functions
14.10 Reference point check
This command first positions the tool at the position assigned by the program and then, if that
positioning point is the first reference point, it outputs the reference point arrival signal to the
machine in the same way as with the G28 command. Therefore, when a machining program is
prepared so that the tool will depart from the first reference point and return to the first reference
point, it is possible to check whether the tool has returned to the reference point after the program
has been run.
Command format
Detailed description
(1) If the P command has been omitted, the first reference point will be checked.
(2) The number of axes whose reference points can be checked simultaneously depends on the
number of axes which can be controlled simultaneously.
Note that the display shows one axis at a time from the final axis.
(3) An alarm will occur if the reference point is not reached after the command is completed.
388
14. Coordinates System Setting Functions
14.11 Work coordinate system setting and offset
14.11 Work coordinate system setting and offset ; G54 to G59 (G54.1)
Function and purpose
(1) The work coordinate systems are for facilitating the programming of workpiece machining in
which the reference point of the workpiece to be machined is to serve as the zero point.
(2) These commands enable the tool to move to the positions in the work coordinate system.
There are 6 work coordinate systems which are used by the programmer for programming.
(G54 to G59)
In addition to the six sets of workpiece coordinate systems between G54 and G59, there are
48 additional workpiece coordinate system sets. (The 48 sets are options.)
(3) Among the work coordinate systems currently selected by these commands, any work
coordinate system with coordinates which have been commanded by the present position of
the tool is reset. (The "present position of the tool" includes the offset amounts for tool radius,
tool length and tool position offset.)
(4) An imaginary machine coordinate system with coordinates which have been commanded by
the present position of the tool is set by this command.
(The "present position of the tool" includes the offset amounts for tool diameter, tool length and
tool position offset.) (G54, G92)
Command format
(5) Extended work coordinate system offset amount setting (P1 to P48)
G10 L20 Pn Xx Yy Zz ;
389
14. Coordinates System Setting Functions
14.11 Work coordinate system setting and offset
Detailed description
(1) With any of the G54 through G59 commands, the tool diameter offset amounts for the
commanded axes will not be canceled even if work coordinate system selection is
commanded.
(2) The G54 work coordinate system is selected when the power is switched on.
(3) Commands G54 through G59 are modal commands (group 12).
(4) The coordinate system will move with G92 in a work coordinate system.
(5) The offset setting in a work coordinate system denotes the distance from the zero point of the
basic machine coordinate system.
R#1 Reference point
(#1) (zero point)
-X M return position
Basic machine coordinate
-X(G54)(-500, system zero point
-500)
-X(G55)(-2000, W1 G54 reference point (zero point)
-1000) -Y
W2 (G54)
(6) The offset settings of work coordinate systems can be changed any number of times. (They
can also be changed by G10 L2 Pp1 Xx1 Zz1.)
Handling when L or P is omitted
G10 L2 Pn Xx Yy Zz ; ;n=0 : Set the offset amount in the external workpiece
coordinate system.
n=1 to 6 : Set the offset amount in the designated workpiece
coordinate system.
Others : The program error (P35) will occur.
G10 L2 Xx Yy Zz ; Set the offset amount in the currently selected workpiece
coordinate system.
When in G54.1 modal, the program error (P33) will occur.
G10 L20 Pn Xx Yy Zz ; n=1 to 48 : Set the offset amount in the designated
workpiece coordinate system.
Others : The program error (P35) will occur.
G10 L20 Xx Yy Zz ; Set the offset amount in the currently selected workpiece
coordinate system.
When in G54 to G59 modal, the program error (P33) will
occur.
G10 Pn Xx Yy Zz ; L2 (workpiece offset) will be judged if there is no L value.
G10 Xx Yy Zz ;
390
14. Coordinates System Setting Functions
14.11 Work coordinate system setting and offset
(7) A new work coordinate system 1 is set by issuing the G92 command in the G54 (work
coordinate system 1) mode. At the same time, the other work coordinate systems 2 through 6
(G55 to G59) will move in parallel and new work coordinate systems 2 through 6 will be set.
(8) An imaginary machine coordinate system is formed at the position which deviates from the
new workpiece reference (zero) point by an amount equivalent to the work coordinate system
offset amount.
R#1
Reference (zero) point return
-X M position
Basic machine coordinate
system zero point
-X [M]
Imaginary machine coordinate system
coordinate point based on G92
-X(G54)
Old work 1 (G54) coordinate system
-X(G55) W1
Old work 2 (G55) coordinate system
-X(G54') W2
New work 1 (G54) coordinate system
-X(G55') [W1] -Y(G55) -Y(G54)
New work 2 (G55) coordinate system
[W2]
-Y
-Y(G54')
-Y(G55')
-Y
After the power has been switched on, the imaginary machine coordinate system is matched with the
basic machine coordinate system by the first automatic (G28) or manual reference (zero) point return.
(9) By setting the imaginary basic machine coordinate system, the new work coordinate system
will be set at a position which deviates from that imaginary basic machine coordinate system
by an amount equivalent to the work coordinate system offset amount.
(10) When the first automatic (G28) or manual reference (zero) point return is completed after the
power has been switched on, the basic machine coordinate system and work coordinate
systems are set automatically in accordance with the parameter setting.
(11) If G54X-Y-; is commanded after the reference return (both automatic or manual) executed
after the power is turned ON, the program error (P62) will occur. (A speed command is
required as the movement will be controlled with the G01 speed.)
(12) Do not command a G code for which a P code is used in the same block as G54.1. The P code
will be used in the prioritized G command.
(13) When number of workpiece offset sets additional specifications is not added, the program
error (P39) will occur when the G54.1 command is executed.
391
14. Coordinates System Setting Functions
14.11 Work coordinate system setting and offset
(14) When number of workpiece offset sets additional specifications is not added, the program
error (P172) will occur when the G10 L20 command is executed.
(15) The local coordinate system cannot be used during G54.1 modal. The program error (P438)
will occur when the G52 command is executed during G54.1 modal.
(16)A new workpiece coordinate system P1 can be set by commanding G92 in the G54.1 P1 mode.
However, the workpiece coordinate system of the other workpiece coordinate systems G54 to
G59, G54.1 and P2 to P96 will move in parallel with it, and a new workpiece coordinate system
will be set.
(17) The offset amount of the extended workpiece coordinate system is assigned to the variable
number as shown in Table 1.
CAUTION
If the workpiece coordinate system offset amount is changed during single block stop, the new
setting will be valid from the next block.
392
14. Coordinates System Setting Functions
14.11 Work coordinate system setting and offset
Example of program
(Example 1)
R#1
When the first reference point coordinate is zero, the basic machine coordinate
system zero point and reference (zero) point return position (#1) will coincide.
(Example 2)
(1) G28X0Y0 ;
(2) G90G00G53X0Y0 ;
(3) G54X-500 Y−500 ;
(4) G01G91X−500F 100 ;
(5) Y−500 ;
(6) X+500 ;
(7) Y+500 ;
(8) G90G00G55X0Y0 ; Reference (zero) point
(9) G01X−500 F200 ; return position (#1)
(10) X0Y−500 ;
(11) G90G28X0Y0 ; (1)
Present position
(2)
M
-X(G54) -1000 -500 (3) -500
(9) W2
-X(G55) (8) W1
- -1000
(5) (4) (7) 500
(10) (11) - -1500
(6)
1000
-Y -Y
(G55) (G54)
393
14. Coordinates System Setting Functions
14.11 Work coordinate system setting and offset
(Example 3) When work coordinate system G54 has shifted (−500, −500) in example 2 (It is
assumed that 3 through 10 in example 2 have been entered in subprogram 01111.)
(1) G28 X0 Y0 ;
(2) G90 G53 X0 Y0 ; (This is not required when there is no G53 offset.)
(3) G54 X Amount by which work coordinate system deviates
−500Y−500 ;
(4) G92 X0 Y0 ; New work coordinate system is set.
(5) M98 P1111 ;
W2 -Y
(G54)
-Y -Y
(G55) (G54')
-Y(G55')
-Y
(Note) The work coordinate system will shift each time steps 3 through 5 are
repeated. The reference point return (G28) command should therefore be
issued upon completion of the program.
394
14. Coordinates System Setting Functions
14.11 Work coordinate system setting and offset
(Example 4) When six workpieces are placed on the same coordinate system of G54 to G59, and
each is to be machined with the same machining.
395
900mm
500mm
100mm 0 M
-X
200mm
175
125 100mm
-X -X -X 75 50mm
G58 G56 G54 W1 50
W5 W3 75
175
1 125 200mm
2 4
3
500mm
14.11
(Workpiece 5) (Workpiece 3)
396
-Y -Y (Workpiece 1) -Y
-X -X -X
14. Coordinates System Setting Functions
-Y
Work coordinate system setting and offset
14. Coordinates System Setting Functions
14.11 Work coordinate system setting and offset
(Example 5) Program example when continuously using 48 sets of added workpiece coordinate
system offsets.
In this example, the offsets for each workpiece are set beforehand in P1 to P48 when
48 workpieces are fixed on a table, as shown in the drawing below.
P8 P6 P4 P2
P7 P5 P3 P1
397
14. Coordinates System Setting Functions
14.11 Work coordinate system setting and offset
(Example 6) Program example when the added workpiece coordinate system offsets are transferred
to the standard workpiece coordinate system offsets and used.
In this example, the workpiece coordinate system offsets for each workpiece are set
beforehand in P1 to P24 when the workpiece is fixed on a rotating table, as shown in the
drawing below.
P3
P20
P19 Y
P1 P2 Z
P21
P23
P22
P5 P6
P24
P4
X
B
O20000 (Main)
G28 XYZB ; Zero point return
G90 ; Absolute value mode
G00 B0 ; Position table to face 1
G65 P2001 A1 ; Load workpiece offsets
M98 P2002 ; Drilling
G00 B90. ; Position table to face 2
G65 P2001 A7 ;
M98 P2002 ;
G00 B180. ; Position table to face 3
G65 P2001 A13 ;
M98 P2002 ;
G00 B270. ; Position table to face 4
G65 P2001 A19 ;
M98 P2002 ;
G28 XYB ; Return to zero point
M02 ;
%
O2001 Transmission of workpiece offsets
#2=5221 ; Leading No. of workpiece coordinate system
variables
#3=(#1-1)∗20+7001 ; Leading No. of added workpiece coordinate
system variables
#5=0 ; No. of sets counter clear
WHILE [#5 LT 6] DO1 ; Check No. of sets
#6=#6+1 ; Set transmission source 1st axis variable No.
#7=#7+1 ; Set transmission destination 1st axis variable No.
#4=#4+1 ; Clear No. of axes counter
WHILE [#4 LT 6] DO2 ; Check No. of axes
#[#6]=#[#7] ; Transmit variable data
#6=#6+1 ; Set transmission source next axis
#7=#7+1 ; Set transmission destination next axis
#4=#4+1 ; No. of axes counter +1
END2 ;
#2=#2+20 ; Transmission source Set lead of next No. of sets
#3=#3+20 ; Transmission destination Set lead of next No. of
sets
#5=#5+1 ; No. of sets counter +1
END1 ;
M99 ;
%
398
14. Coordinates System Setting Functions
14.11 Work coordinate system setting and offset
O2002 (Drilling)
G54 M98 H100 ; Drilling in G54 coordinate system
G55 M98 H100 ; In G55
G56 M98 H100 ; In G56
G57 M98 H100 ; In G57
G58 M98 H100 ; In G58
G59 M98 H100 ; In G59
G28 Z0 ;
M99 ;
N100 G98 G81 X-20. Y-15. Z-150. R5. F40 ; Fixed cycle for Drilling call
X-25. Y-20. ;
X-20. Y-25. ;
X-15. Y-20. ;
G80 ;
G28 Z ;
M99 ;
%
399
14. Coordinates System Setting Functions
14.12 Local coordinate system setting
The local coordinate systems can be set independently on the G54 through G59 work coordinate
systems using the G52 command so that the commanded position serves as the programmed zero
point.
The G52 command can also be used instead of the G92 command to change the deviation
between the zero point in the machining program and the machining workpiece zero point.
Command format
Detailed description
(1) The G52 command is valid until a new G52 command is issued, and the tool does not move.
This command comes in handy for employing another coordinate system without changing the
zero point positions of the work coordinate systems (G54 to G59).
(2) The local coordinate system offset will be cleared by the dog-type manual reference (zero)
point return or reference (zero) point return performed after the power has been switched on.
(3) The local coordinate system is canceled by (G54 to G59) G52X0 Y0 Z0 α0 ;.
(4) Coordinate commands in the absolute value (G90) cause the tool to move to the local
coordinate system position.
(G91) G52X_Y_;
Incremental value
Ln
Local coordinate
Absolute value systems
Ln Absolute value
Ln (G90)
G52X_Y_;
Work coordinate
Wn(n=1 to 6) system
Reference point Work coordinate system offset
(Screen setting, G10 L2P_X_Y_ ;)
R
External work coordinate system offset
(Screen setting, G10 P0 X_Z_;)
M Machine coordinate system
(Note) If the program is executed repeatedly, the workpiece coordinate system will deviate each
time. Thus, when the program is completed, the reference point return operation must be
commanded.
400
14. Coordinates System Setting Functions
14.12 Local coordinate system setting
(Example 1) Local coordinates for absolute value mode (The local coordinate system offset is not
cumulated)
(8)
2500 (9)
(1) G28X0Y0 ;
(2) G00G90X1. Y1. ; (6)
(3) G92X0Y0 ; 2000
(5) (7)
(4) G00X500Y500 ; (4) Local coordinate
(5) G52X1. Y1. ; 1500 (3) [W1]L1 system created by (5).
(6) G00X0Y0 ; (2)
(7) G01X500F100 ; 1000
(8) Y500 ; (10) New coordinate system
(9) G52X0Y0 ; 500 [W1] created by (3)
(10) G00X0Y0 ; Matched with local
coordinate system by (9).
(1)
500 1000 1500 2000 2500 3000
R#1
W1 Current position X
(Example 2) Local coordinates for incremental value mode (The local coordinate system offset is
cumulated.)
401
14. Coordinates System Setting Functions
14.12 Local coordinate system setting
G54 G55
X 1000 1000 Workpiece coordinate system
Y 500 2000 (parameter setting value)
(1) G28X0Y0 ;
(2) G00G90G54X0Y0 ; Y 3000
(3) G52X500Y500 ;
(4) M98P200 ;
(5) G00G90G55X0Y0 ; 2500 (D)
(6) M98P200 ;
(B)
(7) G00G90G54X0Y0 ;
2000 G55
~
(C)
M02 ; (5) W2
(A) O200 ; 1500 (D)
(B) G00X0Y0 ;
(C) G01X500F100 ; (B)
1000
(D) Y500 ; Local coordinate system
(7) (C)
(E) M99 ; (3) created by (3)
(2) [W1] L1
% 500 G54
W1
1
500 1000 1500 2000 2500 3000
R#1
Current position X
(Explanation)
The local coordinate system is created at the G54 coordinate system (500,500)
position by (3), but the local coordinate system is not created for the G55 coordinate
system.
During the movement for (7), the axis moves to the G54 local coordinate system's
reference point (zero point).
The local coordinate system is canceled by G90G54G52X0Y0;.
402
14. Coordinates System Setting Functions
14.12 Local coordinate system setting
(Example 4) Combination of workpiece coordinate system G54 and multiple local coordinate
systems
G54
X 500 Workpiece coordinate offset
(1) G28X0Y0 ; Y 500 (parameter setting value)
(2) G00G90G54X0Y0 ;
(3) M98P300 ;
(4) G52X1. Y1. ;
3000
(5) M98P300 ;
(6) G52X2. Y2. ;
(7)
(7) M98P300 ; 2500
(8) G52X0Y0 ; Local coordinate system
[W1] L2 created by (6)
~
2000
M02 ;
(A) O300 ; (5)
(B) G00X0Y0 ; 1500
(C) G01X500F100 ; Local coordinate system
(D) Y500 ; [W1] L1
created by (4)
(E) X0Y0 ; 1000
(D)
(F) M99 ; (8)
% (2) (3)
500 G54
(E) (C)
(B) W1
(Explanation)
The local coordinate system is created at the G54 coordinate system (1000,1000)
position by (4).
The local coordinate system is created at the G54 coordinate system (2000,2000)
by (6).
The G54 coordinate system and local coordinate system are matched by (8).
403
14. Coordinates System Setting Functions
14.13 Workpiece coordinate system preset
(1) This function presets the workpiece coordinate system shifted with the program command
during manual operation to the workpiece coordinate system offset from the machine zero
point by the workpiece coordinate offset amount by the program command (G92.1).
(2) The set workpiece coordinate system will be shifted from the machine coordinate system
when the following type of operation or program command is executed.
• When manual interrupt is executed while manual absolute is OFF
• When movement command is issued in machine lock state
• When axis is moved with handle interrupt
• When operation is started with mirror image
• When local coordinate system is set with G52
• When workpiece coordinate system is shifted with G92
This function presets the shifted workpiece coordinate system to the workpiece coordinate
system offset from the machine zero point by the workpiece coordinate offset amount. This
takes place in the same manner as manual reference point return. Whether to preset the
relative coordinates or not can be selected with the parameters.
Command format
G92.1 X0 Y0 Z0 α0 ;
(G50.3)
α0 Additional axis
404
14. Coordinates System Setting Functions
14.13 Workpiece coordinate system preset
Detailed description
(1) Command the address of the axis to be preset. The axis will not be preset unless commanded.
(2) A program error (P35) will occur if a value other than "0" is commanded.
(3) This can be commanded in the following G code systems.
• G code system 2 to 7
• G code system 1 when the G code changeover parameter (#1267 ext3/bit0 = 1) is set.
(4) Depending on the G code system, the G code will be "G50.3".
(5) When manual operation is carried out when manual absolute is set to OFF, or if the axis is
moved with handle interrupt
Y Workpiece coordinate x
Present position after preset
Manual
movement Present position
amount Preset
W1’
Workpiece
coordinate y
after preset
W1
Workpiece coordinate X
zero point
W1 Workpiece coordinate X
Workpiece offset zero point
M Machine coordinate
zero point
If manual operation is carried out when manual absolute is set to OFF, or if the axis is moved
with handle interrupt, the workpiece coordinate system will be shifted by the manual
movement amount.
This function returns the shifted workpiece coordinate zero point W1' to the original workpiece
coordinate zero point W1, and sets the distance from W1 to the present position as the
workpiece coordinate system's present position.
405
14. Coordinates System Setting Functions
14.13 Workpiece coordinate system preset
Y Y
Movement amount Workpiece
during machine lock coordinate x
after preset
Workpiece coordinate Preset
system coordinate
Present position value
Present position
Workpiece
coordinate y
after preset
If the movement command is issued in the machine lock state, the present position will not
move, and only the workpiece coordinates will move.
This function returns the moved workpiece coordinates to the original present position, and
sets the distance from W1 to the present position as the workpiece coordinate system's
present position.
Workpiece
Y coordinate x Y
after preset
Present position Present position
Preset
Actual
operation Program command Workpiece
coordinate y
after preset
If operation is carried out with mirror image, only the NC internal coordinates are used as the
program command coordinates. The other coordinates are the present position coordinates.
This function sets the NC internal coordinates as the present position coordinates.
406
14. Coordinates System Setting Functions
14.13 Workpiece coordinate system preset
Y Y
Local coordinates x Workpiece
coordinate x
Present position after preset Present position
Preset
Local
coordinates y
L1
The local coordinate system is set with the G52 command, and the program commands, etc.,
are issued with the local coordinate system.
With this function, the set local coordinate system is canceled, and the program commands,
etc., use the workpiece coordinate system which has W1 as the zero point. The canceled local
coordinate system is only the selected workpiece coordinate system.
Y Y
Workpiece
Workpiece coordinate x
coordinates x Present position after preset Present position
Preset
Workpiece
W1’ coordinates y
The workpiece coordinate system shifts with the G92 command, and the distance between
W1' and the present position is set as the present position of the workpiece coordinate
system.
This function returns the shifted workpiece coordinate zero point to W1, and sets the distance
from W1 to the present position as the workpiece coordinate system's present position. This is
valid for all workpiece coordinate systems.
407
14. Coordinates System Setting Functions
14.13 Workpiece coordinate system preset
Example of program
The workpiece coordinate system shifted with G92 is preset with G92.1.
Y Y
(5)
(4) 1500
1500
(3) G92.1
(2) command 1000
1000 preset
Workpiece zero point
after G92 command
500 500
(1)
W1 500 1000 1500 X W1 500 1000 1500 X
Workpiece coordinate zero point (Unit: mm) Workpiece coordinate zero point (Unit: mm)
(Example)
G28 X0 Y0 ;...................... (1)
G00 G90 X1. Y1. ;............ (2)
G92 X0 Y0 ;...................... (3)
G00 X500 Y500 ;.............. (4)
G92.1 X0 Y0 ;................... (5)
Precautions
(1) Cancel tool radius compensation, tool length offset and tool position offset before using this
function. If these are not canceled, the workpiece coordinates will be at a position obtained by
subtracting the workpiece coordinate offset amount from the machine value. Thus, the
compensation vector will be temporarily canceled.
(2) This function cannot be executed while the program is being resumed.
(3) Do not command this function during the scaling, coordinate rotation or program mirror image
modes.
A program error (P34) will occur if commanded.
408
15. Measurement Support Functions
15.1 Automatic tool length measurement
These functions issue the command values from the measuring start position as far as the
measurement position, move the tool in the direction of the measurement position, stop the
machine once the tool has arrived at the sensor, cause the NC system to calculate automatically
the difference between the coordinate values at that time and the coordinate values of the
commanded measurement position and provide this difference as the tool offset amount.
When offset is already being applied to a tool, it moves the tool toward the measurement position
with the offset still applied, and if a further offset amount is generated as a result of the
measurement and calculation, it provides further compensation of the present offset amount.
If there is one type of offset amount at this time, and the offset amount is distinguished between
tool length offset amount and wear offset amount, the wear amount will be automatically
compensated.
Command format
G37Z__R__D__F__ ;
When R_, D_ of F_ is omitted, the value set in the parameter is used instead.
409
15. Measurement Support Functions
15.1 Automatic tool length measurement
Example of execution
-100
-200
F
-300 R
D
-400
-Z Instrument
H01=0 D
T01 ;
M06 T02 ;
G90 G00 G43 Z0 H01 ;
G37 Z-400 R200 D150 F1 ;
Coordinate value when measurement position is reached = -300
-300 - (-400) = 100
0+100 = 100 Where, H01 = 100
410
15. Measurement Support Functions
15.1 Automatic tool length measurement
Detailed description
Measurement
allowable range
D(d) D(d)
F(Fp)
Distance R(r)
Offset amount
Measuring
position Operation 1 Normal completion
Stop point Or no detection
Operation 2 Alarm stop (P607)
Sensor
output Operation 3
Alarm stop (P607)
(2) The sensor signal (measuring position arrival signal) is used in common with the skip signal.
(3) The feedrate will be 1mm/min if the F command and parameter measurement speed are 0.
(4) An updated offset amount is valid unless it is assigned from the following Z axis (measurement
axis) command of the G37 command.
(5) Excluding the corresponding values at the PLC side, the delay and fluctuations in the sensor
signal processing range from 0 to 0.2ms.
As a result, the measuring error shown below is caused.
1 0.2 (ms)
Maximum measuring error (mm) = Measuring speed (mm/min) • •
60 1000
(6) The machine position coordinates at that point in time are ready by sensor signal detection,
and the machine will overtravel and stop at a position equivalent to the servo droop.
Maximum overtravel (mm)
1 1
= Measuring speed (mm/min) • •
60 Position loop gain (s−1)
The standard position loop gain is 33 (s−1).
411
15. Measurement Support Functions
15.1 Automatic tool length measurement
Precautions
(1) Program error (P600) results if G37 is commanded when the automatic tool length
measurement function is not provided.
(2) Program error (P604) results when no axis has been commanded in the G37 block or when
two or more axes have been commanded.
(3) Program error (P605) results when the H code is commanded in the G37 block.
(4) Program error (P606) results when G43_H is not commanded prior to the G37 block.
(5) Program error (P607) results when the sensor signal was input outside the allowable
measuring range or when the sensor signal was not detected even upon arrival at the end
point.
(6) When a manual interrupt is applied while the tool is moving at the measuring speed, a return
must be made to the position prior to the interrupt and then operation must be resumed.
(7) The data commanded in G37 or the parameter setting data must meet the following
conditions:
| Measurement point − start point | > R command or parameter r
> D command or parameter d
(8) When the D command and parameter d in (7) above are zero, operation will be completed
normally only when the commanded measurement point and sensor signal detection point
coincide. Otherwise, program error (P607) will results.
(9) When the R and D commands as well as parameters r and d in (7) above are all zero, program
error (P607) will result regardless of whether the sensor signal is present or not after the tool
has been positioned at the commanded measurement point.
(10) The automatic tool length measurement command (G37) must be commanded together with
the G43H_ command that designates the offset No.
G43H_;
G37 Z_ R_ D_ F_;
412
15. Measurement Support Functions
15.2 Skip function
When the skip signal is input externally during linear interpolation based on the G31 command, the
machine feed is stopped immediately, the remaining distance is discarded and the command in the
following block is executed.
Command format
Detailed description
(1) If Ff is assigned as the federate in the same block as the G31 dommand block, command feed
f will apply; if it not assigned, the value set in the parameter “#1174 Skip_F” will serve as the
feedrate. In either case, the F modal will not be updated.
(2) The machine will not automatically accelerate and decelerate with the G31 block. The G31
maximum speed will depend on the machine specifications.
(3) Override is invalid with the G31 command and it is fixed at 100%. Dry run is also invalid. The
stop conditions (feed hold, interlock, override zero and stroke end) are valid. External
deceleration is also valid.
(4) The G31 command is unmodal and so it needs to be commanded each time.
(5) If the skip command is input during G31 command start, the G31 command will be completed
immediately.
When a skip signal has not been input until the G31 block completion, the G31 command will
also be completed upon completion of the movement commands.
(6) When the G31 command is issued during tool diameter compensation, program error (P608)
will result.
(7) When there is no F command in the G31 command and the parameter speed is also zero,
program error (P603) will result.
(8) With machine lock or with a command for the Z-axis only with the Z-axis cancel switch ON, the
skip signal will be ignored and execution will continue as far as the end of the block.
413
15. Measurement Support Functions
15.2 Skip function
Execution of G31
G01
G31
-200000
G01
G01
-300000
The coordinate positions for which the skip signal is input are stored in the system variables #5061
(1st axis) to #506n (n-th axis), so these can be used in the user macros.
~
414
15. Measurement Support Functions
15.2 Skip function
The amount of coasting from when the skip signal is input during the G31 command until the
machine stops differs according to the parameter "#1174 skip_F" or F command in G31.
The time to start deceleration to a stop after responding to the skip signal is short, so the machine
can be stopped precisely with a small coasting amount
F F F F
δ0 = 60 × Tp + 60 × ( t1 ± t2 ) = 60 × ( Tp + t1 ) ± 60 × t2
δ1 δ2
δ0 : Coasting amount (mm)
F : G31 skip speed (mm/min.)
Tp : Position loop time constant (s) = (position loop gain)−1
t1 : Response delay time (s) = (time taken from the detection to the arrival of the skip
signal at the controller via PC)
t2 : Response error time (0.001 s)
When G31 is used for calculation, the value calculated from the section indicated by δ1 in the
above equation can be compensated, however, δ2 results in calculation error.
Time (S)
t1 ± t2 Tp
The relationship between the coasting amount and speed when Tp is 30ms and t1 is 5ms is shown
in the following figure.
Tp = 0.03
0.050 t1 = 0.005
Max. value
Coasting amount δ (mm)
Average
0.040 Min. value
0.030
0.020
0.010
0 10 20 30 40 50 60 70
Feedrate F (mm/min)
415
15. Measurement Support Functions
15.2 Skip function
+1
0
60 Feedrate
-1
Measurement value comes within shaded
section.
416
15. Measurement Support Functions
15.2 Skip function
~
G31 X100. F100 ; Skip command
G04 ; Machine stop check
#101 = #5061 ; Skip signal input coordinate readout
#102 = #110∗#111/60 ; Coasting based on response delay time
#105 = #101−#102−#103 ; Skip signal input coordinates
~
417
15. Measurement Support Functions
15.3 Multi-stage skip function
The setting of combinations of skip signals to be input enables skipping under various conditions.
The actual skip operation is the same as with G31.
The G commands which can specify skipping are G31.1, G31.2, G31.3, and G04, and the
correspondence between the G commands and skip signals can be set by parameters.
Command format
G31.1 Xx Yy Zz αα Ff ;
Detailed description
(1) Feedrate G31.1 set with the parameter corresponds to "#1176 skip1f", G31.2 corresponds to
"#1178 skip2f", and G31.3 corresponds to "#1180 skip3f".
(2) A command is skipped if it meets the specified skip signal condition.
(3) The G31.n and G04 commands work the same as the G31 command for other than (1) and (2)
above.
(4) The feedrates corresponding to the G31.1, G31.2, and G31.3 commands can be set by
parameters.
(5) The skip conditions (logical sum of skip signals which have been set) corresponding to the
G31.1, G31.2, G31.3 and G04 commands can be set by parameters.
Parameter Valid skip signal
setting 1 2 3
1
2
3
4
5
6
7
(Skip when signal is input.)
418
15. Measurement Support Functions
15.3 Multi-stage skip function
Example of operation
(1) The multi-stage skip function enables the following control, thereby improving measurement
accuracy and shortening the time required for measurement.
Parameter settings :
Skip condition Skip speed
G31.1 :7 20.0mm/min (f1)
G31.2 :3 5.0mm/min (f2)
G31.3 :1 1.0mm/min (f3)
Program example :
N10G31.1 X200.0 ;
N20G31.2 X40.0 ;
N30G31.3 X1.0 ;
f Operation
(f1) N10
Measurement
distance
Skip speed
(f2) N20
(f3) N30
t
Input of skip signal 3
Input of skip signal 2
Input of skip signal 1
(Note 1) If skip signal 1 is input before skip signal 2 in the above operation, N20 is skipped at
that point and N30 is also ignored.
(2) If a skip signal with the condition set during G04 (dwell) is input, the remaining dwell time is
canceled and the following block is executed.
419
15. Measurement Support Functions
15.4 Multi-skip function 2
During linear interpolation, command operation is skipped if skip signal parameter Pp specified
with a skip command (G31), which indicates external skip signals 1 to 7, is met.
If multi-skip commands are issued simultaneously in different systems, both systems perform skip
operation simultaneously if the input skip signals are the same, or they perform skip operation
separately if the input skip signals are different. The skip operation is the same as with a normal
skip command (G31 without P parameter).
X1 X1
Skip signal 1 Skip signal 1
System 1
System 1
Z
Z
System 2
System 2
Skip signal 1 Skip signal 2
X2
X2
Same skip signals input in both systems 1 and
Different skip signals input in systems 1 and 2
2
If the skip condition specified by the parameter "#1173 dwlskp" (indicating external skip signals 1 to
7) is met during execution of a dwell command (G04), the remaining dwell time is canceled and the
following block is executed. Similarly, if the skip condition is met during revolution dwelling, the
remaining revolution is canceled and the following block is executed.
Command format
G31 Xx Zz αα Pp Ff ;
Xx Zz αα : Command format axis coordinate word and target coordinates
Pp : Skip signal parameter
Ff : Feedrate (mm/min)
420
15. Measurement Support Functions
15.4 Multi-skip function 2
Detailed description
(1) The skip is specified by command speed f. Note that the F modal is not updated.
(2) The skip signal is specified by skip signal parameter p. p can range from 1 to 127. If p is
specified outside the range, program error (P35) occurs.
Skip signal Valid skip signal
parameter P 7 6 5 4 3 2 1
1
2
3
4
5
6
7
8
~ ~ ~ ~ ~ ~ ~ ~ ~
~ ~ ~ ~ ~ ~ ~ ~ ~
125
126
127
(Skip when signal is input.)
(3) The specified skip signal command is a logical sum of the skip signals.
(Example)
G31 X100. P5 F100 ;
421
15. Measurement Support Functions
15.4 Multi-skip function 2
(4) If skip signal parameter Pp is not specified, the skip condition specified by the G31 parameter
works. If speed parameter Ff is not specified, the skip speed specified by the G31 parameter
works.
(5) If skip specification is effective and P is specified as an axis address, skip signal parameter P
is given priority and axis address P is ignored.
(Example)
G31 P500. F100 ;
(6) Those items other than (1) to (5) are the same with the ordinary skip function (G31 without P).
422
15. Measurement Support Functions
15.5 Speed change skip
When the skip signal is detected during linear interpolation by the skip command (G31), the
feedrate is changed.
Command format
Detailed description
(1) When the skip signal for which the feedrate fn≠0 is commanded, the speed is changed to the
command speed corresponding to the skip signal.
(2) When the skip signal for which the feedrate fn=0 is commanded, the movement is stopped.
The acceleration and deceleration time constant at the movement stop does not follow the
skip time constant, but the normal G31 skip.
After the movement is stopped, the remaining movement commands are canceled and the
following block executed.
(3) When the skip signal has not been input until the G31 block completion, the G31 command will
be also completed upon completion of the movement command.
(4) When the skip return is valid, the return operation by the skip signal detection is executed after
the movement is stopped.
(5) Even if the acceleration and deceleration with the inclination constant G1 (#1201 G1_acc) is
valid, the speed change skip will be the operation of the time constant acceleration and
deceleration.
(6) When the feedrate command (Fn=fn) is not specified after detecting the skip signal, the
normal G31 skip operation will be applied.
423
15. Measurement Support Functions
15.5 Speed change skip
(7) If the skip signal is input during the deceleration by the movement command completion, the
speed change will be ignored.
Speed
Skip signal 4
f Skip signal 3
f4
Skip signal 2 (Speed change) : Invalid
f3 Skip signal 1 (Movement stop) : Valid
f2
f1
0 Time
(8) The skip signal for which the feedrate is not commanded in the program is ignored.
(9) The speed change or the movement stop is performed when detecting the rising edge of the
skip signal. Note that if several rising edges are input at 3.5ms intervals or less, they maybe
judged the simultaneous input. When they are judged the simultaneous input, the smaller
value will be valid.
Speed
Skip signal 3 + Skip signal 4
f4 Skip signal 2
f3 Skip signal 1
f2
f1
0 Time
Skip signal 4
Skip signal 3
Skip signal 2
Skip signal 1
Time
424
15. Measurement Support Functions
15.5 Speed change skip
(10) If the G31 block is started with the skip signal input, that signal is considered to rise at the
same time as the block start.
(11) If the skip signals for changing the speed and for stopping the movement are simultaneously
input, the skip signal for stopping the movement will be valid regardless of the size of the
number.
(12) If the skip time constant "#2102 skip_tL" is illegal, the "Y51 PARAMETER ERROR 15" will
occur, and if the "#2103 skip_t1" is illegal, the "Y51 PARAMETER ERROR 16" will occur.
(13) The items other than (1) to (12) are the same with the G31 command.
Example of operation
Example of program
G31 X100. Ff F1=0 F2=f2 F3=f3 F4=f4 ;
Operation
Speed
Skip signal 4
f Skip signal 3
f4 Skip signal 2
f3 Skip signal 1
f2
f1
0 Time
425
15. Measurement Support Functions
15.6 Programmable current limitation
This function allows the current limit value of the servo axis to be changed to a desired value in the
program, and is used for the workpiece stopper, etc.
The commanded current limit value is designated with a ratio of the limit current to the rated
current.
Command format
G10 L14 X dn ;
(n is the skip signal 1 to 8)
L14 : Current limit value setting (+ side/– side)
X : Axis address
dn : Current limit value 1% to 300%
(1) If the current limit is reached when the current limit is valid, the current limit reached signal is
output.
(2) The following two modes can be used with external signals as the operation after the current
limit is reached.
• Normal mode
The movement command is executed in the current state.
During automatic operation, the movement command is executed to the end, and then the
next block is moved to with the droops still accumulated.
• Interlock mode
The movement command is blocked (internal interlock).
During automatic operation, the operation stops at the corresponding block, and the next
block is not moved to.
During manual operation, the following same direction commands are ignored.
(3) During the current limit, the droop generated by the current limit can be canceled with external
signals.
(Note that the axis must not be moving.)
(4) The setting range of the current limit value is 1% to 300%. Commands that exceed this range
will cause a program error (P35).
(5) If a decimal point is designated with the G10 command, only the integer will be valid.
(Example) G10 L14 X10.123 ; The current limit value will be set to 10%.
(6) For the axis name "C", the current limit value cannot be set from the program (G10 command).
To set from the program, set the axis address with an incremental axis name, or set the axis
name to one other than "C".
426
16. Machining mode
16.1 High-speed machining mode
This function runs a machining program that approximates a freely curved surface with fine
segments at high speed using the MELDAS 64 (M type). This is effective in increasing the speed of
machining dies of a freely curved surface.
High-accuracy machining can be realized by combined use of this function with the high-accuracy
control function.
This function requires the "High-speed machining mode III" specifications.
Command format
Example of program
427
16. Machining mode
16.1 High-speed machining mode
Detailed description
(1) The following G codes can be used in high-speed machining mode III.
G00, G01, G02, G03, G90, G91, G17, G18, G19
(2) It is possible to command only axis names, movement amounts (variables and calculating not
possible), and F commands I/J/K/R/P in high-speed machining mode III. (Comments can be
used.)
(3) Tape, MDI, and memory operation are all possible with the high-speed machining mode III.
(4) Override, maximum cutting speed clamp, single block operation, dry run, handle interrupt,
graphic trace, and high-accuracy control functions are valid even in the high-speed machining
mode III modal.
(5) Depending on the No. of characters in one block, the machining speed may decrease.
(6) When high-speed machining mode III is validated, absolute/incremental, G00 to G03, and F
command modal information are carried over.
(7) High-speed machining mode III commands are possible in a sub-program.
Program example
Main program Sub-program
01 O1000
• G05 P3 ; High-speed machining
• mode III ON
G61.1 ; •
M98 P1000 L100 ; •
• •
• •
• •
• G05 P0 ; High-speed machining
mode III OFF
M99 ;
M99 commands cannot be used in the high-speed machining mode III modal.
(A program error (P33) will occur.)
Always turn OFF the high-speed machining mode III before the M99 command.
428
16. Machining mode
16.1 High-speed machining mode
Restrictions
(1) This function requires the "High-speed machining mode III" specifications.
If G05 is commanded when there are no specifications, program error (P65) will occur.
(2) When machining with the high-speed machining mode III, the program path and actual path
may differ.
G01
Program path
G01
Actual path
G01
The actual path may move to an
G01 end point up to 4 fine segment
blocks ahead.
(3) Cancel tool radius compensation, tool length offset, G command mirror image, and program
coordinate rotation before commanding G05 P3. If these functions are not canceled, program
error (P34) will occur.
The modal information of the Modal Inform. screen will also change to the modal information
during the G05 P3 command.
The modal updated during the high-speed machining mode III modal is carried over even after
the high-speed machining mode III is canceled.
(4) The program error (P33) will occur if any command other than the following is carried out
during high-speed machining mode III modal: Axis names, absolute/incremental movement
amounts, F commands, G05 P0, G90/G91, G17/G18/G19, G00/G01/G02/G03, I/J/K/R/P
commands, or comments.
Change to the standard mode (G05 P0) before issuing commands other than those above.
(5) The optional block skip (/) cannot be used during high-speed machining mode III modal.
The program error (P33) will occur.
(6) The sequence No. (N) cannot be used during the high-speed machining mode III modal.
The program error (P33) will occur.
(7) The automatic operation process is prioritized during high-speed machining mode III modal,
so the monitor display, etc., may be delayed.
(8) The machine decelerates temporarily in the G05 P3 and G05 P0 command blocks, so turn the
machine ON/OFF at the places where the tool separates from the workpiece.
[Command]
G05 P3 ; X-577;Y-577;Z-577;G05 P0; · · · · · ·
[Speed]
(9) During high-speed machining mode operation by tape operation, the machining speed may be
suppressed due to the No. of characters in one block.
(10) If there is no P command in the G05 command block, a program error (P33) will occur.
(11) Decimal points are invalid in P commands.
(12) Program error (P35) will occur for commands other than P0/P3.
Note that program error (P39) will occur for P1/P2 commands.
(13) Variable commands and user macro cannot be used during high-speed machining mode III
modal.
(14) The high-speed machining mode III cannot be used when using the 2-part system. A program
error (P34) will occur.
(15) If an address other than G, P or N is commanded in the G5P3, G5P0 command block, a
program error (P33) will occur.
429
Appendix 1. Program Parameter Input N No. Correspondence Table
430
Appendix 1. Program Parameter Input N No. Correspondence Table
(Note) Convert the 0x00 to 0xFF data into a decimal before using.
431
Appendix 1. Program Parameter Input N No. Correspondence Table
432
Appendix 2. Program Error
P 10 EXCS. AXIS No. • Divide the alarm block command into two.
The number of axis addresses • Check the specifications.
commanded in the same block exceeds
the specifications.
P 11 AXIS ADR. ERROR • Revise the axis names in the program.
The axis address commanded by the
program and the axis address set by the
parameter do not match.
P 20 DIVISION ERROR • Check the program.
An axis command which cannot be
divided by the command unit has been
issued.
P 29 NOT ACCEPT CMND • Check the program.
The normal line control command
(G40.1, G41.1, G42.1) has been issued
during the modal in which the normal line
control is not acceptable.
P 30 PARITY H • Check the paper tape.
The number of holes per character on the • Check the tape puncher and tape reader.
paper tape is even for EIA code and odd
for ISO code.
P 31 PARITY V • Make the number of characters per block on
The number of characters per block on the paper tape even.
the paper tape is odd. • Set the parameter parity V selection OFF.
P 32 ADDRESS ERROR • Check and revise the program address.
An address not listed in the specifications • Check and correct the parameters values.
has been used. • Check the specifications.
P 33 FORMAT ERROR • Check the program.
The command format in the program is
not correct.
P 34 G-CODE ERROR • Check and correct the G code address in the
A G code not listed in the specifications program.
has been used.
An illegal G code was commanded
during the coordinate rotation command
(G68).
G51.2 or G50.2 was commanded when • Check the parameter setting values.
the rotary tool axis No. (#1501 polyax)
was set to “0”.
G51.2 or G50.2 was commanded when
the tool axis was set to the linear axis
(#1017 rot “0”).
433
Appendix 2. Program Error
434
Appendix 2. Program Error
435
Appendix 2. Program Error
436
Appendix 2. Program Error
P151 G2‚ 3 CMP. ERR • Issue the linear command (G01) or rapid
A compensation command (G40‚ G41‚ traverse command (G00) in the
G42‚ G43‚ G44‚ G46) has been issued in compensation command block or cancel
the arc mode (G02‚ G03). block.
(Set the modal to linear interpolation.)
P152 I.S.P NOTHING • Reconsider the program.
In interference block processing during
execution of a tool radius compensation
(G41 or G42) or nose R compensation
(G41‚ G42‚ or G46) command‚ the
intersection point after one block is
skipped cannot be determined.
P153 I.F ERROR • Reconsider the program.
An interference error has arisen while the
tool radius compensation command
(G41‚ G42) or nose R compensation
command (G41‚ G42‚ G46) was being
executed.
P155 F-CYC ERR (CC) • The radius compensation mode is
A fixed cycle command has been issued established when a fixed cycle command is
in the radius compensation mode. executed and so the radius compensation
cancel command (G40) should be issued.
P156 BOUND DIRECT • Change the vector to that with which the
At the start of G46 nose R compensation‚ compensation direction is defined.
the compensation direction is undefined • Exchange with a tool having a different tip
if this shift vector is used. point number.
P157 SIDE REVERSED • Change the G command to that which allows
During G46 nose R compensation‚ the inversion of the compensation direction (G00‚
compensation direction is inverted. G28‚ G30‚ G33‚ or G53).
• Exchange with a tool having a different tip
point number.
• Turn ON the #8106 G46 inversion error
avoidance parameter.
P158 ILLEGAL TIP P. • Change the tip point number to a legal one.
During G46 nose R compensation‚ the tip
point is illegal (other than 1 to 8).
P170 NO CORR. No. • Add the compensation number command to
The compensation number (DOO‚ TOO‚ the compensation command block.
HOO) command was not given when the • Check the number of compensation number
radius compensation (G41‚ G42‚ G43‚ sets a correct it to a compensation number
G46) command was issued. command within the permitted number of
Alternatively‚ the compensation number compensation sets.
is larger than the number of sets in the
specifications.
437
Appendix 2. Program Error
P172 G10 L-No. ERR • Check the address L-Number of the G10
(G10 L-number error) command and correct the number.
The L address command is not correct
when the G10 command is issued.
P173 G10 P-No. ERR • First check the number of compensation sets
(G10 compensation error) and then set the address P designation to
When the G10 command is issued‚ a within the permitted number of sets.
compensation number outside the
permitted number of sets in the
specifications has been commanded for
the compensation number command.
P177 LIFE COUNT ACT • The tool life management data cannot be
Registration of tool life management data registered when counting the used data. Turn
with G10 was attempted when the used the used data count valid signal OFF.
data count valid signal was ON.
P178 LIFE DATA OVER • Review the No. of registrations. The
The No. of registration groups‚ total No. maximum No. of registrations is shown
of registered tools or the No. of below.
registrations per group exceeded the System System 1 System 2
specifications range.
No. of groups 80 40/40
No. of tools 80 40/40
Per group 16
438
Appendix 2. Program Error
439
Appendix 2. Program Error
P203 CONF. ERR (MRC) • Check the fixed cycle for compound lathe I
The fixed cycle for compound lathe I (G70 to G73) shape program.
(G70 to G73) shape program could not
cut the work normally because it defined
an abnormal shape.
P204 VALUE ERR (MRC) • Check the fixed cycle for compound lathe
A command value of the fixed cycle for (G70 to G76) command value.
compound lathe (G70 to G76) is illegal.
P210 NO PAT CYC SPC • Check the specification.
A fixed cycle for compound lathe II (G74
to G76) command was input although it
was undefined in the specification.
P220 NO SPECIAL CYC • Check the specifications.
No special fixed cycle specifications are
available.
P221 NO HOLE (S_CYC) • Reconsider the program.
A 0 has been specified for the number of
holes in special fixed cycle mode.
P222 G36 ANGLE ERR • Reconsider the program.
A G36 command specifies 0 for angle
intervals.
P223 G12 G13 R ERR • Reconsider the program.
The radius value specified with a G12 or
G13 command is below the
compensation amount.
P224 NO G12‚ G13 SPC • Check the specifications.
There are no circular cutting
specifications.
P230 NESTING OVER • Check the number of subprogram calls and
• A subprogram has been called 4 or more correct the program so that it does not
times in succession from the subprogram. exceed 4 times.
• The program in the IC card contains the • When using the IC card, the IC card and the
M198 command. number of IC card program calls.
• The program in the IC card has been
called more than once (the program in the
IC card can be called only once at a time).
P231 NO N-NUMBER • Specify the sequence numbers in the call
At subprogram call time‚ the sequence block of the subprogram.
number set at return from the • When using an IC card, check the program
subprogram or specified by GOTO‚ was and its No. in the IC card.
not set.
P232 NO PROGRAM No. • Enter the subprogram.
The subprogram has not been found • Check the program number in the IC card.
when the subprogram is called.
440
Appendix 2. Program Error
441
Appendix 2. Program Error
442
Appendix 2. Program Error
P301 VAR NAME DUPLI • Correct the program so that the name is not
The name of the variable has been duplicated.
duplicated.
P350 NO SCALING SPC • Check the specifications.
The scaling command (G50, G51) when
the scaling specifications were not
available.
P360 NO PROG.MIRR. • Check the specifications.
A mirror image (G50.1 or G51.1)
command has been issued though the
programmable mirror image
specifications are not provided.
P370 NO OPOS MR SPC • Check the specifications.
The facing turret mirror image
specifications are not provided.
P371 MIRR ILLEGAL • Check the program.
Facing turret mirror image was • Check the parameters.
commanded to an axis for which external
mirror image or parameter mirror image
is valid.
Facing turret mirror image validating
mirror image for a rotary axis was
commanded.
P380 NO CORNER R/C • Check the specifications.
A command was issued for corner • Remove the corner chamfering/corner
chamfering/corner rounding though there rounding command from the program.
are no such specifications.
P381 NO ARC R/C SPC • Check the specifications.
Corner chamfering/corner rounding was
specified in the arc interpolation block
although corner chamfering/corner
rounding II is unsupported.
P382 CORNER NO MOVE • Replace the block succeeding the corner
The block next to corner chamfering/ chamfering/corner rounding command by
corner rounding is not a movement G01 command.
command.
P383 CORNER SHORT • Make the corner chamfering/corner rounding
In the corner chamfering/corner rounding less than the movement distance since this
command‚ the movement distance was distance is shorter than the corner chamfering/
shorter than the value in the corner corner rounding.
chamfering/corner rounding command.
P384 CORNER SHORT • Make the corner chamfering/corner rounding
When the corner chamfering/corner less than the movement distance since this
rounding command was input‚ the distance in the following block is shorter than
movement distance in the following block the corner chamfering/corner rounding.
was shorter than the length of the corner
chamfering/corner rounding.
443
Appendix 2. Program Error
444
Appendix 2. Program Error
445
Appendix 2. Program Error
446
Appendix 2. Program Error
447
Appendix 2. Program Error
448
Appendix 2. Program Error
449
Appendix 3. Order of G Function Command Priority
G09
Exact stop
check
G10 to G11 G10 to G11
are executed are executed
G10 is priority G10 is used
G10, G11 for axis for axis, so the G40 to G42 G43 to G49
selected plan are ignored are ignored
Program data No movement
axis will be the
setting I, J, K rotation basic axis.
input
G command
commanded
last is valid.
G17 to G19 Plane axis
Plane selection changeover
during
diameter
compensation
causes error
P112
450
Appendix 3. Order of G Function Command Priority
G Group 08
01 02 03 05 06 07
Commanded G43, G44,
G00 to G03 G17 to G19 G90, G91 G94, G95 G20, G21 G40 to G42
G code G49
G20, G21 Possible in
same block
Inch/metric
changeover
451
Appendix 3. Order of G Function Command Priority
G Group 19
09 10 12 13 14 17
Commanded G50.1
G73 to G89 G98, G99 G54 to G59 G61 to G64 G66 to G67 G96, G97
G code G51.1
Group 1 G66 to G67
command is are executed
During the arc
executed
G00 to G03.1 command, all
Group 9 is modals are axis names
G00 to G03.1 canceled updated become
Positioning/ mirror center
interpolation data
Movement
with mirror
shape
G04 is G04 is
executed executed
G04 is
G04 G73 to G89 executed G50.1 and
Dwell are ignored G51.1 are
Group 12 is
ignored
changed
G09
Exact stop
check
G10 to G11 G10 is G66 to G67 G10 to G11
are executed executed are executed are executed
G10, G11
G73 to G89 G54 to G59 G10 is G50.1 and
Program data are ignored modals are ignored G51.1 are
setting updated ignored
G17 to G19
Plane selection
452
Appendix 3. Order of G Function Command Priority
G Group 19
09 10 12 13 14 17
Commanded G50.1
G73 to G89 G98, G99 G54 to G59 G61 to G64 G66 to G67 G96, G97
G code G51.1
G20, G21
Inch/metric
changeover
G31 to G31.3
Skip
Group 1 G66 to G67
command is are executed
G33 executed
G33 modals is
Thread cutting Group 9 is updated
canceled
453
Appendix 3. Order of G Function Command Priority
G Group 01 08
02 03 05 06 07
Commanded G00 to G03.1 G43, G44,
G17 to G19 G90, G91 G94, G95 G20, G21 G40 to G42
G code G33 G49
Arc and G43,
G44 cause
G command
G43, G44, G49 error P70 commanded
Length last is valid.
compensation Arc and G43,
G44 cause
error P70
G50.1
G51.1
Program mirror
image
G52 is G52 is
G52 executed executed
Local G40 to G42 G43 to G49
coordinate are ignored are ignored
system
G53 is G53 is
G53 executed executed
Machine G40 to G42 G40 to G42
coordinate are ignored are ignored
system
G54 to G59
Workpiece
coordinate
system
G61 to G64
Mode selection
G65 is G65 is
executed executed
G65 G00 to G03.1 G43 to G49
Macro call modals are modals are
updated updated
454
Appendix 3. Order of G Function Command Priority
G Group 01 08
02 03 05 06 07
Commanded G00 to G03.1 G43, G44
G17, G19 G90, G92 G94, G95 G20, G21 G40 to G42
G code G33 G49
G66 to G67
are executed
G66 to G67
G00 to G03.1 are executed
G66 to G67
modals are
G43 to G49
Macro call updated
modals are
updated
G96, G97
Constant
surface speed
control
G98, G99
Initial point/ R
point return
455
Appendix 3. Order of G Function Command Priority
G Group 19
09 10 12 13 14 17
Commanded G50.1
G73 to G89 G98 to G99 G54 to G59 G61 to G65 G66 to G67 G96, G97
G code G51.1
G66 to G67
are executed
G43, G44, G49
G43 to G49
Length modals are
compensation updated
G52 is G52 is
G52 executed executed
G53 is
G53 executed
Machine G50.1
coordinate G51.1 is
system invalid
G command
G61 to G64 commanded
Mode selection last is valid.
456
Appendix 3. Order of G Function Command Priority
G Group 19
09 10 12 13 14 17
Commanded G50.1
G73 to G89 G98, G99 G54 to G59 G61 to G67 G66 to G67 G96, G97
G code G51.1
G66 to G67 G66 to G67 G command G66 to G67
are executed are executed commanded are executed
last is valid.
G73 to G89 G54 to G59 G50.1
G66 to G67 are ignored modals are
G51.1 is
Macro call updated
ignored
G command
commanded
last is valid.
G command G66 to G67
commanded are executed
G73 to G89 All axes
last is valid.
G73 to G89 become
Canned cycle are ignored mirror center
G90, G91
Absolute value/
incremental
value
G92 is
G92 executed
Note that G92
Coordinate G73 to G89 is priority for
system setting are ignored axis
G94, G95
Synchronous/
asynchronous
G96, G97 G command
commanded
Constant
last is valid.
surface speed
control
G command
G98, G99
commanded
Initial point/R last is valid.
point return
457
Revision History
Feb. 2002 BNP-B2182C The contents revised to correspond to M64AS, M64S, M65S and M66S.
Miswrite is corrected.
Design of the cover and the back cover were changed.
Manual name changed from "MELDAS 64/65 Programming Manual" to
"MELDAS 60/60S Series Programming Manual".
MODEL, MODEL CODE, and Manual No. were added on the back cover.
Mar. 2003 BNP-B2182D Revisions to comply with M60S Series Version B3.
May. 2004 BNP-B2182E Revisions to comply with M60S Series Version C0, C1.
Notice
Every effort has been made to keep up with software and hardware revisions in the
contents described in this manual. However, please understand that in some
unavoidable cases simultaneous revision is not possible.
Please contact your Mitsubishi Electric dealer with any questions or comments
regarding the use of this product.
Duplication Prohibited
This instruction manual may not be reproduced in any form, in part or in whole,
without written permission from Mitsubishi Electric Corporation.