CNC Programiranje
CNC Programiranje
CNC Programiranje
Other company and product names that appear in this manual are trademarks or
registered trademarks of the respective companies.
Introduction
This instruction manual mainly targets milling machines and machining centers. It is to
be used as a guide when using CNC MELDAS 600M Series fixed-format
high-performance contour control software.
This instruction manual describes the programming for all the models stated above, so
read this instruction manual thoroughly before using.
This manual has been written assuming that all functions have been provided in all of
the models stated above. However, not all options are provided with every CNC, so
always confirm functions, operations, etc., described in this manual with the
specifications issued by the machine manufacturer.
Thoroughly read the "Safety Precautions" given on the next page to ensure safe use of
this numerical control unit.
(1) This manual gives general explanations from the standpoint of the NC side.
For explanations concerning individual machine tools, refer to the instruction manual
issued by the machine manufacturer.
For items described as "Restrictions, "Usable State", etc., the instruction manual
issued by the machine manufacturer takes precedence over this manual.
(2) While every effort has been made to describe special handling in this manual, items
not described in this manual should be interrupted as "Not Possible".
(3) Refer to the following manual for details on the screen operations.
MELDAS M600M Series Instruction Manual ..... BNP-B2237
CAUTION
For items described as "Restrictions" or "Usable State" in this manual, the instruction
manual issued by the machine manufacturer takes precedence over this manual.
Matters not described in this instruction manual should be interpreted as "not possible".
This manual is written on the assumption that all option functions are added. Refer to
the specifications issued by the machine manufacturer before starting use.
Refer to the instruction manual issued by each machine manufacturer for details on
each machine tool.
Some screens and functions may differ or may not be usable depending on the NC
system version.
Precautions for Safety
Always read the specifications issued by the machine manufacturer, this manual, related
manuals and attached documents before installation, operation, programming, maintenance or
inspection to ensure correct use.
Understand this numerical control unit, 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
1. Items related to product and manual
For items described as "Restrictions" or "Usable State" in this manual, the instruction
manual issued by the machine manufacturer takes precedence over this manual.
Matters not described in this instruction manual should be interpreted as "not possible".
This manual is written on the assumption that all option functions are added. Refer to the
specifications issued by the machine manufacturer before starting use.
Refer to the instruction manual issued by each machine manufacturer for details on
each machine tool.
Some screens and functions may differ or may not be usable depending on the NC
system version.
2. Items related to programming
Because of key chattering etc., during editing, the commands with no value after G
become a "G00" operation during running.
";", "EOB" and "%" "EOR" are expressions used for the explanation. The actual codes
are "line feed" and "%" for ISO, and "EOB" (End of Block) and "EOR" (End of Record)
for EIA.
Do not change fixed cycle programs without the prior approval of the machine
manufacturer.
CONTENTS
1. OUTLINE OF NC PROGRAM................................................................................................1
1.1 Program Format ...........................................................................................................1
1.2 Word and Address........................................................................................................1
1.3 Block.............................................................................................................................1
1.4 End of Block .................................................................................................................3
1.5 Modal and Unmodal Commands..................................................................................3
3. OUTLINE OF PROGRAMMING.............................................................................................8
3.1 Program to Specify the Movement of Tools along the Machining Workpiece
Shape ..........................................................................................................................8
3.2 Program to Command the Feed of a Tool at the Designated Rate to Cut a
Workpiece....................................................................................................................9
3.3 Program to Command Various Machine Operations such as Spindle Rotation
and Stop and Coolant ON/OFF ...................................................................................9
3.4 Program to Command the Spindle Rotation Speed ...................................................10
3.5 Program to Select an Appropriate Tool for Workpiece Machining .............................10
3.6 Configuration of Program ...........................................................................................11
3.7 Other Programming Notes .........................................................................................12
3.8 Coordinate Systems and Coordinate Zero Point Symbols .........................................12
3.9 Optional Block Skip (Block delete) .............................................................................13
7. FEED FUNCTIONS..............................................................................................................46
7.1 Rapid Traverse Rate ..................................................................................................46
7.2 Cutting Feedrate.........................................................................................................47
7.3 Feed per Minute; G94 ................................................................................................49
7.4 Feed per Rotation; G95..............................................................................................50
7.5 Inverse Time Feed; G93.............................................................................................51
i
7.6 Synchronized Tapping; ,R/,H .....................................................................................53
7.7 Dwell (Time designation); (G94) G04.........................................................................62
7.8 Dwell (Rotation designation); (G95) G04 ...................................................................63
7.9 F1-digit Feed ..............................................................................................................64
ii
13. PROGRAMMING SUPPORT FUNCTIONS .....................................................................151
13.1 High-speed Machining Mode; G05.........................................................................151
13.2 Subprogram Control; M98/M99 ..............................................................................153
13.3 Fixed Cycle; G80 to G89/G73/G74/G76.................................................................155
13.3.1 Outline ...........................................................................................................155
13.3.2 Command format...........................................................................................155
13.3.3 Description of operation ................................................................................157
13.3.4 Detailed description.......................................................................................159
13.3.5 Description of each command.......................................................................160
13.4 Corner Chamfering, Corner R; ,C/,R ......................................................................169
13.4.1 Outline ...........................................................................................................169
13.4.2 Corner chamfering.........................................................................................169
13.4.3 Corner R........................................................................................................171
13.4.4 Corner chamfering/corner R speed E designation ........................................173
13.5 Mirror Image; G50.1/G51.1 ....................................................................................174
13.5.1 Outline ...........................................................................................................174
13.5.2 External switch mirror image and parameter set mirror image......................174
13.5.3 G command mirror image..............................................................................175
13.6 Variable Commands...............................................................................................177
13.6.1 Outline ...........................................................................................................177
13.6.2 Detailed description.......................................................................................177
13.7 User Macro Specifications......................................................................................179
13.7.1 User macro commands .................................................................................179
13.7.2 Macro call instruction.....................................................................................180
13.7.3 Variables .......................................................................................................189
13.7.4 Types of variables .........................................................................................191
13.7.5 Arithmetic commands ....................................................................................212
13.7.6 Control commands ........................................................................................216
13.7.7 External output commands............................................................................219
13.7.8 Checkpoints...................................................................................................221
13.7.9 Actual examples of using user macros..........................................................223
13.8 Linear Angle Command..........................................................................................227
13.9 Geometric Command .............................................................................................228
13.10 Pattern Rotation; M98 l_J_...................................................................................229
13.11 Program Coordinate Rotation; G68/G69 ..............................................................231
13.12 Parameter Coordinate Rotation............................................................................233
13.13 Special Fixed Cycles; G34/G35/G36/G37.1.........................................................235
13.14 Circular Cutting; G12/G13 ....................................................................................240
13.15 Scaling; G50/G51 .................................................................................................241
13.16 Normal Line Control; G40.1/G41.1/G42.1 ............................................................244
13.17 Macro Interrupt; M96/M97 ....................................................................................249
13.18 Three-dimensional Coordinate Conversion Function; G68/G69 ..........................253
13.19 Cutting Mode; G64 ...............................................................................................269
13.20 Automatic Corner Override; G62..........................................................................270
13.21 High-accuracy Control; G61.1 ..............................................................................271
13.22 High-accuracy Control for Die Machining; G61.2/G61.3 ......................................276
13.23 High-accuracy Control for Part Machining; G61.5................................................279
13.24 Program Parameter Input; G10L70/G11 ..............................................................281
13.25 Program Compensation Input; G10......................................................................282
13.26 N Number Single Command Skip ........................................................................284
iii
15. PROTECTION FUNCTIONS ............................................................................................294
15.1 Pre-movement Stroke Check; G22/G23.................................................................294
iv
1. OUTLINE OF NC PROGRAM
1.1 Program Format
1. OUTLINE OF NC PROGRAM
Word data
End of block (EOB)
N001 G00 X123.4 M03 S1000 ;
Address
Therefore, each word data is the basic element of the NC program and the series of these word data
forms the program that performs actual workpiece cutting.
The word data that are represented by the addresses G, M, S and T are called G code, M code, S
code and T code, respectively. Table 1 lists the specified number of digits of each word data.
1.3 Block
To cause the machine to make a necessary movement, generally, it is required to specify a line of
statement (control information) that is configured of multiple word data continuously. This line of
statement is called "block" (or 1 block).
A block is a self-sufficient program and the series of these blocks constitutes the machining program
(or NC program) used in the actual cutting.
1
1. OUTLINE OF NC PROGRAM
1.3 Block
B' is internal sub-micrometric system (unit of display/setting is one micron, and an internal unit of
processing is 0.1 microns). Please inquire to the machine manufacturer whether the machine of your
use is an internal sub-micrometric system.
(Note 1) "" indicates the U, V, W, A or B additional axis address.
(Note 2) This format is the same for every numerical value input made from the tape, memory, MDI
or the setting and display unit.
(Note 3) Excluding tool compensation numbers, all leading zeros in numbers can be omitted.
(Note 4) Program numbers are commanded in independent blocks. Command them in the head
block of each program.
(Note 5) The significance of the abbreviations used are as follows.
Example 1) O8 : 8-digit program number
Example 2) G21 : Address G has two digits to the left of the decimal point and one digit
to the right.
Example 3) X+53 : Address X has a "+" or "-" sign and five digits to the left of the decimal
point and three digits to the right.
2
1. OUTLINE OF NC PROGRAM
1.4 End of Block
The example given below is a case where the X axis is positioned (G00) at the 45.123mm
position in the absolute value (G90) mode.
G00X45 123 ;
Three digits below decimal point
This denotes 5 digits above decimal point. However, since the
actual value is "+00045", the leading zeros and "+" sign are omitted.
G0 may be applicable instead.
3
2. BASIC CONCEPT FOR PROGRAMMING
2.1 Control Axis and Axis Name
4
2. BASIC CONCEPT FOR PROGRAMMING
2.2 Minimum Program Unit and Minimum Movement Amount
Spindle head
Z+
Z
Tool magazine
Tool
Y+
X+
Table
X
5
2. BASIC CONCEPT FOR PROGRAMMING
2.2 Minimum Program Unit and Minimum Movement Amount
Table 2 Input command unit type and the type of minimum movement
amount
Linear axis
Rotating
Type Metric command Inch command axis ()
(mm) (inch)
CS-A 0.01 0.001 0.01
Input command
CS-B 0.001 0.0001 0.001
unit
CS-C 0.0001 0.00001 0.0001
(Note 1) The metric/inch command can be changed over by the parameters of CNC unit
and by the G command (G20/G21).
(Note 2) The metric/inch command cannot be used simultaneously.
[Example of designating by the 0.1m system] (This is especially called submicrometer command.)
Refer to the instruction manual of machine manufacturer for details of the actual setting unit.
6
2. BASIC CONCEPT FOR PROGRAMMING
2.3 Incremental Value Command and Absolute Value Command
2.4 Reference Point (machine zero point position) and Zero Point Return
For each control axis of the machine, a specific machine position is specified as the reference point of
the machine coordinate system. This machine position is called reference point (or machine zero point
position). The reference point has the important role of being the reference point when changing the
coordinate system of the machining program or the tool as well as when setting the tool offset amount.
Most CNC machine tool are equipped with the function to automatically return to the zero point
position by the program or by manual operation. This is called zero point return.
Refer to the instruction manual of machine manufacturer for the reference point position of each axis.
If the operation is to be restarted after the NC power has been turned OFF or after emergency stop,
the return to the zero point return is performed. (Except in the case where the absolute position
detection function is provided.)
7
3. OUTLINE OF PROGRAMMING
3.1 Program to Specify the Movement of Tools along the Machining Workpiece Shape
3. OUTLINE OF PROGRAMMING
3.1 Program to Specify the Movement of Tools along the Machining Workpiece
Shape
The shape of all machining workpieces is configured of combinations of lines and arcs. Therefore, the
program commands (Note 1) are divided into two groups; commands that move the tool along the line
and commands that move the tool along the arc. But, in the actual machining, commands to traverse
the table to the specified position at a higher speed are needed in addition to the commands that
move the tool along the shape.
8
3. OUTLINE OF PROGRAMMING
3.2 Program to Command the Feed of a Tool at the Designated Rate to Cut a Workpiece
(Note 1) In the actual machine, the table may move while the tool may not. This manual assumes the
tool moves to the workpiece. There is no difference in programming.
(Note 2) The leading zeros of the numeric value data that follow the address such as G00, G01 and
G02 can be omitted. The data can be represented as G0, G1 and G2.
The function to move the tool along the linear or the arc is called interpolating function and the
function to traverse the tool at a high rate is called positioning or rapid traverse function.
The G codes such as G00, G01, G02 and G03 are called preparation function (or G function) and
there are many kinds of G functions. Refer to Section "6. POSITIONING AND INTERPOLATION
FUNCTIONS" for details.
3.2 Program to Command the Feed of a Tool at the Designated Rate to Cut a
Workpiece
To cut a workpiece, the feedrate of a tool should be considered according to the material or tool used.
The function to designate the feedrate is called feed function (or F function). The feedrate is
designated by numeric values.
For example, command F200.0 (or F200.) to feed a tool at 200mm per minute.
F mm/min. Tool
Workpiece
Machining table
The F command is usually designated for the same block as the interpolation function such as G01
but it can be designated singly.
As this is one of the modal commands, it needs not be designated for each block until the feedrate
needs to be changed. This applies to all interpolation functions (G01, G02, G03).
Refer to Section "7. FEED FUNCTIONS" for details.
9
3. OUTLINE OF PROGRAMMING
3.4 Program to Command the Spindle Rotation Speed
10
3. OUTLINE OF PROGRAMMING
3.6 Configuration of Program
The sequence number designated at the head of each block is commanded by the maximum 5-digit
numeric value following the address N. This is displayed on the screen while executing the program. It
can be used to monitor the machining program execution states or to call a specific process of the
machining program (program search).
The sequence number does not show the order in which the commands are executed. The program is
executed according to the order of the block written in the program. (The command in the block is
executed simultaneously.) The sequence number does not need to be commanded for each block.
There is no influence on the machining even if it is not commanded at all.
The words which are not needed for block operation (G, X, Y, Z, ... F) can be omitted.
The machining program is generally configured as follows.
The EOB ( ; ) at the head of the program is followed by the program number and each block for
machining, and the program end code of M02 or M30 is written at the end of the program.
The program number (maximum 8-digit numeric value following the address O) is displayed on the
screen in the same way as the sequence number. By controlling this number, it is possible to know
what machining program is being executed. This also used to select the program necessary for the
machining when some kinds of machining program are stored in the memory of the CNC unit.
The program number should be designated for each machining program. The same number cannot
be used twice. The block number is automatically assigned by the CNC, and need not be designated
when programming. This is cleared to zero each time a new program number or sequence number is
read, or counted up each time one block is read. If the count reaches 99999, it is cleared to zero and
the counting starts again. The block number is displayed on the screen as in the same way as the
sequence number.
11
3. OUTLINE OF PROGRAMMING
3.7 Other Programming Notes
Workpiece
Machining table
Therefore, this software is provided with the following tool offset functions so that programmers may
write programs without considering the deviation.
1) Tool radius compensation function
2) Tool length offset function
These functions allow to register the radius and the length of a tool in the memory (offset memory) of the
CNC unit and automatically compensate for the tool displacement due to the tool diameter and the tool
length when the dedicated G code and the registration number are designated.
Refer to Section "11. TOOL COMPENSATION" for details.
:Reference point
12
3. OUTLINE OF PROGRAMMING
3.9 Optional Block Skip (Block delete)
13
4. POSITION COMMAND
4.1 Absolute/Incremental Command; G90/G91
4. POSITION COMMAND
4.1 Absolute/Incremental Command; G90/G91
When issuing the axis coordinate data with the machining program commands, the
incremental command method (G91) to command the relative distance from the current
position, or the absolute command method (G90) to move to the designated position of the
predetermined coordinate system can be selected.
1) Command format
G90 Absolute command (Absolute value command)
G91 Incremental command (Incremental value command)
2) Combined use of absolute and incremental commands in the same block is possible. The
changeover is carried out with G90 or G91.
Note that the arc radius designation (R) is an incremental command.
The arc center designation (I, J, K) can be changed by the parameters so it is fixed to
incremental designation or so that it follows the G90 and G91 modal.
3) Figure description
End point
Y100. Y100.
Y100.
14
4. POSITION COMMAND
4.2 Inch/Metric Changeover; G20/G21
Inch/metric
Target Remarks
changeover
Input unit Parameters (excluding some) Automatic conversion at
changeover Tool compensation amount parameter changeover
(parameters) Workpiece offset (mm fixed internally).
Machining program command Restart necessary.
Position display
Output unit Parameters (those depending No automatic changeover.
changeover on ball screws) Restart necessary.
(parameters)
G20/G21 Machining program command
only
G20 ;
Metric command
G21 ;
15
4. POSITION COMMAND
4.3 Decimal Point Input I, II
(b) The two types of handling of command values for data with no decimal points are Decimal
point input: Type 1 and Type 2. The type is selected by the parameters.
1) Decimal point input: Type 1 (When control parameter "Decimal point type 2" is OFF.)
When the axis coordinates, etc., data is issued in the machining program command, the
program data designation can be simplified by using decimal point input. The least digit of
commands not using a decimal point becomes the minimum setting unit.
Besides the axis coordinate value, other addresses in which this input type can be used are
speed commands and dwell commands.
The decimal point position is a mm unit during metric mode, an inch unit during inch mode
and a second unit during dwell time setting. For the rotation axis, the decimal point position
is a degree, regardless of metric or inch mode.
2) Decimal point input: Type 2 (When control parameter "Decimal point type 2" is ON.)
Type 2 is different from Type 1. When there is no decimal point, the last digit is a mm unit
during metric mode, an inch unit during inch mode, and a second unit in time setting.
Always designate a "." (point) when commands below the decimal point are necessary.
(c) The valid addresses of the decimal point command are XYZUVWABCDIJKEFGPQR. Refer to
the list for details.
(d) The decimal point command is valid even for commands defining the variable data used in
subprograms.
(e) Decimal point commands for decimal point invalid addresses are processed as integer data
only and everything below the decimal point is ignored. Decimal point invalid addresses are
HLMNOS T.
All variable commands, however, are handled as data with decimal points.
16
4. POSITION COMMAND
4.3 Decimal Point Input I, II
Decimal
Address point Application Remarks
command
A Valid Coordinate position data
Invalid Miscellaneous function code
Valid Geometric linear angle data
Invalid Rotation table
Invalid Program parameter input
(axis number/spindle number)
B Valid Coordinate position data
Invalid Miscellaneous function code
C Valid Coordinate position data
Invalid Miscellaneous function code
Valid Corner chamfering amount ,C
Invalid Offset number
D
(tool position, tool radius compensation)
Valid Automatic tool length measurement,
deceleration range d
Valid Program parameter input
Invalid Subprogram storage device No. ,D
E Valid Inch threads, Precision thread lead
F Valid Feedrate
Valid Thread lead
G Valid Preparatory function code
H Invalid Sequence number in subprograms
Invalid Offset number
(tool position, tool length offset)
I Valid Circular center coordinate
Valid Tool radius compensation vector component
Valid Special fixed cycle, hole pitch
J Valid Circular center coordinate
Valid Tool radius compensation vector component
Valid Special fixed cycle, hole pitch and angle
17
4. POSITION COMMAND
4.3 Decimal Point Input I, II
Decimal
Address point Application Remarks
command
K Valid Circular center coordinate
Valid Tool radius compensation vector component
Invalid Special fixed cycle, number of holes
Invalid Fixed cycle, number of repetitions
L Invalid Subprogram, number of repetitions
Invalid Fixed cycle, number of repetitions
Invalid Program tool compensation input type selection L2, L10, L11
Invalid Program parameter input L70
M Invalid Miscellaneous function code
N Invalid Sequence number
Invalid Program parameter input, data number
O Invalid Program number
P Valid/Invalid Dwell time Parameter
Invalid Subprogram call program number
Invalid Program tool compensation input,
compensation number
Invalid Special fixed cycle, number of holes
Invalid Helical number of pitches
Valid Scaling magnification
Invalid High-speed mode type
Invalid 2nd reference point number
Invalid Program parameter input,
broad classification number
Invalid Return sequence number from subprogram
Q Valid Deep hole drilling cycle, cut amount
Valid Back boring shift amount
Valid Fine boring shift amount
18
4. POSITION COMMAND
4.3 Decimal Point Input I, II
Decimal
Address point Application Remarks
command
R Valid R-designated arc radius
Valid Corner R arc radius ,R
Valid Program tool compensation input,
compensation amount
Valid Fixed cycle R point
Invalid Synchronous tap/asynchronous tap changeover
Valid Automatic tool length measurement,
deceleration range r
S Invalid Spindle function code
T Invalid Tool function code
U Valid Coordinate position data
Invalid 2nd miscellaneous function code
V Valid Coordinate position data
Invalid 2nd miscellaneous function code
W Valid Coordinate position data
Invalid 2nd miscellaneous function code
X Valid Coordinate position data
Valid Dwell time
Valid Program tool compensation input
Y Valid Coordinate position data
Valid Program tool compensation input
Z Valid Coordinate position data
Valid Program tool compensation input
19
4. POSITION COMMAND
4.4 Command Value and Setting Value Range
B' is internal sub-micrometric system (unit of display/setting is one micron, and an internal unit of
processing is 0.1 microns). Please inquire to the machine manufacturer whether the machine of your
use is an internal sub-micrometric system.
20
4. POSITION COMMAND
4.4 Command Value and Setting Value Range
21
5. PREPARATORY FUNCTIONS
5.1 List of G Commands
5. PREPARATORY FUNCTIONS
5.1 List of G Commands
Refer- Refer-
G code Group Function G code Group Function
ence ence
00 01 Positioning 6.1 31.3 00 Multi-step skip 3 14.2
02.1 01 Spiral interpolation CW 6.8 34 00 Special fixed cycle (bolt hole circle) 13.13
17 02 Plane selection X-Y 12.8 47 00 Tool position offset 2-fold increase 11.6
18 02 Plane selection Z-X 12.8 48 00 Tool position offset 2-fold decrease 11.6
22 04 Stroke check before movement ON 15.1 50.1 19 Mirror image cancel 13.5
23 04 Stroke check before movement OFF 15.1 51.1 19 Mirror image ON 13.5
30 00 2nd to 4th reference point return 12.10 58 12 Workpiece coordinate system 5 selection 12.3
22
5. PREPARATORY FUNCTIONS
5.1 List of G Commands
Refer- Refer-
G code Group Function G code Group Function
ence ence
61 13 Exact stop check mode 90 03 Absolute value command 4.1
65 00 User macro Simple call 13.7 99 10 Fixed cycle R point level return 13.3
66 14 User macro Modal call A 13.7
23
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.1 Positioning; G00
G00 Xx1 Yy1 Zz1 ; (simultaneously with additional axis A, B, C, U, V and W also possible)
(x1, y1, z1 are numerical values indicating position data)
Positioning operation at the rapid traverse rate is carried out by the commands above. The path
takes the shortest distance in a straight line toward the end point.
Refer to the section on "Rapid traverse rate" for details on the NC rapid traverse rate.
Because the actual rapid traverse rate differs according to the machine, refer to the machine
specifications.
(Example) (Example)
Interpolation type (movement in a straight Non-interpolation type (each axis moves at
line to the end point) the rate of the respective parameter)
100.
100.
24
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.2 Unidirectional Positioning; G60
G60 Xx1 Yy1 Zz1 ; (simultaneously with additional axis A, B, C, U, V and W also possible)
(x1, y1, z1 are numerical values indicating position data)
With the above command, the tool moves by rapid traverse rate from the final position to a position
separated only by the unidirectional positioning shift amount (parameter setting), and then moves
further to the final position and completes the positioning.
Refer to the section on "Rapid traverse rate" for details on the NC rapid traverse rate.
Because the actual rapid traverse rate differs according to the machine, refer to the machine
specifications.
25
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.2 Unidirectional Positioning; G60
(m) During high-accuracy control, the unidirectional positioning operation is also carried out with
acceleration/deceleration before interpolation.
(Example)
1. Each of the axis rapid traverse
G60 G91 X100. Y100. ; rates is a value set in the
parameters as the G00 speed.
Endpoint
point
End 2. The vector speed to the middle
point is a value composed of the
respective speeds and distances.
3. The unidirectional positioning
shift amount of the distance
Y100.
between the middle point and end
point is set independently for
Current position each axis in the parameters.
Current position
X100.
(4) Notes
(a) The program error "PR0061" will occur if G60 is commanded in an NC not provided with this
specification.
26
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.3 Linear Interpolation; G01
G01 Xx1 Yy1 Zz1 Ff1 ; (simultaneously with additional axis A, B, C, U, V and W also
possible)
(x1, y1, z1 are numerical values indicating position data, f1 is a
numerical value indicating speed data.)
Linear interpolation is carried out by the commands above at the f1 speed. The path takes the
shortest distance in a straight line toward the end point.
The NC f1 command value is a maximum 480m/min (when the input unit is 0.001mm), however
this will differ according to the machine, so refer to the machine specifications.
(Example)
G01 G91 X100. Y100. F120 ; 1. The cutting feedrate becomes the
Y End point command to the vector direction.
2. The composite speed of each axis
becomes the proportional allocation
Feedrate of the respective command values.
120mm/min
100.
(85mm/min)
(d) The number of axes that can be simultaneously commanded depends on the specifications
(number of simultaneous control axes). Axis combination within that range is random.
(e) The feedrate is controlled so as not to exceed the cutting feedrate clamp.
If linear axis and rotation axis are commanded in the same block, this is regarded as a linear
axis using degree () (1 = 1mm) units, and linear interpolation is carried out.
(4) Notes
(a) The program error (PR0062) will occur if an F command is not issued in the first G01
command.
27
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.4 Circular Interpolation (designating center/radius); G02/G03
G02/G03 Xx1 Yy1 Ii1 Jj1 Ff1 ; (additional axis A, B, C, U, V and W possible)
Arc rotation End point Arc center Feedrate
direction coordinate value
value
2) Circular interpolation operations are carried out at the f1 rate by the commands above. The
path is toward the end point, following an 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.
28
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.4 Circular Interpolation (designating center/radius); G02/G03
5) (Example) Examples of a 1/4 circle, half circle, 3/4 circle and perfect circle are given.
6)
(1) G02 X100. Y100. I100. End point (3) G02 X100. Y-100. I100. End point
1/4 circle 3/4 circle
Y100.
X100.
I100.
X100. Y-100.
Start point Start point
I100.
(2) G02 X200. Y0. I100. End point (4) G02 X0 Y0 I100. End point
Half circle Perfect circle
X200.
X0 Y0
I100. I100.
Start point Start point
a. The axes that can be simultaneously commanded are the two axes of the selected
plane.
b. The feedrate is constantly controlled to be a rate that follows the circumference.
c. Circular interpolation can be commanded within a 360 rotation.
d. The maximum radius value can be designated up to six digits above the decimal point.
29
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.4 Circular Interpolation (designating center/radius); G02/G03
2)
a. The arc rotation direction is designated by G02 or G03.
b. The arc plane is designated by G17, G18 and G19.
The arc plane always follows G17, G18 and G19. The alarm (PR0070) occurs if two
addresses that do not match the plane are commanded.
c. The arc center is on the perpendicular line that bisects the line segment connecting the
start and end points. The intersection of the arc center and the designated radius circle
that has the start point as its center is the center coordinate of the arc command.
d. The symbol of the command program R value is an arc command of 180 or less for the
plus direction, and an arc command exceeding 180 for the minus direction.
(Example 1) (Example 2)
G02 G91 X100. Y100. R100. F120 ; G02 G91 X100. Y100. R-100. F120 ;
Y Y
Arc end point
Feedrate Arc end point
coordinates
120mm/min coordinates
(X, Y)
(X, Y)
R100.
Feedrate
120mm/min
Current position (Arc start point) Current position (Arc start point)
X X
The axes that can be simultaneously commanded are the two axes of the selected plane.
The feedrate is constantly controlled to be a speed that follows the circumference.
The following conditions are necessary in R-designated circular interpolation commands.
L/2 r
3) Notes
a. When R-designation and I, J and K designation are simultaneously designated in the
same block, arc command by the R designation is given priority.
b. For perfect circle commands (start point and end point match), if an R-designated arc
command is issued, it is instantly completed and there is no operation. Therefore, use I,
J and K designation arc commands.
c. When the R command, and the I, J and K commands are omitted from the arc block, the
program error "PR0071 Can't calculate arc center" will occur.
By setting the parameter (#110136 CIR to G1 no CENT OP), linear interpolation can be
applied up to only the end point coordinate value of that block. Note that the modal is an
arc modal.
30
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.5 Hypothetical Axis Interpolation; G07
The designation of the axis to carry out axis command cancel is applicable to all of the NC axes.
To carry out hypothetical axis interpolation, it is necessary to combine and add helical
interpolation.
31
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.6 Cylindrical Interpolation; G07.1
Z
r Z
C o
0 o o o o C
90 180 270 360
The rotation axis movement amount commanded in angle is converted internally in the CNC to the
linear axis distance on the circumference. After conversion, linear and circular interpolation are
carried out between the other axes. After interpolation, the linear axis distance is converted back
into the rotation axis movement amount.
(b) The direction of the rotation axis can be set in the parameters.
32
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.6 Cylindrical Interpolation; G07.1
(g) Positioning
An error will occur if positioning (including commands that create rapid traverse cycles, such
as G28 and G80 to G89) is carried out in the cylindrical interpolation mode. Note that only G0
rapid traverse is possible.
Set the mode to cylindrical interpolation cancel mode when positioning.
(i) The cylindrical interpolation (G07.1) cannot be commanded in the positioning mode (G00).
(j) The fixed cycle cannot be commanded in the cylindrical interpolation mode.
33
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.6 Cylindrical Interpolation; G07.1
(4) Notes
(a) The cylindrical interpolation mode cannot be set again during the cylindrical interpolation
mode. To set the mode again, cancel the cylindrical interpolation mode once.
(b) One rotation axis can be simultaneously interpolated. Thus, two or more rotation axes cannot
be commanded with the G07.1 command.
(c) During the cylindrical interpolation mode, the movement amount of the rotation axis
commanded as an angle is converted into a distance on the circumference once. Then, after
carrying out the linear and circular interpolation operations between the other axes, the
amount is reconverted into an angle.
Thus, if the cylinder radius is small, etc., the actual movement amount may differ from the
commanded value. Note that the error at this time is not cumulated.
34
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.7 Helical Interpolation; G02/G03
Or
The arc center coordinates and radius should be commanded with a decimal point.
(Example)
End
End point
point
X
W
J100 Start
I-100
Start point
Y
point
(a) Command a linear axis (or a multiple number of axes) not including the arc axis for the circular
interpolation command.
(b) Command the combined speed of the X, Y and Z axis components for the feedrate F.
(c) Pitch L is determined from the following formula:
L = z1/ ( (2 p1 + )/2)
= e s = arctan (ye/xe) arctan (ys/xs) (0 < 2)
Where, xs and ys are the coordinates of the start point
xe and ye are the coordinates of the end point
(d) Address P may be omitted when the pitch number is 0.
(e) The command range for pitch number P is 0 to 9999.
(f) The pitch number (P command) cannot be designated using an R-designated arc.
35
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.7 Helical Interpolation; G02/G03
36
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.8 Spiral Interpolation; G02.1/G03.1
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.
The arc plane is designated by G17, G18 and G19.
G17 XY plane
G18 ZX plane
G19 YZ plane
The arc rotation direction is designated by G02.1 or G03.1.
G02.1 Clockwise (CW)
G03.1 Counterclockwise (CCW)
P: This designates the number of pitches (rotation speed).
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.
F: Tool path direction speed
(f) The axis combination that can be simultaneously commanded depends on the specifications.
The combination within that range is random.
(g) The feedrate is the constant tangential speed.
(h) Simultaneous control by combining with tool radius compensation (G41, G42) is not possible.
37
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.8 Spiral Interpolation; G02.1/G03.1
(i) 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.
(Example)
G91 G17 G01 X60. F500 ;
Y140. ;
G2.1 X60.0 Z100.0 I100. P1 F300 ; Because this is the G17 plane, arc control
is not carried out by X-Z.
G01 X120 ; Arc control is carried out by X-Y.
(Example)
G17 G91 G2.1 X100. Z150. I150. P3
Z Z
F500 ; XZ
plane
In these examples, the interpolation is
X
truncated cone interpolation. X
W
38
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.9 NURBS Interpolation; G06.2
The shape of the NURBS curve can be flexibly controlled with the number of stages, control point,
weight and knot vector. The shape can be freely edited by changing the control point position,
changing the weight, and by changing the relative interval between each knot of the knot vector.
However, generally manual editing is usually impossible, and a dedicated CAD/CAM system, etc.,
must be used to edit the NURBS curve or generate the NURBS interpolation program.
Manually editing the NURBS interpolation program generated with a CAD/CAM system, etc., is
not recommended.
The NURBS interpolation mode is entered with the G06.2 command. The number of stages, the
control point coordinate value, the control point weight and the knot to determine the NURBS
curve shape are commanded in succession.
39
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.9 NURBS Interpolation; G06.2
(e) K indicates the knots. When the a number of stages is m and the number of control points is
n, the NURBS curve reguires (n+m) knots. The arrangement of these (n+m) knots is called
the knot vector. To command the knot vector, command the first knot simultaneously with the
first control point, the second knot simultaneously with the second control point and following
as a pair in one block. After commanding the blocks for the number of control points (n),
command the remaining m knots in the independent blocks respectively. The number of
control points is identified by these blocks containing only knots, so the control point does not
need to be commanded. NURBS interpolation is completed when the blocks containing only
knots are commanded for the number of stages.
(f) The command range of the number of stages, weight and knots is as follows.
Number of digits valid
Meaning Address Range
after decimal point
Number of stages P 2, 3, 4 0
Weight R 0.0001 to 99.9999 4
Knot K 214748 to 214748 4
(4) Notes
(a) NURBS interpolation cannot be commanded for a rotary-type rotation axis. An error will occur
if commanded.
(b) Command the control point for the axis (X, Y or Z) carrying out NURBS interpolation with the
control point in the first block (G06.2 block). If an axis not commanded in the first block is
commanded in the second and following blocks, an alarm will occur.
(c) The first control point (G06.2 block coordinate value) should be commanded as the start point
of the NURBS curve. Thus, command so that it matches the end point of the previous block.
An alarm will occur if the points do not match.
(d) The command range of the weight is 0.0001 to 99.9999. Even if the decimal point is omitted,
the value will be handled as a value with a decimal point.
If "1" is commanded, the result will be the same as "1.0".
(e) The knot cannot be omitted, and must be commanded in each block. An alarm will occur if
omitted.
(f) As with the weight, up to four digits after the decimal point can be commanded for the knot.
However, even if the decimal point is omitted, the value will be handled as a value with a
decimal point.
(g) Command the knot with a monotone increment. If the value is smaller than the previous block,
an alarm will occur.
(h) There is no particular order to command the addresses.
(i) During single block operation, the operation will stop at the position corresponding to that
block's knot of the NURBS curve shape instead of the control point.
40
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.9 NURBS Interpolation; G06.2
Control point : P0 P1 P2 P3 P4 P5 P6
Knot vector : [0.0 0.0 0.0 0.0 1.0 2.0 3.0 4.0 4.0 4.0 4.0]
:
:
:
G90 G01 X0 Y120. F3000 ;
Y100. ; ..................... P0
P0 P1
G6.2 P4 X0 Y100. R1. K0 ; ....... P0
41
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.10 Thread Cutting; G33
Zz1 : Thread cutting direction axis address (X, Y, Z, ) and thread length
Ff1 : Lead of long axis (axis which moves most) direction.
Qq1 : Thread cutting start shift angle (0 to 360)
Zz1 : Thread cutting direction axis address (X, Y, Z, ) and thread length
Ee1 : Lead of long axis (axis which moves most) direction.
Qq1 : Thread cutting start shift angle (0 to 360)
Zz1 : Thread cutting direction axis address (X, Y, Z, ) and thread length
Ee1 : Number of ridges per inch in direction of long axis (axis which moves most)
(decimal point command can also be assigned)
Qq1 : Thread cutting start shift angle (0 to 360)
1) By using the E command, the leads can be commanded in a smaller unit than the F
command.
The E command is also used to command the number of ridges for inch thread cutting,
but it can also be used to designate the precision leads by turning the control parameter
"Precision thrd cut E" ON.
42
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.10 Thread Cutting; G33
a
Lz N2 (Tapered thread section)
N3
X
Lx
When a<45 lead is LZ
When a>45 lead is LX
When a=45 lead can be in either LX or LZ
Command the shift angle as an integer between 0 and 360. Decimal values will be
ignored even if commanded.
6) The spindle speed should be kept constant throughout from the rough cutting until the
finishing.
7) 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 next movement block that does not contain thread cutting.
(The "Auto operation pause signal ON" warning will not appear.)
8) When thread cutting is started, the feedrate determined by the lead and spindle rotation
speed and the cutting feed clamp speed will be compared. If the speed exceeds the
cutting feed clamp speed, an error will occur.
9) In order to protect the lead during thread cutting, an actual feedrate may sometimes
exceed the cutting feed clamp rate.
43
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.10 Thread Cutting; G33
10) An illegal lead is normally produced at the start of the thread cutting and at the end of
that 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.
11) The spindle speed is subject to the following restriction:
1 R Maximum feedrate
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).
12) Spindle override is invalid during thread cutting, and will be fixed to 100% regardless of
the external signal. If thread cutting is executed when an override value other than 100%
is selected, the 100% override will be applied during thread cutting. The selected
override value will be applied when thread cutting is completed.
13) Single block is invalid during thread cutting. Block stop will be applied at the end point of
the next movement block that does not contain thread cutting.
14) If the operation mode is changed during execution of G33, block stop will be applied at
the end point of the next movement block that does not contain thread cutting.
15) The thread cutting command waits for the single rotation sync signal of the rotary
encoder and starts movement. Note that when using multiple systems, if a system issues
the thread cutting command while another system is executing thread cutting, movement
will start without waiting for the rotary encoder single rotation sync signal. This will cause
the thread ridges to deviate, so do not issue the thread cutting command when using
multiple systems.
16) Thread cutting is executed in synchronization with the spindle selected with the R
register (R1839: command spindle selection). Note that if multiple spindles are selected,
the spindle with the smallest number will be used as the thread cutting spindle.
(Example 1) When the R1839 value is "4" (bit 2 is set to 1) The 3rd spindle will be
the thread cutting spindle.
(Example 2) When the R1839 value is "5" (bit 0 and bit 2 are set to 1) The 1st
spindle will be used as the thread cutting spindle.
1) Number of thread ridge command range (The direction with the most movement is used
as the reference)
Metric command Inch command
Command unit Number of ridge command Command unit Number of ridge command
(mm) range (ridge/inch) (inch) range (ridge/inch)
0.001 0.01 to 999999.99 0.0001 0.0001 to 9999.9999
3) The number of ridges in the long axis direction is assigned as the number of ridges per
inch.
4) The E command is also used to command the leads for precision thread cutting, but it
can also be used to designate the number of ridges by turning the control parameter
"Precision thrd cut E" OFF.
44
6. POSITIONING AND INTERPOLATION FUNCTIONS
6.10 Thread Cutting; G33
5) The E command value should be set within the lead value range when the lead is
converted.
(Lead value (inch) = 1/ridge)
6) See (a) Uniform lead thread cutting for other details.
(4) Restrictions
(a) Dry run can be validated for thread cutting by turning the control parameter "Dry run in thread
cut" ON. Note that the feedrate in dry run will not be synchronized to the spindle rotation. The
dry run signal is checked at the start of thread cutting, and any changes during thread cutting
are ignored.
(b) If thread cutting is commanded during tool radius compensation, the tool radius
compensation will be temporarily canceled, and thread cutting will be executed. Any
movement commands for axes other than the compensation axis will not be temporarily
canceled.
(c) If a group 1 modal command is issued in the same block, the G code commanded last will
have the priority.
(d) If group 9 (fixed cycle) is commanded in the same block, the thread cutting command will
have the priority.
(e) If G93 (inverse time feed) is commanded during the thread cutting modal, or if thread cutting
is commanded during the G93 modal, the program error "G93 mode error" will occur.
45
7. FEED FUNCTIONS
7.1 Rapid Traverse Rate
7. FEED FUNCTIONS
7.1 Rapid Traverse Rate
(1) Detailed description
(a) The rapid traverse rate can be independently set for each axis.
(b) The rapid traverse rate is valid in the following G codes: G00, G27, G28, G29, G30 and G60.
(c) When positioning, the path from the start point to the end point is interpolated by a straight line.
With the parameters it is also possible to select non-interpolation type positioning that moves
at the maximum speed of each axis. The time taken for positioning is the same with either type.
Note that in reference point return, the interval between from the middle point to the reference
point is only non-interpolation type. (Interpolation type is invalid.)
(d) An override can be applied to the rapid traverse rate by an external signal dependent on PLC
specifications.
up to 100% is one step
F0, F1, 50%, 100%
F0: Can be set in the parameters at a constant speed for each axis.
F1: Can be set in the parameters at a constant percent.
(e) Setting range of the rapid traverse rate
46
7. FEED FUNCTIONS
7.2 Cutting Feedrate
(4) Notes
(a) A program error will occur if there is no F command in the first cutting command (G01, G02,
G03, G02.1, G03.1) after restarting.
(5) Others
(a) 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 rotation axes which
control rotation movement.
The feedrate is designed to designate the displacement speed of these axes, and the effect
exerted by this feedrate on the tool movement speed which affects cutting differs between the
time when control is exercised over the linear axes and when it is exercised over the rotation
axes.
The displacement amount for each axis is designated separately by a value corresponding to
the respective axis. The feedrate is not designated for each axis but designated 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 designation of the feedrate is described with the following related items.
1) When controlling linear axes
Even when only one machine axis is to be controlled or there are two or more axes to be
controlled simultaneously, the feedrate which is designated by the F code functions as a
linear speed in the tool advance direction.
When only linear axes are to be controlled, it is sufficient to designate the cutting feedrate
in the program.
The designated feedrate is broken down into components corresponding to the movement
amounts, and each of these components constitutes the feedrate for each axis.
47
7. FEED FUNCTIONS
7.2 Cutting Feedrate
48
7. FEED FUNCTIONS
7.3 Feed per Minute; G94
G94 Ff1 ;
(c) By turning the parameter "Initial synchr feed" OFF , the initial status after restart can be set to
asynchronous feed (feed per minute).
49
7. FEED FUNCTIONS
7.4 Feed per Rotation; G95
G95 Ff2 ;
(4) Notes
(a) The operation warning "OPW 112 Spindle stop" will occur if the spindle speed is zero during
feed per rotation execution.
If the speed is slow (9r/min or less), a warning may be output. However, the operation will not
be obstructed.
50
7. FEED FUNCTIONS
7.5 Inverse Time Feed; G93
G93 ;
Inverse time feed (G93) is a modal command. Once commanded, it is valid until feed per minute
or feed per rotation is commanded.
G00 Xx1 Yy1 ;
G93 ; Inverse time feed mode ON
G01 Xx2 Yy2 Ff2 ; In inverse time feed mode
G02 Xx3 Yy3 Ii3 Jj3 Ff3 ;
G94 (G95) ; Inverse time feed mode OFF
Program path
51
7. FEED FUNCTIONS
7.5 Inverse Time Feed; G93
(d) The initial modal after a restart is G94 (feed per minute) or G95 (feed per rotation).
(e) The feedrate of the block inserted in tool radius compensation, C axis normal line control and
corner R/C is the same speed as the feedrate of the block immediately before it.
(f) The feed function is clamped at the maximum cutting speed. Consequently, the feed may be
slower than the commanded speed.
(g) If an extremely slow speed such as F0.001 is designated, an error will occur in the machining
time.
(4) Notes
(a) The F command in G93 modal is unmodal. Issue an F command for each block. The program
error "PR0062" will occur in blocks with no F command.
(b) The program error "PR0062" will occur when F0 is commanded.
(c) An F command is necessary when G93 to G94 or G95 is commanded. The program error
"PR0062" will occur if there is no F command.
(d) In the inverse time feed mode, the program error will occur when the commands below are
issued.
G12 Inside cutting CW
G13 Inside cutting CCW
G31 to G31.1 Skip
G33 Thread cutting
G34 to G36, G37.1 Special fixed cycle
G37 Automatic tool length measurement
G73 to G89 Fixed cycle
(e) The program error will occur if inverse time feed (G93) is commanded in the following modes.
G33 Thread cutting
G73 to G89 Fixed cycle
(f) Even if the control parameter "1-digit F feed valid" is ON, the F1-digit feed command will not
be valid during the G93 modal.
(g) The dwell command in the inverse time feed modal is a time designation (dwell per second).
52
7. FEED FUNCTIONS
7.6 Synchronized Tapping; ,R/,H
(Note) With plane selection, the synchronous tapping cycle can be carried out for axes other
than the Z axis.
53
7. FEED FUNCTIONS
7.6 Synchronized Tapping; ,R/,H
(1)
Setting from the CRT The synchronous tap control/
asynchronous tap control designation
Parameter
setting is ignored by the parameters
when the address ,R (H is outside the
Address, R/H (1) target) is commanded.
54
7. FEED FUNCTIONS
7.6 Synchronized Tapping; ,R/,H
Speed
Motor operation
Multi-step acceleration/
deceleration
Shortened distance
Normal acceleration/
deceleration
Basically, the command format is the same as for the normal time/constant inclination
acceleration/deceleration command. With multi-step acceleration/deceleration, the spindle
rotation speed for retracting can be commanded with the address (,S).
Address Details Command range
,S Spindle rotation speed for retracting 0 to 99999 (r/min)
The data is held as modal information. Thus, even if
the synchronous tap is canceled, the S command
will be held. Note that this can be canceled with the
parameter (#330106 Tap back speed CLR).
When ,S is commanded, if the value is smaller than the S command, the S command will
be valid during retract.
When ,S ( 0) is commanded, the tap retract override will be invalid.
The ,S command is canceled with reset (modal not held) or rewind. It is not canceled with
reset (modal held).
If the ,S command exceeds the maximum rotation speed for multi-step acceleration/
deceleration retract (stmax), it will be clamped at the maximum rotation speed for multi-step
acceleration/deceleration retract.
When ,S0 is commanded, the command will be ignored and the tap retract override will be
validated.
If S is commanded during an asynchronous (,R0) command, the S command will be
ignored.
The retract spindle rotation speed can be changed even when S is commanded in the G84
modal.
Note that when ,S is commanded independently (with no positioning command),
"PRW0004 Unused address exists" will occur.
55
7. FEED FUNCTIONS
7.6 Synchronized Tapping; ,R/,H
Stapn Advance
Time (ms)
stapt3n
56
7. FEED FUNCTIONS
7.6 Synchronized Tapping; ,R/,H
Stapn Advance
Stap2n
Time (ms)
Stapt2n
Stapt3n
Stapn
Stap2n
S command
Stap1n
Time (ms)
Stapt1n
Stapt2n
57
7. FEED FUNCTIONS
7.6 Synchronized Tapping; ,R/,H
Stmaxn Retract
Stapn Advance
Stap2n
Time (ms)
Stapt2n
Stapt3n
Stap2n
Stapn
Time (ms)
Stapt2n
Stapt3n
The axis will accelerate to the 3rd step's maximum rotation speed at the 2nd step's
time constant
58
7. FEED FUNCTIONS
7.6 Synchronized Tapping; ,R/,H
Stmaxn Retract
Stapn Advance
Stap2n
Stap1n
Time (ms)
Stapt1n
Stapt2n
Stapt3n
0 < 1st step's maximum rotation speed < 2nd step's maximum rotation speed < 3rd
step's maximum rotation speed, and
0 < 2nd step's time constant < 1st step's time constant < 3rd step's time constant
Stmaxn Retract
Stapn Advance
Stap2n
Stap1n
Time (ms)
Stapt1n
Stapt2n
Stapt3n
Stmaxn
Stapn
Stap2n
Stap1n
Stapt2n
Stapt3n
59
7. FEED FUNCTIONS
7.6 Synchronized Tapping; ,R/,H
Stapn
Stap2n
Stap1n
Stapt3n
Stapt2n
Stapt1n
Time (ms)
Stap1n
Stap2n
Stapn
,S
Stmaxn
(5) Restrictions
(a) When both F and E are commanded simultaneously in the G84, G74 command block, the
prioritized address will be determined by the input unit.
Metric input.............Pitch (F) has the priority. (The number of ridges is ignored.)
Inch input................The number of ridges (E) has the priority. (The pitch is ignored.)
(b) During synchronous tapping, the hole drilling axis's cutting feedrate and spindle rotation
speed are clamped by the hole drilling axis's maximum cutting feedrate or the spindle
maximum rotation speed.
(c) During execution of G84, G74, the hole drilling axis's cutting feedrate is synchronized with
the spindle rotation speed. However, the cutting feedrate modal (F modal) will not change at
this time.
(d) The forward run (M3), reverse run (M4) and stop (M5) commands are ignored during the
synchronous tap cycle modal. (The M code and MF will not be output.)
The spindle's rotation speed will be synchronized with the hole drilling axis movement, and
will rotate in the forward or reverse direction. There is no need to issue the spindle forward
run or reverse run command before the fixed cycle command.
(e) If the S command is issued during the synchronous tap cycle modal, the program error
"PR0033 Format error" will occur. To change the spindle rotation speed, cancel the
synchronous tap cycle modal with G80, and then issue the G84 command.
[Example]
1) G84 Z-10. R-2. F1. S1000;
X-10.;
S2000; "PR033 Format error"
Y-10.;
2) G74 Z-10. R-2. F1. S2000;
X-10.;
S2000; "PR033 Format error"
Y-10.;
3) G74 Z-10. R-2. F1. S2000;
G74 Z-12. R-2. F1. S1500; "PR033 Format error"
60
7. FEED FUNCTIONS
7.6 Synchronized Tapping; ,R/,H
(f) If there is no S command in the first G84 command block, synchronous tapping will be
executed with the previously commanded S command (S modal). (The gears will not be
changed in the G84 command block.)
(g) The other restrictions are the same as the regular fixed cycle.
(h) The spindle will not rotate while the miscellaneous function is locked.
(i) If F/E are not commanded in the G84, G74 command block, the program error "PR0183 No
pitch/thread number" will occur. Note that the previous F/E values will be used if the
parameter (#320024 Synchronized tapping) is turned ON.
In this case, the F/E values will be initialized when the NC is reset.
[Example] Parameter OFF
G84Xx Yy Zz Rr Ff Ss ,R1;
Xx;
G80;
G84Xx Yy Zz Rr ,R1; "PR0183 No pitch/thread number"
G80;
Parameter ON
G84Xx Yy Zz Rr Ff Ss ,R1;
Xx;
G80;
G84Xx Yy Zz Rr ,R1; Operates with previous f
G80;
61
7. FEED FUNCTIONS
7.7 Dwell (Time designation); (G94) G04
(G94) G04 Xx1 ; Besides address X, designation is also possible with address
P.
Asynchronous Dwell Time
Previous block
cutting command
Next block
Dwell command
Dwell time
62
7. FEED FUNCTIONS
7.8 Dwell (Rotation designation); (G95) G04
(G95) G04 Xx1 ; Besides address X, designation is also possible with address
P.
Synchronous Dwell Rotation
Previous block
cutting command
Next block
Dwell command
Dwell rotation speed
(h) If commanded in the same block as another unmodal command, the latter command will have
the priority.
(i) If commanded in the same block as the group 1 modal command (G00 to G03.1, G33), the
dwell will be executed and the modal will be updated.
(j) If commanded in the same block as a modal command that involves axis movement, such as
Group 4 (G22, G23), Group 7 or 8 (G40 to G44, G49), Group 9 (G73 to G89), Group 11 (G50,
G51), Group 15 (G40.1 to G42.1), Group 16 (G68, G69) or Group 19 (G50.1, G51.1), the dwell
will have the priority and the other command will be ignored.
(k) If commanded in the same block as a modal command that does not have an axis address,
such as plane selection, absolute/incremental command, inch/metric changeover, feed modal,
workpiece coordinate system changeover, or G61 to G64, both commands will be valid.
(l) If the dwell is commanded during the inverse time feed mode (G93), this will be a time
designation.
63
7. FEED FUNCTIONS
7.9 F1-digit Feed
(Note 1) The manual pulse generator is also used for the conventional axis movement,
such as handle interrupt.
Select the usage purpose with the control parameters.
(c) The speeds corresponding to F1 to F9, K and FMn can be set on the Process param screen.
The increment/decrement value range is F1 to F9 ... 0 to FMn
However, if the feedrate is 0 or exceeds the FM1 (FM2 for F5 to F9), the operation warning
"OPW0167 F1 feed rate zero" will occur.
64
7. FEED FUNCTIONS
7.9 F1-digit Feed
65
7. FEED FUNCTIONS
7.9 F1-digit Feed
66
8. SPINDLE FUNCTIONS
8.1 Spindle Control Function
8. SPINDLE FUNCTIONS
8.1 Spindle Control Function
(1) Outline
With this function, the spindle speed is determined for the S command issued by the automatic
operation or manual numerical value command, allowing for the override and gear ratio, and the
spindle is rotated. The outline of the spindle control is shown below.
NC PLC
BCD or BIN
S command value
Gear ratio
maximum rotation
speed (parameter)
(3) Notes
(a) The processing sequence and completion sequence for the S command must be grouped in
the PLC.
(b) There is no rotation speed designation by the code designation method.
67
8. SPINDLE FUNCTIONS
8.2 S Code Output
S xxxxxxxx ;
68
8. SPINDLE FUNCTIONS
8.3 Spindle Position Control (Spindle C axis control)
Position control
Spindle rotation Spindle rotation
SERVO ON
During servo OFF : Spindle (position control not possible)
Reference point return incomplete status
During servo ON : Spindle position control
2) After that, the command is carried out with the axis name when positioning control is set.
(Example) G00 C100. ;
(b) The coordinate system must be established by a reference point return when the spindle is
changed over to position control.
The reference point can be established using one of the following three methods.
(c) A spindle amplifier bus-connected with the control unit and a position detector are necessary
to carry out the spindle position command.
(d) The spindle can also be set so that it does not carry out an automatic reference point return by
an external signal.
(e) The resolution depends on the position detector resolution. Refer to the sections on "Minimum
setting units" and "Speed commands" for the setting units, speed, etc.
(f) A program error will occur if a position control command is carried out during servo OFF or
orientation.
69
9. TOOL FUNCTIONS
9.1 T Commands
9. TOOL FUNCTIONS
9.1 T Commands
(1) Outline
The tool number and tool compensation number can be commanded using the T commands (a
number up to eight digits following address T). Only one set of T commands can be commanded
in one block.
Suffix
Tool compensation number
Tool number
(3) Detailed description
(a) The number of digits in the T command and the number of digits in the tool compensation
number below it are determined by the parameters.
(b) If the number of digits in the tool compensation number is 0, all of the digits can be used for
the tool number command.
A suffix (omission possible) can be commanded at the end of the T command.
(c) The tool compensation consists of tool length offset and tool nose wear compensation. One of
the following three methods can be selected by the parameters for designating these
compensation numbers.
(In this example, the T command has eight digits, and the tool compensation number has two
digits. There is no suffix.)
1) Method by which the compensation numbers of the tool length and tool nose wear are
designated by the T command low-order digits.
High-order digits The tool number is designated.
Low-order digits Both the tool length offset and tool nose wear compensation
are designated by the same compensation number.
(Example) T * * * * * * * *
2) Method by which the tool number and tool length offset number are designated by the T
command high-order digits.
High-order digits The tool number and tool length offset number are designated
by the same compensation number.
Low-order digits The tool nose wear compensation number is designated.
(Example) T * * * * * * * *
70
9. TOOL FUNCTIONS
9.1 T Commands
3) Method by which the tool length offset number is designated by the last two digits of the T
command high-order digits
High-order digits The tool number is designated by all the high-order digits.
The tool length offset number is designated by the last
two digits of the high-order digits.
Low-order digits The tool nose wear compensation number is designated.
(Example) T * * * * * * * *
71
10. MISCELLANEOUS FUNCTIONS
10.1 Miscellaneous Functions
72
10. MISCELLANEOUS FUNCTIONS
10.2 M Individual Output
Machining M individual
Meaning Reply to the CNC
program output
M00 M00 Program stop Fin1 or Fin2
M01 M01 Optional stop Fin1 or Fin2
M02 M02 Program end Reset
M30 M30 Program end Reset
73
10. MISCELLANEOUS FUNCTIONS
10.3 2nd Miscellaneous Functions
74
11. TOOL COMPENSATION
11.1 Tool Length Offset; G43/G44/G49
G43 Zz1 Hh1 ; Besides the Z axis, tool length offset can be
G44 Zz1 Hh1 ; carried out for the all axes (such as X and Y)
Offset direction Selection Offset number that can be controlled by the system.
axis
G49 ; Tool length offset cancel
2) The G49 (tool length offset cancel) mode is established when the power is turned ON and
after the reset and M02 command have been executed.
75
11. TOOL COMPENSATION
11.1 Tool Length Offset; G43/G44/G49
2) The valid range of the offset numbers depends on the specification configuration (number
of offset sets).
Refer to "11.5 Number of compensation sets".
3) An alarm occurs when the offset number commanded exceeds the range of the
specifications.
5) An offset number commanded in the same block as G43/G44 will subsequently remain
valid as a modal.
(Example)
G43 Zz1 Hh1 ; Tool length offset is carried out by h1.
:
G45 Xx1 Yy1 Hh6 ;
:
G49 Zz2 ; Tool length offset is canceled.
:
G43 Zz2 ; Tool length offset is carried out again by h1.
6) When G43/G44 is further commanded while G43/G44 is still modal, offset carried out by an
amount equivalent to the difference in the data of the offset number.
(Example)
G43 Zz1 Hh1 ; z1 + (h1) movement
:
G43 Zz2 Hh2 ; z2 + (h2 h1) movement
76
11. TOOL COMPENSATION
11.1 Tool Length Offset; G43/G44/G49
2) When the control parameter (T leng offset Z fix) is OFF, it depends on the axis address
assigned in the same block as the G43/G44 command. When two or more axes are
simultaneously commanded, the sequence of priority is as follows: Z axis > Y axis > X axis.
(Example)
G43 Xx1 Hh1 ; +offset for X axis
:
G49 Xx2 ;
:
G43 Yy1 Hh2 ; +offset for Y axis
:
G49 Yy2 ;
:
G43 1 Hh2 ; +offset for additional axis
:
G49 2 ;
:
G43 Xx3 Yy3 Zz3 Hh3 ; +offset for Z axis
:
G49 ;
Additional axes are handled in accordance with the setting of the parameters.
When tool length offset is to be commanded with a rotation axis, set the name of the
rotation axis into any of the parallel axes.
3) When there is no axis address in the same block as G43, the Z axis is validated.
(d) Operations when other commands are assigned while tool length offset is modal
1) Automatic reference point return (G28 high-speed/dog-type, G30 high-speed)
If automatic reference point return is started for an axis in the tool length offset modal, the
tool length offset will be canceled and the offset amount will be cleared when the reference
point is reached.
77
11. TOOL COMPENSATION
11.1 Tool Length Offset; G43/G44/G49
78
11. TOOL COMPENSATION
11.1 Tool Length Offset; G43/G44/G49
(4) Example
(a) Combined operation with tool length measurement
(Example 1.) Tool length offset by combination with tool length measurement type I
(Note) H01=
-450.0
When the tool Z2.0
Z0.0
compensation amount is Workpiece
Workpiece
H021 = -450.000, etc.,
it is set by the negative Table Table
value.
(Example 2.) Tool length offset by combination with tool length measurement type II
G28 X0 Y0 Z0;
T01;
T02 M06; R R
G91 G54 G00 G43
Z2.0 01;
(b) When offsetting is carried out with the distance between the reference point and
workpiece as a reference
(Note) H01=
-450.0
When the tool Z2.0
Z0.0
compensation amount is Workpiece
Workpiece
H021 = -450.000, etc.,
it is set by the negative Table Table
value.
79
11. TOOL COMPENSATION
11.1 Tool Length Offset; G43/G44/G49
(5) Notes
To set the tool compensation amount (tool length and tool radius) during automatic operation, set
during the single block stop.
The following will occur when the compensation amount is set during automatic operation.
When tool radius
State during
When tool length offset amount is set compensation
automatic operation
amount is set
Whether to validate the setting from the next
block or from the next H No. command can be Valid from the next
During single stop
set with parameter (110051 Op Tolcomp ofs block.
valid).
The set compensation amount is validated from the tool compensation
Other than the above
command block several blocks ahead of the block being executed.
80
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
11.2.1 Outline
This commands the function that compensates the tool radius. This function compensates the actual
tool center path in respect to the program path on the outside or inside by the tool radius amount,
using a combination of G commands and D designations.
Because path calculation is carried out by the intersection calculation method, overcutting does not
occur at the inside of corners.
Compensation control operation is carried out from the G41 or G 42 commanded blocks. In the tool
radius compensation mode, up to five blocks of the program are pre-read, including blocks with no
movement amount. Of those blocks, a tool radius interference check is carried out on the shape of up
to three blocks with movement amount.
G code Function
G38 Vector change during tool radius compensation
G39 Corner arc during tool radius compensation
G40 Tool radius compensation cancel
G41 Tool radius compensation left command
G42 Tool radius compensation right command
Tool path
r r
81
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
82
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
(b) The offset vectors are zero in the compensation cancel mode, and the tool center path
matches the program path.
(c) Programs including tool radius compensation must be terminated in the compensation cancel
mode.
(b) At the start of compensation, regardless of continuous operation and single-block operation,
three blocks of movement commands are always pre-read. If there are not three blocks of
movement commands, maximum of five blocks are pre-read and compensation calculation is
carried out.
Control mode transition diagram
G01_; G02_;
(c) There are two ways of starting the compensation operation: type A and type B.
The type can be selected or de-selected by the parameter.
This type is used in common with the compensation cancel type.
(d) In the following explanatory diagram, "S" denotes the single block stop point.
83
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
Program path
r = Compensation amount r
Program path
Tool center path
s s
G42
G42
Tool center
path
Start point Start point Center of arc
(b) Machining an outside corner (obtuse angle) (Type A or B can be selected by parameter)
[90 < 180]
s s
Tool center path
r = Compensation amount r
G41 G41 Tool center path
Program path
Intersection
Intersection
s
s
Tool center path r
r r
r
Tool center path
Program path G41
G41
Start point
Start point Center of arc Program path
(Note) Cutting in may occur if the compensation amount is larger than the arc radius.
84
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
Center of
s arc
G41
G41
Start point
Start point
G41 r
Start point
G41
Start point
(Note) An alarm will occur without the radius compensation starting up if cancel G40 is commanded
without an axis movement command in the compensation plane after a G41/G42 command.
85
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
Linear Linear (90 < 180) Linear Linear (0 < < 90)
Linear Arc (90 < 180) Linear Arc (0 < < 90)
Center of arc
Center of arc
Arc Linear (90 < 180) Arc Linear (0 < < 90)
Center of arc
Program path
Program path
s
Intersection
s
86
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
Arc Arc (90 < 180) Arc Arc (0 < < 90)
Center of arc
r
r
Tool center path r r
Tool center path
s
Intersection
Program path Program path
r
r s
s
Tool center path r Tool center path
Intersection
Program path Program path Center of arc
r
Tool center path Tool center path
s s
Inter- Inter-
section section r
r
Center of arc
Center of arc
Program path
Program path
s
s Tool center path
Inter- Inter-
r section Tool center path
section
r
Center of arc
87
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
r
Center of arc
Program path
s Tool center path
Center of arc Center of arc Inter-
section
Program path
Hypothetical circle
Tool center path
s
r
R
Center of arc
r
Program path
A B
88
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
Program path
r = Compensation amount
r Program path
Tool center path
s s
G40
G40
Tool center
path
End point End point
Center of arc
(b) Machining an outside corner (obtuse angle) (Type A or B can be selected by parameter)
Intersection
Intersection s
s
Tool center path
r
r r
r
Tool center path
Program path G40
G40
End point
End point Center of arc Program path
89
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
(c) Machining an outside corner (acute angle) (Type A or B can be selected by parameter)
Center of
s arc
G40
G40
End point
End point
r
G40
End point
G40
End point
90
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
Program path N1
N2
r
r
Tool center path Center of arc
This movement
and feedrate fall
under block N2.
91
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
r=Compensation
r=Compensation amount amount
s
Program path Tool center path
Intersection
(With G39 command) (Without G39 command) (With G39 command) (Without G39 command)
(With G39 command) (Without G39 command) (With G39 command) (Without G39 command)
(Example)
N3 G39X40.;
N6 N4 N4 G39Y40.;
N5 G39X-40.;
N6 Y-40.;
N7
N3
N7 G40X-20.Y20.;
N2
N8 M02.;
D1=5.000
N1
(Note) The corner arc will not be inserted when the G39 independent block is commanded.
92
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
r1 N12 r1
N13
N12
r1 r1
N11
N11G1Xx11 ;
N12G38Xx12Yy12 ; Tool center path N13 Program path
N11G1Xx11Yy11 ;
N13G40Xx13 ;
N12G38Xx12Yy12 ;
N13G40Xx13 ; r1: Vector at N11-N12 block
r1: Vector at N11-N12 block intersection calculation intersection calculation
r1
Tool center path
N12
N11 r1
(Note) If G38 is commanded in the same block as the arc block (G02/G03) I and J commands,
I and J will be handled as the G38 vector, and "PR0070 Arc end point deviation large"
will occur.
93
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
(c) Commanding G41/G42 and vector hold/change (G38) in the same block
When these are commanded in the same block, G41/G42 will be valid and G38 will be ignored
as shown below.
Program command Operation
G40G41/G42+G38 G41/G42 commands are valid.
G40G41/G42+G38+I, J G41/G42I, J commands are valid.
G41/G42G41/G42+G38 G41/G42 commands are valid.
G41/G42G41/G42+G38+I, J G41/G42I, J commands are valid.
94
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
Compensation
direction +
G code
G41 Left-hand compensation Right-hand compensation
G42 Right-hand compensation Left-hand compensation
(b) The compensation direction can be changed by changing the compensation command in the
compensation mode without commanding the compensation cancel. However, no change is
possible in the compensation start block and the following block. Refer to the "General
cautions for tool radius compensation" for the operations when the sign is changed.
LinearLinear
Program path
G41 G41 G42
95
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
Program path
r r
ArcArc
Program path r
G41 G42
G41
Center of arc
G41 G41 G42
G41
Tool center path
G42
r
Program path
G42
96
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
S
S
Middle point
N5 N6 N7 N8
~
(G41)
G33
Intersection
Program path
(c) When G53 (basic machine coordinate system selection) is commanded, the compensation
vector is eliminated temporarily.
(Note) The compensation vector does not change with the coordinate system setting (G92)
command.
97
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
N2
N3
N1 X30.Y60.;
N2, 3, 4, 5, 6
N1 X30.Y60.;
N2 G41 D10;
N7
N3 G4 X1000; (Intersection)
N4 F100; Block without
N5 S500; movement N1
N8
N6 M3;
N7 X20.Y-50.;
N8 X50.Y-20.;
N2~5
N1 G41 X30.Y60.D10;
N6
N2 G4 X1000;
(Intersection)
N3 F100; Block without N1
N4 S500; movement N7
N5 M3;
N6 X20. Y-50.;
N7 X50. Y-20.;
98
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
N6 G91X100. Y200.; N7 N8
N7 G04X P1000; Block without
N8 X200. ; movement
N6 N8
When 4 or more blocks without movement follow in succession and when there is an M
command prohibiting pre-read in the compensation mode, the compensation vectors are
created perpendicularly at the end point of the previous block.
N11
N6 X100. Y200.;
N7 G4 X1000;
N6 N11
N8 F100 ; Block without
N9 S500 ; N7 to N10
movement
N10 M4 ;
N11 X100. ; N6
N8
N7
N6 X100. Y200. ;
N7 G40 G04P1000 ;
N8 X100. Y50. ;
N6
99
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
(i,j)
N2
Tool center path A N1 (G41)G1X_ ;
r
r N2 G40 XaTbIiJj ;
G41 r
N1
Program path
In this case, care is required since the intersection must be sought even when the command
vector is incorrect, as in the figure below, regardless of the compensation direction.
(a,b)
N2
Tool center path When the I, J signs
A are incorrect in the
G41 above program
N1 r
example
Program path
r
(i,j)
When the compensation vectors are extremely large as a result of the intersection calculation,
perpendicular vectors are created in the block before G40.
(a,b)
G40
Tool center path
A
G41
Program path r
(i,j) r
Hypothetical tool center path
(b) Care should be taken with the G40 command after an arc command since a section may be
left uncut when the arc exceeds 360 due to the contents of I, J and K.
r
Section left uncut
N2
N1 (G42,G91) G01X200. ;
(i,j) N2 G02 J150. ;
r N3 G40 G1X150.Y-150.I-100.J100. ;
N1
Program path
Tool center path r
G42
G40
N3
100
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
The compensation direction can be intentionally changed by issuing the G41/G42 command and I, J,
K in the same block.
As shown in the figures below, the vectors with a size equivalent to the compensation amount are
made to serve as the I, J type compensation vector perpendicularly to the direction designated by I,
J without the intersection of the programmed path being calculated.
The I, J vector can be commanded during the compensation mode (when G41/42 are commanded
in the same block) even at the compensation start.
Even when the compensation mode is entered, if there is no G41/G42 command, the I, J vector
command will be ignored.
N110
N120
N130 (G40)
Y N140 N150
~
Y (G40)
N3
~
N1 G41 I150. D1 ;
X
N2 N2 G91 X100. Y100. ;
N3 X150. ;
~
D1 N1
101
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
(I,J) N110
(2)
~
N100 D1
(G17 G41 G91)
N120 (1) N100 G41 G00X150. J50. ;
(2) N110 G02 I150. ;
(N120) N120 G00 X-150. ;
Y
~
X
Program path
(1) I,J type vector
Tool center path (2) Intersection calculation type vector
(K,I) N110
N100
~
N120
(G18 G41 G91)
N100 G41 G00 Z150. I50. ;
N110 G02 K50. ;
(N120) N120 G00 Z-150. ;
X
~
(J,K) N110
~
N100
(G19 G41 G91)
N120 N100 G41 G00 Y150. K50. ;
N110 G02 J50. ;
(N120) N120 G00 Y-150. ;
~
N5
(I,J) N1 G41 D1 G01 F1000 ;
N2
N2 G91 X100. Y100. ;
N3 G41 I50. ;
N4 X150. ;
N5 G40 ;
N1
D1
102
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
(100, 0) I, J direction
Offset vector direction
Y
N1 G28 X0Y0 ;
N2 G41 D1 F1000 ;
X N3 G01 G91 X100. Y100. ;
(I,J) N4 G42 X100. I100. J-100. D2;
N4 N5 X100. Y-100. ;
N3 D2
N6 G40 ;
N7 M02 ;
N2
N5 %
D1
N6
103
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
(Example 1)
D1 A D1 (G41 D1 G91)
~
(I,J)
y N100 N100 G41 X150. I50. ;
N110 X100. Y-100. ;
N110
~
x
Vector A is the compensation amount entered in compensation number modal D1 in the N100
block.
(Example 2)
(G41 D1 G91)
B D2
~
D1
N200 G41 X150. I50. D2 ;
y (I,J) N210 X100. Y-100. ;
N200
~
N210
x
Vector B is the compensation amount entered in compensation number modal D2 in the N200
block.
(6) Notes
(a) Issue the I, J type vector in a linear mode (G00, G01). If it is issued in an arc mode at the start
of compensation, program error will result.
An I, J designation in an arc mode functions as an arc center designation in the circular mode.
(b) 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.
Cutting N1 G28 X0 Y0 ;
x
N2 G42 D1 F1000 ;
(I,J)
N3 G91 X100. ;
N4 G42 X100. Y100. I10. ;
N5 X100. Y-100. ;
N6 G40 ;
N7 M02 ;
N2 N4 N5 N6
N3
104
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
G38 G41/G42
: :
(G41) (G41)
: :
G38 G91 X100. I50. J50. ; G41 G91 X100. I50. J50. ;
: :
(I, J)
(I, J)
(Compensation (Compensation
amount) amount)
Vector with size of compensation amount in I, Vector with size of compensation amount
J direction perpendicularly to the I, J direction
(b) Refer to the following table for the compensation direction which can be applied depending on
whether or not the G41/G42 and I, J (K) commands are used in combination.
N3 A
N1 G91 G01 G41 X200
D1 F1000 ;
N2 X-150. Y150. ;
(I,J) N3 G41 X300. I50. ;
N4 X-150. Y-150. ;
N4 N5 G40 X-200. ;
N2
Y
105
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
N2
N3
N2
N3
N2 N3
106
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
Program path
Inter-
rupt
In the absolute value mode, however, the tool returns to its original path at the end point of the
block following the interrupted block, as shown in the figure.
Inter-
rupt
107
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
Workpiece
108
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
In principle, the compensation numbers should not be changed in a compensation mode. If they are
changed, operation will be as follows.
(a) LinearLinear
Compensation amount
assigned by N101 Compensation
amount assigned
by N102
r1
N102
N101 r2
N103
Program path
r1
Program path
r1
r1
r2
r2
109
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
(b) LinearArc
N101
Program path r1
N101
r1
r1
N102
G03
r2
Center of arc
(c) ArcArc
r1
r2
N102
Center of arc
Center of arc
r1
r1
r1
r2
Tool center path
Program path
Center of arc
Center of arc
110
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
If programmed in this way, it is possible to read up to the N6 block at N1 compensation start, determine
the relationship between N1 and N6 and proceed with compensation properly as shown in the above
figure.
Next, when the N4 block in the above program has been divided into two:
N1
N1 G91 G00 G41 X 500. Y 500. D1 ;
N2 S1000 ;
N3 M3 ;
N6
N4 Z-250. ; N4
N5 G01 Z-50. F1 ;
N6 Y 100. F2 ; N5
N6
Cutting
Z
Y
N1
X X
It is not possible here to read as far as the N6 block at N1 compensation start since there are four
blocks (N2 to N5) without a command on the XY plane.
Compensation is therefore based on the information in N1 block only, and the NC system cannot
create compensation vectors at compensation start. Over-cutting therefore results, as shown in the
above figure.
In cases like this, by taking the calculations performed inside the NC system into prior consideration, it
is possible to safeguard against over-cutting provided that, after the Z axis has descended, the
command in the same direction at the advance direction is already assigned immediately before the Z
axis cutting.
N1 G91 G00 G41 X 500. Y 400. D1 ;
N2 Y100. S1000 ; N6 N6
N3 M3 ; N6
N4 Z-250. ;
N5 G01 Z-50. F1 ; N2
N6 Y 100. F2 ; N2 N5
N1 Y
N1 Y
X Z
The same direction as the N6 advance direction is assigned in N2 so that compensation is performed
properly.
111
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
(1) Outline
A tool, whose radius has been compensated under 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.
(Example)
Avoidance path
(G41)
N1 G90 G1 X50. Y-100. ;
Outer diameter
N2 X70. Y-100. ; of tool
N3 X120. Y0 ;
N1 N3
N2
Cutting with N2
Cutting with N2
112
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
1 2 ' 3 N3
4 4'
N1
N2
N1 N3
Vectors intersect here.
N2
Program path
N6
N1 N5
No interference check possible
N2
N3
N4
113
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
N3
N1
N2
Note that if the arc block is interpreted as a straight line, when the compensation direction with
the previous and next blocks is on the inner side, it will not be interpreted as a straight line,
and interference avoidance will be carried out.
N3
114
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
N2 N3
N1
Program path
N2 N3
N1 r Center of arc
Avoidance
N3 vector
N2
r2
r1
N3
Avoidance vector 1
Tool center path 2 N2
2 2
Avoidance vector
r1
Tool center path 1 r2
N1
Program path
Interference
avoidance path
Program path
115
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
N1
1
N2
23
N3 4
(b) When the interference check avoidance function has been selected
1) When there are valid vectors at the end point of the following block even when all the
vectors at the end point of its own block have been deleted
a. When, as shown in the figure, the N2 in interference check is conducted, the N2 end
point vectors are all deleted but the N3 end point vectors are regarded as valid.
Program error now occurs at the N1 end point.
N4
3 4
N3
Alarm stop
N2
2 1
N1
b. In a case such as that shown in the figure, the tool will move in the reverse direction at
N2. Program error results prior to N1 execution.
1234
N1 N4
N2 N3
116
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
.
Alarm stop
N1
N2
N4
N3
Alarm stop
N1
N2
N4
N3 Angle of
intersection
3) When the program advance direction and the advance direction after compensation are
reversed
When a groove that is parallel or has a widening bottom that is narrower than the tool
diameter is programmed, even if interference does not actually occur, it will be interpreted
as occurring.
Program path Tool center path
Stop
117
11. TOOL COMPENSATION
11.2 Tool Radius Compensation; G40/G41/G42/G38/G39
By setting the control parameter "#320039 OFS Diameter DESIGN" ON, the compensation amount
set in the command tool number can be recognized as the diameter compensation amount, and
converted into a radius compensation amount during compensation.
:
G01 G41 X50. D1 F100 ;
Workpiece
G03 I-50. ;
G01 G40 X0 F500 ;
:
118
11. TOOL COMPENSATION
11.3 Three-dimensional Tool Radius Compensation; G40/G41/G42
Tool
r: Tool radius
Workpiece
Z(K)
Three-dimensional
compensation vector
Program coordinate value
(x, y, z)
X(I)
Y(J)
As shown above, the tool is moved with the tool center coordinate values (x', y', z') offset by the
tool radius r in respect to the program coordinate values (x, y, z) following the plane normal line
vector (I, J, K).
While two-dimensional tool radius compensation creates the vectors at a right angle in the (I, J, K)
direction, three-dimensional tool radius compensation creates the vector in the (I, J, K) direction.
(The vector is created at the end point of the block.)
The three-dimensional compensation vector (offset) axis elements are as follows.
I
Hx = r
2 2 2
(I + J + K )
J
Hy = r
2 2 2
(I + J + K )
K
Hz = r
2 2 2
(I + J + K )
Thus, the tool center coordinate values (x', y', z') are each expressed as follows. Note that (x, y, z)
are the program coordinate values.
x = x + Hx
y = y + Hy
z = z + Hz
(Note 1) Three-dimensional compensation vector (Hx, Hy, Hz) refers to the plane normal line
vector such as follows ;
The direction is same as the plane normal line vector (I, J, K ).
The size equals to the tool radius ( r ).
(Note 2) When the machining parameter "330013 3-dimensional compen" is set to a value other
2 2 2
than "0", "330013 3-dimensional compen" will be used as the (I + J + K ) value.
(Refer to the Parameter Manual for details.)
(Note 3) This function is an additional specifications. If commanded when the function is not
provided, "PR0154 No 3D-compensation spec." will occur.
119
11. TOOL COMPENSATION
11.3 Three-dimensional Tool Radius Compensation; G40/G41/G42
Compensation
Compensation amount: + Compensation amount: D00
G code
G40 Cancel Cancel Cancel
G41 I, J, K direction I, J, K reverse direction Cancel
G42 I, J, K reverse direction I, J, K direction Cancel
G17 ;
G41 Ii Jj Kk ; XYZ space
G17 U ;
G41 Ii Jj Kk ; UYZ space
120
11. TOOL COMPENSATION
11.3 Three-dimensional Tool Radius Compensation; G40/G41/G42
G41 Xx Yy Zz Ii Jj Kk Dd ;
Program path
Start point
G41 Ii Jj Kk Dd ;
Start point
(Example 3) Movement during radius compensation: When there is a movement command and a
plane normal line vector command
Xx Yy Zz Ii Jj Kk ;
Tool center path
New vector
Old vector
Program path
Start point
(Example 4) Movement during radius compensation: When there is no plane normal line vector
command
Xx Yy Zz ;
Tool center path
New vector
Old vector
Program path
Start point
121
11. TOOL COMPENSATION
11.3 Three-dimensional Tool Radius Compensation; G40/G41/G42
Program path
Start point
(Note) The center coordinate value will not shift for an arc or helical cutting.
Thus, when the arc I, J, K is commanded with the following type of vector, the
error "PR0070 Arc end point deviation large" will occur.
Center of arc
G41 Xx Yy Zz Ii Jj Kk Dd1 ;
Tool enter path
(Note 1) If I, J, K is not commanded in a block where the offset amount is changed, the
vector will be equivalent to the old vector. In this case, the modal will change,
but the offset amount will change when I, J, K is commanded.
122
11. TOOL COMPENSATION
11.3 Three-dimensional Tool Radius Compensation; G40/G41/G42
G41 Xx Yy Zz Ii Jj Kk Dd1 ;
Program path
New vector
G42 Xx Yy Zz Ii Jj Kk ;
Tool center path
Old vector
Start point
(Note 1) If I, J and K are not commanded in a block where the offset direction is to be
changed, the vector will be equivalent to the old vector and the offset direction
will not be changed
In this case, the modal will change, but the offset direction will change when I,
J and K are commanded.
(Note 2) If the offset direction is changed in an arc (G2/G3) block, I, J will be the center
of arc, so the offset direction will not change. For the R command, even if I, J
and K are commanded, they will be ignored, and the offset direction cannot
be changed.
End point
Program path
123
11. TOOL COMPENSATION
11.3 Three-dimensional Tool Radius Compensation; G40/G41/G42
(e) Scaling
Scaling is applied on the coordinate values before three-dimensional tool radius
compensation. Scaling is not applied on the plane normal line vector (I, J, K).
D1=10.
X -50. -30. -20. -10.
G90 ;
G51 X0 Y0 P0.5 ;
Program path
N1 G41 D1 X-10. Y-20. Z-10. I-5. J-5. K-5. ; after scaling
N2 X-30. Y-30. Z-20. ; Path after scaling
Program path
N3 X-50. Y-20. Z-10. ; and compensation
Path after compensation
N4 Y0. ;
-20.
Plane normal line vector
N1( -5.000, -10.000, -10.000 )
-30.
N1( -10.773, -15.773, -15.773 )
Y
N2( -15.000, -15.000, -20.000 )
N2( -20.773, -20.773, -25.773 ) X
Program path
N3( -25.000, -10.000, -10.000 ) after scaling
-10.
N3( -30.773, -15.773, -15.773 )
Plane normal line vector
124
11. TOOL COMPENSATION
11.3 Three-dimensional Tool Radius Compensation; G40/G41/G42
(i) Skip
The program error "PR0608 Skip during radius compen" will occur.
125
11. TOOL COMPENSATION
11.3 Three-dimensional Tool Radius Compensation; G40/G41/G42
G90 ;
N1 G41 D1 X-10. Y-20. Z-10. I-5. J-5. K-5. ;
N2 X-30. Y-30. Z-20. ;
Program path
N3 X-50. Y-20. Z-10. ;
N4 G53 Y0 ; Path after compensation
-20.
2) For an incremental value command, the axis will move by the amount obtained by
subtracting each axis vector from the movement increment value.
(The offset amount is temporarily canceled.)
G91 ;
N1 G41 D1 X-10. Y-20. Z-10. I-5. J-5. K-5. ; Program path
N2 X-20. Y-10. Z-10. ;
N3 X-20. Y10. Z10. ; Path after compensation
N4 G53 Y20. ;
-20.
126
11. TOOL COMPENSATION
11.3 Three-dimensional Tool Radius Compensation; G40/G41/G42
D1=10.
X -50. -30. -20. -10. W(0,0)
G91 ;
N1 G92 G41 D1 X-10. Y-20. Z-10. I-5. J-5. K-5. ;
N2 X-20. Y-10. Z-10. ; Program path
N3 X-30. Y-10. Z10. ;
N4 Y20. ; Path after compensation
G92 -20.
Path after Z
compensation
Path after
N1( -10.000, -20.000, -10.000 )
compensation -30. -40.
N1( -15.773, -25.773, -15.773 ) Y
M(0,0)
N3( -50.000, -20.000, -10.000 )
N3( -55.773, -25.773, -15.773 )
X
-10.
W(0,0)
N4( 0.000, 0.000, 0.000 ) Program path
N4( 0.000, 0.000, 0.000 )
-10. -20.
N4( 20.000, 10.000, 10.000 )
N4( 20.000, 10.000, 10.000 )
Path after
-30.
compensation -20.
* Upper line: Program value
Lower line: Value after compensation
Z
127
11. TOOL COMPENSATION
11.3 Three-dimensional Tool Radius Compensation; G40/G41/G42
(o) NC reset
The three-dimensional tool radius compensation will be canceled if NC reset is executed
during three-dimensional tool radius compensation.
(4) Restrictions
(a) The compensation number is selected with the D command, but the D command is valid only
when G41 and G42 are commanded. If D is not commanded, the number of the previous D
command will be valid.
(b) Change to the compensation mode in the G00 or G01 mode. When changed during the arc
mode, the program error "PR0150 Radius compen in arc modal" will occur.
The compensation direction and offset amount after the changes are valid from the block
where I, J and K are commanded in the G00 or G01 mode.
If the three-dimensional tool radius compensation command is used in a block not containing
the plane normal line vector (I, J, K) during the arc mode, only the modal information will
change. The plane normal line vector will be validated from the block where I, J and K are
commanded next.
(c) During the three-dimensional tool radius compensation mode in a certain space, the space
cannot be changed to another space and three-dimensional tool radius compensation cannot
be carried out. To change the compensation space, always carry out cancel (G40 or D00).
(Example)
G41 Xx Yy Zz Ii Jj Kk; Compensation starts in X, Y, Z space.
:
:
G41 Uu Yy Zz Ii Jj Kk; Compensation is carried out in X, Y, Z space, and U axis moves
by commanded value.
(d) If the compensation number D exceeds 1 to 40 with the standard specifications or 1 to 800
(max.) with the additional specifications, the program error "PR0170 No compensation
number" will occur.
(e) Only the G40 and D00 commands can be used to cancel three-dimensional tool radius
compensation.
(f) If the size (I2+J2+K2) of the vector commanded with I, J and K overflows, the program error
"PR0035 Address range over" will occur.
128
11. TOOL COMPENSATION
11.4 Shape Compensation Amount, Wear Compensation Amount
11.4.1 Outline
Of the tool positions in a direction parallel to the control axis, the tool shape offset amount and wear
compensation amount are registered. The compensation may extend over two or more axes.
(a) Of the tool position offsets in a direction parallel to the control axis, the rotation tool's
longitudinal direction offset amount is registered as the tool length offset amount. The tool
length offset amount includes type I and type II.
1) Type I
The distance from the tip of the tool to the workpiece upper end when the tool position is at
the reference point is registered as the shape compensation amount. The tool length offset
amount is set with a negative value.
R
Tool radius
compensation
amount
Tool length
offset amount
Z0.0
Workpiece
Table
2) Type II
The distance from the reference point to the tip of the tool when the tool position is at the
reference point is measured and registered as the shape compensation amount. The tool
length offset amount is set with a positive value.
R
Tool radius
compensation
amount
Tool length
Z0.0 offset amount
W Workpiece
Table
(b) Of the tool position compensates in a direction parallel to the control axis, the rotation tool's
radius direction compensation amount is registered as the tool radius compensation amount.
The tool radius compensation amount is set with a positive value.
129
11. TOOL COMPENSATION
11.4 Shape Compensation Amount, Wear Compensation Amount
The tool length wear compensation amount and tool radius wear compensation amount can be set
independently.
If a negative value is set for the tool length compensation amount, a negative value must be set for the
tool length wear compensation amount. Set a positive value for the tool radius wear compensation
amount.
130
11. TOOL COMPENSATION
11.5 Number of Compensation Sets
131
11. TOOL COMPENSATION
11.6 Tool Position Offset; G45/G46/G47/G48
Note that in this case, the arc start point must already be offset in the required direction.
(If offset is commanded independently to the arc, the arc start point radius and arc end point
radius will be deviated by the offset amount.)
(b) When an absolute value is commanded, the movement from the previous block's end point to
the position commanded in the block containing G45 (to G48) will be extended or reduced in
each axis direction. Thus, when an absolute value is commanded, the offset will be applied to
the movement amount in that block. If the movement amount is zero, the movement will stop
immediately, and the offset amount will not be applied.
132
11. TOOL COMPENSATION
11.6 Tool Position Offset; G45/G46/G47/G48
Equivalent command
movement amount Actual example
Command
(Designated offset (When X = 1000)
amount = l)
G45Xx Dd X (x + l) l = 10 X = 1010
l = 10 X = 990
G45X x Dd X (x + l) l = 10 X = 1010
l = 10 X = 990
G46Xx Dd X (x l) l = 10 X = 990
l = 10 X = 1010
G46X x Dd X (x l) l = 10 X = 990
l = 10 X = 1010
G47Xx Dd X (x + 2 l) l = 10 X = 1020
l = 10 X = 980
G47X x Dd X (x + 2 l) l = 10 X = 1020
l = 10 X = 980
G48Xx Dd X (x 2 l) l = 10 X = 980
l = 10 X = 1020
G48X x Dd X (x 2 l) l = 10 X = 980
l = 10 X = 1020
(d) If n axes are commanded simultaneously, the same amount of offset will be applied on all axes
commanded within the range of the simultaneous control axes.
The tool position offset is also valid for the additional axis.
(e) Do not use this command in the fixed cycle mode. If commanded in the fixed cycle mode, it will
be ignored.
(f) If the command direction is reversed because of the internal operation by the extension and
retraction, the axis will move in the reverse direction.
(g) When G45 to G48 is commanded, the offset amount per time is the offset amount designated
with the offset number. The difference with the previous offset will not be moved as with the
tool length offset (G43).
(4) Notes
(a) Even if the offset number is not commanded in the same block as the G45 to G48 commands,
the offset will be applied with the previously registered tool position offset number. An alarm will
occur if the designated offset number exceeds the specifications.
133
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.1 Automatic Coordinate System Setting
G92 Offset
134
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.2 Machine Coordinate System
W1
135
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.3 Workpiece Coordinate System; G54 to G59
(b) Expanded workpiece coordinate system selection (+48 sets or 96 sets) (Option)
In addition to the six workpiece coordinate system sets in G54 to G59, 48 sets (or 96 sets) of
workpiece coordinate systems can be used with the G54.1Pn command.
G code Function
G54 Workpiece coordinate system 1 selection (W1)
G55 Workpiece coordinate system 2 selection (W2)
G56 Workpiece coordinate system 3 selection (W3)
G57 Workpiece coordinate system 4 selection (W4)
G58 Workpiece coordinate system 5 selection (W5)
G59 Workpiece coordinate system 6 selection (W6)
(b) Expanded workpiece coordinate system selection (+48 sets or 96 sets) (Option)
The format for the workpiece coordinate system selection and movement command to the
workpiece coordinates using the G54.1Pn command is as follows.
The n value for P following G54.1 indicates each workpiece coordinate system. Designate 1 to
48 or 1 to 96.
136
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.3 Workpiece Coordinate System; G54 to G59
W2 W1
Workpiece coordinate 2 Workpiece coordinate 1
(G55) (G54)
Start
W4 W3
(g) The coordinate system will move with G92 in a workpiece coordinate system.
(h) A new workpiece coordinate system 1 is set by setting the coordinate system (G92) command
in the G54 (workpiece coordinate system 1) mode. At the same time, the other workpiece
coordinate systems 2 to 6 (G55 to G59) will move in parallel and new workpiece coordinate
systems 2 to 6 will be set.
(i) A hypothetical machine coordinate system is formed at the position which deviates from the
new workpiece reference point by an amount equivalent to the workpiece coordinate system
offset amount.
(j) By setting the hypothetical machine coordinate system, the new workpiece coordinate system
will be set at a position which deviates from that hypothetical machine coordinate system zero
point by an amount equivalent to the workpiece coordinate system offset amount.
(k) When the first automatic reference point return (G28) or manual reference (zero) point return
is completed after the power has been turned ON, the basic machine coordinate system and
workpiece coordinate systems are set automatically in accordance with the parameter
settings.
(l) If no P code exists in the same block as G54.1, the input is treated as P1.
137
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.3 Workpiece Coordinate System; G54 to G59
(4) Notes
(a) The program error "PR0062" will occur when G54X_Y_ ; is assigned subsequent to reference
point return (automatic or manual) after the power is turned ON. (A speed command is
required since the speed is controlled by G01.)
(b) If the numeric value of P that follows G54.1 is other than 1 to 96 (including P0), the program
error "PR0035" will occur.
(c) Do not use any G command for which a P code is to be used in the same block as G54.1.
(d) If the G54.1 command is executed when there are no additional specification for the number of
sets of the workpiece offset, the program error "PR0437" will occur.
(e) The local coordinate system cannot be used when the G54.1 is modal. If the G52 command is
executed while G54.1 is modal, the program error "PR0438" will occur.
138
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.4 Local Coordinate System; G52
L1
Local coordinates
G54 G52
y1
W1
x1
Workpiece coordinate 1
(G54)
G code Function
G54 G52 Local coordinate system setting on workpiece coordinate system 1
G55 G52 Local coordinate system setting on workpiece coordinate system 2
G56 G52 Local coordinate system setting on workpiece coordinate system 3
G57 G52 Local coordinate system setting on workpiece coordinate system 4
G58 G52 Local coordinate system setting on workpiece coordinate system 5
G59 G52 Local coordinate system setting on workpiece coordinate system 6
G52X0Y0Z00 ; Local coordinate system cancel
139
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.4 Local Coordinate System; G52
(f) The coordinate commands in the absolute value mode (G90) will cause movement to the
position in the local coordinate system.
140
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.5 External Workpiece Coordinate Offset
(c) In addition to the normal external workpiece coordinate system offset, 48 sets (or 96 sets) of
expanded external workpiece coordinate system offsets can be set and selected as an option.
141
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.6 Coordinate System Setting; G92
Example in which machine is at W1 position (x1, y1) and W1 is shifted to the new
W1 when G92Xx1Yy1; is commanded during the workpiece coordinate system W1
modal.
(External workpiece coordinate system offset = 0, interrupt amount offset = 0)
Y1
W1
y1
X1
x1
Machine position
(b) The shifted coordinate system will return to the original system when dog-type reference point
return or the program is executed.
(c) If the manual absolute switch is OFF and manual axis movement is carried out, etc., causing
the workpiece coordinate system to deviate, the correct workpiece coordinate system can be
recovered with the following procedure.
1) Carry out reference point return while the coordinate system is deviated.
2) Then command G92G53X0Y0Z0;. With this command, the workpiece coordinate value and
current value display will be preset to the workpiece coordinate system offset value.
(d) Whether to always move with absolute values or to follow the incremental value/absolute value
modal can be selected with the machine parameters.
(e) Whether to preset the current position counter can be selected with the parameters.
142
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.7 Rotation Axis Coordinate System
Rotation type
Linear type
Shortcut valid Shortcut invalid
ABS Moves with a shortcut to Moves according to the Moves according to the sign
command the end point. sign for the remainder for the movement amount
obtained by dividing the obtained by subtracting the
incremental movement current value from the end
amount by 360. point as with the normal
linear axis. (The value is not
rounded to 360.)
INC Moves in the direction of the commanded sign by the incremental amount
command commanded using the current position as the start point.
143
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.8 Plane Selection; G17/G18/G19
(a) Which of the X, Y or Z axes to keep the additional axis parallel to can be selected with
parameters. By using this, the plane can be selected by two random axes that are not parallel.
If the rotation axis is registered as a parallel axis, a plane containing the rotation axis can be
selected.
(b) Which of the G17, G18 or G19 states to set the initial state to (state when power is turned ON
or reset) can be selected with parameters.
(c) The Y-Z cylindrical plane (hypothetical plane that develops cylinder) can be selected with G16
only in the milling mode.
(d) The movement command and plane selection can be commanded in the same block.
G19 X100. ; In this program command, X100. is an axis that does not exist in the
G19 (Yp, Zp) plane. However, YpZp is selected by G19, and the X
axis moves 100.mm separately from G19 plane.
G17 X100. R50. ; In this program command, the Xp, Yp plane is selected with the G17,
so the arc command is controlled over this plane.
(a) As shown in the Table 1, the basic axis and its parallel axis can be registered up to the 2nd
parallel axis.
(b) The basic axis can be an axis other than X, Y and Z.
(c) An axis that is not registered is irrelevant for the plane selection.
144
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.8 Plane Selection; G17/G18/G19
(b) The plane selected by the basic axis and one of the parallel axis depends on the axis address
commanded in the same block as the plane selection (G17, G18, G19).
For Table 1 parameter registration example
G17X_Y_ ; XY plane
G17W_Y_ ; WY plane
G18X_V_ ; VX plane
G18U_V_ ; VU plane
G19Y_Z_ ; YZ plane
G19Y_V_ ; YV plane
(c) The plane will not change in a block where the plane selection G code (G17, G18, G19) is not
commanded.
G17X_Y_ ; XY plane
Y_Z_ ; XY plane (Plane does not change)
(d) If the axis address is omitted in the block where the plane selection G code (G17, G18, G19) is
commanded, it will be interpreted that the basic three axes addresses have been omitted.
For Table 1 parameter registration example
G17 ; XY plane
G17U_ ; UY plane
G18U_ ; ZU plane
G18V_ ; VX plane
G19Y_ ; YZ plane
G19V_ ; YV plane
(e) 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 Table 1 parameter registration example
If G17 U_Z_; is commanded, the UV plane is selected, and Z moves without relevance to the
plane.
(f) If the basic axis or parallel axis is commanded in duplicate in the same block as the plane
selection G code (G17, G18, G19), the plane will be determined using the basic axis, No. 1
parallel axis and No. 2 parallel axis as the order of priority.
For Table 1 parameter registration example
If G17 U_Y_W_; is commanded, the UY plane is selected, and W moves without relevance to
the selected plane.
145
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.9 Automatic 1st Reference Point Return; G28/G29
G code Function
G28 Automatic 1st reference point return
G29 Start position return (Return from 1st reference point to middle point position for 1st
reference point return start, and then position to position designated by program.)
G28 Xx1 Yy1 Zz1 ; After positioning the designated axis at rapid traverse to
Return Return control axis the commanded position (middle point), each axis is
command (middle point) independently returned to the 1st reference point.
G29 Xx1 Yy1 Zz1 ; After positioning each axis independently at rapid traverse
Return Return control axis via the middle point with G28 and G30, the axis is
command (Commanded position) positioned at rapid traverse to the position designated with
the program.
Interpolation/
non-interpolation
G29
selection
Interpolation/
non-interpolation
selection
G29
146
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.9 Automatic 1st Reference Point Return; G28/G29
(b) The return pattern for the automatic 1st reference point return is the same as for the manual
1st reference point return.
(c) The number of axes that can be simultaneously returned to the 1st reference point depends on
the number of simultaneous control axes.
(d) If tool radius compensation or tool nose radius compensation is not canceled during the 1st
reference point return, it will be temporarily canceled during the movement to the middle point.
The compensation will be reapplied at the next movement after returning.
(e) If the tool length offset is not canceled during the 1st reference point return, the offset will be
canceled during the movement from the middle point to the 1st reference point, and the offset
amount will also be cleared. However, the tool length offset can be temporarily canceled with
the parameters. In this case, the offset will be reapplied at the next movement command.
(f) The movement to the G28 middle point and the movement from the G29 middle point to the
commanded point can be selected as interpolation or non-interpolation with the parameters.
The movement from the G28 middle point to the 1st reference point and the movement to the
G29 middle point will be non-interpolation.
(g) Even if single block is selected, the program will not stop at the middle point.
(h) The zero point reached signal is output when the 1st reference point return is completed.
147
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.10 2nd, 3rd and 4th Reference Point Return; G30
G code Function
G30 P2 2nd reference point return
G30 P3 3rd reference point return
G30 P4 4th reference point return
G30 Xx1 Yy1 Zz1 Pp1 ; After positioning the designated axis to the
Return Return control axis Return point commanded middle point with rapid traverse, each
command (middle point) number axis is independently returned to the reference point.
G30 P2
Start position
Middle point
G30 P3
G30 P4
148
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.10 2nd, 3rd and 4th Reference Point Return; G30
149
12. COORDINATE SYSTEM SETTING FUNCTIONS
12.11 Reference Point Check; G27
G27 Xx1 Yy1 Zz1 Pp1 ; After the designated axis is positioned with rapid
Compare Return control axis Compare traverse to the commanded position, if the returned
command number point is the reference point, the reference point
P1 : 1st reference point check reached signal is output.
P2 : 2nd reference point check If the P command is omitted, it will be handled as 1st
P3 : 3rd reference point check reference point check.
P4 : 4th reference point check
150
13. PROGRAMMING SUPPORT FUNCTIONS
13.1 High-speed Machining Mode; G05
Program command
(b) The high-speed machining mode I is commanded with G05P1, and the high-speed machining
mode II is commanded with G05P2. The high-speed machining mode is canceled with G05P0.
The incremental value/absolute value commands in the high-speed machining mode follow the
modals for when G05 is commanded.
151
13. PROGRAMMING SUPPORT FUNCTIONS
13.1 High-speed Machining Mode; G05
(c)
Mode Command M6
Standard mode G05 (P0) 8.4m/min (Regardless of tool radius
compensation ON/OFF)
High-speed mode I G05P1 16.8m/min (Regardless of tool radius
compensation ON/OFF)
High-speed mode II G05P2 67m/min (When tool radius compensation is
OFF.)
The numbers in the above table indicate the maximum speed (m/min) when the G1 block for
1mm segment is executed.
The performance conditions are common and are as follow:
4-axis system (including spindle) or less
1 system
Three axes or less simultaneously commanded with G01
Block containing only axis name and movement amount (macros and variable commands
are not contained)
Only stored stroke limit I is valid for stroke check
For high-speed mode II, the following condition applies in addition to the above.
Tool radius compensation OFF
There are no particular limits to the program for the high-speed machining mode I. However, if
the above conditions are not satisfied, the designated speed may not be ensured.
(d) Override, maximum cutting speed clamp, single block operation, dry run, manual pulse
generator interrupt, graphic trace and high-accuracy control mode are all valid even in the
high-speed machining mode.
(4) Restrictions
(a) Before commanding G05P2, cancel the radius compensation, mirror image, scaling,
coordinate rotation, hypothetical axis interpolation and three-dimensional radius
compensation.
(b) The automatic operation process has the priority during the high-speed machining mode, so
the display response may be delayed.
(c) During the G05P2, G05P0 and G05P1 command blocks, the speed will decelerate once, so
command these at a position where the tool is separated from the workpiece.
(d) When using the high-speed machining mode with communication or tape operation, the
machining speed may be suppressed to a low speed due to restrictions in the program transfer
speed.
(e) The cutting feed clamp speed during the high-speed machining mode is the minimum speed of
the movement axes' cutting feed clamp speeds. The cutting feed clamp speed when not in the
high-speed machining mode is set so that the feedrate of each movement axis does not
exceed the respective cutting feed clamp speed. Thus, the cutting feed clamp speed during
the high-speed machining mode may decrease compared to when not in the high-speed
machining mode.
(5) Notes
(a) The only address P commands that are valid are P0, P1 and P2. A program error will occur if
other P commands are designated, or if there is no P command.
(b) Do not command addresses other than N or P in the G05 block. A program error will occur if
an address other than N or P is commanded.
(c) Decimal points are invalid for address P. Even if a decimal point is used, it will be ignored.
152
13. PROGRAMMING SUPPORT FUNCTIONS
13.2 Subprogram Control; M98/M99
Op1 (Subprogram)
:
Nh1
:
M99 ; (Return to main program)
(Note) Set the device No. in which a subprogram exists. The call sequence designated in
the
machining parameters is followed if this setting is omitted.
The d1 device No. is set in the machining parameters.
M99 Pp2 ;
Return Return destination sequence number
command (When omitted, the program will return to the block
following the call block.)
P1000 P1 P2 P8
8 level call
M98 P2;
M98 P1; M99;
M98 P3;
M99;
M99;
M02/M30;
153
13. PROGRAMMING SUPPORT FUNCTIONS
13.2 Subprogram Control; M98/M99
(d) The subprogram branch destination and the subprogram repetition can also be designated.
Execute five
M98 P1 H1;
times.
M99;
M98 P1 L5;
N100;
M98 P1 H100; M99 ;
M99; Execute five times
M02/M30; M02/M30; and then return.
(e) In addition to subprogram stored in the NC memory, subprograms stored in the personal
computer's floppy disk or hard disk, etc., can also be run.
The relation of the main program storage place and subprogram storage place is as follows.
(4) Notes
(a) The program error "PR0232" will occur if the designated P (program number) is not found.
(b) The M98P_;M99; block will branch to "O100" after "X100." is executed if the program is
"X100.M98P100;".
(c) If M99; is commanded in the main program, the program will return to the head. (This also
applies for MDI.)
Note that a program error will occur if the parameter (Main M99 alarm stop) is ON.
(d) The subprogram can be branched to with M98P_; using tape operation, but a sequence
number cannot be designated as the return destination with M99P_;. (P_ will be ignored.)
(e) If the sequence number is designated with M99P_;, it may take longer to search for the
designated position depending on the program.
154
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
13.3.1 Outline
Using this function, hole drilling cycles such as drill, tapping, etc., can be commanded with a program
containing one block. By designating the operation mode, various fixed cycle can be called out.
By editing the standard fixed cycle subprogram, the fixed cycle sequence can be changed by the user.
The user can also register and edit an original fixed cycle program.
(Note) G87/G74 can be used as the manual synchronous tapping function. Refer to the MELDAS 600M
Series Instruction Manual (BNP-B2237) "CHAPTER 2 MACHINE OPERATIONS" for details on the
operation.
G98 G81 Xx1 Yy1 Zz1 Rr1 Qq1 Pp1 Ll1 Ff1 ;
Return point Operation Hole position Hole machining data Feedrate
mode data
G code Function
G98 Initial point level return
G99 R point level return
155
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
G code Application
G80 Cancel
G81 Drilling, spot drilling cycle
G82 Drilling, counter boring cycle
G83 Deep hole drilling cycle
G84 Tapping cycle
G85 Boring cycle
G86 Boring cycle
G87 Back boring cycle
G88 Boring cycle
G89 Boring cycle
G73 Step cycle
G74 Reverse tapping cycle
G76 Fine boring cycle
(Note 1) The number of repetitions can also be commanded with address K. Parameter (110134
Valid ADR_K FIX) needs to be set in order to validate the address K command.
(Note 2) When addresses L and K are commanded in the same block, address L will have the
priority.
(Note 3) When G87/G76 is commanded, address K will designate the shift amount rather than
the number of repetitions.
156
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
1
2
Initial point
3
R point
4 6
Z point
Operation 1: This denotes the X and Y axis positioning, and positioning is done by G00.
By setting the parameters, the axis can be moved according to the current 01 group's G code.
Operation 2: This action takes place at the positioned (initial) point.
When the G87 command is assigned, the M19 command is output from the NC unit to the machine.
This M command is executed and when the finish (FIN) signal arrives at the NC unit,
the next action starts.
If the single block stop switch is in the ON position, the block stop mode is established
upon completion of the positioning.
Operation 3: The tool is positioned as far as the R point by rapid traverse.
Operation 4: Hole machining is conducted by cutting feed.
Operation 5: This action takes place at the hole position.
It differs according to the fixed 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 as far as the R point.
Depending on the fixed cycle mode, it will be retracted at the cutting feed or rapid traverse rate.
Operation 7: The tool is returned as far as the initial point at the rapid traverse rate.
Whether operation 6 or 7 is to be regarded as the completion of the fixed cycle can be selected by the
G commands (G98/G99).
157
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
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
with M02, M30, and reset G99
drilling example
button
G81X100.
Y100. Initial point Initial point
Z50.
Only one R25. R point R point
execution F1000;
G81X100.
Y100.
Z50.
R25.
Second and
L5F1000;
following
executions
First Second Final First Second Final
time time time time time time
(a) With the label L, when the number of repetition is two or more times, the axis will return to the
point determined by G98/G99 modal at the last time.
(b) With the label O, when the number of repetition is two or more times, the axis will return to the
initial point regardless of G98/G99 mode at the last time.
158
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
(a) Any axis except the hole drilling axis can be assigned for the positioning.
(b) The hole drilling axis is determined by the axis address of the hole drilling axis commanded in
the same block as the fixed cycle command (G81 to G89, G73, G74, G76). The basic axis
serves as the hole drilling axis if the axis address is not designated. Designate the number of
fixed cycle repetitions as 0 when not carrying out hole drilling.
(Example) When G17 (X-Y plane) has been selected and the W axis has been set as the axis
parallel to the Z axis
G81 Z_ ; Z axis is set as the hole drilling axis.
G81 W_ ; W axis is set as the hole drilling axis.
G81 ; Z axis is set as the hole drilling axis.
(Note 1) The Z axis can be fixed as the hole drilling axis by parameter setting.
(Note 2) The hole drilling axis should be selected in the fixed cycle cancel mode.
In this explanation, the command value is incremental, the positioning plane is XY, and the hole
drilling axis is the Z axis.
(Note) For addresses Z and R, reprogram when changing the workpiece coordinates even if the
values are the same.
(Example) G54 Xx1 Yy1 Zz1 ;
G81 Xx2 Yy2 Zz2 Rr2 ;
:
:
G55 Xx3 Yy3 Zz2 Rr2 ; Command again even if the Z and R values are the
same as the previous command.
Xx4 Yy4 ;
Xx5 Yy5 ;
:
:
159
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
G73 Xx Yy Zz Qq Rr Ff Pp ;
G98 mode
Initial point
R point
q n
G99 mode
Z point
1) G0 Xx Yy;
2) G0 Zr;
3) G1 Zq Ff;
4) G4 Pp;
5) G0 Z (zn);
6) G1 Z (q+n) Ff;
:
:
(n) G98 mode G0 Z (z+r);
G99 mode G0 Z z;
Using the G73 command, the tool can be returned by rapid traverse by an amount equivalent to
"n" mm and then switched to cutting feed for the second and subsequent passes.
The return amount "n" is set with the parameters.
The stop position during single block operation applies upon completion of the 1), 2) and (n)
commands.
160
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
G74 Xx Yy Zz Qq Rr Ff Pp ;
G98 mode
Initial point
M04
R point
Z p oint
M03
1) G0 Xx Yy ;
2) G0 Zr ;
3) G1 Zz Ff ;
4) G4 Pp ;
5) M03 ; (Spindle forward rotation)
6) G1 Z z Ff ;
7) G4 Pp ;
8) M04 ; (Spindle reverse rotation)
9) G98 mode G0 Z r ;
G99 mode No movement
Override is canceled while G74 is being executed and the override is automatically set to 100%.
Dry run is also ignored.
When the feed hold button is pressed while G74 is being executed, the tool will not stop
immediately with sequences 3) to 6) but will stop upon completion of 6). It will stop immediately
with sequence 1), 2) and 9) rapid traverse.
The stop position during single block operation applies upon completion of the 1), 2) and 9)
commands.
The "in-tapping" NC output signal is output while G74 is modal.
The M03, M04, M05 and S codes are not output while the G74 synchronous tapping is modal.
If F/E are not commanded in the G84, G74 command block, the program error "PR0183 No
pitch/thread number" will occur. Note that the previous F/E values will be used if the parameter
(#320024 Synchronized tapping) is turned ON.
In this case, the F/E values will be initialized when the NC is reset.
161
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
G98 mode
R point
q
M19 sh ift
1) G0 Xx Yy ;
2) G0 Zr ;
3) G1 Zz Ff ;
4) M19 ; (Spindle orientation)
5) G1 Xq1 Yq2 Ff ; (Shift)
6) G98 mode G0 Z (z + r) ;
G99 mode G0 Z z ;
7) G0 X q1 Y q2 ;
8) M03 ; (Spindle forward rotation)
The stop position during single block operation applies upon completion of the 1), 2) and 7)
commands.
This command can be used to perform high-precision boring without leaving scratches or marks
on the machining surface.
This is escaped (retracted) after cutting in the shifted state in the reverse direction to the tool
nose.
The shift amount is assigned as follows by addresses I, J and K.
I and J with G17
K and I with G18
J and K with G19
(Note) Even if address K for designating the number of fixed cycle repetitions is valid, address
K will designate the shift amount rather than the number of repetitions.
The shift amount is executed by linear interpolation and the feedrate accords with the F
command.
I, J and K should be assigned with incremental values in the same block as the hole position
data.
I, J and K are treated as modals during fixed cycles.
(Note) When the parameter fixing the hole drilling axis as the Z axis has been set, the shift
amount can also be assigned by address Q and not by I and J. In a case like this, the
shift amount is set by parameter to +X, X, +Y or Y.
The sign of the Q value is ignored and handled as plus.
Care should be taken because the value of Q is modal in a fixed cycle and considered
as the cutting amount of subsequent G83, G87 and G73 commands.
162
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
G81 Xx Yy Zz Rr Ff ;
G98 mode
R point
1) G0 Xx Yy ;
2) G0 Zr ;
3) G1 Zz Ff ;
4) G98 mode G0 Z (z + r) ;
G99 mode G0 Zz;
The stop position during single block operation applies upon completion of the 1), 2) and 4)
commands.
G82 Xx Yy Zz Rr Ff Pp ;
Initial point
1) G0 Xx Yy ;
2) G0 Zr ;
3) G1 Zz Ff ;
4) G4 Pp ; (Dwell)
5) G98 mode G0 Z (z + r) ;
G99 mode G0 Z z ;
The stop position during single block operation applies upon completion of the 1), 2) and 5)
commands.
163
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
G83 Xx Yy Zz Rr Qq Ff ;
Q: Where Q is the cut amount for each pass, which is always assigned as an incremental value.
G98 mode
Initial point
R point
q
n
G99 mode
Z p oint
1) G0 Xx Yy ;
2) G0 Zr ;
3) G1 Zq Ff ;
4) G0 Zq;
5) G0 Z (q n) ;
6) G1 Z (q + n) Ff ;
7) G0 Z2q;
8) G0 Z (2 q n) ;
9) G1 Z (q + n) Ff ;
10) G0 Z3q;
:
:
(n) G98 mode G0 Z (z + r) ;
G99 mode G0 Zz;
Using the G83 command, the tool can be switched from rapid traverse to cutting feed in front of
"n" mm from the position machined immediately before for the second and subsequent passes.
"n" is set with the parameters.
Program so that q > n.
The stop position during single block operation applies upon completion of the 1), 2) and (n)
commands.
164
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
G84 Xx Yy Zz Rr Ff Pp ;
G98 mode
Initial point
M03
R point
Z p oint
M04
1) G0 Xx Yy ;
2) G0 Zr ;
3) G1 Zz Ff ;
4) G4 Pp ;
5) M04 ; (Spindle reverse rotation)
6) G1 Z z Ff ;
7) G4 Pp ;
8) M03 ; (Spindle forward rotation)
9) G98 mode G0 Z r ;
G99 mode No movement
Whether to use the synchronous tapping mode or asynchronous tapping mode follows the
parameter settings.
Override is canceled while G84 is being executed and the override is automatically set to 100%.
Dry run is also ignored.
When the feed hold button is pressed while G84 is being executed, the tool will not stop with
sequences 3) to 6) but will stop immediately upon completion of 6). It will stop immediately with
sequence 1), 2) and 9) rapid traverse.
The stop position during single block operation applies upon completion of the 1), 2) and 9)
commands.
The "in-tapping" NC output signal is output while G84 is modal.
The M03, M04, M05 and S codes are not output in the G84 synchronous tapping modal.
If F/E are not commanded in the G84, G74 command block, the program error "PR0183 No
pitch/thread number" will occur. Note that the previous F/E values will be used if the parameter
(#320024 Synchronized tapping) is turned ON.
In this case, the F/E values will be initialized when the NC is reset.
165
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
G85 Xx Yy Zz Rr Ff ;
G98 mode
In itial point
R point
Z p oint
1) G0 Xx Yy ;
2) G0 Zr ;
3) G1 Zz Ff ;
4) G1 Z z Ff ;
5) G98 mode G0 Z r ;
G99 mode No movement
The stop position during single block operation applies upon completion of the 1), 2), 4) or 5)
commands.
G86 Xx Yy Zz Rr Ff Pp ;
G98 mode
In itial point
R point
Z p oint
1) G0 Xx Yy ;
2) G0 Zr ;
3) G1 Zz Ff ;
4) G4 Pp
5) M05 ; (Spindle stop)
6) G98 mode G0 Z (z + r) ;
G99 mode G0 Z z ; S
7) M03 ; (Spindle forward rotation)
The stop position during single block operation applies upon completion of the 1), 2) and 7)
commands.
166
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
(Note) Take care with the z and r assignment. (The z and r signs are reversed.)
There is no R point return.
G87
Borin g cycle
M19
R point
M19
Z p oint
M03
1) G0 Xx Yy ;
2) M19 ; (Spindle orientation)
3) G0 Xq1 Yq2 ; (Shift)
4) VG0 Zr ;
5) G1 X q1 Y q2 Ff ; (Shift)
6) M03 ; (Spindle forward rotation)
7) G1 Zz Ff ;
8) M19 ; (Spindle orientation)
9) G0 Xq1 Yq2 ; (Shift)
10) G98 mode G0 Z (z + r) ;
G99 mode G0 Z z ;
11) G0 X q1 Y q2 ; (Shift)
12) M03 ; (Spindle forward rotation)
The stop position during single block operation applies upon completion of the 1), 4), 6) and 11)
commands.
This command can be used to perform high-precision boring without leaving scratches or marks
on the machining surface.
This is escaped (retracted) after cutting in the shifted state in the reverse direction to the tool
nose.
The shift amount is assigned as follows by addresses I, J and K.
I and J with G17
K and I with G18
J and K with G19
(Note) Even if address K for designating the number of fixed cycle repetitions is valid, address
K will designate the shift amount rather than the number of repetitions.
The shift amount is executed by linear interpolation and the feedrate accords with the F
command.
I, J and K should be assigned with incremental values in the same block as the hole position
data.
I, J and K are treated as modals during fixed cycles.
(Note) When the parameter fixing the hole drilling axis as the Z axis has been set, the shift
amount can also be assigned by address Q and not by I and J. In a case like this, the
shift amount is set by parameter to +X, X, +Y or Y.
The sign of the Q value is ignored and handled as plus.
Care should be taken because the value of Q is modal in a fixed cycle and considered
as the cutting amount of subsequent G83, G87 and G73 commands.
167
13. PROGRAMMING SUPPORT FUNCTIONS
13.3 Fixed Cycle; G80 to G89/G73/G74/G76
G88 Xx Yy Zz Rr Ff Pp ;
G98 mode
In itial point
R point
Z p oint
1) G0 Xx Yy ;
2) G0 Zr ;
3) G1 Zz Ff ;
4) G4 Pp
5) M05 ; (Spindle stop)
6) Stop with single block stop switch ON
7) G98 mode G0 Z (z + r) ;
G99 mode G0 Z z ;
8) M03 ; (Spindle forward rotation)
The stop position during single block operation applies upon completion of the 1), 2) 6) and 8)
commands.
G89 Xx Yy Zz Rr Ff Pp ;
G98 mode
In itial point
R point
Z p oint
1) G0 Xx Yy ;
2) G0 Zr ;
3) G1 Zz Ff ;
4) G4 Pp
5) G1 Z z ;
6) G98 mode G0 Z r ;
G99 mode No movement
The stop position during single block operation applies upon completion of the 1), 2), 5) or 6)
commands.
168
13. PROGRAMMING SUPPORT FUNCTIONS
13.4 Corner Chamfering, Corner R; ,C/,R
N100 G01 X_ Z_ , C_ ;
Length up to chamfering starting point or end point from
hypothetical corner
N200 G01 X_ Z_ ;
Next block's end point coordinates
c1
N2
c1
N1
Hypothetical corner
Cc1
Cc1
Chamfering start
point
Chamfering end point
(1)
(2)
169
13. PROGRAMMING SUPPORT FUNCTIONS
13.4 Corner Chamfering, Corner R; ,C/,R
Hypothetical corner
Cc1
Cc1
Chamfering end
point
Chamfering start point
(2)
(1)
Hypothetical corner
Cc1
Cc1
Chamfering start
point
Chamfering end point
(2) (1)
(5) Notes
(a) A program error will occur if the block commanding corner chamfering or the block following it
is a positioning command or thread cutting command.
(b) A program error will occur if the block following that commanding corner chamfering is not a
group 01 G command.
(c) A program error will occur when the movement amount in the block assigning corner
chamfering is less than the chamfering amount.
(d) A program error will occur when the movement amount in the block following the block
commanded corner chamfering is less than the chamfering amount.
170
13. PROGRAMMING SUPPORT FUNCTIONS
13.4 Corner Chamfering, Corner R; ,C/,R
13.4.3 Corner R
(1) Function
The hypothetical corner that assumes that there is no rounding, is rounded with the radius arc
designated with ",R".
N100 G01 X_ Z_ , R_ ;
Arc radius for corner rounding
N200 G01 X_ Z_ ;
Corner R is performed at the point where N100 and N200 hypothetical corner.
N2
r1
N1
Rr 1
(2)
171
13. PROGRAMMING SUPPORT FUNCTIONS
13.4 Corner Chamfering, Corner R; ,C/,R
Rr 1
(1)
Hypothetical corner
(1)
(2)
(5) Notes
(a) A program error will occur if the block commanding corner R or the block following it is a
positioning command or thread cutting command.
(b) A program error will occur if the block following that commanding corner R is not a group 01 G
command.
(c) A program error will occur when the movement amount in the block commanded corner R is
less than the R value.
(d) A program error will occur when the movement amount in the block following the block corner
R is less than the R value.
172
13. PROGRAMMING SUPPORT FUNCTIONS
13.4 Corner Chamfering, Corner R; ,C/,R
The feedrate for the corner chamfering and corner R areas can be commanded with the E command.
This allows the correct shape to be cut at the corner area.
(Example)
X F
(a) The E command is a modal. It is valid even for the next corner chamfer and corner R areas.
(b) The E command modal has independent asynchronous feedrate modals and synchronous
feedrate modals. The valid speed follows the asynchronous/synchronous mode (G94/G95).
(c) If the E command is 0 or if E has not been designated yet, the feedrate at the corner chamfering
and corner R area will be the F command feedrate.
(d) The E command modal is not cleared even when the reset button is pressed. It is cleared when
the power is turned OFF. (This is the same as the F command.)
173
13. PROGRAMMING SUPPORT FUNCTIONS
13.5 Mirror Image; G50.1/G51.1
13.5.1 Outline
When cutting a left/right symmetrical shape, the other shape can be machined with just the left or the
right program. The programming time can be shortened by using this mirror image function.
The mirror image command methods include the following:
External switch mirror image input from PLC
Parameter set mirror image
G command mirror image
13.5.2 External switch mirror image and parameter set mirror image
(2) Notes
(a) When turning the mirror image parameter OFF during execution of a machining program,
make sure to turn it OFF at the same coordinate position as where it was turned ON.
If the changeover position changes, always execute reference point return and
G92G53X_Y_Z__ ;.
174
13. PROGRAMMING SUPPORT FUNCTIONS
13.5 Mirror Image; G50.1/G51.1
(1) Outline
The mirror image can be directly designated with the G command by creating a machining program.
G code Function
G50.1 G command mirror image cancel
G51.1 G command mirror image ON
G51.1 Xx1 Yy1 Zz1 ; The mirror image is applied on the (x1, y1, z1) as if a
Mirror image Command axis and command mirror is placed.
ON position
G50.1 Xx1 Yy1 Zz1 ; The coordinate word indicates the axis for which mirror
Mirror image Command axis image is turned OFF. The coordinate value is ignored.
cancel
X
Mirror axis
175
13. PROGRAMMING SUPPORT FUNCTIONS
13.5 Mirror Image; G50.1/G51.1
(4) Notes
When mirror image is canceled anywhere except at the mirror image center, the program
command position and machine position will deviate, as shown in the figure below. This state
continues until positioning is executed with the absolute value command (G90 mode) in the
program or a G28 or G30 command is assigned for zero point return. The mirror center is set with
an absolute value commanded in the program and so if another mirror image is assigned in this
state, the center may be set at an unforeseen position.
Cancel mirror image above the mirror center and, after cancellation, assign a positioning
command using absolute values.
(b) Scaling
Mirror image applies to a shape after scaling so that cutting proceeds as follows.
Original shape
176
13. PROGRAMMING SUPPORT FUNCTIONS
13.6 Variable Commands
13.6.1 Outline
The program can have flexibility and general-purpose capabilities by designating variables, instead of
giving direct numerical values to particular addresses in a program, and by assigning the values or
those variables as required when executing a program.
The variables can also be operated (added, subtracted, multiplied, divided).
(a) The standard operators are "+", "", "" and " / ". User macro specifications are required for
other operators.
(b) The user macro specifications are required for logical operators (OR, AND, etc.) and functions
(SIN, COS, etc.)
(c) An error will occur if the variable number is negative.
177
13. PROGRAMMING SUPPORT FUNCTIONS
13.6 Variable Commands
(a) All common variables are retained even when the power is turned OFF.
(b) The common variables are divided into the following two types.
Common variables 1: 500 to 549, variables which can be used in common through all
systems
Common variables 2: 100 to 149, variables which can be used in common in the programs
of the system
(b) Notes
1) A variable cannot be defined in the same block as an address. It must be defined in a
separate block.
2) Up to five sets of square brackets [ ] may be used.
3) There are no restrictions on the number of characters and number of variables for variable
definition.
4) The variable values should be within a range from 0 to 99999999.
5) If this range is exceeded, the operations may not be conducted properly.
6) The variable definitions are valid from the moment that the variables are actually defined.
7) Variable quotations are always regarded as having a decimal point at the end.
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
(a) 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.
(b) The G66 (or G66.1) and G67 commands must be paired in the same program.
179
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 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.
No. of repetitions
Program No.
(a) 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.
180
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
1) Argument designation I
: Can be used.
: Cannot be used.
* : Can be used while G66.1 command is modal.
181
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
2) Argument designation II
Format : A__ B__ C__ I__ J__ K__ I__ J__ K__
(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.
182
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
To subprogram
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 1 times with each call.
The argument is the same as for a simple call.
No. of repetitions
Program No.
(a) 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.
(b) 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.
183
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
No. of repetitions
Program No.
(a) 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.
(b) 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).
(c) 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.
(d) O, sequence numbers N and modal G codes are updated as modal information.
Format ; G <argument> ;
G code for macro call
(a) 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.
184
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
(b) The correspondence between the " " which conducts the macro call and the program
number P of the macro to be called is set by parameter.
(c) Up to 10 G codes from G100 to G255 can be used with this instruction. (G01 to 99 can also
be used with parameter #120032 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.
(d) These commands cannot be issued during a user macro subprogram which has been called
by a G code.
Program example
M99 ;
Format ; Mm ; (or Ss ;, Tt ;, Bb ;)
M code for macro call (or S, T, B code)
(a) 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. M98P ;
M98, Mm are not output
b. G65P Mm ;
c. G66P 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.
(b) 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.
(c) As with M98, it is displayed on the CRT screen of the setting and display unit but the M codes
and MF are not output.
185
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
(d) 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.
(e) All S, T and B codes call the subprograms in the prescribed program numbers of the
corresponding S, T and B functions.
(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 ;
186
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Local variable Local variable Local variable Local variable Local variable
(level 0) (level 1) (level 2) (level 3) (level 4)
#1 #1
: #1 #1 #1 :
: Argument : Argument : Argument : Argument :
(1) is set (1) is set (1) is set 1 is set
: : : : :
: : : : :
#33 : : : #33
#33 #33 #33
Macro Macro
Main program (level 2)
(level 1)
Op2 ; Op1 ;
M99 ;
M99 ;
#1 #1
#1 a #1
: #2 b #2 #2
: : : :
: #24 #24 x #24
: #25 #25 y #25
#33 : : :
#33 #33 #33
187
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
(b) Types stored in local variables in order of macro program call order
Macro
Macro
Main program (level 1) (level 2)
Op2 ; Op1 ;
M99 ; M99 ;
#1 #1 #1 a
: #2 #2 b
: : :
: #24 x #24
: #25 y #25
#33 : :
#33 #33
(Note) The set local variable is initialized with macro return (M99) when using simple call (G65).
When using modal call A (G66) or B (G66.1), the local variable is initialized with cancel
(G67).
The types (a) and (b) can be changed with the parameter (#110138 macro call LVAR type).
188
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
13.7.3 Variables
Both the variable specifications and user macro specifications are required for the variables which are
used with the user macros.
The offset amounts of 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 turned OFF. (Common variables
can also be cleared by parameter #310004 Com-var RST clear.)
#10 = 5 ;
#[#10 + 1] = 1000 ; In which case, #6 = 1000.
#[#10 1] = 1000 ; In which case, #4 = 1000.
#[#103] = 100 ; In which case, #15 = 100.
#[#10/2] = 100 ; In which case, #2 = 100.
189
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Note 1) EQ and NE should be used only for integers. For comparison of numeric values with
decimals, GE, GT, LE, and LT should be used.
190
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
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 Call
Local Local
command Argument command Argument
variable variable
G65 address G65 address
G66.1 number G66.1 number
G66 G66
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.
191
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Subscripts 1 to 10 for I, J, and K indicate the order of the specified command sets. They are not
required to specify instructions.
Local variables in subprograms can be defined by means of the <argument> designation during
macro call.
M02; M99;
F(#9)= 800
Local variable
S(#19)= 100.000
data table
192
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
#30=FUP [#2/#5/2] ;
G65 P1 A100. B50. J10. F500;
To subprogram #5=#2/#30/2 ;
M98H100L#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.
193
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
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 Instruction Manual for details.
194
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
195
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Note 1) The last values of the system variables #1100 to #1141 sent are retained as 1 or 0.
(They are not cleared even with resetting.)
Note 2) The following applies when any number except 1 or 0 is substituted into #1100 to
#1131.
<Vacant> is treated as 0.
Any number except 0 and <vacant> is treated as 1.
Any value less than 0.00000001 is indefinite.
196
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
#1001 #1101
#1002 #1102
#1003 #1103
Read only Read/write
#1028 #1128
Macro instructions
#1029 #1129
#1030 #1130
#1031 #1131
#1035 #1135
(R130, R131) (R30, R31)
197
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
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 4000 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.
#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.
198
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Note) The number of axes which can be controlled differs according to the specifications.
Axis No.
Axis 1 Axis 2 Axis 3 Axis 4 Remarks
Axis name
External workpiece External workpiece offset
#5201 #5202 #5203 #5204
offset specifications are required.
G54 #5221 #5222 #5223 #5224
G55 #5241 #5242 #5243 #5244
G56 #5261 #5262 #5263 #5264
G57 #5281 #5282 #5283 #5284
G58 #5301 #5302 #5303 #5304
G59 #5321 #5322 #5323 #5324
(Example
(Example 1)
N1
N1 G28 X0Y0Z0 ; -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 workpiece
G54 work coordinate
N11 G90 G00 G54 X0Y0 ; system defined
coordinate by
system
N10
defined by N10 G54
G54workpiece
work coordinate
coordinate system
system defined by
defined
N2 by N2
M02 ;
(Example
(Example 2) Base machine coordinate system
External workpiece offset
M
G55
G54
This is an example where the external workpiece offset values are added to the workpiece
coordinate (G54, G55) system offset values without changing the position of the workpiece
coordinate systems.
199
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
(Note) This is valid when the extended workpiece coordinate system specifications are provided.
200
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Command format
#3000 = 70 (CALL#PROGRAMMER#TEL#530) :
Alarm message
Alarm number
P277 : Macro
PR0277: Macroalarm message
alarm message
IF [#1 NE 0] GOTO 100 ;
#3000=70(CALL#PROGRAMMER#TEL#530) ; Stops with
NC alarm
N100 <Operator 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.
201
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Contents when
Variable Initialization of
Type Unit power is turned Count condition
number contents
ON
Integrating At all times while
3001 Same as when
(run-out) time 1 Value substituted power is ON
1ms power is turned
Integrating for variable
3002 OFF 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
(allowable
#3001=0 ;
(allowabletime)
G65P9010T time) ms; To WHILE [#3001LE#20] DO1 ;
subprogram
END1 :
M99 ;
Entered in local
Local variable
Allowable time portion :
variable #20 DO1-END is repeated and when allowable
T#20
time is reached, operations jumps to M99.
(11) 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.
202
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Command format
The message should not be longer than 31 characters and it should be enclosed within round
( ) parentheses.
#3007
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
nth axis 4 3 2 1
203
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
204
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Variable number
Function
Pre-read block Execution block
#4001 #4201 Interpolation mode : G00:0, G01:1, G02:2, G03:3
#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
Fixed cycle : G80:80, G73~74:73~74, G76:76,
#4009 #4209
G81~G89:81~89
#4010 #4210 Return level : G98:98, G99:99
#4011 #4211 Scaling : G50:50, G51:51
#4012 #4212 Workpiece coordinate system: G54~G59:54~59
#4013 #4213 Acceleration/deceleration : G61~G64:61~64
#4014 #4214 Macro modal call : G66:66, G66.1:66.1, G67:67
Normal line control : G40.1:40.1, G41.1:41.1,
#4015 #4215
G42.1:42.1
#4016 #4216 Coordinate rotation : G68:68, G69:69
#4017 #4217
#4018 #4218
#4019 #4219 Mirror image : G50.1:50.1, G51.1:51.1
#4020 #4220
#4021 #4221
(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#1X#24Y#25;
M99;
%
205
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Note 1) The number of axes which can be controlled differs according to the specifications.
Note 2) The tool position offset position is the value obtained with only the G45 to G48
position compensation amount.
206
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
1) The positions of the end point coordinates and skip coordinates are positions in the workpiece
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 workpiece 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.)
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, workpiece coordinates and skip coordinates.
Workpiece coordinate
Work coordinatesystem
system W
G00 Read
command
Gauge, etc.
G01
Skip coordinates
Read
command
[End point
coordinates]
W Workpiece
Work coordinate
system
coordinate system
[Work
[Workpiece
coordinates]
coordinates]
Machine coordinate
system
[Machine M
coordinates]
Skip signal
G31
F (feedrate)
W Workpiece
Work coordinate
coordinate system
[Workpiece system
[Input coordinates [Work For " ", check stop and
coordinates]
coordinates] then proceed to read.
of skip signal] Machine coordinate
system For " ", reading is
M possible during movement.
[Machine coordinates]
The position of the skip signal input coordinates is the position in the workpiece 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.
207
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
N1 G91G28X0Y0;
N2 G90G00X0Y0;
N3 X0Y-100.; -50
N4 G31X-150.Y-50.F80;
N5 #111=#5061#112=#5062; -75
N6 G00Y0;
N7 G31X0; -100
N8 #121=#5061#122=#5062; -Y
N9 M02;
Skip signal
208
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
209
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
(23) Scaling
The scaling information can be read using the variable numbers #30080 to #30097
Variable No. Details
#30080 Scaling valid axis
bit 0: 1st axis scaling valid
bit 2: 2nd axis scaling valid
.
.
bit 15: 16th axis scaling valid
#30081 1st axis scaling center coordinate value
#30082 2nd axis scaling center coordinate value
. .
. .
#30096 16th axis scaling center coordinate value
#30097 Scaling magnification
210
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Command format
(a) Once variable names have been set, they will not be cleared even when the power is turned
OFF.
(b) Variables in programs can be quoted by their variable names. In cases like this, the variables
should be enclosed in square parentheses.
(c) The variable numbers, data and variable names appear on the screen of the setting and
display unit.
[Common variables]
#500 -12345.678 A234567
#501 5670.000 DIST
#502 -156.500 TOOL25
211
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
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 workpiece 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)
#101 = 1000 ;
#101 1000.000
#10001 = #101 ;
#102 1000.000
#102 = #10001 ;
Note 3) The <formula> after a function must be enclosed in the square parentheses.
212
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
213
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
214
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
215
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
(1) 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.
"n" of GOTO n must always be in the same program. Alarm "PR0231 No sequence No." 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, alarm "PR0231 No sequence No." 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 X#22 Y#23; N100 N10
#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.
216
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
(2) Iteration
~
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 to 127 (DO1, DO2, DO3, ....... DO127). Up to
27 nesting levels can be used.
(1) Same identifier number can be used any (2) Any number may be used for the WHILE
number of times. DOm 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" (4) The number of WHILE DOm nesting levels
is any number from 1 to 127 for the nesting cannot exceed 27.
depth.
DO1 WHILE ~ DO1 ;
WHILE ~ DO1 ;
~
WHILE~DO27; DO27
Not possible
WHILE ~ DO28;
~
END 28;
~
END 27 ;
END 3 ;
:
:
END 2 ; END 2 ;
~
END 1 ;
END 1 ;
217
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
(5) WHILE DOm must be designated first and (6) WHILE DOm and ENDm must correspond
ENDm last. on 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 (10) Subprograms can be called by M98, G65 or
DOm. G66 between WHILE DOm's.
WHILE~DO1; Main program Subprogram
IF~GOTOn;
Not possible
IF~GOTOn;
Not possible
WHILE~DO1;
WHILE~DO1; WHILE~DO02;
Possible
END1; G65
To subprogram
P100;
WHILE~DO1; END2;
Nn;
END1;
Nn;
M02; M99;
END1; END1;
(11) Calls can be initiated by G65 or G66 between (12) A program error will occur at M99 if WHILE
WHILE DOm's and commands can be and END are not paired in the subprogram
issued again from 1. Up to 27 nesting levels (including macro subprogram).
are 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 fixed cycles G73 and G83 and the special fixed cycle G34 use WHILE, these will be
added multiple times.
218
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
(1) Outline
The external output commands are designed to output the variable values or characters via the
RS-232C interface.
(a) Types
POPEN For preparing the processing of data outputs
PCLOS For terminating the processing of data outputs
BPRNT For character output and variable value binary output
DPRNT For character output and digit-by-digit variable numerical output
(a) The command is issued before the series of data output commands.
(b) The DC2 control code and % code are output from the NC system to the external output
device.
(c) Once POPEN; has been issued, it will remain valid until PCLOS; is issued.
(a) This command is issued when all the data outputs are completed.
(b) The DC4 control code and % code are output from the NC unit to the external output device.
(c) This command is used together with the open command and it should not be issued unless
the open mode has been established.
(d) 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.
219
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
220
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
13.7.8 Checkpoints
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 "#320002 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)
Executable statements are all those statements which are not macro statements.
Flow of processing
Macro single OFF
Program analysis N1 N2 N3 N4 N5 N6 N7
Program analysis N1 N2 N3 N4 N5 N6 N7
Execution N2 N3 N6 N7
Next command block
Statement
N1 N2 N3 N6
process Block in execution
221
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
Macro single ON
Macro single OFF
N4, N5 and N6 are processed in parallel
with the control of the executable statement
of N3, N6 is an executable statement and
[In execution] N3 G00 X-100. Y-100. ;
so it is displayed as the next command. If
[Next command]N6 G01 X#101 Y#102 the N4, N5 and N6 analysis is in time
F800 ; during N3 control, the machine movement
will be continuously controlled.
222
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
(SIN) Y
G65 Pp1 Aa1 Bb1 Cc1 Ff1 ;
100.
-100.
223
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
-X x1
W
Main program
a1 ;
Start angle a1
b1 ;
No. of holes y1
G81Z100.R50.F300L0 To subprogram
r1 ;
Radius
G65P9920Aa1Bb1Rr1Xx1Yy1 ; x1 ;
X axis center
position -Y
y1 ; Y axis center
position
224
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
-Y
(Example 3) Grid
After defining the hole data with the fixed cycle (G72 to G89), macro call is commanded as a hole
position command.
G28 X0 Y0 Z0;
100. 100. 100.
T1 M06; W
-X
G90 G43 Z100.H01;
G54 G00 X0 Y0; -75.
G81 Z-100.R3.F100 L0 M03;
To subprogram
G65P9930 X0 Y0 I-100. J-75. A5B3; -75.
-X
-100.
-Z
225
13. PROGRAMMING SUPPORT FUNCTIONS
13.7 User Macro Specifications
#106=#2 ;
Y
#105=#1 ;
X#101 Y#102 Positioning, drilling
WHILE [#105GT0] DO2 ;
#101=#101+#103 ;
(Note 1)
#105=#1051 ;
END2 ;
END1 ;
M99 ;
226
13. PROGRAMMING SUPPORT FUNCTIONS
13.8 Linear Angle Command
(Example)
Y
End point
(Automatically operated and
calculated)
Y?
o
60
X100.
Start point
(4) Notes
(a) If the workpiece coordinate system selection and linear angle command are issued in the
same block, the end point will be the coordinate value in the new coordinate system.
227
13. PROGRAMMING SUPPORT FUNCTIONS
13.9 Geometric Command
N1 G17 Aa1 ;
Selected plane Angle
N2 Xx2, Yy2, Aa2 ;
Next blocks end Angle
point coordinates
(Example)
N2
a2
a1
Automatic N1
intersection
calculation Start point
Z
W1
(4) Notes
(a) Program error results when the geometric command is not on the selected plane.
(b) The end point coordinates of the 2nd block should be commanded with absolute values. When
incremental values are used, the program error will occur.
(c) When the angle where the two straight lines intersect is less than 1, program error will result.
(d) The program error will occur when the plane is changed in the 1st block and 2nd block.
(e) A program error will occur if a linear command is not issued in the 2nd block.
(f) When A is selected for the axis name, or when A is selected for the 2nd miscellaneous
function name, this function will be ignored.
228
13. PROGRAMMING SUPPORT FUNCTIONS
13.10 Pattern Rotation; M98 l_J_
j1
Rotation center
i1
229
13. PROGRAMMING SUPPORT FUNCTIONS
13.10 Pattern Rotation; M98 l_J_
(4) Notes
(a) A program error will occur if a pattern rotation command is used during pattern rotation.
(b) Pattern rotation and program coordinate rotation cannot be commanded simultaneously.
A program error will occur.
Subprogram (O2200)
N01 G91 G01 X29.389 Y-59.549 ; 200.
N02 X65.717 Y-9.549 ;
100. 300. X
N03 M99 ;
230
13. PROGRAMMING SUPPORT FUNCTIONS
13.11 Program Coordinate Rotation; G68/G69
Y
(Rotation angle)
y1 r1 (Rotation
Y' (x1, y1) center)
X'
x1
(Original
W local X
coordinate
system)
(Rotated local coordinate system)
W'
(4) Notes
(a) The program coordinate rotation cannot be executed simultaneously with figure rotation. The
program error will occur if coordinate rotation is commanded during figure rotation, or figure
rotation commanded during coordinate rotation.
(b) The program error will occur if the plane selection is commanded during the coordinate
rotation mode.
(c) The program error will occur if the tool position offset is commanded during the coordinate
rotation mode.
231
13. PROGRAMMING SUPPORT FUNCTIONS
13.11 Program Coordinate Rotation; G68/G69
(5) Example
Subprogram 200.
(Shape programmed with original coordinate system) Actual
machining
N101 G90 G01 X50. F200 ; shape
N102 G02 X100. R25. ;
N103 G01 X125. ;
N104 Y75. ;
100.
N105 G03 X100. Y100. R25. ; 30
N106 G01 X50. ;
N107 G02 X0 Y50. R50. ;
N108 G01 X0 Y0 ; (Programmed
N109 M99 ; coordinates) X
232
13. PROGRAMMING SUPPORT FUNCTIONS
13.12 Parameter Coordinate Rotation
M 330017
Coord rot plane (H)
330019
Coord rot center (H)
233
13. PROGRAMMING SUPPORT FUNCTIONS
13.12 Parameter Coordinate Rotation
(4) Notes
(a) If rotation angle zero is commanded while carrying out coordinate rotation, it will be canceled
at the next movement command regardless of the G90 or G91 setting.
(b) Command the first movement after this command with the G00 or G01 mode. If an arc
command is issued, the arc start point will not be rotated. However, only the arc end point will
rotate. This will cause the start point radius and end point radius to differ, and "PR0070: Arc
end point deviation large" to occur.
(5) Example
234
13. PROGRAMMING SUPPORT FUNCTIONS
13.13 Special Fixed Cycles; G34/G35/G36/G37.1
Special fixed cycles are used for multiple drilling of pattern shapes. These cycles are used in
combination with the hole drilling fixed cycles, and the hole drilling pattern shape is commanded
with this special fixed cycle.
The special fixed cycles include the following:
Bolt hole cycle
Line at angle
Arc
Grid
235
13. PROGRAMMING SUPPORT FUNCTIONS
13.13 Special Fixed Cycles; G34/G35/G36/G37.1
2) Command format
G34 X x1 Y y1 I r J K n ;
X, Y Bolt hole circle center position; affected by G90/G91.
I Circle radius "r"; unit is based on minimum setting unit and supplied as a
positive number.
J Angle at initial drilling point; counterclockwise direction is taken to be
positive.
K Number "n" of holes to be drilled. Any number from 1 to 9999 can be
assigned; 0 cannot be assigned. An alarm will occur if 0 is set. A positive
value will position in the counterclockwise direction, and a negative value
will position in the clockwise direction.
3) Example
20
I=100mm
Y1=100mm
W
(500mm,100mm)
Position prior to G34 G0 command in N005
As shown in the above example, the tool position applied upon completion of the G34
command is above the final hole. Thus, when moving it to the next position, it is convenient
to command the movement amount in the absolute value mode.
(The coordinate value must be calculated to command the movement amount in the
incremental mode.)
236
13. PROGRAMMING SUPPORT FUNCTIONS
13.13 Special Fixed Cycles; G34/G35/G36/G37.1
2) Command format
G35 X x1 Y y1 I d J K n ;
X, Y Start point coordinate assignment; affected by G90/G91.
I Distance "d"; unit is based on minimum setting unit and when "d" is negative,
drilling proceeds in the symmetrical direction of the point centered on the
start point.
J Angle ; counterclockwise direction is taken to be positive.
K Number "n" of holes including the start point. Any number from 1 to 9999
can be assigned.
3) Example
Y
n=5 holes
When input setting unit is 0.001mm
d=100mm
G91 ;
G81 Z-10.000 R5.000 L0 F100 ;
G35 X200.000 Y100.000 I100.000
=30
J30.000 K5 ;
X
y1=100mm
W
X1=200mm
Position prior to G35 execution
4) Notes
a. The program error will occur when the K command is K0 or when it is absent.
b. The last 4 digits are valid when the value of K is more than 4 digits.
c. Any address except G, L, N, X, Y, I, J, K, F, M, S, T or B programmed in the same block
as the G35 command will be ignored.
d. If there is a group 0 G command in the same block as the G35 command, the one
commanded afterwards takes precedence.
e. When a G22/G23 command is programmed in the same block as the G35 command, it
will be ignored and the G35 command will be executed.
f. If a G72 to G89 command is assigned in the same block as the G35 command, the hole
drilling fixed cycle will be ignored and the G35 command will be executed.
237
13. PROGRAMMING SUPPORT FUNCTIONS
13.13 Special Fixed Cycles; G34/G35/G36/G37.1
2) Command format
G36 X x1 Y y1 I r J P K n ;
X, Y Circle center coordinates; affected by G90/G91.
I Circle radius "r", unit is based on minimum setting unit and supplied as a
positive number.
J Angle at initial drilling point; counterclockwise direction is taken to be
positive.
P Angle distance ; counterclockwise when positive and clockwise when
negative.
K Number "n" of holes to be drilled. Any number from 1 to 9999 can be assigned.
3) Example
=15
Position prior to G36 execution
=10
Y1=100mm
W
X1=300mm
238
13. PROGRAMMING SUPPORT FUNCTIONS
13.13 Special Fixed Cycles; G34/G35/G36/G37.1
2) Command format
G37.1 X x1 Y y1 I x P nx J y K ny ;
X, Y Start point coordinate assignment; affected by G90/G91.
I X-axis interval x; unit is based on minimum setting unit; positive direction
intervals as seen from start point when x is positive and negative
direction when it is negative.
P Number "nx" of holes to be drilled in X-axis direction. Any number from 1
to 9999 can be assigned.
J Y-axis interval y; unit is based on minimum setting unit; positive direction
intervals as seen from start point when y is positive and negative
direction when it is negative.
K Number "ny" of holes to be drilled in Y-axis direction. Any number from 1
to 9999 can be assigned.
3) Example
W y=100m
y1=100mm
x=50mm
4) Notes
a. The program error will occur when the P or K command is P0 or K0, or when they are
absent.
b. The last 4 digits are valid when the value of P or K is more than 4 digits.
c. Any address except G, L, N, X, Y, I, P, J, K, F, M, S, T, or B programmed in the same
block as the G37.1 command will be ignored.
d. If there is a group 0 G command in the same block as the G37.1 command, the one
commanded afterwards takes precedence.
e. When a G22/G23 command is programmed in the same block as the G37.1 command,
it will be ignored and the G37.1 command will be executed.
f. If a G72 to G89 command is assigned in the same block as the G37.1 command, the
hole drilling fixed cycle will be ignored and the G37.1 command will be executed.
239
13. PROGRAMMING SUPPORT FUNCTIONS
13.14 Circular Cutting; G12/G13
G12/G13 Ii Dd Ff ;
Circular cutting Perfect circle Compensation Speed
command radius number
G code Function
G12 CW (Clockwise)
G13 CCW (Counterclockwise)
Y
With G12 command (tool center path)
012345670
5 With G13 command (tool center path)
076543210
Circle
radius
1
0 2 X
4 7 6
Compen- 3
sation
amount
(b) The "+" compensation amount sign denotes reduction and the "" sign expansion.
(c) Circular cutting is performed on the plane currently selected by G17, G18 and G19.
(4) Notes
(a) A program error will occur when compensation number "D" is not assigned or when an illegal
number is assigned.
(b) A program error occurs when [radius (I) compensation amount] is zero or a negative value.
(c) If G12 or G13 is specified while the radius compensation (G41, G42) is specified, the radius
compensation becomes valid for the path after compensation is made according to the D
commanded by G12 or G13.
(d) If the address H is commanded in the same block as G12 or G13, program error occurs.
240
13. PROGRAMMING SUPPORT FUNCTIONS
13.15 Scaling; G50/G51
G code Function
G50 Scaling cancel
G51 Scaling ON
Y
sc
sc:
s1 p1
y1 Scaling center
p1, p2, p3:
Program shape
s1, s2, s3:
Shape after scaling
s3
s2
p2
p3
X
x1
1) Scaling center
a. The scaling center follows the absolute/incremental mode (G90/G91) set at that point.
b. The scaling center must be commanded even when the current position is to be the
center.
c. As explained above, the axis for which scaling is actually effective is the axis for which
the scaling center is commanded.
2) Scaling magnification
a. The scaling magnification is commanded with address P.
b. Minimum command unit: 0.000001
c. Command range: 1 to 99999999 (0.000001 to 99.999999-fold) or 0.000001 to 99.99999
are both valid.
d. If the magnification is not commanded in the same block as G51, the magnification set
in the parameters will be used.
241
13. PROGRAMMING SUPPORT FUNCTIONS
13.15 Scaling; G50/G51
e. Even if this parameter is changed during the scaling mode, the changes will not be valid.
The scaling will be applied with the value set when G51 is commanded.
f. If the magnification is not set in the program or parameters, it will be calculated as
1-fold.
(4) Notes
(a) Scaling is not applied to the offset amounts such as tool radius compensation, tool position
offset or tool length offset. (The compensation and offset is calculated in respect to the scaled
shape.)
(b) Scaling is valid only for movement commands in automatic operation. It is invalid for manual
movement.
(c) For X, Y and Z, the scaling is valid only for the commanded axes. Scaling is not applied on the
axis not having a command.
(d) For the arc command, if scaling is validated for one of the two axes that configure the arc
plane, scaling will be applied only on that axis.
(e) If M02, M30 or M00 (only for M0 reset) is commanded during the scaling mode, the cancel
mode will be entered.
(f) If the coordinate system is shifted (G92, G52 command) during scaling, the scaling center will
also shift by the difference amount.
(g) If manual interrupt is applied during scaling, the manual ABS selection will be ignored, and the
same operation as manual ABS OFF will take place.
242
13. PROGRAMMING SUPPORT FUNCTIONS
13.15 Scaling; G50/G51
243
13. PROGRAMMING SUPPORT FUNCTIONS
13.16 Normal Line Control; G40.1/G41.1/G42.1
Tool end
position
C axis turning
The normal line control I and II can be used according to the C axis turn direction during normal
line control. This is determined by the machine manufacturer specifications.
G Function
G40.1 Normal line control cancel
G41.1 Normal line control left ON
G42.1 Normal line control right ON
244
13. PROGRAMMING SUPPORT FUNCTIONS
13.16 Normal Line Control; G40.1/G41.1/G42.1
No tool radius After the C axis is turned to be at a right angle of the XY axis
compensation movement in the next block, that block is moved.
If radius compensation is applied on a linear-linear, linear-arc
or arc-arc block that crosses a sharp angle, a linear block can
With tool radius
be inserted. At this time, the C axis normal line control inserts
compensation
a C axis turn movement in respect to the shape after radius
compensation.
c. Cancel
The C axis does not turn, and the axis movement by the XY axis command is carried
out.
245
13. PROGRAMMING SUPPORT FUNCTIONS
13.16 Normal Line Control; G40.1/G41.1/G42.1
R
R
Fc F
C axis The speed becomes the circular The tool end position feedrate is automatically
turning interpolation speed (angle controlled by CNC internal calculations so that it
speed speed) corresponding to the X matches the F command value.
during and Y axes interpolation speed. The circular interpolation speed Fr is obtained with
circular However, if the C axis turning the following expression.
interpolation speed exceeds the C axis Fr = Fr/(R+r) (mm/min)
cutting clamp speed, the circular F : Command speed (mm/min)
interpolation speed (F r : Arc radius (mm)
command) will be clamped so R : Parameter value (mm)
that the C axis turning speed Length from C axis center to tool end
becomes the C axis cutting feed
clamp speed. Note that if Fr exceeds the C axis cutting feed clamp
speed, the circular interpolation speed (F command)
will be clamped so that the C axis turning speed
becomes the C axis cutting feed clamp speed.
Fr
R r
246
13. PROGRAMMING SUPPORT FUNCTIONS
13.16 Normal Line Control; G40.1/G41.1/G42.1
(4) Notes
(a) If the spindle is to be the axis targeted for normal line control, the spindle must be changed to
a servo axis. The spindle C axis (servo ON), and C axis spindle (servo OFF) changeover
is carried out with M commands.
(b) The normal line control axis will stop at the turning start position at the single block, cutting
block start interlock and block start interlock.
(c) The C axis movement command is ignored during normal line control.
(d) During C axis normal line control (during the G41.1 and G42.1 modal), the C axis workpiece
offset rewrite command (G92C_;) cannot be issued. The program error (PR0901) will occur if
commanded.
(e) If mirror image is applied to either the 1-axis or 2-axis, the normal line control will be reversed.
247
13. PROGRAMMING SUPPORT FUNCTIONS
13.16 Normal Line Control; G40.1/G41.1/G42.1
248
13. PROGRAMMING SUPPORT FUNCTIONS
13.17 Macro Interrupt; M96/M97
:
Interrupt program 0pi
:
M96Ppi;
: :
: :
The user macro interrupt signal can : :
be accepted in this area. : :
: :
Interrupt signal
: :
: :
M97; :
: M99;
:
:
The user macro interrupt signal The modal information is restored to
:
cannot be accepted in this area. the state before the interruption.
:
:
:
:
M02;
(a) If an interrupt signal is input from the machine side during the user macro interrupt valid
period (from when M96 is commanded to when M97 is commanded or the NC is reset), the
user macro interrupt will start, the program commanded with P_ will interrupt the machining
program currently running, and will be executed instead.
(b) During the user macro interrupt, or in the user macro interrupt invalid state (after M97
command or NC reset), the input interrupt signal will be ignored.
(c) If the user macro interrupt option is not selected, the M96/M97 command will function as a
normal M code, and will be output externally.
249
13. PROGRAMMING SUPPORT FUNCTIONS
13.17 Macro Interrupt; M96/M97
[Type 1]
When the interrupt signal is input, the movement or dwell being executed at that point will be
stopped, and the interrupt program will be executed.
If there is a movement command or miscellaneous function command (MSTB) in the
interrupt program, the command in the stopped block will be lost, and the interrupt program
will be executed. When the interrupt program is completed, the program will restart from the
block following the stopped block.
If there is no movement command or miscellaneous function command (MSTB) in the
interrupt program, after returning from the interrupt program, the program will restart from
where the block was interrupted. However, if the interrupt signal is input during execution of
a miscellaneous function command (MSTB), the NC will enter the completion signal standby
state. Thus, after the completion signal is input, the movement command or miscellaneous
function command (MSTB) in the interrupt program will be executed.
[Type 2]
When the interrupt signal is input, the interrupt program will be executed without stopping the
command being executed at that point.
If there is a movement command or miscellaneous function command (MSTB) in the
interrupt program, the movement command or miscellaneous function command (MSTB) in
the interrupt program will be executed after the block command being executed is completed.
However, if the interrupt program is not completed even when the original block is completed,
the machining may temporarily stop.
250
13. PROGRAMMING SUPPORT FUNCTIONS
13.17 Macro Interrupt; M96/M97
Status trigger method The signal is accepted as a valid signal while the user macro
interrupt signal is ON.
If the interrupt signal is ON when the user macro interrupt is
validated with M96, the interrupt program will be executed.
If the interrupt signal is continuously turned ON, the interrupt
program can be repeated.
Edge trigger method The signal is accepted as a valid signal at the rising edge where the
user macro interrupt signal changes from OFF to ON.
This is used when the interrupt program is to be executed only
once, etc.
To return to the original program from the user macro interrupt program, command M99 in the
interrupt program. The sequence number in the program to be returned to can be designated
with address P. In this case, the area from the block following the interrupted block to the last
block of the program will be searched for. If not found, the area from the block at the head of
the program to the block before the interrupted block will be searched for, and the system will
return to the block with the sequence number that appears first.
(Same as M99P_ in M98 call)
251
13. PROGRAMMING SUPPORT FUNCTIONS
13.17 Macro Interrupt; M96/M97
These variables can be used only in the user macro interrupt program.
An error will occur if used in programs other than the user macro interrupt program.
(4) Restrictions
(a) The user macro interrupt function is part of the user macros, and cannot be used if the user
macro specifications are not provided.
(b) If the system variables #5001 (position information) and following for reading the coordinate
values are used in the user macro interrupt program, the read coordinate value will be that
read with the preread buffer.
(c) When interrupting during execution of the following function, always designate a sequence
number (M99P_ ;) in the return command from the user macro interrupt program. The original
program will not be returned to correctly if the sequence number is not designated.
Tool radius compensation
252
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
Y Radius direction Y
Axis direction
Radius direction X
Z
Machine coordinate system
G68 Xx Yy Zz Ii Jj Kk Rr ;
Three-dimensional Rotation center Rotation center axis Rotation angle
coordinate conversion coordinates direction
mode command
: If the rotation center axis is the X axis, set "1" in i. If not the rotation center axis, set "0".
x, y, z Rotation center coordinate Designated with the absolute position in the local
coordinate system.
i, j, k Rotation center axis direction 1: Designated,
0: Not designated. Note that only one of the three
axes is designated.
r Rotation angle The counterclockwise direction looking at the rotation
center from the rotation center axis direction is the
plus (+) direction. Command as a 0.001 unit within
the range of 360.000 to 360.000.
G69 ;
Three-dimensional coordinate conversion
mode cancel command
There are limits to the G codes that can be commanded during the three-dimensional coordinate
conversion mode.
253
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
254
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
+Z
+Y
+Y
45
+Z
+Y
+Z
+X
P (0, 0, 0)
G68 program
+X coordinate system (B)
P (0, 0, 0)
Local coordinate system
(workpiece coordinate system)
30
P (0, 0, 0)
* If the local coordinate system offset is not applied, the local coordinate system is the
same as the workpiece coordinate system.
255
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
Tn conversion row
1 0 0 0
0 1 0 0
0 0 1 0
x y z 1
256
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
N01 G17 G90 G00 X0 Y0 Z0; Position to the workpiece zero point P.
N02 G00 X100. Y200. Z200.; Move to (100, 200, 200) with rapid traverse.
N03 G02 X100. Y400. J100. F1000; Carry out arc cutting on workpiece top.
N04 G00 Z300.; Escape in +Z direction at +100 rapid traverse.
N05 G68 X0 Y0 Z200. I0 J1 K0 R90.; After shifting program coordinate system to (0, 0, 200), rotate
coordinate axis +90 in Y axis direction.
N06 G17 G90 G00 X0 Y0 Z0; Position to new program's zero point P'.
N07 G00 X100. Y200. Z200.; Move to program coordinate system (100, 200, 200) and
workpiece coordinate system (200, 200, 100) with rapid
traverse.
N08 G02 X100. Y400. J100. F1000; Carry out arc cutting on workpiece side.
N09 G00 Z300.; Move +100 in program coordinate system + Z' direction with
rapid traverse.
N10 G69;
N11 M02;
+Y
+Z
+Y
N4
N6
N3
N9
P (0, 0, 200) N7
N1
N2 N8
P (0, 0, 0)
+Z
+X
+X
257
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
N01 G90 G00 X0 Y0 Z0; Position to the workpiece coordinate system's 1st
workpiece zero point.
N02 F2000;
N03 G00 X100. Y100. Z-600.; Move to (100, 100, 600) with rapid traverse.
N04 G52 X100. Y100. Z-600.; Set the local coordinate system to the (100, 100, 600)
position.
N05 G00 X100. Y10. Z 200.; Move to the local coordinate system's (100, 10, 200)
position with rapid traverse.
N06 G91; Incremental value command
N07 G81 Z-10. R5. L0 F2000; Drilling
N08 G34 X100. Y200. I90. J270. K10.; Bolt hole cycle
N09 G80; Drilling cancel
N10 G91 G00 X-200.; Move 200 from machining end point to X axis direction
with rapid traverse.
N11 G90 G52 X0 Y0 Z0; Cancel local coordinate system.
N12 G90 G00 X0 Y0 Z0; Position to workpiece zero point.
N13 G00 X100. Y100. Z-400.; Move to (100, 100, 400) with rapid traverse.
N14 G68 X100. Y100. Z-400. I0 J1 K0 R90.; Set G68 program coordinate system to position rotated
+90 in Y axis direction using (100, 100, 400) position
as center.
N15 G00 X100.Y10. Z200.; Move to (100, 10, 200) position in G68 program
coordinate system with rapid traverse.
N16 G91; Incremental value command
N17 G81 Z-10. R5. L0 F200; Drilling
N18 G34 X100.Y200. I90. J270. K10.; Bolt hole cycle
N19 G80; Drilling cancel
N20 G91 G00 X-200.; Move 200 from machining end point to X axis direction
with rapid traverse.
N21 G69; Cancel three-dimensional coordinate conversion modal.
N22 M02; End program.
+Y
O (0, 0, 0) N1
N12 +X N20 +Y
-Z N10
N13
N7~N9
+Z
N3
+Y
O (100, 100, -400)
N15
N17~N19
N5
+Z
+X
+X
258
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
259
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
<Example 1>
G68 X0.Y0.Z0. I1J0K0 R90. X axis rotation 90
G68 X0.Y0.Z0. I0J1K0 R90. Y axis rotation 90
(The Y axis designated here is the same as the
Z axis in the original coordinate system.)
<Example 2>
G68 X0.Y0.Z0. I1J0K0 R90. X axis rotation 90
G68 X0.Y0.Z0. I0J0K1 R-90. Z axis rotation 90
(The Z axis -90 rotation designated here is the
same as the Y axis +90 rotation in the original
coordinate system.)
260
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
(i) When first movement command after three-dimensional coordinate conversion command
is an arc command
When the first movement command after the three-dimensional coordinate conversion
command is an arc shape, if the arc center position has not changed before and after the
three-dimensional coordinate conversion, the arc will be drawn. However, an error will occur in
the following cases.
Example in which "Arc end point deviation large" alarm occurs (1)
G90 G28 XYZ Y Y
F3000 G17
G68 X100. Y0. Z0. I0J0K1 R0.
G02 X100. I50.
Arc end point
Y deviation large
End point
End point (X 50, Y 0)
X X
(X 100, Y 0) Current (X 100, Y 0) (X 100, Y 0) X
Current
position position
Arc center Arc center
Y
Example in which "Arc end point deviation large"
alarm occurs (2) End point
(X 150, Y 150)
Arc center
50
Current position
X
Y
X
(X 100, Y 0) (X 100, Y 0)
50
Arc center
End point
No three-dimensional In three-dimensional coordinate conversion
coordinate conversion (X 150, Y -50)
261
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
Radius=50 Radius50
End point End point
X X
Current position (X 100, Y 0) Current (X 100, Y 0) (X 100, Y 0) X
position
Can't calculate
arc center
No three-dimensional coordinate conversion In three-dimensional coordinate conversion
Y
Radius50
Radius=50
End point
Current position Current position
Y
Y
X X
(X 100, Y 0) (X 200, Y 0)
(X 100, Y 0)
262
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
+Y
N1 G28 X0Y0;
N2 G00 X100. Y200.;
N3 G68 I0J0K1 R45.;
N4 G90 X0.;
G68 program
coordinate system
N4
200
100 N2
(0, 70.710, 0) 50
45
+X
0 G54 workpiece
50 100
coordinate system
263
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
+X
G28 XYZ; +Y
N1 G90 G01 X200. F2000;
N2 G51.1 X0.;
N3 G68 X200. Y200. I0J0K1 R90.;
N4 G90 G00 X100. Y0 Z0;
300
500
200
400 Path with no mirror
100
300 Three-dimensional
coordinate conversion
200 center
+Y
N3
100
100 Path during mirror
command
N4
+X
200 N2 N1 200
Mirror center
(with no three-dimensional coordinate conversion)
Mirror center
(during three-dimensional coordinate conversion)
G28 XYZ;
+X
+Y
N1 G91 G01 X200. F2000;
N2 G51.1 X0.;
Path during mirror
N3 G68 X200. Y200. I0J0K1 R90.;
command
N4 G90 G00 X100. Y0 Z0;
N4
300
500
400
200
300
100
N3
Three-dimensional
100
264
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
(l) When mirror image is used during three-dimensional coordinate conversion command
If the G command mirror image is applied during the three-dimensional coordinate conversion
command, the mirror center will be set with the G68 program coordinate system.
If the mode is the absolute value mode, the mirror center will be set with the absolute position
in the G68 program coordinate system. If the mode is the incremental value mode, the mirror
center will be set as a position obtained by adding the incremental value designated in the
G68 program coordinate system to the current position.
+X
G28 XYZ;
+Y
N1 G90 G01 X200. F2000;
N2 G68 X200. Y200. I0J0K1 R90.;
N3 G51.1 X200.;
Path during mirror
N4 G90 G01 X100. Y100. Z0; N4 command
500
300
400
N3
300
100
Path with no mirror
200 N2
+Y
Three-dimensional
coordinate conversion
100
100 center
+X
200 N1 200
Mirror center
(with no three-dimensional coordinate conversion)
Mirror center
(during three-dimensional coordinate conversion)
The mirror center is set at the absolute value X = 200 in the G68 program coordinate system.
(X, Y: before conversion/X', Y': after conversion)
G28 XYZ;
+Y
N1 G91 G01 X200. F2000;
N2 G68 X200. Y200. I0J0K1 R90.;
N3 G51.1 X200.;
N4 G90 G01 X100. Y100. Z0;
500
300
400
200
200 N2
N3
+Y
Three-dimensional
N4 coordinate conversion
100
100
Path during mirror center
command
+X
200 N1 200
Mirror center
(with no three-dimensional coordinate conversion)
Mirror center
(during three-dimensional coordinate conversion)
The mirror center is a position +200 in the X direction from the current position in the G68
program coordinate system. (X, Y: before conversion/X', Y': after conversion)
265
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
In Example 1, there is movement in the Z axis direction in the original figure. However, after
three-dimensional coordinate conversion, the movement is converted to movement in the X axis
direction, so the axis will move.
<Example 1>
G90 G28 XYZ
G68 X0. Y0. Z0. I0J1K0 R90. Y axis rotation 90
G01 Z100. ( 0, 0, 100) (100, 0, 0) (100, 0, 0)
Coordinate before Coordinate after Movement destination
conversion conversion coordinate
In Example 2, there is no movement in the Z axis direction in the original figure. However,
movement in the Z axis direction will be generated after three-dimensional coordinate
conversion.
If the mode is the Z axis cancel mode, this Z axis direction movement will be ignored and no
movement will take place.
<Example 2>
G90 G28 XYZ
G68 X0. Y0. Z0. I0J1K0 R90. Y axis rotation 90
G01 X100. Y100. (100, 100, 0) ( 0, 100, 100) ( 0, 100, 0)
Coordinate before Coordinate after Movement destination
conversion conversion coordinate
266
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
This occurs because movement is executed with an incremental value command while the
position of the shape after three-dimensional coordinate conversion is canceled is deviated
from the original shape.
Normally, the path drawn with graphic check is the original shape onto which
three-dimensional coordinate conversion has not been applied. However, when
three-dimensional coordinate conversion is canceled, the graphic check position is aligned
with the machine position, so if the canceled position is different from the original shape, it will
be deviated from the original shape.
In the above examples, the graphic check's current position (original shape's current position)
in N6 is (0,100,0), but when three-dimensional coordinate conversion is canceled in N7, the
position is aligned to the current machine position (0,0,100).
Thus, if the next movement command is an incremental value command (N8 block), the axis
will move to a position deviated from the original shape.
This deviation can be corrected by moving with an absolute value command. (N9 block)
267
13. PROGRAMMING SUPPORT FUNCTIONS
13.18 Three-dimensional Coordinate Conversion Function; G68/G69
268
13. PROGRAMMING SUPPORT FUNCTIONS
13.19 Cutting Mode; G64
G code Function
G64 Cutting mode ON
The cutting mode can be canceled with the exact stop check mode (G61), automatic corner
override (G62), tapping mode (G63), or high-accuracy control mode (G61.1 to G61.5).
269
13. PROGRAMMING SUPPORT FUNCTIONS
13.20 Automatic Corner Override; G62
G62 ;
The automatic corner override turns ON with the G62 command, and is canceled with the
following G commands.
Program path
Workpiece Machining allowance (finished shape)
S
Workpiece surface
shape
(3)
(2)
(1) Tool center path
Machining
allowance
Ci
Deceleration
area
Tool
270
13. PROGRAMMING SUPPORT FUNCTIONS
13.21 High-accuracy Control; G61.1
G61.1 ;
271
13. PROGRAMMING SUPPORT FUNCTIONS
13.21 High-accuracy Control; G61.1
By using an S-character filter, the speed change becomes smoother, machine vibration is
suppressed, and surface accuracy can be improved.
At the corners, the command vectors of the machining program are automatically judged, and
corner deceleration is carried out. Highly accurate edge machining is enabled by corner
deceleration.
Speed
N001 N002
F
P N002
Pre-inter polation
acceler ation/ F : Cutting feedrate
N001 Deceleration to V0 deceleration
inclin e (acceler ation) V0 V0: Max. tolerable deceleration
Tim e
Kp Kv M
Detector
Kp : Position loop gain
Kv : Speed loop gain S
M : Motor
S : Differential
272
13. PROGRAMMING SUPPORT FUNCTIONS
13.21 High-accuracy Control; G61.1
Path A P2
P1 P3 P4
P11 P12
Path B P15 P16
P14
P13
P21 P22 Wave or step
P23
Path C P25 P26
P24
P1 P31 P41
P8 P9
Path A
P7 P21
P6 Path B
P17
P16 P42
P5
P15 P32 P43 P44
P4 P22
Path D
P14
P3 P23 Path C
P13 Paths are misaligned at P33
adjacent paths P34
P2 Path B
P24
P12 P25
P1 P2 Path A
P11
P3
If strict speed control, based on the angle of two blocks, is used on a program with this type of
step or error, sensitive acceleration/deceleration may be repeated at local steps or errors. As a
result, marks like scratch may be made or streaks may appear on the cutting surface.
With SS (Smooth Surface) control, by using the angle of two blocks and the path information
of a wide area, optimum speed control not affected excessively by the fine steps or waves can
be carried out.
The features of SS control are listed below.
1) Effective for machining a smooth shape die with a fine segment program.
2) Speed control not easily affected by errors in the path.
3) Similar acceleration/deceleration patterns used if shape and accuracy of adjacent paths
are similar.
4) Even at sections not requiring corner deceleration, speed is clamped if predicted
acceleration rate is high.
(Clamp rate is set in the machining parameter (user parameter) "SS ctrl clamp coef".)
The length of the path direction recognized with SS control can be adjusted with the machining
parameter (user parameter) "SS ctrl std length". When a large value is set, a wider range will
be applied, and the effect of errors will be lessened.
(Note) SS control executes speed control using path information for a wide range. Thus, the
number of pre-read blocks will increase. The performance in the high-speed machining
mode I, II cannot be guaranteed when SS control is valid.
1) Operation
Previous Next
Changes in movement Deceleration check
block block
direction at block joint
(N1) (N2)
G0 G0 When movement direction G0 in-position width is checked.
changes
N1 G0 N1
N2
N2 G0 G0 in-position width
Block joint
N1 N2
Block joint
N1 G0
N1 N2
N2 G1
G0 in-position width
Block joint
N1 G0 N2 G1
N1 N2
Block joint
N1 G1
N2 G0
N1 N2
Block joint
N1 G1 N2 G0
N1 N2
Block joint
274
13. PROGRAMMING SUPPORT FUNCTIONS
13.21 High-accuracy Control; G61.1
2) Acceleration/deceleration
When this function is validated (control parameter 2 "Prec ctrl dec chk2" is ON), the
inclination of the acceleration/deceleration during the positioning command (G0) and
cutting feed command (G1) will be determined by the base system parameter #120090
"Glbf2" and #120091 "GlbtL2".
G1bf2
G1 G0
G1btL2 G1btL2
4) Restrictions
Deceleration check is carried out when the control parameter 2 #320010 "G0 interpolation
OFF" is ON.
Deceleration check is carried out when error detect is ON.
Deceleration check is carried out in the exact stop check (G09) command block.
Deceleration check is carried out during the synchronous tapping mode (G74/G84).
When this function is valid and the machining time is calculated, the calculated time will
be the same as when the function is invalid.
If there is a block with no movement, such as the M code, during the movement
commands, the tool will decelerate by the process time for the block with no movement.
275
13. PROGRAMMING SUPPORT FUNCTIONS
13.22 High-accuracy Control for Die Machining; G61.2/G61.3
The function for controlling the machining program commanded with fine segments at a high
accuracy is configured of the following functions.
276
13. PROGRAMMING SUPPORT FUNCTIONS
13.22 High-accuracy Control for Die Machining; G61.2/G61.3
G61.2 ;
The high-accuracy control for die machining (CAM data) is commanded with G61.2.
G61.3 ;
The high-accuracy control for die machining (height sensor data) is commanded with G61.3.
Tolerance
amount
Commanded
point For height sensor data
The noncontinuous points caused by the height sensor system's
Revised measurement errors, etc., are revised to make a smooth path.
point
(Note) The block will not stop at the image data compression command point. The block will
stop at the revised point.
277
13. PROGRAMMING SUPPORT FUNCTIONS
13.22 High-accuracy Control for Die Machining; G61.2/G61.3
Tangent direction
feedrate
Kp Kv M
Detector
Kp : Position loop gain
Kv : Speed loop gain S
M : Motor
S : Differential
A stable servo control with an extremely small servo error can be realized using the feed
forward control characteristic to this CNC system.
278
13. PROGRAMMING SUPPORT FUNCTIONS
13.23 High-accuracy Control for Part Machining; G61.5
G61.5 ;
The high-accuracy control for the part machining is commanded with G61.5.
279
13. PROGRAMMING SUPPORT FUNCTIONS
13.23 High-accuracy Control for Part Machining; G61.5
When using arc interpolation, the arc radius decrease error is improved as follows.
F
Command path
F R
Actual path
Exponential 1 3
1 1 F 10 2
R =
2 2
High-accuracy control acceleration/ ( Ts + 2 Tp ) (
60
) (mm)
R 2
mode OFF deceleration
(acceleration/decelera-ti Linear 3
on after interpolation) 1 1 1 F 10 2
R =
2 2
acceleration/ R
(
24
Ts +
2
Tp ) ( 60 ) (mm)
deceleration
High-accuracy control mode ON 3
. 1 1 F 10 2
(acceleration/deceleration before R =. R (0 + 2 Tp (1 Kf )) (
2 2
60 ) (mm)
interpolation)
R : Command radius (mm) Ts : Time constant of set acceleration/deceleration circuit (s)
R : Radius error (mm) Tp : Position loop time constant (s)
: Angle error (rad) Kf : Feed forward gain (fwd_g)
F : Command cutting speed (m/min) F : Real cutting speed (m/min)
280
13. PROGRAMMING SUPPORT FUNCTIONS
13.24 Program Parameter Input; G10L70/G11
G10 L70 ;
Parameter input command
Pp Ss Nn Aa Dd ;
Parameter data designation
;
(Parameter data designation)
G11 ;
Parameter input cancel command
(4) Notes
(a) A program error will occur if this function is commanded when the option is not provided.
(b) A program error will occur if the parameter No. is illegal. A program error will also occur if a
numerical value is set that exceeds the setting range of that parameter.
(c) A program error will occur if an address other than P, A, N, D or S is commanded.
(d) A program error will occur if the program parameter input command is issued during a fixed
cycle modal or radius compensation modal.
(e) Only parameters that are set with decimal numerical values can be set with program
parameter input.
(The value following D is always a decimal, and is always handled as having a decimal point.
Hexadecimal data and character strings cannot be commanded.)
(f) Issue the backlash compensation amount and machine error compensation amount program
parameter input command at the zero point.
281
13. PROGRAMMING SUPPORT FUNCTIONS
13.25 Program Compensation Input; G10
G code Function
G10 L2 P0 External workpiece coordinate system setting
G10 L2 P1 Workpiece coordinate system 1 setting (G54)
G10 L2 P2 Workpiece coordinate system 2 setting (G55)
G10 L2 P3 Workpiece coordinate system 3 setting (G56)
G10 L2 P4 Workpiece coordinate system 4 setting (G57)
G10 L2 P5 Workpiece coordinate system 5 setting (G58)
G10 L2 P6 Workpiece coordinate system 6 setting (G59)
(Note) If Ll1 is omitted, the tool shape compensation amount will be set. A program error will
occur if Pp1 is omitted.
G code Function
G10 L10 Tool length shape compensation amount setting
G10 L11 Tool length wear compensation amount setting
G10 L12 Tool radius shape compensation amount setting
G10 L13 Tool radius wear compensation amount setting
G10 L20 Pn Xx Yy Zz ;
n = 1 to 96
282
13. PROGRAMMING SUPPORT FUNCTIONS
13.25 Program Compensation Input; G10
(4) Notes
(a) A program error will occur if this function is commanded when the option is not provided.
(b) A program error will occur if an illegal L number or offset number is commanded.
(c) A program error will occur if the offset amount exceeds the maximum command value.
283
13. PROGRAMMING SUPPORT FUNCTIONS
13.26 N Number Single Command Skip
N1G90G54X0Y0 ; Y
N2G00X-10.Y-10. ; X
G54 (0, 0)
N3G91G43H1Z-50. ;
N4 X-10.Y-5. ;
N4
N5 X-10.Y-5.;
N5
N6 ; N6
N8 N7
N7; N9
N8X-10.Y-5. ;
N9X-10.Y-5 ; Speed
N10G01Z-20.F500 ;
Time
N1G90G54X0Y0 ; Y
N2G00X-10.Y-10. ; X
G54 (0, 0)
N3G91G43H1Z-50. ;
N4 X-10.Y-5. ;
N4
N5 X-10.Y-5. ;
N5
N6 ; Skip
N8
N7 ; Skip N9
N8X-10.Y-5. ;
N9X-10.Y-5 ; Speed
N10G01Z-20.F500 ;
Time
284
13. PROGRAMMING SUPPORT FUNCTIONS
13.26 N Number Single Command Skip
N1G90G54X0Y0 ; Y
N2G00X-10.Y-10. ;
X
G54 (0, 0)
N3G91G43H1Z-50. ;
N4 X-10.Y-5. ;
N4
N5 X-10.Y-5.;
N5
N6
N6 N7
N8
IF[#5023EQ-50.]GOTO9;
N7 X-10.Y-5. ;
Speed
N8 X-10.Y-5 ;
N9 G01Z-20.F500 ;
Time
N1G90G54X0Y0 ; Y
N2G00X-10.Y-10. ; X
G54 (0, 0)
N3G91G43H1Z-50. ;
N4 X-10.Y-5. ;
N4
N5 X-10.Y-5. ; N5
N6 N8
N9
IF[#5023EQ-50.]GOTO9;
N7 X-10.Y-5. ;
Speed
N8 X-10.Y-5 ;
N9 G01Z-20.F500 ;
Time
(3) Notes
(a) The sequence number on the screen is not updated for a block with a single N number.
Instead, it will be updated at the block containing the next axis address or G code.
(b) Even if the N single block is commanded for compare stop, the operation will not stop, and
instead the program will end.
(c) During graphic check, the N single block will not be skipped regardless of the parameter
settings.
(d) During the high-speed machining modes 1 and 2, the N single block will not be skipped
regardless of the parameter settings.
(e) The sequence number for an N single block can be searched.
(f) The jump destination can be designated with a macro control statement.
(g) When macro signal is ON, single block stop will be executed with the Nn + macro control
statement and Nn + variable command.
285
14. AUTOMATED SUPPORT FUNCTIONS
14.1 High-speed Skip; G31
Feedrate
Remaining Position
Actual movement distance distance
Command value
286
14. AUTOMATED SUPPORT FUNCTIONS
14.1 High-speed Skip; G31
:
G90 G00 X-100. ;
G31 X-200. F60 ; Skip command
#101 = #5061 The skip signal input coordinates (workpiece coordinate system)
: are read out in variables #101.
+1
0
60 Feedrate (mm/min)
-1
287
14. AUTOMATED SUPPORT FUNCTIONS
14.1 High-speed Skip; G31
~
G31 X100. F100 ; Skip command
#110 = Skip feedrate;
#111 = Response delay G04 ; Machine stop check
time t1; #101 = #5061 ; Skip signal input
coordinate readout
#102 = #110 #111/60 ; Coasting amount based
on response delay time
#105 = #101 #102 ; Skip signal input
coordinates
288
14. AUTOMATED SUPPORT FUNCTIONS
14.2 Multi-step Skip; G31.1 to G31.4
Position
Remaining
Actual movement distance distance
Command value
(b) Method 2
The skip signals that can be used are 1 to 8. Which of these to be used is designated with P in
the program. When one of the combination signals is completely input, the skip operation
takes place.
When there is no P command, the normal skip command will be applied.
G31.n Xx1 Yy1 Zz1 Pp Ff1 ; 1: Follows G94/G95.
Skip Command value and Skip signal Feedrate 2: Follows G90/G91.
command target coordinate value 2 command 1
289
14. AUTOMATED SUPPORT FUNCTIONS
14.2 Multi-step Skip; G31.1 to G31.4
Parameter setting
Skip condition (Valid skip signal) Skip speed
G31.1:7 (Valid skip signal 3, 2, 1) 20.0mm/min(f1)
G31.2:3 (Valid skip signal 2, 1) 5.0mm/min(f2)
G31.3:1 (Valid skip signal 1) 1.0mm/min(f3)
Program f
N10 G31.1 X200.0;
N20 G31.2 X40.0; Operation
N30 G31.3 X1.0 (f1) N10
Measurement
distance
(f2) N20
(f3) N30
t
(Note) If the skip signal 1 is input before the skip signal 2 during execution of N20 above,
N20 will be skipped at that point, and M30 will end immediately.
290
14. AUTOMATED SUPPORT FUNCTIONS
14.2 Multi-step Skip; G31.1 to G31.4
291
14. AUTOMATED SUPPORT FUNCTIONS
14.3 Automatic Tool Length Measurement; G37
If R_, D_, and F_ are omitted, the values set in the parameters will be used.
Program example
Reference point (Z0)
G28 Z0 ;
T01 ;
M06 T02 ;
Tool G43 G00 Z0 H01 ;
length G37 Z-300. R10. D2. F10 ;
Tool
Movement Here, H01 (H01=TLM+Za1-Z0) is calculated as the
amount by tool length compensation amount, and is registered
tool length in the tool compensation table.
measurement
Z0
A region A region
: Move with G0
Tool length B1, B2 region
measurement point : Move at measurement feedrate
(Za1) B1 region
: Error when sensor signal is input
B1 B2 region
region r1 : Error when sensor signal is not input
f1
Sensor d1
B2
region Z1
d1
292
14. AUTOMATED SUPPORT FUNCTIONS
14.3 Automatic Tool Length Measurement; G37
1) The sensor signal (measuring position arrival signal) is used in common with the skip signal.
2) The feedrate will be 1mm/min if the F command and parameter measurement speed are 0.
3) An updated offset amount is valid from the Z axis (measurement axis) command following the
G37 command.
4) Excluding the values applying at the PLC side, the delay or fluctuations in the sensor signal
processing range from 0 to 0.2ms at the NC system side only.
Therefore, a measuring error will arise as follows:
Maximum measuring error [mm] = Measuring speed [mm/min] 1/60 0.2 [ms]/1000
5) The machine position coordinates are read by sensor signal detection, and the machine will
overtravel and stop at a position equivalent to the servo droop.
Maximum overtravel [mm] = Measuring speed [mm/min] 1/60 1/Position loop gain [1/s].
6) The standard position loop gain is 33 [1/s].
7) When the current tool length offset amount is zero, it will be interpreted as a new measurement,
and the length dimension will be compensated.
8) When the tool length offset amount is not zero and there is a distinction between the length
dimensions and length wear, the length wear will be compensated. If there is no distinction, the
length dimensions will be compensated.
(4) Notes
(a) A program error will occur when any axis is not commanded in the G37 block or when two or
more axes have been commanded.
(b) A program error will occur if the H code is not commanded in the G37 block.
(c) Command G37 as a pair with the G43H_ command that designates the compensation number.
A program error will occur if G43H_ is not commanded before the G37 block.
(d) A program error will occur when the sensor signal was input outside the allowable measuring
range or when the sensor signal was not detected even when the tool arrived at the end point.
(e) When manual interrupt has been applied during movement at the measuring speed, return to
the position prior to interrupt and then operation must be resumed.
(f) 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
(g) When the D command and parameter d in (f) above are zero, operation will be completed
normally only when the commanded measurement point and sensor signal detection point
coincide. Otherwise, program error will result.
(h) When the R and D commands as well as parameters r and d in (f) above are all zero, a
program error will occur regardless of whether the sensor signal is present or not after
positioning at the commanded measurement point.
293
15. PROTECTION FUNCTIONS
15.1 Pre-movement Stroke Check; G22/G23
Machine coordinate
Machine valid movement range system
(Note) The upper limit value and lower limit value (points 1 and 2 in the above drawing) are
commanded with coordinate values on the machine coordinate system.
294
15. PROTECTION FUNCTIONS
15.1 Pre-movement Stroke Check; G22/G23
(4) Restrictions
(a) This function is valid only when starting the automatic operation. When interrupted with
manual absolute OFF, the prohibited area will also be shifted by the interrupted amount.
(b) An error will occur during stroke check if the start point or end point is in the prohibited area.
(c) Stroke check will not be carried out for axes having the same value set for point 1 and point
2.
(d) The stroke check is carried out with the tool center coordinate values.
(e) If G23X_Y_Z_; etc., is commanded, the command will be interpreted as G23;X_Y_Z;. Thus,
after the pre-movement stroke check is canceled, movement will take place with the previous
movement modal.
(f) During automatic reference point return, the check will not be carried out between the
intermediate point and zero point. With G29, when moving between the start point and
intermediate point, the check will not be carried out.
(g) If there is an address not used in one block, the warning "PRW0004 Unused address exists"
will occur.
(h) When the basic axis is set as a rotary-type rotation axis, the prohibited area will change from
0 to 360 in the same manner as the movement command.
If the setting extends over "0", the side containing "0" will be the check area. (Refer to the
example below.)
Example
1) G22 Z45. K315. : Stroke check area 45. Z 315.
2) G22 Z115. K45. : Stroke check area 225. Z 315.
3) G22 Z45. K45. : Stroke check area 0. Z 45., 315. Z 360.
1) 2) 3)
45 45
0 0
360 360
295
APPENDIX 1. LIST OF VARIABLE NUMBERS
Argument designation II
# 1 2 3 4 5 6 7 8 9 10 to 27 28 29 30 31 32 33
Argument
A B C I1 J1 K1 I2 J2 K2 I3 to K8 I9 J9 K9 I10 J10 K10
address
(Note) Variables compatible with additional specifications can be used when those additional
specifications have been added.
296
APPENDIX 1. LIST OF VARIABLE NUMBERS
: Reading/writing possible
: Writing not possible
: Unrelated to reading/writing
Variable
Details Read Write
No. (#)
1900 Machining parameter C axis rotation radius
1901 Machining parameter C axis insertion radius
3000 NC alarm (alarm display in the macro program)
3001 Cumulative time 1
3002 Cumulative time 2
3003 Control of single block stop and miscellaneous function finish signal wait
3004 Feed hold, feedrate override, G09 valid/invalid
3006 Message display/stop (message display in the macro program, block stop)
3007 Mirror image
3008 Miscellaneous function lock state
3009 Miscellaneous function lock invalid
3011 Clock (year/month/day)
3012 Clock (hour/min./sec.)
4001 to Modal information
4520 Execut-i Modal Pre-re Execut-i Inter-r
Modal information Pre-read Interrupt
ng information ad ng upt
G code (group 1) 4001 4201 4401 M code 4113 4313 4513
to N code 4114 4314 4514
G code (group 19) 4019 4219 4419 O code 4115 4315 4515
Tool nose radius S code 4119 4319 4519
4107 4307 4507
compensation No. D
T code 4120 4320 4520
Feedrate F 4109 4309 4509
Tool length offset
4111 4311 4511
No. H
(Note) Variables compatible with additional specifications can be used when those additional
specifications have been added.
297
APPENDIX 1. LIST OF VARIABLE NUMBERS
: Reading/writing possible
: Writing not possible
: Unrelated to reading/writing
Variable
Details Read Write
No. (#)
5201 to Workpiece coordinate offset
5334
7001 to Axis 5th axis to
1st axis 2nd axis 3rd axis 4th axis
Workpiece 14th axis
8914
EXT 5201 5202 5203 5204 5205 to 5214
G54 5221 5222 5223 5224 5225 to 5234
G55 5241 5242 5243 5244 5245 to 5254
G56 5261 5262 5263 5264 5265 to 5274
G57 5281 5282 5283 5284 5285 to 5294
G58 5301 5302 5303 5304 5305 to 5314
G59 5321 5322 5323 5324 5325 to 5334
G54.1 P1 7001 7002 7003 7004 7005 to 7014
to : : : : :
G54.1 P96 8901 8902 8903 8904 8905 to 8914
(Note) Variables compatible with additional specifications can be used when those additional specifications
have been added.
298
APPENDIX 2. FIXED CYCLE PROGRAM
2.1 Parameters for Fixed Cycle Program Operation
Caution
Do not change fixed cycle programs without the prior approval of the machine manufacturer.
(Note 1) Set "0" to the parameter "110007 Fix_P" after the operations related to fixed cycle
programs are finished. (This enables the normal user created machining programs to be
operated.) This parameter is set to "0" when the power is turned ON.
299
APPENDIX 2. FIXED CYCLE PROGRAM
2.2 Input/Output of Fixed Cycle Programs
(3) Erasure
The operation method is the same as that for user machining programs.
The registered fixed cycle programs can be erased one at a time or as a batch of continuous
programs.
Set the device, directory and No. of the program to be erased in setting column A. When erasing a
batch of continuous programs, set the range of program Nos. to be erased.
The message "Erase complete" is displayed if the data erasure process finishes normally.
If some files that could not be erased remain after a batch of programs is erased, the message
"Erase ended. Some file not erased" is displayed.
300
APPENDIX 2. FIXED CYCLE PROGRAM
2.3 Standard Fixed Cycle Programs
301
APPENDIX 2. FIXED CYCLE PROGRAM
2.3 Standard Fixed Cycle Programs
G0 Z#28 ; Retract.
#29 = #11 + #14 ; Define the cutting amount for block 2 and after.
END1 ;
N1 G1 Z#3 #26 ; Cutting feed
#3003 = #8 ;
G0 Z #3 #2 ; Retract.
N2 M99%
302
APPENDIX 2. FIXED CYCLE PROGRAM
2.3 Standard Fixed Cycle Programs
303
APPENDIX 2. FIXED CYCLE PROGRAM
2.3 Standard Fixed Cycle Programs
304
APPENDIX 2. FIXED CYCLE PROGRAM
2.3 Standard Fixed Cycle Programs
306
APPENDIX 2. FIXED CYCLE PROGRAM
2.4 Fixed Cycle Variables
Variable Command
Contents
No. address
#0 Null data
#1 Between I and R point distance
#2 R_ R point positioning amount (incremental)
#3 Total cutting amount (incremental)
#4 P_ Dwell time
#5 R point/initial point (G99=0/G98=1)
#6 G43/G44/G49 Tool length offset G code
#7 H_ Tool length offset No.
#8 #3003 System variable #3003 copy
#9 #3004 System variable #3004 copy
#10 Z_ Absolute value of command value Z (only when an absolute
value is commanded, this variable can be set.)
#11 Q_ Cutting amount/shift amount (incremental)
#12 I_ Shift amount [horizontal axis] (incremental)
#13 J_ Shift amount [vertical axis] (incremental)
#14 Parameter G73 return amount/G83 clearance amount
#15 D_ User release variable
#16 R_ User release variable
#17 Z_ User release variable
#18 Q_ User release variable
#19 I_ User release variable
#20 J_ User release variable
#21 K_ User release variable
#22 to #25 System reserve (do not use)
#26 to #29 Temporary variable
Variable Command
Contents
No. address
#30 Axis, R, Z command present/absent flag
#31 Command axis address flag
#32 Incremental/absolute value flag
#33 1st axis data
#34 2nd axis data
#35 3rd axis data
#36 4th axis data
#37 5th axis data
#38 6th axis data
#39 to #48 Special fixed cycle variable
#49 to #69 Temporary variable
#70 to #98 System reserve
#99 Control unit
307
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
308
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
309
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
311
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
312
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
313
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
314
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
315
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
316
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
317
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
318
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
319
APPENDIX 3. LIST OF ALARMS
3.1 Program Errors
320
APPENDIX 3. LIST OF ALARMS
3.2 Program Warnings
321
Revision History
Sep. 1998 BNP-B2239A The incorrect descriptions are corrected and unnecessary sections are erased.
Nov. 1998 BNP-B2239B The incorrect descriptions are corrected and unnecessary sections are erased.
The document number of this manual changed as below.
Old : BNP B3950-006
New : BNP B2239
The details are revised to correspond to the MELDAS 600M Series Version D0.
Feb. 2000 BNP-B2239C
The following explanations and related descriptions are added.
6.9 NURBS interpolation
7.12 F1-digit feed
15 Protection function
Unnecessary sections are erased.
Incorrect descriptions are corrected.
The details are revised to correspond to the MELDAS 600M Series Version F0.
Mar. 2001 BNP-B2239D
The following explanations and related descriptions are added.
6.10 Thread cutting
13.21 Tapping Mode
13.27 N Number Single Command Skip
Unnecessary sections are erased.
Incorrect descriptions are corrected.
Design of the cover and the back cover were changed.
Mar. 2002 BNP-B2239E
MODEL, MODEL CODE, and Manual No. were added on the back cover.
The details are revised to correspond to the MELDAS 600M Series Version F0.
The following explanations and related descriptions are added.
13.18 Three-dimensional Coordinate Conversion Function
The following explanations and related description is added.
Jun. 2003 BNP-B2239F
Appendix2 2.4 Fixed Cycle Variables
The following explanations and related description is revised.
Appendix3 3.1 Program Errors
Unnecessary sections are erased.
Incorrect descriptions are corrected.
The description of internal sub-micrometric system was added.
Apr. 2006 BNP-B2239G
Incorrect descriptions were corrected.
Global service network
NORTH AMERICA FA Center CHINA FA Center
EUROPEAN FA Center KOREAN FA Center
ASEAN FA Center
TAIWAN FA Center
North America FA Center (MITSUBISHI ELECTRIC AUTOMATION INC.) ASEAN FA Center (MITSUBISHI ELECTRIC ASIA PTE. LTD.)
Illinois CNC Service Center Singapore CNC Service Center
500 CORPORATE WOODS PARKWAY, VERNON HILLS, IL. 60061, U.S.A. 307 ALEXANDRA ROAD #05-01/02 MITSUBISHI ELECTRIC BUILDING SINGAPORE 159943
TEL: +1-847-478-2500 (Se FAX: +1-847-478-2650 (Se TEL: +65-6473-2308 FAX: +65-6476-7439
California CNC Service Center Thailand MITSUBISHI CNC Agent Service Center (F. A. TECH CO., LTD)
5665 PLAZA DRIVE, CYPRESS, CA. 90630, U.S.A. 898/19,20,21,22 S.V. CITY BUILDING OFFICE TOWER 1 FLOOR 12,14 RAMA III RD BANGPONGPANG,
TEL: +1-714-220-4796 FAX: +1-714-229-3818 YANNAWA, BANGKOK 10120. THAILAND
Georgia CNC Service Center TEL: +66-2-682-6522 FAX: +66-2-682-6020
2810 PREMIERE PARKWAY SUITE 400, DULUTH, GA., 30097, U.S.A. Malaysia MITSUBISHI CNC Agent Service Center
TEL: +1-678-258-4500 FAX: +1-678-258-4519 (FLEXIBLE AUTOMATION SYSTEM SDN. BHD.)
New Jersey CNC Service Center 60, JALAN USJ 10/1B 47620 UEP SUBANG JAYA SELANGOR DARUL EHSAN MALAYSIA
200 COTTONTAIL LANE SOMERSET, NJ. 08873, U.S.A. TEL: +60-3-5631-7605 FAX: +60-3-5631-7636
TEL: +1-732-560-4500 FAX: +1-732-560-4531 JOHOR MITSUBISHI CNC Agent Service Satellite
Michigan CNC Service Satellite (FLEXIBLE AUTOMATION SYSTEM SDN. BHD.)
2545 38TH STREET, ALLEGAN, MI., 49010, U.S.A. NO. 16, JALAN SHAHBANDAR 1, TAMAN UNGKU TUN AMINAH, 81300 SKUDAI, JOHOR MALAYSIA
TEL: +1-847-478-2500 FAX: +1-269-673-4092 TEL: +60-7-557-8218 FAX: +60-7-557-3404
Ohio CNC Service Satellite Indonesia MITSUBISHI CNC Agent Service Center
62 W. 500 S., ANDERSON, IN., 46013, U.S.A. (PT. AUTOTEKNINDO SUMBER MAKMUR)
TEL: +1-847-478-2608 FAX: +1-847-478-2690 WISMA NUSANTARA 14TH FLOOR JL. M.H. THAMRIN 59, JAKARTA 10350 INDONESIA
Texas CNC Service Satellite TEL: +62-21-3917-144 FAX: +62-21-3917-164
1000, NOLEN DRIVE SUITE 200, GRAPEVINE, TX. 76051, U.S.A. India MITSUBISHI CNC Agent Service Center (MESSUNG SALES & SERVICES PVT. LTD.)
TEL: +1-817-251-7468 FAX: +1-817-416-1439 B-36FF, PAVANA INDUSTRIAL PREMISES M.I.D.C., BHOASRI PUNE 411026, INDIA
Canada CNC Service Center TEL: +91-20-2711-9484 FAX: +91-20-2712-8115
4299 14TH AVENUE MARKHAM, ON. L3R OJ2, CANADA BANGALORE MITSUBISHI CNC Agent Service Satellite
TEL: +1-905-475-7728 FAX: +1-905-475-7935 (MESSUNG SALES & SERVICES PVT. LTD.)
Mexico CNC Service Center S 615, 6TH FLOOR, MANIPAL CENTER, BANGALORE 560001, INDIA
MARIANO ESCOBEDO 69 TLALNEPANTLA, 54030 EDO. DE MEXICO TEL: +91-80-509-2119 FAX: +91-80-532-0480
TEL: +52-55-9171-7662 FAX: +52-55-9171-7698 Delhi MITSUBISHI CNC Agent Parts Center (MESSUNG SALES & SERVICES PVT. LTD.)
Monterrey CNC Service Satellite 1197, SECTOR 15 PART-2, OFF DELHI-JAIPUR HIGHWAY BEHIND 32ND MILESTONE GURGAON 122001,
ARGENTINA 3900, FRACC. LAS TORRES, MONTERREY, N.L., 64720, MEXICO INDIA
TEL: +52-81-8365-4171 FAX: +52-81-8365-4171 TEL: +91-98-1024-8895 FAX:
Brazil MITSUBISHI CNC Agent Service Center Philippines MITSUBISHI CNC Agent Service Center
(AUTOMOTION IND. COM. IMP. E EXP. LTDA.) (FLEXIBLE AUTOMATION SYSTEM CORPORATION)
ACESSO JOSE SARTORELLI, KM 2.1 18550-000 BOITUVA SP, BRAZIL UNIT No.411, ALABAMG CORPORATE CENTER KM 25. WEST SERVICE ROAD SOUTH SUPERHIGHWAY,
TEL: +55-15-3363-9900 FAX: +55-15-3363-9911 ALABAMG MUNTINLUPA METRO MANILA, PHILIPPINES 1771
TEL: +63-2-807-2416 FAX: +63-2-807-2417
European FA Center (MITSUBISHI ELECTRIC EUROPE B.V.) Vietnam MITSUBISHI CNC Agent Service Center (SA GIANG TECHNO CO., LTD)
47-49 HOANG SA ST. DAKAO WARD, DIST.1 HO CHI MINH CITY, VIETNAM
Germany CNC Service Center
TEL: +84-8-910-4763 FAX: +84-8-910-2593
GOTHAER STRASSE 8, 40880 RATINGEN, GERMANY
TEL: +49-2102-486-0 FAX:+49-2102486-591
South Germany CNC Service Center China FA Center (MITSUBISHI ELECTRIC AUTOMATION (SHANGHAI) LTD.)
KURZE STRASSE. 40, 70794 FILDERSTADT-BONLANDEN, GERMANY China CNC Service Center
TEL: +49-711-3270-010 FAX: +49-711-3270-0141 2/F., BLOCK 5 BLDG.AUTOMATION INSTRUMENTATION PLAZA, 103 CAOBAO RD. SHANGHAI 200233,
France CNC Service Center CHINA
25, BOULEVARD DES BOUVETS, 92741 NANTERRE CEDEX FRANCE TEL: +86-21-6120-0808 FAX: +86-21-6494-0178
TEL: +33-1-41-02-83-13 FAX: +33-1-49-01-07-25 Shenyang CNC Service Center
Lyon CNC Service Satellite TEL: +86-24-2397-0184 FAX: +86-24-2397-0185
Beijing CNC Service Satellite
U.K CNC Service Center 9/F, OFFICE TOWER1, HENDERSON CENTER, 18 JIANGUOMENNEI DAJIE, DONGCHENG DISTRICT,
TRAVELLERS LANE, HATFIELD, HERTFORDSHIRE, AL10 8XB, U.K. BEIJING 100005, CHINA
TEL: +44-1707-282-846 FAX:-44-1707-278-992 TEL: +86-10-6518-8830 FAX: +86-10-6518-8030
Italy CNC Service Center China MITSUBISHI CNC Agent Service Center
ZONA INDUSTRIALE VIA ARCHIMEDE 35 20041 AGRATE BRIANZA, MILANO ITALY (BEIJING JIAYOU HIGHTECH TECHNOLOGY DEVELOPMENT CO.)
TEL: +39-039-60531-342 FAX: +39-039-6053-206 RM 709, HIGH TECHNOLOGY BUILDING NO.229 NORTH SI HUAN ZHONG ROAD, HAIDIAN DISTRICT ,
Spain CNC Service Satellite BEIJING 100083, CHINA
CTRA. DE RUBI, 76-80 -APDO.420 08190 SAINT CUGAT DEL VALLES, BARCELONA SPAIN TEL: +86-10-8288-3030 FAX: +86-10-6518-8030
TEL: +34-935-65-2236 FAX: Tianjin CNC Service Satellite
Turkey MITSUBISHI CNC Agent Service Center RM909, TAIHONG TOWER, NO220 SHIZILIN STREET, HEBEI DISTRICT, TIANJIN, CHINA 300143
(GENEL TEKNIK SISTEMLER LTD. STI.) TEL: -86-22-2653-9090 FAX: +86-22-2635-9050
DARULACEZE CAD. FAMAS IS MERKEZI A BLOCK NO.43 KAT2 80270 OKMEYDANI ISTANBUL, Shenzhen CNC Service Satellite
TURKEY RM02, UNIT A, 13/F, TIANAN NATIONAL TOWER, RENMING SOUTH ROAD, SHENZHEN, CHINA 518005
TEL: +90-212-320-1640 FAX: +90-212-320-1649 TEL: +86-755-2515-6691 FAX: +86-755-8218-4776
Poland MITSUBISHI CNC Agent Service Center (MPL Technology Sp. z. o. o) Changchun Service Satellite
UL SLICZNA 34, 31-444 KRAKOW, POLAND TEL: +86-431-50214546 FAX: +86-431-5021690
TEL: +48-12-632-28-85 FAX: Hong Kong CNC Service Center
Wroclaw MITSUBISHI CNC Agent Service Satellite (MPL Technology Sp. z. o. o) UNIT A, 25/F RYODEN INDUSTRIAL CENTRE, 26-38 TA CHUEN PING STREET, KWAI CHUNG, NEW
UL KOBIERZYCKA 23, 52-315 WROCLAW, POLAND TERRITORIES, HONG KONG
TEL: +48-71-333-77-53 FAX: +48-71-333-77-53 TEL: +852-2619-8588 FAX: +852-2784-1323
Czech MITSUBISHI CNC Agent Service Center
(AUTOCONT CONTROL SYSTEM S.R.O. ) Taiwan FA Center (MITSUBISHI ELECTRIC TAIWAN CO., LTD.)
NEMOCNICNI 12, 702 00 OSTRAVA 2 CZECH REPUBLIC Taichung CNC Service Center
TEL: +420-596-152-426 FAX: +420-596-152-112 NO.8-1, GONG YEH 16TH RD., TAICHUNG INDUSTIAL PARK TAICHUNG CITY, TAIWAN R.O.C.
TEL: +886-4-2359-0688 FAX: +886-4-2359-0689
Taipei CNC Service Satellite
TEL: +886-4-2359-0688 FAX: +886-4-2359-0689
Tainan CNC Service Satellite
TEL: +886-4-2359-0688 FAX: +886-4-2359-0689
Duplication Prohibited
This instruction manual may not be reproduced in any form, in part or in whole,
without written permission from Mitsubishi Electric Corporation.