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.
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.
DANGER
WARNING
CAUTION
When the user may be subject to injuries or when physical damage may
occur if handling is mistaken.
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
2. BASIC CONCEPT FOR PROGRAMMING ............................................................................4
2.1 Control Axis and Axis Name.........................................................................................4
2.2 Minimum Program Unit and Minimum Movement Amount ...........................................4
2.3 Incremental Value Command and Absolute Value Command .....................................7
2.4 Reference Point (machine zero point position) and Zero Point Return ........................7
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
4. POSITION COMMAND ........................................................................................................14
4.1 Absolute/Incremental Command; G90/G91 ...............................................................14
4.2 Inch/Metric Changeover; G20/G21.............................................................................15
4.3 Decimal Point Input I, II ..............................................................................................16
4.4 Command Value and Setting Value Range................................................................20
5. PREPARATORY FUNCTIONS ............................................................................................22
5.1 List of G Commands...................................................................................................22
6. POSITIONING AND INTERPOLATION FUNCTIONS.........................................................24
6.1 Positioning; G00 .........................................................................................................24
6.2 Unidirectional Positioning; G60 ..................................................................................25
6.3 Linear Interpolation; G01............................................................................................27
6.4 Circular Interpolation (designating center/radius); G02/G03 ......................................28
6.5 Hypothetical Axis Interpolation; G07 ..........................................................................31
6.6 Cylindrical Interpolation; G07.1 ..................................................................................32
6.7 Helical Interpolation; G02/G03 ...................................................................................35
6.8 Spiral Interpolation; G02.1/G03.1...............................................................................37
6.9 NURBS Interpolation; G06.2 ......................................................................................39
6.10 Thread cutting; G33..................................................................................................42
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
7.7
7.8
7.9
ii
iii
iv
1. OUTLINE OF NC PROGRAM
1.1 Program Format
1. OUTLINE OF NC PROGRAM
This chapter describes some of the terminologies of NC programming.
1.1
Program Format
There are some predefined formats to supply control information to numerical control unit (hereinafter
referred to as CNC) to control the movement of NC machine tool. This CNC employs the format of the
word address system.
In this system, the control information supplied to the machine is configured of a combination of each
alphabetic initial character and multiple digits of numeric characters. As the role (address) is assigned
to each alphabet, it can be specified in any order.
The following programs cause the machine to perform the same operation.
Example 1)
Example 2)
1.2
Each alphabetic initial character described in section 1.1 is called address, and the control information
that follows the address, consisting of multiple digits of numeric value, is called word data (or simply
word). The address has the predefined function.
The number of digits that can be designated for each word data varies depending on the address.
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. OUTLINE OF NC PROGRAM
1.3 Block
Table 1
Item
Program number
Sequence number
Ready function
Input unit
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.
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.
Example) Configuration of one block in the machining program
To configure one block of data, care should be taken because the following restrictions exist.
1) The number of digits of word data that can be specified is determined by the type of address.
Refer to Table 1 for details.
2) The word data except those which are represented by the addresses G and M cannot be
designated in duplicate. If they are designated in duplicate, the word data which is designated later
becomes valid.
3) The total number of characters of each word that can be designated in a single line is limited to
within 128 characters including the end of block code (EOB) (described in later section).
4) The initial character of the address can be either lower or upper case.
1.4
End of Block
The end of block is abbreviated as EOB and is the information code to inform the CNC unit of the end
of each block of command. Therefore, the EOB should be designated for each block. In this manual,
the EOB is represented by the symbol " ; ". This corresponds to INPUT key on the keyboard of
CNC unit or the Enter key of a personal computer.
The CNC unit ignores all information until the first EOB code is read after the power is turned ON or
reset. To ensure the execution from the start block of the machining program, the EOB should be
designated in the start block.
Example 1) N001
N002
N003
G00
X100.0
Y50.0 ;
G00 Z30.0 ;
S3000 M03 ;
If this program is started after the NC power is turned ON or reset, the block N001 is ignored and the
block N002 and onward are executed. Therefore, the following programming should be made as
shown in Examples 2) and 3). (Except machining programs stored in the NC memory.)
Example 2) ;
1.5
N001
G00
X100.0
N002
N003
G00 Z30.0 ;
S3000 M03 ;
Y50.0 ;
N001
G00
X100.0
N002
N003
G00 Z30.0 ;
S3000 M03 ;
Y50.0 ;
Some of the word data are stored in the CNC once they are designated and to when they are updated or
canceled, while other data need to be designated for each block each time they are used. The former is
called modal command and the latter is called unmodal command. For example, the word data F that
designates the feedrate described in later section of this manual is a typical modal command and the
word data that designates the movement amount such as data X, Y or Z is a typical unmodal command.
Avoiding the duplicate designation of the modal commands leads to efficient programming.
2.1
The normal vertical machining center with a CNC (hereinafter referred to as MC) performs cutting
(machining) operation by singly or simultaneously moving the table that moves horizontally (left/right
and forward/backward) and the spindle head that moves up and down.
The mobile parts that move in three directions are called the "control axis" and have the following axis
names.
Control axis that carries out left/right feed of the table X axis
Control axis that carries out forward/backward feed of the table Y axis
Control axis of the spindle head that moves up and down Z axis
The axes of the horizontal machining center are called as follows because the spindle head is placed
horizontally (forward and back word movement)
Control axis that carries out left/right feed of the table X axis
Control axis of the spindle head that moves up and down Y axis
Control axis that carries out forward/backward feed of the table Z axis
The X, Y and Z axes are usually used for linear axis while the A, B and C axes are used for the
rotating axis such as rotary table. The U, V and W axes are used for the address of the additional axis
name.
Up to 14 axes can be used according to the CNC type. This instruction manual assumes the
maximum number of the control axes is 4.
Refer to instruction manual of machine manufacturer for the actual configuration of the control axes.
Fig. 1 shows the configuration example of the three control axes (X, Y, Z).
2.2
In contrast to the movement amount of the control axis, the minimum unit of movement amount that
can be designated by the program and the minimum movement amount that the machine actually
makes consist of three types as shown in the Table 2. The type is selectable by the parameters
specified by the CNC unit.
The type CS-B of 1m system shown in the Table 2 is most frequently used.
2.2
Spindle head
Z+
Z
Tool magazine
Tool
Y
Y+
X+
Table
X
Fig. 1
2.2
Table 2 Input command unit type and the type of minimum movement
amount
Linear axis
Type
Input command
unit
Metric command
(mm)
Inch command
(inch)
Rotating
axis ()
CS-A
0.01
0.001
0.01
CS-B
0.001
0.0001
0.001
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 the 1m system]
Designated by the program
X1
Y10
Z1000
X0.1
Y10.0
A90000
B10.009
A axis 99.0
B axis 10.009
Z1.0001
to
less than three digits under the decimal point.
[Example of designating by the 0.1m system] (This is especially called submicrometer command.)
Designated by the program
X100
Y10
Y axis 0.001mm
Z1
X0.0001
Y1.0
Z10.0009
A90.0001
B9000
Z axis 0.0001mm
X axis 0.0001mm
Y axis 1.0mm
Z axis 10.0009mm
A axis 90.0001
B axis 9.0
Refer to the instruction manual of machine manufacturer for details of the actual setting unit.
2.3
2.3
To designate the movement amount of the control axis, either the relative value command method
(incremental) or the absolute value command method (absolute) can be chosen. The type can be
selected freely, but depending on the program details some machines need to be designated by the
incremental value type only.
Examples are given in the following for better illustration. Refer to Section "4. POSITION COMMAND"
for details.
Difference is shown between the increment value
command program and the absolute value command
program when the table returns immediately to the point
A after the table has moved from the point A to the point
D (positioning).
20 . 0
N3
Incremental value
command method
B N2
10 . 0
C
N1
N4
A
0.0
10 . 0
20 . 0
30 . 0
Absolute value
command method
AB
N1 G0 X10.0 Y10.0;
N1 G0 X10.0 Y10.0;
BC
N2 X20.0 Y10.0;
CD
N3 X10.0 Y10.0;
N3 X30.0 Y20.0;
DA
N4 X30.0 Y-20.0;
N4 X0 Y0;
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.)
3. OUTLINE OF PROGRAMMING
Program to Specify the Movement of Tools along the Machining Workpiece Shape
3.1
3. OUTLINE OF PROGRAMMING
3.1
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.
(1) Program to command the movement of a tool along the line
Program format
G01
F;
G01 (or G1).... G code that designates the movement
along the line (Note 2)
X, Y ................ End point coordinate value of linear
movement
F ..................... Tool feedrate
X
X
Y
Y
R
R
F;
F;
G03
G02
Y;
G00 ................ G code to designate the tool rapid
traverse movement
X, Y ................ Coordinate value of positioning end
point
3.2
3. OUTLINE OF PROGRAMMING
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
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.
3.3
For machining a workpiece, it is necessary to rotate the spindle, to apply coolant (cutting oil) and to
turn ON/OFF devices on the other machine side. The function that commands this series of operations
is called miscellaneous function (or M function). This is generally designated by a two digit of numeric
value (M code) that follows the address M.
For example, M03 commands the forward rotation of the spindle, M04 does the reverse rotation of the
spindle and M05 stops the spindle. Refer to instruction manual of machine manufacturer for details of
the functions of the M code.
The M codes are not fully defined by machine manufacturer. The functions such as M00, M01, M02,
M30, M98 and M99 are fixed on the CNC side.
Refer to Section "10. MISCELLANEOUS FUNCTIONS" for details.
3. OUTLINE OF PROGRAMMING
3.4 Program to Command the Spindle Rotation Speed
3.4
Like the F command, an appropriate tool rotation speed (spindle rotation speed) must be designated
according to the material of the workpiece and the tool used. The rotation speed of the tool can be
calculated based on the relative speed of the tool and the workpiece (cutting speed).
For example, if a workpiece needs to be machined at a cutting speed of 200m per minute with a
tool of 100, the rotation spindle speed is 640r/min. So, designate the rotation speed (r/min) after the
address S. That is the code of S640 used in this case.
It is also possible to command the required value directly without calculation.
The command related to the spindle rotation speed is called spindle function (S function). Since the S
function is a modal command, the designated spindle rotation speed does not need to be set until the
next change. If any new S function is commanded while the rotation spindle is rotating, the rotation
speed is changed immediately. If the power has been turned ON or the spindle has been stopped by
M05, the spindle rotation speed should be commanded simultaneously with spindle rotation
commands (M03 or M04) or a spindle rotation command (M03, M04) should be issued first.
Refer to Section "8. SPINDLE FUNCTIONS" for details.
3.5
In the actual workpiece machining process, milling, drilling, tapping and boring are performed and
appropriate tools should be used. Each tool has a number (tool number) and is commanded by the
2-digit numeric value (T code) following the address T. This is called tool function (or T function).
For example, if a 10 drill has the tool number 5, command program T05 or T5 to select it.
The tool selection is closely related to the tool change method (ATC) of each machine manufacturer.
Refer to instruction manual of machine manufacturer for details.
Refer to Section "9. TOOL FUNCTIONS" for other details.
10
3. OUTLINE OF PROGRAMMING
3.6 Configuration of Program
3.6
Configuration of Program
Preparation
function
Coordinate word
Miscellaneous Spindle
function
function
Tool
Feed
function function End of block
(EOB)
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.
;
O1234 ;
Block
Block
Block
Block
:
;
Program end
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
3.7
The machining program is usually written in such a way that the tool center moves along the contour
lines on the machining drawing. But, in the actual machining, as tools of various thickness (tool radius)
and length (tool length) are used, the actual tool path deviates by the amount of the radius and the
length, and the exact machining cannot be expected if no measure is taken.
Z axis
reference
point
L2
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.
3.8
:Reference point
12
3.9
3.9
3. OUTLINE OF PROGRAMMING
Optional Block Skip (Block delete)
This function selectively ignores specific blocks in a machining program which start with the " / "
(slash) code.
(1) Optional block skip
Provided that the optional block skip switch is ON, blocks starting with the " / " code are ignored.
They are executed if the switch is OFF.
Parity check is valid regardless of whether the optional block skip switch is ON or OFF.
When, for instance, all blocks are to be executed for one workpiece but specific blocks are not to
be executed for another workpiece, the same machining program can be used to machine
different parts by inserting the " / " code at the head of those specific blocks.
(2) Notes for using optional block skip
1) Put the " / " code at the head of the block. (In this example, an error of dividing by zero occurs.)
Example:
2) Parity checks (H and V) are conducted regardless of the optional block skip switch status.
3) The optional block skip is processed immediately before the pre-read buffer.
Consequently, it is not possible to skip up to the block which has been read into the pre-read
buffer.
4) This function is valid even during a sequence number search.
5) All blocks with the " / " code are also input and output during tape storage and tape output,
regardless of the optional block skip switch status.
13
4. POSITION COMMAND
Absolute/Incremental Command; G90/G91
4.1
4. POSITION COMMAND
4.1
G91
Y200.
Incremental value
G90
Z300.
Absolute value
(Note) Even in the MDI command, the modal executed before is followed when there is
no G90/G91 designation as with the memory 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
(Incremental value command)
G91 X100. Y100. ;
End point
End point
Y100.
Y100.
Y100.
Current
position
Current
position
X100.
Program coordinate
(0,0)
Program coordinate
(0,0)
X100.
14
X100.
4.2
4.2
4. POSITION COMMAND
Inch/Metric Changeover; G20/G21
(1) Outline
The two unit systems handled by the NC are the metric unit system and the inch unit system. The
unit system can be designated by the parameters and the machining program. Commands from
the machining program are only valid in machining program commands; the unit system of the
position display, etc., does not change.
(2) Detailed description
Inch/metric
changeover
Target
Remarks
Input unit
changeover
(parameters)
Automatic conversion at
parameter changeover
(mm fixed internally).
Restart necessary.
Output unit
changeover
(parameters)
No automatic changeover.
Restart necessary.
G20/G21
15
4. POSITION COMMAND
4.3 Decimal Point Input I, II
4.3
(1) Outline
This function enables the decimal point command to be input. It assigns the zero point in
millimeter or inch units for the machining program input information that defines the tool paths,
distances and speeds.
The two types of decimal point commands are as follows. They can be selected by the
parameters.
1) Decimal point input: Type 1 (When control parameter "Decimal point type 2" is OFF.)
2) Decimal point input: Type 2 (When control parameter "Decimal point type 2" is ON.)
(2) Detailed description
(a) The decimal point command is valid for distance, angle, time, speed and scaling magnification
commands in the machining program.
(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.
(f) Example of program
Machining program
G00 X100. Y200.5
G1 X100 F20.
Y200 F100 (Note 1)
G4 X1.5 (Note 2)
X2
(Note 1)
(Note 2)
X100mm, Y200.5mm
X100mm, F20mm/min
Y200mm, F100mm/min
Dwell 1.5s
2s
F unit is mm/min. (inch/min. for inch system) for either type I or II.
Valid/invalid changeover of the decimal point command is possible with the control
parameter "G04P decim pt valid".
16
4. POSITION COMMAND
4.3 Decimal Point Input I, II
Decimal
point
command
Valid
Valid
Invalid
Rotation table
Invalid
Valid
Valid
Invalid
Valid
Invalid
Valid
Valid
Valid
Feedrate
Valid
Thread lead
Valid
Invalid
Invalid
Offset number
(tool position, tool length offset)
,C
Offset number
(tool position, tool radius compensation)
Valid
Invalid
Remarks
Invalid
Invalid
C
Application
Valid
Valid
Valid
Valid
Valid
Valid
17
,D
4. POSITION COMMAND
4.3 Decimal Point Input I, II
Address
Decimal
point
command
Valid
Valid
Application
Remarks
Invalid
Invalid
Invalid
Invalid
Invalid
Invalid
L70
Invalid
Invalid
Sequence number
Invalid
Invalid
Program number
O
P
Invalid
Invalid
Invalid
Valid
Parameter
Scaling magnification
Invalid
Invalid
Invalid
Invalid
Valid
Valid
Valid
18
4. POSITION COMMAND
4.3 Decimal Point Input I, II
Address
Decimal
point
command
Valid
Application
R-designated arc radius
Valid
Valid
Valid
Invalid
Valid
Invalid
Invalid
Valid
Invalid
Valid
Invalid
Valid
Invalid
Y
Z
Remarks
Valid
Valid
Dwell time
Valid
Valid
Valid
Valid
Valid
19
,R
4.4
4.4
4. POSITION COMMAND
Command Value and Setting Value Range
(1) Outline
A command range (maximum/minimum) exists for the setting values from the screen, command
values in the machining programs, etc. Commands outside of that range cause an error.
(2) Detailed description
(a) Details of the number of digits in words data
Minimum setting unit
Metric command
Program number
Sequence number
Preparation function
Movement axis
X, Y, Z,
Inch command
O
N
G
A: 0.01
B: 0.001
B': 0.001
C: 0.0001
A: 0.01
B: 0.001
B': 0.001
C: 0.0001
A: 0.01
B: 0.001
B': 0.001
C: 0.0001
A: 0.01
B: 0.001
B': 0.001
C: 0.0001
A: 0.001
B: 0.0001
B': 0.0001
C: 0.00001
A: 0.001
B: 0.0001
B': 0.0001
C: 0.00001
A: 0.001
B: 0.0001
B': 0.0001
C: 0.00001
A: 0.001
B: 0.0001
B': 0.0001
C: 0.00001
Feed function
(feed per rotation) F
A: 0.01
B: 0.001
B': 0.001
C: 0.0001
A: 0.001
B: 0.0001
B': 0.0001
C: 0.00001
Dwell
A: 0.01 (rev/s)
B: 0.001 (rev/s)
B': 0.001 (rev/s)
C: 0.001 (rev/s)
A: 0.01
B: 0.001
B': 0.001
C: 0.0001
A: 0.01 (rev/s)
B: 0.001 (rev/s)
B': 0.001 (rev/s)
C: 0.001 (rev/s)
A: 0.001
B: 0.0001
B': 0.0001
C: 0.00001
Auxiliary axis I, J, K
Fixed cycle
Tool compensation
number
Miscellaneous function
Spindle function
Tool function
2nd miscellaneous
function
Subprogram
O8
N5
G3/G21
X+52
X+53
X+43
X+44
I+52
I+53
I+43
I+44
I+62
I+63
I+53
I+54
0.01 to 480000.00
0.001 to 480000.000
0.001 to 100000.000
0.0001 to
100000.0000
0.001 to 99999.999
0.0001 to 9999.9999
0.0001 to 999.9999
0.00001 to
999.99999
X53 P8
X53 P8
X53 P8
X53 P8
R+52 Q52 P8 L4
R+53 Q53 P8 L4
R+43 Q43 P8 L4
R+44 Q44 P8 L4
H3/D3, T1/T2
X+43
X+44
X+34
X+35
I+43
I+44
I+34
I+35
I+53
I+54
I+44
I+45
0.001 to 18897.6378
0.0001 to 18897.6378
0.0001 to 3937.0078
0.00001 to
3937.00787
0.001 to 3937.007
0.0001 to 393.7007
0.0001 to 39.3700
0.00001 to 39.37007
R+43 Q43 P8 L4
R+44 Q44 P8 L4
R+34 Q34 P8 L4
R+35 Q35 P8 L4
M8
S8
T8
B8/A8/C8
P8H5L4
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.4
4. POSITION COMMAND
Command Value and Setting Value Range
O8
G21
21
5. PREPARATORY FUNCTIONS
5.1 List of G Commands
5. PREPARATORY FUNCTIONS
5.1
List of G Commands
G code Group
Function
Reference
14.2
00
01
Positioning
01
01
Linear interpolation
02
01
Circular interpolation
CW
03
01
Circular interpolation
CCW
6.4
CW
6.8
34
00
CCW
6.8
35
00
(line at angle)
13.13
(arc)
13.13
02.1
01
Spiral interpolation
33
01
14.2
Thread cutting
6.10
13.13
03.1
01
Spiral interpolation
04
00
Dwell
7.7
36
00
High-speed mode
13.1
37
00
14.3
37.1
00
13.13
00
11.2
38
05
00
06
(Spare)
6.9
06.2
01
NURBS interpolation
07
00
6.5
39
00
11.2
07.1
00
Cylindrical interpolation
6.6
40
07
11.2
41
07
11.2
(Spare)
07
11.2
42
40.1
15
08
09
00
00
13.25
10
11
00
13.24
41.1
15
13.16
42.1
15
13.16
43
08
(+)
11.1
()
11.1
12
00
Circle cutting
CW
13.14
13
00
Circle cutting
CCW
13.14
13.16
14
(Spare)
44
08
15
(Spare)
45
00
11.6
16
(Spare)
46
00
11.6
17
02
12.8
47
00
11.6
18
02
12.8
48
00
11.6
19
02
12.8
49
08
11.1
Inch command
4.2
50
11
Scaling cancel
13.15
51
11
Scaling ON
13.15
20
06
21
06
Metric command
4.2
22
04
15.1
50.1
19
13.5
23
04
15.1
51.1
19
Mirror image ON
13.5
24
(Spare)
52
00
12.4
25
(Spare)
53
00
12.2
26
(Spare)
54
12
12.3
55
12
12.3
27
00
12.11
28
00
12.9
56
12
12.3
29
00
12.9
57
12
12.3
30
00
12.10
58
12
12.3
14.1
59
12
12.3
12
12.3
54.1
60
00
Unidirectional positioning
6.2
31
00
Skip
31.1
00
Multi-step skip 1
31.2
00
Multi-step skip 2
14.2
14.2
22
5. PREPARATORY FUNCTIONS
5.1 List of G Commands
G code Group
Function
61
13
61.1
13
13.21
13.22
61.2
13
61.3
13
(height data)
Function
90
03
91
03
Reference
4.1
4.1
12.6
92
00
13.22
93
05
7.5
94
05
7.3
95
05
7.4
61.5
13
13.23
62
13
13.20
13.19
98
10
Fixed cycle
13.3
99
10
Fixed cycle
13.3
64
13
Cutting mode
65
00
User macro
Simple call
13.7
66
14
User macro
Modal call A
13.7
66.1
14
User macro
Modal call B
13.7
67
14
User macro
13.7
68
16
Coordinate rotation ON
13.11
69
16
13.11
70
71
72
73
09
13.3
74
09
13.3
09
75
76
77
78
79
13.3
80
09
13.3
81
09
13.3
82
09
13.3
83
09
13.3
84
09
7.6
85
09
13.3
86
09
13.3
87
09
13.3
88
09
13.3
89
09
13.3
23
Positioning; G00
(1) Outline
This command is a function that sets the current point as the start point, and carries out
high-speed positioning commanded with the movement command value in the program at the
rapid traverse rate.
(2) Command format
G00
Xx1
Yy1
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.
(3) Detailed description
(a) The rapid traverse rate can be set independently for each axis with the parameters.
(b) The number of axes that can be simultaneously driven depends on the specifications (number
of simultaneous control axes). Axis combination within that range is random.
(c) Once this command has been issued, the G00 mode is retained until it is changed by another
G function (the G01, G02 or G03, etc.) in the 01 group is issued. If the next command is G00,
all that is required is simply to specify the coordinate words.
(d) Acceleration and deceleration are constantly carried out at the start and end of the program
command block. The in-position status is confirmed before advancing to the next block. Set
the in-position width in the parameters.
(e) Any G function (G72 to G89) in the 09 group is cancelled (G80) by the G00 command.
(f) The feedrate is controlled to the shortest time, in a range not exceeding the rapid traverse rate
of each axis. (Interpolation type)
The axis can also be moved at the respective rapid traverse rate of each independent axis,
using parameter settings. In this case, the path is not a straight line toward the end point.
(Non-interpolation type)
The positioning time does not change in either case.
(g) When no number following the G address, this is treated as G00.
(Example)
Interpolation type (movement in a straight
line to the end point)
(Example)
Non-interpolation type (each axis moves at
the rate of the respective parameter)
End point
End point
100.
100.
Current position
Current position
100.
100.
24
6.2
(1) Outline
Final positioning is always carried out by the G60 command in the one direction specified in the
parameters.
Positioning excluding backlash can be carried out.
(2) Command format
G60
Xx1
Yy1
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.
Final positioning is as follows. (When final positioning is in the + direction)
25
(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
rates is a value set in the
parameters as the G00 speed.
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
between the middle point and end
point is set independently for
each axis in the parameters.
Y100.
Current position
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.3
(1) Outline
This command is accompanied by coordinate words and a feedrate command. It makes the tool
move (interpolate) linearly from its current position to the end point specified by the coordinate
words at the cutting feedrate specified by address F. In this case, the feedrate specified by
address F always acts as a linear speed in the tool nose center advance direction.
(2) Command format
G01
Xx1
Yy1
Zz1
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.
(3) Detailed description
(a) Once this command is issued, this mode is maintained until another G function (G00, G02,
G03, G33, etc.) in the 01 group which changes the G01 mode is issued. Therefore, if the next
command is also G01 and if the feedrate is the same, all that is required is to specify the
coordinate words.
(b) The feedrate of the rotation axis is commanded in /min (decimal point position unit ) or /rev
(per spindle rotation). (F300 = 300 /min)
(c) The G functions (G72 to G89) in the 09 group are cancelled (G80) by the G01 command.
(Example)
End point
Feedrate
120mm/min
100.
(85mm/min)
Current position
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.4
6.4
(1) Outline
(a) I, J and K designation circular interpolation
Using the movement command value issued in the program, this function moves the tool in an
arc on the plane selected by the plane selection G code.
(b) R-designated circular interpolation
In addition to the arc center coordinate designation by the I, J and K of the previous item, this
function can also issue arc commands by directly designating the arc radius.
(2) Command format
(a) I, J and K designation circular interpolation
G02/G03
Xx1
Arc rotation
direction
End point
coordinate
value
Yy1
Ii1
Jj1
Xx1
Arc rotation
direction
End point
coordinate
value
Yy1
Rr1
Arc
Feedrate
radius
G18
G03
G02
G17 XY plane
G18 ZX plane
G19 YZ plane
G03
G17
Clockwise (CW)
Counterclockwise (CCW)
28
G02
X
G19
G02
G03
Y
6.4
Examples of a 1/4 circle, half circle, 3/4 circle and perfect circle are given.
6)
(1) G02 X100. Y100. I100.
End point
1/4 circle
End point
3/4 circle
Y100.
Start point
X100.
I100.
X100.
I100.
Start point
End point
Half circle
Y-100.
End point
Perfect circle
X200.
X0 Y0
Start point
I100.
Start point
I100.
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.4
(Example 2)
Feedrate
120mm/min
R100.
Feedrate
120mm/min
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
The alarm (PR0071) occurs if L/2r > (parameter: Arc error).
L: Straight line segment from the start point to the end point
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.5
(1) Outline
By having one of the circular interpolation axes with spiral interpolation or with helical interpolation
including the linear axis as the hypothetical axis (the axis which does not actually move) and by
distributing the pulses, it is possible to provide interpolation (sine or cosine interpolation) in which
the helical or spiral interpolation is viewed from the side (hypothetical axis). G07 is the command
which sets the hypothetical axis.
(2) Command format
G07
G07
The designation of the axis to carry out axis command cancel is applicable to all of the NC axes.
(3) Detailed description
(a) Helical interpolation and spiral interpolation are the interpolation functions which can be used
for hypothetical axis interpolation.
(b) The "" axis in the "G070 ; to G071 ;" program commands is the hypothetical axis.
Consequently, when the "" axis is commanded separately between these program
commands, the dwell state is established until the pulse distribution to the hypothetical axis is
completed.
(c) The hypothetical axis is valid only with automatic operation; it is not valid with manual
operation.
(d) The protection functions (such as interlock and stored stroke limit) are also valid for the
hypothetical axis.
(e) Handle interrupt is valid for the hypothetical axis as well. The axis will move by an amount
equivalent to the handle interrupt.
(f)
Example G07 Z0 ;
Y
G18
G02
X50.
Z0.
Y100.
K30.
P3 ;
To carry out hypothetical axis interpolation, it is necessary to combine and add helical
interpolation.
31
6.6
(1) Outline
The cylindrical interpolation function is for machining the side face of a cylindrical workpiece.
Because programming can be carried out on the plane developed on the cylinder side face,
cylinder groove machining programs can be easily created.
Z
r
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.
32
33
(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.
Actual movement amount =
34
6.7
(1) Outline
With orthogonal three axes, it is possible for the 3rd axis to carry out linear interpolation
synchronized with the rotation of the arc, while the circular interpolation is simultaneously carried
out by the G02/G03 commands on the plane selected by the plane selection G code (G17, G18,
G19).
(2) Command format
G02/G03
G17
Arc plane
Arc rotation
direction
Xx1
Yy1
Zz1
Ii1
Linear axis
end point
Jj1
Pp1
Arc center
coordinates
Ff1
Number
of
pitches
Feedrate
Or
G02/G03
G17
Arc plane
Arc rotation
direction
Xx2
Yy2
Zz2
Rr2
Ff2
Linear axis
end point
Arc
radius
Feedrate
The arc center coordinates and radius should be commanded with a decimal point.
(3) Detailed description
(Example)
G91 G17 G02 X0. Y200. Z100. I-100. J100. F120 ;
Z
End
point
End
point
X
W
J100
Start
point
I-100
Start
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)
35
36
6.8
(1) Outline
This function carries out interpolation that smoothly joins the start and end points in a spiral. This
interpolation is carried out for arc commands such as those in which the start point and end point
are not on the same circumference.
(2) Command format
G17
Rotation
plane
G02.1/G03.1
Arc rotation
direction
Xx1
Yy1
Ii1
Jj1
Pp1
Ff1
Number
of pitches
Feedrate
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
(3) Detailed description
(a) The arc rotation direction G02.1 is the same as G02, and G03.1 is the same as G03.
(b) There are no R-designated arcs in spiral interpolation.
(c) Conical cutting, tapered thread-cutting and other such machining operations can be conducted
by changing the start point and end point radius and commanding the linear axis
sumultaneously.
(d) Normally the spiral interpolation is automatically enabled with the arc commands (G02, G03)
when the difference between the start point radius and the end point radius is less than the
parameter setting value.
(e) (Example)
Y
End
point
140.
Center
Start
point
X60.
P1
F300 ;
I100.
W
60.
160.
(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
(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
G01
F300 ;
X120 ;
XY
plane
X
W
(Example)
G17 G91 G2.1 X100. Z150. I150. P3
F500 ;
In these examples, the interpolation is
truncated cone interpolation.
38
XZ
plane
X
W
6.9
(1) Outline
NURBS interpolation is an interpolation function that operates the command output in the NURBS
format from the CAD/CAM directly with the NURBS definition in the CNC.
Directly exponential interpolation of a free line defined with the NURBS format in the CAD/CAM is
possible without developing the curve into fine segments, so a very smooth interpolation path is
achieved.
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.
(2) Command format
G06.2
Pp
Kk
NURBS
interpolation
ON
Number
of stages
(can be
omitted)
Knot
Kk
Xx
Yy
Zz
Control point
coordinate
value
Xx
Rr
Control point
weight
(can be
omitted)
Ff
Interpolation speed
(can be omitted)
Yy Zz
:
:
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.
(3) Detailed description
(a) G06.2 belongs to the G code group 1. The G06.2 mode is entered when NURBS
interpolation is commanded. When turning the NURBS interpolation OFF (canceling the
interpolation), and not issuing a NURBS interpolation command in succession, issue another
group 1 command (G0, G1, etc.). The NURBS interpolation mode is not held when either
initializing or retaining the modal at NC reset. (Initialization is carried out following the control
parameter #320004 Initial G00.)
(b) When turning NURBS interpolation ON immediately after turning NURBS interpolation OFF,
the G06.2 code can be omitted. Note that in this case, the number of stages P and
interpolation speed F cannot be commanded.
(c) P indicates the number of stages in the NURBS curve. When the number of stages is m,
NURBS curve is a (m-1) dimension curve. The P setting value is 2, 3, or 4. Any other value
will cause an error. If the setting is omitted, the default value 4 will be set. Designate the
number of stages in the first block (same block as G06.2 command).
The NURBS curve will be as follow according to the value set for the number of stages P.
P2 ... Linear (one-dimension curve)
P3 ... Two-dimension curve
P4 ... Three-dimension curve
(d) X, Y and Z indicate the coordinate values of the control point, and R indicates the weight of
the control point. The weight is unique to each control point, and is commanded in the same
block as the control point coordinate values. If the weight is omitted, the default value 1.0 will
be set. When a large weight is set, the NURBS curve will be generated closer to the control
point, and when a small weight is set, the NURBS curve will be farther from the control point.
39
(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.
Meaning
Address
Range
Number of stages
2, 3, 4
Weight
0.0001 to 99.9999
Knot
214748 to 214748
(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
P0
P1
P2
P3
P4
P5
P6
[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 ;
P0
Y100. ;
P1
..................... P0
....... P0
................... P1
................... P2
................... P3
................... P4
................... P5
................... P6
Program command
P4
P2
P3
P5
K4. ;
K4. ;
K4. ;
K4. ;
P6
P7
41
G01 X120. ;
:
:
:
.......................... P7
6.10
(1) Outline
The thread cutting command (G33) enables thread cutting with a commanded number of thread
leads or number of ridges per inch. When the leads are designated, the command value unit is
[mm/rev] or [inch/rev], but the unit is always [ridges/inch] when designating the number of ridges.
Multiple thread screws, etc., can also be machined by designating the thread cutting start angle (0
to 360).
(a) Uniform lead thread cutting (lead designation)
The tool feed is controlled in synchronization with the spindle rotation using the synchronization
signal from the spindle encoder as the base, and the designated lead threads are cut. This
makes it possible to conduct constant-lead straight thread-cutting and tapered thread-cutting.
(b) Inch thread cutting (number of ridge designation)
If the number of ridges per inch in the long axis direction is assigned, the feed of the tool
synchronized with the spindle rotation will be controlled, which means that constant-lead
straight thread-cutting and tapered thread-cutting can be performed.
(c) Continuous thread cutting
When the lead or shape changes during the threads, continuous thread cutting can be
realized by commanding thread cutting commands in succession.
(2) Command format
(a) Constant lead thread cutting (lead designation)
G33
Zz1
Ff1
Qq1
Thread
command
Thread end
point
Thread lead
Shift angle
Zz1 :
Ff1 :
Qq1 :
G33
Zz1
Ee1
Qq1
Thread
command
Thread end
point
Thread lead
Shift angle
Zz1 :
Ee1 :
Qq1 :
Zz1
Ee1
Qq1
Thread
command
Thread end
point
Number of
threads
Shift angle
Zz1 :
Ee1 :
Qq1 :
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
2)
a
Lz
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
3)
4)
Inch command
0.001
E command
0.00001 to 999.99999
0.0001
E command
0.0000001 to 9.9999999
F command
0.0001 to 999.9999
F command
0.000001 to 99.999999
5)
Inch command
0.001
E command
E1=0.00001
(E1.=1.00000)
0.0001
E command
E1=0.0000001
(E1.=1.0000000)
F command
F1=0.0001
(F1.=1.0000)
F command
F1=0.000001
(F1.=1.000000)
Inch command
1.
Q1=0.001 (Q1.=1.000)
1.
Q1=0.0001 (Q1.=1.0000)
Q command
Q command
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
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.
(b) Inch thread cutting (number of ridge designation)
1)
Number of thread ridge command range (The direction with the most movement is used
as the reference)
Metric command
2)
Inch command
Command unit
(mm)
Command unit
(inch)
0.001
0.01 to 999999.99
0.0001
0.0001 to 9999.9999
Metric command
Command unit
(inch)
Command unit
(mm)
0.0001
E1=1 (E1=1.0000)
0.001
E1=1 (E1=1.00)
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
5)
The E command value should be set within the lead value range when the lead is
converted.
(Lead value (inch) = 1/ridge)
6)
(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
A, B
B', C
1 to 18897 (inch/min)
1 to 3937 (inch/min)
46
7. FEED FUNCTIONS
7.2 Cutting Feedrate
7.2
Cutting Feedrate
(1) Outline
This function designates the feedrate of the cutting command. The feed amount per spindle
rotation or feed amount per minute is designated.
(2) Command format
F
f1 ;
A, B
B', C
1 to 18897 (inch/min)
1 to 3937 (inch/min)
47
7. FEED FUNCTIONS
7.2 Cutting Feedrate
When the circular interpolation function is used and the tool is moved along the
circumference by the linear control axis, the rate in the tool advance direction, or
in other words the tangential direction, will be the feedrate designated in the
program.
3) When linear and rotation axes are to be controlled at the same time
The NC system is operated in exactly the same way whether linear or rotation axes are to
be controlled.
When a rotation axis is to be controlled, the numerical value assigned by the coordinate
words (A, B, C) is the angle and the numerical values designated by the feedrate (F) are
all handled as linear speeds. In other words, 1 of the rotation axis is handled as being
equivalent to 1mm of the linear axis.
Consequently, when both linear and rotation axes are to be controlled simultaneouly, the
components of the numerical value designated by F each component corresponding to
each axis will be the same as for item 1) above (When controlling linear axes).
In this case, however, although both the size and direction of the speed components
based on linear axis control do not vary, the direction of the speed components based on
rotation axis control will change along with the tool movement (their size will not change).
This means, as a result, that the composite tool advance direction feedrate will vary along
with the tool movement.
48
7. FEED FUNCTIONS
7.3 Feed per Minute; G94
7.3
(1) Outline
By issuing a G94 command, the commands from that block can be commanded as feedrate per
minute (mm/min, inch/min) using an F code.
(2) Command format
G94
Ff1 ;
F command
unit (mm/min)
No decimal point
With decimal point
(A) 0.01mm
(B) 0.001mm
(B') 0.001mm
(C) 0.0001mm
F1 =1mm/min
F1.=1mm/min
F1 =1mm/min
F1.=1mm/min
F1 =1mm/min
F1.=1mm/min
F1 =1mm/min
F1.=1mm/min
0.01 to
480000.00
0.001 to
480000.000
0.001 to
100000.000
0.0001 to
100000.0000
(A) 0.001inch
(B) 0.0001inch
(B') 0.0001inch
(C) 0.00001inch
F1 =1inch/min
F1.=1inch/min
F1 =1inch/min
F1.=1inch/min
F1 =1inch/min
F1.=1inch/min
F1 =1inch/min
F1.=1inch/min
0.001 to
18897.6378
0.0001 to
18897.6378
0.0001 to
3937.0078
0.00001 to
3937.00787
F command
unit (inch/min)
No decimal point
With decimal point
49
7.4
7.4
7. FEED FUNCTIONS
Feed per Rotation; G95
(1) Outline
By issuing a G95 command, the command from that block can be commanded as feedrate per
spindle rotation (mm/rev, inch/rev) using an F code. A rotary encoder must be installed on the
spindle to use this command.
(2) Command format
G95
Ff2 ;
(A) 0.01mm
(B) 0.001mm
(B') 0.001mm
(C) 0.0001mm
F1 = 0.1
F1. = 1
F1 = 0.01
F1. = 1
F1 = 0.01
F1. = 1
F1 = 0.001
F1. = 1
(A) 0.001inch
(B) 0.0001inch
(B') 0.0001inch
(C) 0.00001inch
F1 = 0.01
F1. = 1
F1 = 0.001
F1. = 1
F1 = 0.001
F1. = 1
F1 = 0.0001
F1. = 1
0.001 to 3937.007
0.0001 to 393.7007
0.0001 to 39.3700
0.00001 to 39.37007
7.5
7.5
7. FEED FUNCTIONS
Inverse Time Feed; G93
(1) Outline
During inside cutting when machining curved shapes with radius compensation applied, the
machining speed on the cutting surface becomes faster than the tool center feedrate. Therefore,
problems such as reduced accuracy may occur.
This reduced accuracy can be prevented with inverse time feed. This function can, in place of
normal feed commands, issue one block of machining time (inverse) in F commands. The
machining speed on the cutting surface is constantly controlled, even if radius compensation is
applied in to the machining program that expresses the free curve surface with fine segment lines.
Note that when the calculated machining time exceeds the cutting feed clamp speed, the F
command value in the inverse time feed follows the cutting feed clamp speed.
(2) Command format
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 ;
Inverse time feed mode ON
G93 ;
G01
G02
Xx2
Xx3
Yy2
Yy3
Ff2 ;
Ii3 Jj3
G94 (G95) ;
(3) Detailed description
(a) Inverse time feed (G93) is a modal command. Once commanded, it is valid until feed per
minute (G94) or feed per rotation (G95) is commanded, or until a reset (M02, M30, etc.) is
executed.
(b) Command method of F command values in inverse time feed
Metric command (G21)
During linear
mode (G01)
Handling of F command
When F0 is commanded
0.001~99999.999
Path after tool radius
compensation
Program path
51
7.5
7. FEED FUNCTIONS
Inverse Time Feed; G93
Comparison of asynchronous feed and inverse time feed (when tool radius is 10.0mm)
Location
N04
Asynchronous feed
Feedrate of
Feedrate of
tool center
cutting point
F500
F450
N05
F500
F550
F450
N06
F500
F450
F550
F500
F500
(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
G13
G31 to G31.1
G33
G34 to G36, G37.1
G37
G73 to G89
Inside cutting CW
Inside cutting CCW
Skip
Thread cutting
Special fixed cycle
Automatic tool length measurement
Fixed cycle
(e) The program error will occur if inverse time feed (G93) is commanded in the following modes.
G33
G73 to G89
Thread cutting
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.6
7.6
7. FEED FUNCTIONS
Synchronized Tapping; ,R/,H
(1) Outline
This function carries out tapping while carrying out synchronized control of the spindle and servo.
High-accuracy tap depth tapping can be carried out without a floating tap.
(2) Command format
(a) Tap pitch designation
G84
(G74)
Xx1
Tapping
command
Yy1
Zz1
Hole position
data
Rr1
Pp1
Ff1
Ss1
Pitch
Spindle
speed
, R1/Hh
Synchronized method
Xx1
Tapping
command
Yy1
Hole position
data
Zz1
Rr1
Pp1
Ee1
Ss1
Number
of
threads
Spindle
speed
, R1/Hh
Synchronized method
: Forward tap
G74: Reverse tap
: Drilling coordinate position
: Hole bottom position
: Hole R position
: Dwell time at hole bottom
: Z axis feed amount (tap pitch) per spindle rotation
: Number of tap threads per Z axis inch
: Spindle rotation speed
: Synchronous method selection
(,R0: asynchronous method ,R1: synchronous method
H0: asynchronous method Hh: (a)synchronous method (by the parameters))
(When ,R and H are commanded in the same block, the H command is ignored.) (h>0)
With plane selection, the synchronous tapping cycle can be carried out for axes other
than the Z axis.
53
7.6
7. FEED FUNCTIONS
Synchronized Tapping; ,R/,H
Parameter
Address, R/H
G84
G74
(1)
G84, G74
Subprogram
FR-SF spindle
Z axis feed
Control
,R0
H=0
,R1
H>0
Synchronous tap
parameter: ON
Synchronous
method 1)
Asynchronous Synchronous
method
method 2)
Synchronous tap
parameter: OFF
Asynchronous
method
Asynchronous (A)Synchronous
method
method 3)
1)
2)
3)
54
7.6
7. FEED FUNCTIONS
Synchronized Tapping; ,R/,H
Shortened distance
Normal acceleration/
deceleration
Time
Time constant
Xx
Yy
Zz
Rr
Pp
Ff
(Ee)
Ss
, R1
Hh
,Ss ;
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
,S
Details
Command range
0 to 99999 (r/min)
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.6
7. FEED FUNCTIONS
Synchronized Tapping; ,R/,H
Gear 00
Gear 01
Gear 10
Gear 11
1)
Retract
Stapn
Advance
Time (ms)
stapt3n
56
Time constant
#200093 Stapt11
#200094 Stapt12
#200095 Stapt13
#200096 Stapt14
Time constant
#200101 Stapt21
#200102 Stapt22
#200103 Stapt23
#200104 Stapt24
Time constant
#200105
#200106
#200107
#200108
Stapt31
Stapt32
Stapt33
Stapt34
7.6
2)
7. FEED FUNCTIONS
Synchronized Tapping; ,R/,H
Retract
Stapn
Advance
Stap2n
Time (ms)
Stapt2n
Stapt3n
Stap2n
S command
Stap1n
Time (ms)
Stapt1n
Stapt2n
57
7.6
7. FEED FUNCTIONS
Synchronized Tapping; ,R/,H
Retract
Stapn
Advance
Stap2n
Time (ms)
Stapt2n
Stapt3n
Stap2n
Stapn
Stapt2n
Time (ms)
Stapt3n
The axis will accelerate to the 3rd step's maximum rotation speed at the 2nd step's
time constant
58
7.6
3)
7. FEED FUNCTIONS
Synchronized Tapping; ,R/,H
Stmaxn
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
Rotation speed (r/min)
Stmaxn
Retract
Stapn
Advance
Stap2n
Stap1n
Time (ms)
Stapt1n
Stapt2n
Stapt3n
Stapt1n
Stapt2n
Stapt3n
59
Time (ms)
7.6
7. FEED FUNCTIONS
Synchronized Tapping; ,R/,H
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)
2)
3)
G84 Z-10.
X-10.;
S2000;
Y-10.;
R-2.
G74 Z-10.
X-10.;
S2000;
Y-10.;
R-2.
G74
G74
R-2.
R-2.
Z-10.
Z-12.
F1.
S1000;
"PR033 Format error"
F1.
S2000;
"PR033 Format error"
F1.
F1.
S2000;
S1500; "PR033 Format error"
60
7.6
(f)
7. FEED FUNCTIONS
Synchronized Tapping; ,R/,H
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]
G84Xx
Xx;
G80;
G84Xx
G80;
Parameter OFF
Yy
Zz
Rr
Ff
Yy
Zz
Rr
,R1;
Rr
Ff
Rr
,R1;
Parameter ON
G84Xx Yy Zz
Xx;
G80;
G84Xx Yy Zz
G80;
Ss ,R1;
"PR0183 No pitch/thread number"
Ss
,R1;
Operates with previous f
61
7.7
7.7
7. FEED FUNCTIONS
Dwell (Time designation); (G94) G04
(1) Outline
When G04 is commanded, the machine temporarily pauses, and goes to a standby status for the
time commanded in the program. With this function, the start of the next block can be delayed.
When the feed mode is feed per minute (G94), the operation becomes time designated. By adding
a multi-step skip function, the remaining dwell time can be canceled.
(2) Command format
(G94)
G04
Xx1
Asynchronous
Dwell
Time
P.
Previous block
cutting command
Next block
Dwell command
Dwell time
62
7.8
7.8
7. FEED FUNCTIONS
Dwell (Rotation designation); (G95) G04
(1) Outline
When G04 is commanded, the machine temporarily pauses, and goes to a standby status for the
spindle rotation speed commanded in the program. With this function, the start of the next block
can be delayed. When the feed mode is feed per rotation (G95), the operation becomes rotation
speed designated. By adding a multi-step skip function, the remaining dwell time can be canceled.
(2) Command format
(G95)
G04
Xx1
Synchronous
Dwell
Rotation
P.
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
7.9
F1-digit Feed
(1) Outline
When the control parameter "1-digit F feed valid" is ON, by designating a one-digit value after
address F, the feedrate preregistered in the parameters and corresponding to the value can be
commanded. The F commands include F0, and F1 to F9.
When F0 is commanded, the rapid traverse rate is set, and the same feedrate as G00 is applied.
(The G modal does not change.)
When F1 to F9 is commanded, the set feedrate corresponding to the setting becomes the
commanded rate.
When a value F10 or more is commanded, it will be interpreted as the normal F5-digit cutting
feedrate.
The F1-digit command is valid only in the G01, G02, G03, G02.1 or G03.1 modal.
The F1-digit command can be used in the fixed cycle.
(2) Detailed description
(a) If a F1-digit command is issued in the automatic operation mode, the feedrate can be
incremented and decremented by turning the manual pulse generator.
This speed change is valid when the external input (PLC) "F1-digit speed change valid signal" is
selected.
(b) The feedrate increment/decrement amount follows the expression below.
F =
FMn
(number of manual pulse generator pulses) (1)
K
0 to 32767
FM1 (FM2)
1 to 60000 (mm/min)
1 to 60000 (mm/min)
64
7. FEED FUNCTIONS
7.9 F1-digit Feed
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(Example 1)
F0 .................. Rapid traverse rate
F1 to F9......... F1-digit
F10 or more .. Normal cutting feedrate command
F1 to F9 are invalid in the G00 mode. The rapid traverse rate will be applied.
If F0 is used in the G02, G03, G02.1 or G03.1 mode, the program error "PR0121 In F0 arc
modal mode" will occur.
When F1. to F9. (with decimal point) is commanded, this will be the 1mm/min to 9mm/min
feedrate instead of the F1-digit command.
When used with a metric or degree command, the feedrate set corresponding to F1 to F9 will
be the command speed (mm/min or /min).
When used with an inch command, one-tenth of the feedrate set corresponding to F1 to F9
will be the command speed (inch/min).
The number of manual pulse generator pulses is one pulse per scale, regardless of the
magnification.
During the F1-digit command, the "in F1-digit command" signal and F1-digit number are
output as PLC signals.
The speed designated with the E command is valid for the speed at the corner rounding or
corner chamfering.
When both the F1-digit command and inverse time feed command are present, the inverse
time feed command will have the priority. When the inverse time feed is canceled (G94), the
F (speed) command is invalidated, so the F command must be issued again.
G modal
G0F0
F0G0
G0
G0F1
F1G0
G0
G1F0
F0G1
G1
G1F1
F1G1
Actual feedrate
G1
(b) The F1-digit and unmodal command can be issued in the same block. In this case, the
unmodal command is executed, and the F1-digit modal is updated simultaneously.
(6) Example of operation constant K setting
To set the one scale of the manual pulse generator to 10mm/min.
For FM1 = 15000mm/min:
F = 10 =
15000
K
65
7. FEED FUNCTIONS
7.9 F1-digit Feed
66
8. SPINDLE FUNCTIONS
8.1 Spindle Control Function
8. SPINDLE FUNCTIONS
8.1
(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
BCD or BIN
PLC
S command value
S command
Machining program
Manual numerical
value command
START signal
S command
decoding
Spindle rotation
command
BIN
BIN/BCD selection
(parameter)
BIN
Spindle rotation
speed
Digital spindle
Spindle output
command
creation
Gear selection
Override
Gear ratio
maximum rotation
speed (parameter)
67
8. SPINDLE FUNCTIONS
8.2 S Code Output
8.2
S Code Output
(1) Outline
When the eight-digit numbers (S00000000 to S 99999999) after the address S are commanded,
a 32-bit binary data with symbol attached and START signal, or an 8-digit BCD signal and START
signal are output to the PLC.
(2) Command format
S
xxxxxxxx ;
68
8. SPINDLE FUNCTIONS
Spindle Position Control (Spindle C axis control)
8.3
8.3
(1) Outline
With this function, servo control is carried out on the spindle amplifier and spindle motor, and the
spindle position can be controlled.
(2) Detailed description
(a) When controlling the spindle position
1) The SERVO ON signal from the PLC is turned ON.
SERVO ON
Spindle rotation
Position control
Spindle rotation
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.
Reference point return method
Method where the position during
servo ON becomes the reference
point
(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.
(2) Command format
(Example) When the T command has eight digits and the tool compensation number command
has two digits
T
* *
[. * ]
Suffix
Tool compensation number
Tool number
* *
Tool length offset number and tool
nose wear compensation number
Tool number
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)
* *
Tool nose wear compensation number
Tool number and tool length offset
number
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)
* *
Tool nose wear compensation
number
Tool length offset number
Tool number
(d) The tool number, START signal and suffix are output to the PLC (the tool compensation
number is not output) by the T command. The suffix use is random, but can be used to
designate, etc., the cutting edge of the tool having two cutting edges.
(e) Whether the tool number is output as a 32-bit binary value or as a BCD output is set by the
parameters.
(f) The processing sequence and completion sequence for all T commands must be composed
on the PLC side.
71
Miscellaneous Functions
(1) Outline
When the number up to eight digits (M00000000 to M99999999) after the address M are
commanded, a 32-bit binary data and START signal, or an 8-digit BCD signal and START signal
are output to the PLC.
(2) Command format
Mm1
Mm2
Mm3
Mm4 ;
72
10.2
M Individual Output
(1) Outline
These functions are output to the PLC when M00, M01, M02 and M30 are commanded during
automatic operation, or by a manual numerical value command, and are turned OFF by a
miscellaneous function completed signal and reset signal from the PLC.
(2) Command format
Machining
program
M individual
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
Meaning
73
10.3
(1) Outline
By commanding an address code (with a number up to eight digits) that does not overlap with the
axis name from any of A, B, C, H, U, V, W, X, Y or Z, a 32-bit binary data and START signal, or a
BCD signal and START signal are output to the PLC.
(2) Detailed description
(a) The address to be used is defined by the parameters.
(b) A command with a decimal point is also possible. If the decimal point is omitted, the output
magnification can be set with the parameters.
(c) A processing sequence and completion sequence are necessary for all 2nd miscellaneous
functions.
(d) The same address cannot be used in the axis name and 2nd miscellaneous function.
(e) If A is designated in the 2nd miscellaneous function address, the following functions cannot be
used.
Linear angle command
Geometric command
(f) Whether to output a binary data or BCD signal is set in the parameters.
74
11.1
(1) Outline
By this command, the position of the end point of the movement command is changed to the
position that was offset the previously set tool offset amount only, and movement control is carried
out.
Using this function, the distance difference, due to the tool length, between the program
coordinate position and the actual machine tool tip position is offset, and the program and
operation can be made more efficient.
(2) Command format
(a) Offsetting is carried out for the rotation tool.
(b) In 1-axis offset, a random axis is offset. Because the relation between the offset number and
offset axis is not assigned beforehand, which axis is to be offset must be designated when the
command is issued.
The offset number is designated by an H command.
G43
G44
Zz1
Zz1
Hh1
Hh1
G49
;
;
Offset number
Zz
Hh1
z + h1
G44
Zz
Hh1
z h1
G49
Zz
z (+)
h1
The actual end point of the coordinates is offset from the programmed movement
command end point coordinates by an amount calculated by the above expression,
regardless of whether absolute value or incremental value commands are used.
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.1
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
G43
Zz1
:
Zz2
Hh1
; z1 + (h1) movement
Hh2
76
11.1
Xx1
:
Xx2
:
Yy1
:
Yy2
:
1
:
2
:
Xx3
:
;
Hh1
;
Hh2
;
Hh2
;
Yy3
Zz3
Hh3
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.
4) The Z and X axes are offset when the following is commanded:
G43Zz1Hh1 ;
G43Xx1Hh2 ;
(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.
2) Manual dog type reference point return A
If manual dog-type 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.
Note that the Modal screen display will be updated when the system is restarted.
3) Manual high-speed reference point return A
If manual high-speed reference point return is started for an axis in the tool length offset
modal, the tool length offset will not be canceled when the reference point is reached.
Note that the tool length offset can be canceled with the parameter (110135 Cancel G43
MDL M-REF). In this case, the Modal screen display will be updated when the system is
restarted.
4) When a movement command is assigned to the G53 machine coordinate system,
movement follows to the machine position with the tool length offset amount canceled.
When returning to one of the workpiece coordinate systems (G54 to G59), the tool returns
to the coordinates which have been shifted again by an amount equivalent to the tool
offset.
77
11.1
Zz1
:
Zz2
Hh1
Zz1
G49
:
Zz2
Hh1
78
11.1
(4) Example
(a) Combined operation with tool length measurement
(Example 1.)
G28 X0 Y0 Z0;
T01;
T02 M06;
G91 G00 G43
Z2.0 1;
Z+2.0
R
H01=
-450.0
H01=
-450.0
(Note)
When the tool
compensation amount is
H021 = -450.000, etc.,
it is set by the negative
value.
(Example 2.)
Z0.0
Z2.0
Workpiece
Workpiece
Table
Table
G28 X0 Y0 Z0;
T01;
T02 M06;
G91 G54 G00 G43
Z2.0
01;
(Note)
When the tool
compensation amount is
H01 = +150.000, etc.,
it is set by the positive
value.
H01=
+150.0
Z0.0
W
Workpiece
H01=
+150.0
Z2.0
Workpiece
Table
Table
(b) When offsetting is carried out with the distance between the reference point and
workpiece as a reference
G28 X0 Y0 Z0;
T01;
T02 M06;
G91 G00 G43
Z2.0 01;
(Note)
When the tool
compensation amount is
H021 = -450.000, etc.,
it is set by the negative
value.
Z+2.0
R
R
H01=
-450.0
H01=
-450.0
Z0.0
Workpiece
Table
79
Z2.0
Workpiece
Table
11.1
(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.
State during
automatic operation
80
11.2
11.2
11.2.1
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
G38
G39
G40
G41
G42
Function
Vector change during tool radius compensation
Corner arc during tool radius compensation
Tool radius compensation cancel
Tool radius compensation left command
Tool radius compensation right command
Tool path
Program path
81
11.2
11.2.2
Command format
G17
Compensation
plane
G01
Cutting
G41
Compensation
command
Xx1
Yy1
Movement
axis
Dd1
Movement Compensation
axis
number
Function
Remarks
G40X_Y_ ;
G41X_Y_ ;
G42X_Y_ ;
G38I_J_ ;
G39X_Y_ ;
Corner changeover
82
11.2
11.2.3
(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.
(2) Tool radius compensation start (start-up)
(a) Tool radius compensation starts when all the following conditions are met in the compensation
cancel mode.
1) The G41 or G42 command has been issued.
2) The compensation number of the tool radius compensation is 0 < D maximum
compensation number.
3) The movement command is any command except an arc command.
(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
Machining
program
T_;
S_;
G00_;
G41_;
G01_;
G02_;
G01_;
G02_;
Pre-read buffer
T_;
S_;
G00_;
G41_;
G01_;
G02_;
Execution block
T_;
S_;
G00_;
G41_;
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.2
Linear Arc
Program path
r = Compensation amount
Program path
s
G42
G42
Start point
Start point
Tool center
path
Center of arc
(b) Machining an outside corner (obtuse angle) (Type A or B can be selected by parameter)
[90 < 180]
Linear Linear (Type A)
s
Tool center path
r = Compensation amount
G41
G41
Program path
Start point
Start point
Center of arc
Intersection
s
Tool center path
r
Program path
r
Tool center path
Program path
G41
Start point
(Note)
G41
Start point
Center of arc
Program path
Cutting in may occur if the compensation amount is larger than the arc radius.
84
11.2
s
Tool center path
Program path
Program path
G41
G41
Start point
Start point
Center of
arc
Tool center path
s
Program path
Program path
G41
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.2
Program path
Program path
Intersection
s
Program path
Program path
Center of arc
Program path
Program path
Center of arc
s
Intersection
s
86
11.2
Center of arc
Program path
Program path
r
r
Center of arc
s
Intersection
Center of arc
Center of arc
Program path
Program path
r
s
Intersection
Program path
Program path
Center of arc
r
s
Intersection
s
Intersection
Center of arc
Program path
Center of arc
Program path
s
s
Intersection
Intersection
Center of arc
87
11.2
Center of arc
Program path
Center of arc
Intersection
Center of arc
r
Program path
Hypothetical circle
Program path
R
Center of arc
r
r
Program path
A
88
11.2
Arc Linear
Program path
r = Compensation amount
s
G40
Program path
G40
End point
End point
Tool center
path
Center of arc
(b) Machining an outside corner (obtuse angle) (Type A or B can be selected by parameter)
Linear Linear (Type A)
s
r = Compensation
amount
G40
G40
Program path
End point
End point
Center of arc
Intersection
s
Tool center path
r
Program path
r
Tool center path
Program path
G40
End point
G40
End point
Center of arc
89
Program path
11.2
(c) Machining an outside corner (acute angle) (Type A or B can be selected by parameter)
Arc Linear (Type A)
Center of
arc
Program path
Program path
G40
G40
End point
End point
Center of
arc
s
Tool center path
s
Program path
Program path
G40
End point
G40
End point
90
11.2
Program path
N1
N2
r
Tool center path
r
Center of arc
This movement
and feedrate fall
under block N2.
Stop point with single block
91
11.2
11.2.4
Inserted arc
Inserted arc
Intersection
Tool center path
Program path
r=Compensation amount
r=Compensation
amount
Program path
Intersection
Intersection
Tool center path
r=Compensation
amount
r=Compensation amount
Inserted arc
Tool center path
Program path
Program path
s
Intersection
(Example)
N5
N1 G28X0Y0;
N2 G91G01G42X20.Y20.D1F100;
Program path
N3 G39X40.;
N4
N6
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.2
Program path
r1
N12
r1
N13
r1
N11
N11G1Xx11 ;
N12G38Xx12Yy12 ;
N13G40Xx13 ;
N12
r1
r1
Tool center path
N12
r1
N11
N11G1Xx11Yy11 ;
N12G38Xx12Yy12 ;
N13G40Xx13 ;
N13
N12
N11 Program path
N14
N11G1Xx11 ;
N12Yy12 ;
N13G38Xx13IiJjDd ;
N14G40Xx14Yy14 ;
(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.2
(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
G40G41/G42+G38
Operation
G41/G42 commands are valid.
G40G41/G42+G38+I, J
G41/G42G41/G42+G38
G41/G42G41/G42+G38+I, J
94
11.2
G41
Left-hand compensation
Right-hand compensation
G42
Right-hand compensation
Left-hand compensation
G code
(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
Tool center path
r
Intersection
r
Program path
G41
G42
G41
95
11.2
G41
G41
G42
G41
G42
r
Program path
ArcArc
Tool center path
Center of arc
Program path
G41
G42
G41
Center of arc
G41
G41
G42
G41
G42
Program path
G42
Tool center
path
G41
G42
Uncut section
96
11.2
Middle point
N5
N6
N7
N8
(G41)
N5 G91 G01
X60.
Y30.
N6 G28
X50.
Y-40.
N7
X30.
Y-60.
N8
X70.
Y40.
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.2
N1
X30.Y60.;
N2
N3
X20.Y-50.;
N4
X50.Y-20.;
movement
N1
N4
N1
N2
N3
N4
N5
N6
N7
N8
X30.Y60.;
G41 D10;
G4 X1000;
F100;
S500;
M3;
X20.Y-50.;
X50.Y-20.;
N7
Block without
movement
(Intersection)
N1
N8
N2~5
N1
N2
N3
N4
N5
N6
N7
G41 X30.Y60.D10;
G4 X1000;
F100;
Block without
S500;
movement
M3;
X20. Y-50.;
X50. Y-20.;
98
N6
N1
(Intersection)
N7
11.2
N7
N6 G91X100. Y200.;
N7 G04X P1000;
N8 X200. ;
N8
Block without
movement
N8
N6
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
N7
N8
N9
N10
N11
X100. Y200.;
G4 X1000;
F100 ;
S500 ;
M4 ;
X100. ;
Block without
movement
N11
N6
N7 to N10
N6
N8
N7
N6
N7
N8
X100. Y200. ;
G40 G04P1000 ;
X100. Y50. ;
N6
99
11.2
(a,b)
(i,j)
N2
G41
N1 (G41)G1X_ ;
N2 G40 XaTbIiJj ;
r
r
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
G41
N1
Program path
(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
G41
Program path
(i,j)
(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
N2
N1 (G42,G91) G01X200. ;
N2 G02 J150. ;
N3 G40 G1X150.Y-150.I-100.J100. ;
(i,j)
Program path
N1
r
G42
G40
N3
100
11.2
11.2.5
The compensation direction can be intentionally changed by issuing the G41/G42 command and I, J,
K in the same block.
(1) Command format
G17 (XY plane) G41/G42 X__ Y__ I__ J__ ;
G18 (ZX plane) G41/G42 X__ Z__ I__ K__ ;
G19 (YZ plane) G41/G42 Y__ Z__ J__ K__ ;
Assign a linear command (G00, G01) in a movement mode.
(2) I, J type vectors (G17 XY plane selection)
The new I, J type vector (G17 plane) created by this command is now described.
Similar descriptions apply to vector K, I for the G18 plane and to J, K for the G19 plane.
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.
(a) When I, J is commanded at compensation start
1) When there are movement commands
N110
N120
N130
N140
N100
(G40)
N150
D1
Program path
N100
N110
N120
N130
N140
N150
(G40)
N3
N1
N2
N3
X
N2
G41 I150. D1 ;
G91 X100. Y100. ;
X150. ;
D1 N1
101
11.2
(I,J) N110
(2)
D1
N100
N120
(1)
(2)
(N120)
X
Program path
(K,I) N110
N100
N120
(N120)
(J,K) N110
N100
N120
(N120)
N2
N4
(I,J)
N1
D1
102
N5
N1
N2
N3
N4
N5
11.2
With I100.
(Example 2)
With I 100.
(100, 0) I, J direction
(100, 0) I, J direction
Offset vector direction
With I100.
(Example 2)
(100, 0) I, J direction
With I 100.
(100, 0) I, J direction
N1
N2
N3
N4
N5
N6
N7
%
X
N4
N3
(I,J)
D2
N2
D1
N5
N6
103
G28 X0Y0 ;
G41 D1 F1000 ;
G01 G91 X100. Y100. ;
G42 X100. I100. J-100. D2;
X100. Y-100. ;
G40 ;
M02 ;
11.2
D1
(G41 D1 G91)
D1
(I,J)
N100
N110
x
Vector A
block.
(Example 2)
(G41 D1 G91)
B
D1
y
D2
(I,J)
N200
N210
x
Vector B
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.
y
Cutting
x
(I,J)
N2
N4
N5
N3
104
N6
N1
N2
N3
N4
N5
N6
N7
G28 X0 Y0 ;
G42 D1 F1000 ;
G91 X100. ;
G42 X100. Y100. I10. ;
X100. Y-100. ;
G40 ;
M02 ;
11.2
G38
G91
G41/G42
(G41)
(G41)
X100.
I50.
J50. ;
G41
G91
X100.
I50.
J50. ;
:
(I, J)
(I, J)
(Compensation
amount)
(Compensation
amount)
(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.
G41/G42
I, J, (K)
Compensation method
No
No
No
Yes
Yes
No
Yes
Yes
N3
(I,J)
N4
N2
Y
N1
N5
105
11.2
11.2.6
S (Stop position
with single block)
MDI interrupt
S1000 M3;
N2
N3
N1G41D1
N2X-20. Y-50. ;
N3G3 X-40. Y40. R70. ;
MDI interrupt
S
X-50. Y30. ;
X-30. Y50. ;
N2
N3
MDI interrupt
S
N2
106
N3
11.2
Interrupt
Program path
Interrupt
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.
Interrupt
107
11.2
11.2.7
Workpiece
(a)
(b)
108
11.2
11.2.8
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
r1
r1
Compensation
amount assigned
by N102
r2
N102
N101
r2
N103
Program path
r1
r1
Program path
r1
r1
r2
r2
109
11.2
(b) LinearArc
r2
r1
Program path
N102
G02
r1
N101
Center of arc
r1
Program path
r1
N101
r1
r1
N102
G03
r2
Center of arc
(c) ArcArc
Tool center path
r1
Program path
N101
r1
N102
Center of arc
Center of arc
r1
r1
r1
r2
Tool center path
Program path
Center of arc
Center of arc
110
r2
11.2
11.2.9
The usual method of Z-axis cutting consists in first applying radius compensation (normally on the XY
plane) beforehand at a position distanced from the workpiece when cutting starts. Bear in mind the
following points for programming if the Z-axis operation is to be divided into two stages: rapid traverse
and then cutting feed after the work is approached.
When the following has been programmed.
Tool center path
N4
N4: Z-axis
descends
(1 block)
N6
N6
N1
N1
Y
Z
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
N6
N4
N5
N6
Cutting
N1
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 ;
N3 M3 ;
N4
Z-250. ;
N5 G01 Z-50. F1 ;
N6
Y 100. F2 ;
N6
N6
N2
N2
N1
N6
N5
N1
Y
X
The same direction as the N6 advance direction is assigned in N2 so that compensation is performed
properly.
111
11.2
11.2.10
Interference check
(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.
Function
Parameter
Operation
Interference check
alarm function
Interference check
avoidance function
Interference check
invalid function
(Example)
Avoidance path
(G41)
N1 G90 G1 X50. Y-100. ;
N2 X70. Y-100. ;
N3 X120. Y0 ;
Outer diameter
of tool
N1
N3
N2
Cutting with N2
Cutting with N2
112
11.2
4'
2 '
N3
4'
4
N1
N2
Vector 1
Vector 2
Vector 3
check No interference
check No interference
Vectors 4 1 deleted
As a result of the above processing, vectors 1 , 2 , 3 and 4 remain as the valid vectors and
operation is executed with the path connecting vectors 1 , 2 , 3 and 4 as the interference
avoidance path.
(2) Detailed description
(a) Conditions regarded as interference
Interference is regarded as occurring when the compensation calculated vectors, which have
been created at the point of contact with movement commands, intersect in a case where
there are movement commands in 3 blocks among the 5 pre-read blocks.
Tool center path
Program path
r
N3
Vectors intersect here.
N1
N2
N5
No interference check possible
N2
N3
N4
113
11.2
N3
N1
N2
R
N2
N3
N1
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
Tool center path
Program path
R
Avoidance vector
N2
N1
114
11.2
N3
N1
Program path
N3
N2
N1
Center of arc
r
Avoidance
vector
N3
N2
Tool center path
When all the interference
avoidance line vectors have
been deleted, new
avoidance vectors are
created as shown in the
figure on the right and
interference is avoided.
N1 Avoidance vector
Program path
N4
r2
r1
N3
Avoidance vector 1
2 2
Avoidance vector
r1
N1
Program path
Program path
115
N2
11.2
N1
N2
23
N3
(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
4
N3
Alarm stop
N2
2
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
N4
N1
N2
N3
116
11.2
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
117
11.2
11.2.11
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.
(Example)
:
G01 G41 X50. D1 F100 ;
G03 I-50. ;
G01 G40 X0 F500 ;
:
Workpiece
Program path
100.0
20 tool
118
11.3
11.3
(1) Outline
The three-dimensional tool radius compensation offsets the tool in a three-dimensional space
following the commanded three-dimensional vectors.
Tool
r: Tool radius
Workpiece
Z(K)
Three-dimensional
compensation vector
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.
Hx =
I
2
(I + J + K )
Hy =
J
2
(I + J + K )
Hz =
K
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.3
Xx Yy Zz
Ii Jj Kk
Movement axis
command
compensation
space *2
Plane normal
line vector
Xx Yy Zz
Ii Jj Kk ;
Dd ;
Compensation
Compensation amount: +
Compensation amount:
D00
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
G code
(Example) G17
G41 Xx Yy Zz Ii Jj Kk ;
120
XYZ space
G17 ;
G41 Yy Ii Jj Kk ;
XYZ space
G17 V ;
G41 Xx Vv Zz Ii Jj Kk ;
XVZ space
G17 W ;
G41 Ww Ii Jj Kk ;
XYW space
G17 ;
G41 Xx Yy Zz Ww Ii Jj Kk ;
XYZ space
G17 W;
G41 Xx Yy Zz Ww Ii Jj Kk ;
XYW space
G17 ;
G41 Ii Jj Kk ;
XYZ space
G17 U ;
G41 Ii Jj Kk ;
UYZ space
11.3
(Example 1)
Three-dimensional
compensation vector
Program path
Start point
(Example 2)
G41 Ii Jj Kk Dd ;
Tool center path
Three-dimensional
compensation vector
Start point
(Example 3)
;
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.3
(Example 5)
New vector
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.
G02 Xx Yy (Zz) Ii Jj ; I, J (K) express the arc center.
Or
G02 Xx Yy (Zz) Rr ; R-designated arc
Tool center path
Old vector
New vector
Start point
Program path
Arc radius
Arc radius
Center of arc
(Example 6)
G41 Xx Yy Zz Ii Jj Kk Dd2 ;
New vector
Old vector
Program path
Start point
(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.3
(Example 7)
G42 Xx Yy Zz Ii Jj Kk ;
New vector
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.
(Example 8)
(Example 9)
Program path
Old vector
Program path
123
11.3
G90 ;
G51 X0 Y0 P0.5 ;
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. ;
Path after compensation
N4 Y0. ;
-50.
-30.
-20.
-10.
Program path
after scaling
Path after scaling
and compensation
-20.
-30.
Y
X
Program path
after scaling
-10.
124
11.3
(f)
D1=10.
X
G90 ;
G68 X0 Y0 R45. ;
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. ;
Path after compensation
N4 Y0. ;
-50.
-30.
-20. -10.
Program path after
coordinate rotation
N1
-20.
N1(
N1(
-30.
N2
N4
N3
X
Upper
line: Program value after coordinate rotation
*
Lower line: Value after coordinate rotation and compensation
Plane normal line vector
N1
-10.
N4
Program path
N3
N2
-20.
Skip
The program error "PR0608 Skip during radius compen" will occur.
(j)
125
11.3
(l)
-50.
G90 ;
N1 G41 D1 X-10. Y-20. Z-10. I-5. J-5. K-5. ;
N2 X-30. Y-30. Z-20. ;
N3 X-50. Y-20. Z-10. ;
N4 G53 Y0 ;
-20.
-30.
-10.
Program path
Path after compensation
-20.
N1( -10.000, -20.000, -10.000 )
N1( -15.773, -25.773, -15.773 )
-30.
Y
-10.
Program path
0.000, -10.000 )
0.000, -10.000 )
Path after
-20.
compensation
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.)
D1=10.
G91 ;
N1 G41 D1 X-10. Y-20. Z-10. I-5. J-5. K-5. ;
N2 X-20. Y-10. Z-10. ;
N3 X-20. Y10. Z10. ;
N4 G53 Y20. ;
-50.
-30.
-20.
-10.
Program path
Path after compensation
-20.
N1( -10.000, -20.000, -10.000 )
N1( -15.773, -25.773, -15.773 )
-30.
Y
-10.
Program path
0.000, -10.000 )
0.000, -10.000 )
Path after
compensation
-20.
126
11.3
-50.
G91 ;
N1 G92 G41 D1 X-10. Y-20. Z-10. I-5. J-5. K-5. ;
N2 X-20. Y-10. Z-10. ;
N3 X-30. Y-10. Z10. ;
N4 Y20. ;
-30.
-20.
W(0,0)
-10.
Program path
Path after compensation
G92
N1( -10.000, -20.000, -10.000 )
N1( -15.773, -25.773, -15.773 )
-20.
-30.
Y
X
W(0,0)
G92
-10.
Program path
-20.
-50.
-30.
-20.
M(0,0)
-30.
-50.
D1=10.
-20.
-10.
W(0,0)
G91 ;
N1 G41 D1 X-10. Y-20. Z-10. I-5. J-5. K-5. ;
N2 X-20. Y-10. Z-10. ;
N3 X-20. Y10. Z10. ;
N4 G28 X0 Y0 Z0 ;
-10.
Program path
-20.
-30.
Path after
compensation -30.
-40.
0.000,
0.000,
0.000,
0.000,
M(0,0)
X
0.000 )
0.000 )
W(0,0)
-10.
Program path
-10.
-20.
Path after
compensation -20.
-30.
127
11.3
(o) NC reset
The three-dimensional tool radius compensation will be canceled if NC reset is executed
during three-dimensional tool radius compensation.
(p) Emergency stop
The three-dimensional tool radius compensation will be canceled by the emergency stop or
emergency stop cancel 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.4
11.4
11.4.1
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.
11.4.2
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
Z0.0
W
Tool length
offset amount
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.4
11.4.3
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.5
11.5
(1) Outline
The number of tool compensation sets can be selected with parameters.
(2) Detailed description
The number of tool compensation sets can be selected as follows.
(a) Number of 1-axis compensation amount sets
40 sets
Standard specifications
100 sets
Additional specifications
200 sets
Additional specifications
400 sets
Additional specifications
800 sets
Additional specifications
990 sets
Additional specifications
Standard specifications
40 sets
Additional specifications
80 sets
Additional specifications
131
11.6
11.6
(1) Outline
By using this command, movement is controlled so that the end point position of the movement
command is changed to a position extended or reduced by the tool offset amount.
With this function, the difference in the distance between program coordinate position and actual
machine tool installation position caused by the tool position can be offset, allowing machining and
operation efficiency to be improved.
However, this function has been prepared for compatibility with conventional machining programs
not provided with the tool radius compensation function. Thus, do not use this function when
creating a new machining program.
(2) Command format
G45
G00
Offset
Xx1
Movement
axis
G45 command
Yy1
Dd1
G46 command
G47 command
G48 command
Program
command
Program
command
Program
command
Program
command
Actual
movement
amount
Actual
movement
amount
Actual
movement
amount
Actual
movement
amount
b.
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.6
Command
Equivalent command
movement amount
(Designated offset
amount = l)
Actual example
(When X = 1000)
G45Xx Dd
X (x + l)
l = 10
l = 10
X = 1010
X = 990
G45X x Dd
X (x + l)
l = 10
l = 10
X = 1010
X = 990
G46Xx Dd
X (x l)
l = 10
l = 10
X = 990
X = 1010
G46X x Dd
X (x l)
l = 10
l = 10
X = 990
X = 1010
G47Xx Dd
X (x + 2 l)
l = 10
l = 10
X = 1020
X = 980
G47X x Dd
X (x + 2 l)
l = 10
l = 10
X = 1020
X = 980
G48Xx Dd
X (x 2 l)
l = 10
l = 10
X = 980
X = 1020
G48X x Dd
X (x 2 l)
l = 10
l = 10
X = 980
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
(1) Outline
The coordinate systems are created with parameter settings in the following cases:
When the reference point is reached with the first manual or automatic dog-type reference point
return after the NC power is turned ON.
Immediately after the power is turned ON when using the absolute position specifications.
The actual machining program is programmed on the coordinate system set above.
The coordinate system handled by the NC is shown below. The points that can be specified with
the movement commands are points on the workpiece coordinate system (local coordinate system
when local coordinate offset is designated) or on the machine coordinate system.
G92 Offset
134
12.2
(1) Outline
The machine coordinate system is a coordinate system that indicates positions (tool change
position, stroke end position, etc.) characteristic to the machine. These coordinates are
automatically set when the first dog-type reference point return is completed after the power is
turned ON, or immediately after the power is turned ON when using the absolute position
specifications.
(2) Command format
The program format for movement commands to points on the machine coordinate system is as
follows.
G53
Coordinate
system
selection
G90
Absolute/
incremental
command
G00
Movement
mode
Xx1
Yy1
Zz1
W1
135
12.3
(1) Outline
(a) Workpiece coordinate system (Six sets)
This function allows the same shape to be machined easily when machining multiple
workpieces with the same shape. This is carried out by executing one machining program for
the coordinate system of each workpiece.
Up to six workpiece coordinate systems can be selected.
The G54 workpiece coordinate system is selected when the power is turned ON and then the
reset signal that cancels the modal information is input.
(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.
(2) Command format
(a) Workpiece coordinate system (Six sets)
The format for workpiece coordinate system selection and the movement command to the
workpiece coordinates is as follows.
(G90)
(Absolute value)
G54
Coordinate
sys-tem
designation
G00
Xx1
Yy1
Zz1
G code
Function
G54
G55
G56
G57
G58
G59
(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.
(G90)
(Absolute value)
G54.1Pn
Coordinate
sys-tem
designation
G00
Xx1
Yy1
Zz1
The n value for P following G54.1 indicates each workpiece coordinate system. Designate 1 to
48 or 1 to 96.
136
W2
W1
Workpiece coordinate 1
(G54)
Workpiece coordinate 2
(G55)
Start
G90 G56 G00 X0 Y0 ;
W4
Workpiece coordinate 4
(G57)
W3
Workpiece coordinate 3
(G56)
(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
(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.4
(1) Outline
This function is used to designate a further coordinate system within the currently selected workpiece
coordinate system. Using this, the workpiece coordinate system can be changed temporarily.
A local coordinate system in which the commanded position is the program zero point can be set
on the workpiece coordinate system.
The local coordinate system can be designated independently for each of the G54 to G59
workpiece coordinate systems.
This can also be used to instead of changing the deviation of the machining program zero point
and machining workpiece zero point with the coordinate system setting (G92) command.
L1
Local coordinates
G54 G52
y1
W1
x1
Workpiece coordinate 1
(G54)
G52
Local
coordinate
setting
Xx1
Yy1
Zz1
G code
Function
G54 G52
G55 G52
G56 G52
G57 G52
G58 G52
G59 G52
G52X0Y0Z00 ;
139
G52X0Y0Z00 ;
(f) The coordinate commands in the absolute value mode (G90) will cause movement to the
position in the local coordinate system.
140
12.5
(1) Outline
An external workpiece coordinate offset used as the reference for all workpiece coordinate
systems is provided externally from the workpiece coordinates.
By setting the external workpiece coordinate offset, these can be shifted, and all workpiece
coordinate systems can be shifted simultaneously by that offset amount.
(2) Detailed description
(a) If the external workpiece coordinate offset is zero, the external workpiece coordinate system
will match the machine coordinate system.
(b) A movement command cannot be executed when the external workpiece coordinates are
selected.
Workpiece coordinate
system 4
(G57)
Workpiece coordinate
system 5
(G58)
Workpiece coordinate
system 6
(G59)
Workpiece coordinate
system 1
(G54)
Workpiece coordinate
system 2
(G55)
Workpiece coordinate
system 3
(G56)
Workpiece coordinate
system 4
(G57)
Workpiece coordinate
system 5
(G58)
Workpiece coordinate
system 6
(G59)
Workpiece coordinate
system 1
(G54)
Workpiece coordinate
system 2
(G55)
Workpiece coordinate
system 3
(G56)
(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.6
(1) Outline
The absolute value coordinate system in the program and the currently displayed position value
can be preset to newly commanded values without moving the machine or using the workpiece
coordinate system.
(2) Command format
G92
Coordinate
system setting
Xx1
Yy1
Zz1
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)
G92 offset amount
Machine coordinate
system
X : x 1-X1
Y : y1-Y1
M
New W1
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.7
(1) Outline
The axis designated as the rotation axis with the parameters is controlled with the rotation axis
coordinate system. The rotation axis coordinate system is from 0 to 360, but the counter display
is 0 to 359.999.
(2) Detailed description
(a) When using incremental value commands, the axis will move by the commanded movement
amount. However, when using absolute value commands, the movement amount will be within
one rotation (within 360). In either case, the rotation direction is determined by the sign. If
commanded with a (), the axis will move in the () direction, and if commanded with a (+), the
axis will move in the (+) direction.
(b) In respect to the absolute value command, the axis can be moved with a short cut to the end
point by setting the parameters, or can be moved linearly like a normal linear axis as shown
below.
These parameters can be set for each axis.
Rotation type
Shortcut valid
Shortcut invalid
Linear type
ABS
command
INC
command
143
12.8
(1) Outline
These are the G command codes used to specify the commanded plane for the arc command,
tool radius compensation and coordinate rotation command, etc.
(2)
Command format
G17 Xp, Yp plane designation
G18 Zp, Xp plane designation
G19 Yp, Zp plane designation
X100. ;
G17
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.
R50. ; In this program command, the Xp, Yp plane is selected with the G17,
so the arc command is controlled over this plane.
Parallel axis 1
Parallel axis 2
(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
;
;
;
;
;
;
XY plane
WY plane
VX plane
VU plane
YZ plane
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_ ;
Y_Z_ ;
XY plane
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
G17U_
G18U_
G18V_
G19Y_
G19V_
;
;
;
;
;
;
XY plane
UY plane
ZU plane
VX plane
YZ plane
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.9
(1) Outline
By commanding G28 during automatic operation, the axis can be returned to the 1st reference
point. If the middle point is commanded, the axis will be positioned to that point at rapid traverse,
and then will independently return to the 1st reference point.
By commanding G29, after positioning each axis independently to the G28 or G30 middle point,
the axis can be positioned to the commanded position.
G code
G28
G29
Function
Automatic 1st reference point return
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.)
Xx1
Yy1
Zz1
Xx1
Yy1
Zz1
Move with
non-interpolat
ion
G28
Interpolation/
non-interpolation
selection
G29
Interpolation/
non-interpolation
selection
G29
Y
146
147
12.10
(1) Outline
By commanding G30Pn during automatic operation, the axis can be returned to the machine's
characteristic set point (2nd, 3rd, 4th reference point) in the same manner as automatic reference
point return. The 2nd, 3rd, 4th reference point positions are set with the parameters.
G code
G30
G30
G30
Function
P2
P3
P4
Xx1
Yy1
Zz1
Pp1
Return point
number
G30 P2
Start position
Middle point
G30 P3
G30 P4
3rd reference point
148
149
12.11
(1) Outline
By commanding G27, after positioning to the position issued by the program, if the positioning
point is the designated reference point, the reference point reached signal will be output to the
machine side in the same manner as G28. Thus, it can be checked whether the machining
program created to start from the reference point and return to the reference point has correctly
returned to the reference point.
(2) Command format
The G27 program format is as follows.
Xx1
G27
Compare
command
P1
P2
P3
P4
Yy1
Zz1
:
:
:
:
Pp1
Compare
number
150
(1) Outline
This function allows a fine block with extremely short block length in respect to the speed to be
executed at a high speed for die machining, etc. The high-speed machining mode includes mode I
and II according to the differences in performance (functions).
(2) Command format
: High-speed machining mode I ON
: High-speed machining mode II ON
G05
G05
P1 ;
P2 ;
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
(c)
Mode
Standard mode
High-speed mode I
High-speed mode II
Command
M6
G05 (P0) 8.4m/min (Regardless of tool radius
compensation ON/OFF)
G05P1
16.8m/min (Regardless of tool radius
compensation ON/OFF)
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.2
(1) Outline
When the same pattern is used repeatedly during machining, this function registers that machining
pattern as a subprogram. This allows the same machining to be realized easily by calling out the
subprogram from the main program when required. The program can be effectively used with this
function.
The call is designated with the program number and sequence number. The main program is
returned to from the subprogram by commanding M99. Other subprograms can be called from the
subprogram, and a depth of up to eight levels can be programmed.
(2) Command format
(a) Calling the subprogram
Pp1
M98
Call command
Hh1
Ll1
Subprogram Sequence
number
number
(Branch to
subprogram)
,Dd1
Number of
repetitions
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.
(b) Returning from the subprogram
Pp2
M99
Return
command
Main program
level 0 (P1000)
8 level call
P1000
Main program
level 1 (P1)
Main program
level 2 (P2)
P1
P2
Main program
level 8 (P8)
P8
M98 P2;
M99;
M98 P1;
M99;
M98 P3;
M99;
M02/M30;
153
(d) The subprogram branch destination and the subprogram repetition can also be designated.
Subprogram branch destination designation
Subprogram
P1
Main program
P1000
N1;
Subprogram
P1
Execute five
times.
Main program
P1000
M98 P1 H1;
M99;
N100;
M98 P1 L5;
M98 P1 H100;
M99 ;
M99;
M02/M30;
M02/M30;
(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.
Subprogram
storage place
Main program
storage place
NC side
Memory
IC card
Hard
disk/
data
server
Tape
RS-232C
Memory
NC side IC card
MDI
Floppy disk
Personal
Hard disk/
computer
data server
side
Tape RS-232C
The
(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.3
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.
List of machining center system hole drilling fixed cycle functions
Hole drilling start
(Z direction)
G code
Spindle
Return
operation
(+Z direction)
Application
G80
G81
Cutting feed
G82
Cutting feed
Valid
Rapid traverse
G83
Intermittent feed
G84
Cutting feed
Valid
Cancel
Tapping cycle
G85
Cutting feed
G86
Cutting feed
Valid
Stop
G87
Rapid traverse
G88
Cutting feed
Valid
Stop
G89
Cutting feed
Valid
Cutting feed
G73
Intermittent feed
Valid
G74
Cutting feed
Valid
G76
Cutting feed
Cutting feed
Boring cycle
Boring cycle
Reverse tapping cycle
Oriented
Rapid traverse Fine boring cycle
spindle stop
(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.
13.3.2
Command format
G98
Return point
Operation
mode
Xx1
Yy1
Zz1
Hole position
data
Rr1
Qq1
Pp1
Ll1
Ff1
Feedrate
Function
Initial point level return
R point level return
155
Application
G80
Cancel
G81
G82
G83
G84
Tapping cycle
G85
Boring cycle
G86
Boring cycle
G87
G88
Boring cycle
G89
Boring cycle
G73
Step cycle
G74
G76
156
13.3.3
Description of operation
1
2
Initial point
3
R point
4
Z point
5
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
The relation of the G98/G99 mode and No. of repetition designation is as shown below.
G98
At power ON, at cancel
No. of hole
Program
G99
with M02, M30, and reset
drilling
example
button
Only one
execution
G81X100.
Y100.
Z50.
R25.
F1000;
Initial point
Initial point
R point
R point
Second and
following
executions
executed.
G81X100.
Y100.
Z50.
R25.
L5F1000;
First
time
Second
time
Final
time
First
time
Second
time
Final
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.3.4
Detailed description
Positioning plane
G17 (X-Y)
Xp-Yp
Zp
G18 (Z-X)
Zp-Xp
Yp
G19 (Y-Z)
Yp-Zp
Xp
(Note) Xp, Yp and Zp denote the basic axes X, Y and Z or the parallel axes of
these basic axes.
(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
G81
G81
Z_ ;
W_ ;
;
(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.
(2) Fixed cycles and uni-directional positioning (G60)
Using fixed cycles and the uni-directional positioning (G60) command in combination enables a
tool to be positioned with a high accuracy at the hole drilling point without any backlash error.
(3) Workpiece coordinate settings in fixed cycle mode
The axis-designated axis moves with the set workpiece coordinate system.
The Z axis is valid from the R point positioning or Z axis movement after positioning is completed.
(Note)
For addresses Z and R, reprogram when changing the workpiece coordinates even if the
values are the same.
(Example)
G54
G81
G55
Xx1
Xx2
:
:
Xx3
Yy1
Yy2
Zz1 ;
Zz2 Rr2 ;
Yy3
Zz2
Xx4
Xx5
:
:
Yy4 ;
Yy5 ;
159
13.3.5
Xx
Yy
Zz
Rr
Ff
Pp ;
G98 mode
Initial point
R point
q
G99 mode
Z point
1)
2)
3)
4)
5)
6)
:
:
(n)
G0 Xx Yy;
G0 Zr;
G1 Zq Ff;
G4 Pp;
G0 Z (zn);
G1 Z (q+n) Ff;
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
Xx
Yy
Zz
Rr
Ff
Pp ;
G98 mode
Initial point
M04
R point
Z p oint
M03
1)
2)
3)
4)
5)
6)
7)
8)
9)
G0 Xx Yy ;
G0 Zr ;
G1 Zz Ff ;
G4 Pp ;
M03 ;
(Spindle forward rotation)
G1 Z z Ff ;
G4 Pp ;
M04 ;
(Spindle reverse rotation)
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
Xx
Yy
Zz
Rr
Iq1
Jq2
Ff ;
G98 mode
Init ial point
R point
Z p oint
G99 mode
M19 sh ift
1)
2)
3)
4)
5)
6)
G0 Xx Yy ;
G0 Zr ;
G1 Zz Ff ;
M19 ;
(Spindle orientation)
G1 Xq1 Yq2 Ff ;
(Shift)
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
Xx
Yy
Zz
Rr
Ff ;
R point
Z p oint
1)
2)
3)
4)
G99 mode
G0 Xx Yy ;
G0 Zr ;
G1 Zz Ff ;
G98 mode G0
G99 mode G0
Z (z + r) ;
Zz;
The stop position during single block operation applies upon completion of the 1), 2) and 4)
commands.
Xx
Yy
Zz
Rr
Ff
Pp ;
Initial point
1)
2)
3)
4)
5)
R point
G98 mode
Z p oint
G99 mode
G0 Xx Yy ;
G0 Zr ;
G1 Zz Ff ;
G4 Pp ;
(Dwell)
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
Xx
Yy
Zz
Rr
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
G99 mode
Z p oint
1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
:
:
(n)
G0
G0
G1
G0
G0
G1
G0
G0
G1
G0
Xx Yy ;
Zr ;
Zq Ff ;
Zq;
Z (q n) ;
Z (q + n) Ff ;
Z2q;
Z (2 q n) ;
Z (q + n) Ff ;
Z3q;
G98 mode
G99 mode
G0
G0
Z (z + r) ;
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
Xx
Yy
Zz
Rr
Ff
Pp ;
G98 mode
Initial point
R point
M03
Z p oint
M04
1)
2)
3)
4)
5)
6)
7)
8)
9)
G0 Xx Yy ;
G0 Zr ;
G1 Zz Ff ;
G4 Pp ;
M04 ;
(Spindle reverse rotation)
G1 Z z Ff ;
G4 Pp ;
M03 ;
(Spindle forward rotation)
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
Xx
Yy
Zz
Rr
Ff ;
G98 mode
In itial point
R point
Z p oint
1)
2)
3)
4)
5)
G0 Xx Yy ;
G0 Zr ;
G1 Zz Ff ;
G1 Z z Ff ;
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.
Xx
Yy
Zz
Rr
Ff
Pp ;
G98 mode
In itial point
R point
Z p oint
1)
2)
3)
4)
5)
6)
G0 Xx Yy ;
G0 Zr ;
G1 Zz Ff ;
G4 Pp
M05 ;
(Spindle stop)
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
Xx
Yy
Zz
Rr
Iq1
Iq2
Ff ;
(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)
2)
3)
4)
5)
6)
7)
8)
9)
10)
G0 Xx Yy ;
M19 ;
(Spindle orientation)
G0 Xq1 Yq2 ;
(Shift)
VG0 Zr ;
G1 X q1 Y q2 Ff ;
(Shift)
M03 ;
(Spindle forward rotation)
G1 Zz Ff ;
M19 ;
(Spindle orientation)
G0 Xq1 Yq2 ;
(Shift)
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
Xx
Yy
Zz
Rr
Ff
Pp ;
G98 mode
In itial point
R point
Z p oint
1)
2)
3)
4)
5)
6)
7)
G0 Xx Yy ;
G0 Zr ;
G1 Zz Ff ;
G4 Pp
M05 ;
(Spindle stop)
Stop with single block stop switch ON
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.
Xx
Yy
Zz
Rr
Ff
Pp ;
G98 mode
In itial point
R point
Z p oint
1)
2)
3)
4)
5)
6)
G0 Xx Yy ;
G0 Zr ;
G1 Zz Ff ;
G4 Pp
G1 Z z ;
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.4
13.4.1
Chamfering or corner rounding is automatically inserted between blocks by adding " ,C " or " ,R " to
the linear-arc program.
13.4.2
Corner chamfering
(1) Function
The corner is chamfered in such a way that the points, which are distanced by the lengths
assigned by " ,C_ " from the hypothetical start and final corners which would apply were to be
performed, are connected.
(2) Command format
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
169
Hypothetical corner
Cc1
Cc1
Chamfering end
point
Chamfering start point
(2)
(1)
Hypothetical corner
Cc1
Cc1
Chamfering start
point
Chamfering end point
(2)
(1)
170
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".
(2) Command format
N100
G01
X_
Z_
N200
G01
X_
Z_ ;
, R_ ;
Corner R is performed at the point where N100 and N200 hypothetical corner.
(3) Description of operation
(a) Linear Linear
N2
r1
N1
Rr 1
Corner R end point
(2)
171
(1)
(2)
Rr 1
Corner R start point
(1)
Hypothetical corner
Corner R start point
(1)
Corner R end point
Rr 1
(2)
172
13.4.4
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)
F
E
F
E
F
Z
(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.5
13.5.1
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
Y
Mirror image OFF path
174
13.5.3
(1) Outline
The mirror image can be directly designated with the G command by creating a machining program.
G code
G50.1
G51.1
Function
G command mirror image cancel
G command mirror image ON
Xx1
Yy1
Zz1
Xx1
Mirror image
cancel
Yy1
Zz1
Command axis
Mirror axis
175
(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.
(5) Combination with other functions
(a) Radius compensation
Mirror imaging is processed after a radius compensation command has been applied, and
cutting proceeds as follows.
Program path
When radius compensation is applied.
(b) Scaling
Mirror image applies to a shape after scaling so that cutting proceeds as follows.
Original shape
When mirror image and scaling are applied.
Mirror center
176
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).
13.6.2
Detailed description
50+50 2 sets #100 to #149: Independent for system, #500 to #549: Common for system
100+100 2 sets #100 to #199: Independent for system, #500 to #599: Common for system
: # Numerical value
Example)
(Numerical value = 1, 2, 3, )
: # [expression]
Example)
#100
# [#100 + #200]
#100 + #101
#120
[#110]
SIN [#110]
(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
Number
Common variables
100 to 149,
500 to 549
1 to 33
User macro
specifications required.
User macro
specifications required.
Local variables
System variables
1000 to
Fixed cycle
variables
1 to 99
Function
Remarks
Fixed cycle
specifications required.
(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
(4) Variable quotations
(a) Variables can be used for all addresses except O, N and / (slash).
When the variable value is used directly:
X#1 Value of #1 is used as the X value.
When the complement of the variable value is used:
X - #2 Value with the #2 sign changed is used as the X value.
When defining variables:
#3 = #5 Variable #3 uses the value of variable #5.
#1 = 1000 Variable #1 uses the value 1000 (which is treated as 1000.).
When defining the variable operation expression:
#1 = #2 + #3 - 100 The value of the operation result of #2 + #3 - 100. is used as
the #1 value.
X [#1 + #3 + 1000] The value of the operation result of #1 + #3 + 1000. is used
as the X value.
(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.
(c) Variable name definition
Variable names can be set for #500 to #519.
Note that variable names should be 7 alphanumeric characters or less, starting with an
alphabetic character.
SETVNn [NAME1, NAME2, ] ;
n: Head number of variable for attaching name
G00X [#NAME1] ;
NAME1: Name with #n defined
G00Y [#NAMEk] ;
NAMEk: Name with #k defined
:
178
13.7
13.7.1
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.
Main program
Macro program
..... ;
..... ;
M99;
M30;
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
G66
G66.1
G67
(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.7.2
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.
(1) Simple macro calls
Main program
To subprogram
Subprogram (Oo1)
Oo1
G65Pp1Ll1
<argument>;
M99
To main program
G65
P___
L___
<argument> ;
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
1)
Argument designation I
Format : A__ B__ C__ ....... X__ Y__ Z__
Arguments can be designated using any address except G, L, N, O and P.
Except for I, J and K, there is no need for designation in alphabetical order.
I, J and K must be designated in alphabetical order.
I__ J__ K__ ............ Correct
J__ I__ K__ ............ Incorrect
Address which do not need to be designated can be omitted.
The following table shows the correspondence between the addresses which can be
designated by argument designation I and the variable numbers in the user macro main
body.
Address and variable number
correspondence
Variable in
Argument designation I
macro
address
A
#1
B
#2
C
#3
D
#7
E
#8
F
#9
G
#10
H
#11
I
#4
J
#5
K
#6
L
#12
M
#13
N
#14
O
#15
P
#16
Q
#17
R
#18
S
#19
T
#20
U
#21
V
#22
W
#23
X
#24
Y
#25
Z
#26
: Can be used.
: Cannot be used.
: Can be used while G66.1 command is modal.
181
G66.1
*
*
*
2)
Argument designation II
Format : A__ B__ C__
Variable
within macro
#1
#2
#3
#4
#5
#6
#7
#8
#9
#10
#11
#12
#13
#14
#15
#16
Argument designation
II address
J5
K5
I6
J6
K6
I7
J7
K7
I8
J8
K8
I9
J9
K9
I10
J10
K10
Variable
within macro
#17
#18
#19
#20
#21
#22
#23
#24
#25
#26
#27
#28
#29
#30
#31
#32
#33
3)
G65
A1.1
#1 : 1.1
#2 : 2.2
#4 : 4.4
#5 :
#6 :
#7 : 3.3
B-2.2
D3.3
I4.4
I7.7
7.7
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
Subprogram
To subprogram
Oo1
G65Pp1Ll1
<argument>;
M99
G67
To main program
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.
Format ;
G66
P___
L___
<argument> ;
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.
(Example)
Drill cycle
O 9010
N4 X-50.Y-50.;
N5 X-50.;
N6 G67;
To main program
~
X
-150. -100.
-50.
M99;
W
N1
N2
N3
N10
-50.
N4
N20
N30
Argument Z
-100.
Subprogram
Subprogram
N5
Argument R
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
G66.1
P___
L___
<argument> ;
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.
<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
(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
O9016
Program example
G16X100. Y100. Z100. F500 ;
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 ;
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
(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.
(6) Macro call command nesting depth
Up to 4 nesting levels are available for macro subprogram calls based on simple call or modal
call.
The argument with a macro call instruction is valid only on the called macro level. Since the
nesting depth for macro calls extends up to 4 levels, the argument can be used as a local variable
for the program with each respective macro call.
Note 1) When a G65, G66, G66.1 G code macro call or miscellaneous command macro call is
conducted, this is regarded as nesting level 1 and the level of the local variables is
also incremented by one.
Note 2) The designated user macro subprogram is called every time the movement command
is executed with modal call A. However, when the G66 command has been duplicated,
the next user macro subprogram is called every time an axis is moved even with
movement commands in the macro.
User macro subprograms are called in sequence from the subprogram commanded
last.
(Example 1)
Main program
Macro p1
G66Pp1; (p1 call)
Zz1
;
After Z1 execution
y1
x2
M99
x1
y1
x2
M99
Macro p2
(p2 cancel)
Macro p1
Macro p1
Macro p1
Macro p1
Zz3
G67
; (p1 cancel)
Zz4
Zz5
;
;
After Z3 execution
x1
186
y1
x2
M99
G65Pp1 ;
Macro
(level 1)
Macro
(level 2)
Op1 ;
Op2 ;
Op3 ;
G65Pp2 ;
G65Pp3 ;
G65Pp4 ;
M99 ;
#1
:
:
:
:
#33
(Example 2)
M99 ;
Local variable
(level 1)
Local variable
(level 0)
Argument
(1) is set
Macro
(level 3)
#1
:
:
:
:
#33
Op4 ;
M99 ;
Local variable
(level 2)
Argument
(1) is set
Macro
(level 4)
#1
:
:
:
:
#33
M99 ;
Local variable
(level 4)
Local variable
(level 3)
Argument
(1) is set
#1
:
:
:
:
#33
Argument
1 is set
Main program
N1G66Pp1AaBb ;
N2G65Pp2XxYy ;
Op2 ;
Op1 ;
X#24 ;
Y#25 ;
G00Z#1 ;
G01Z#2 ;
M99 ;
Local variable
(level 0)
#1
:
:
:
:
#33
Local variable
(level 1)
Local variable
(level 1)
#1
#2
:
#24 x
#25 y
:
#33
#1 a
#2 b
:
#24
#25
:
#33
N1 block execution
In it ial ization -> st orag e
187
Macro
(level 2)
M99 ;
Local variable
(level 2)
#1
#2
:
#24
#25
:
#33
#1
:
:
:
:
#33
(b) Types stored in local variables in order of macro program call order
Main program
N1G66Pp1AaBb ;
N2G65Pp2XxYy ;
Local variable
(level 0)
#1
:
:
:
:
#33
Macro
(level 2)
Macro
(level 1)
Op2 ;
Op1 ;
X#24 ;
Y#25 ;
G00Z#1 ;
G01Z#2 ;
M99 ;
M99 ;
Local variable
(level 1)
Local variable
(level 2)
#1 a
#2 b
:
#24
#25
:
#33
#1
#2
:
#24 x
#25 y
:
#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).
(8) Differences between M98 and G65 commands
M98 is simply a subprogram call command. Thus, observe the following points.
(a) The argument can be designated for G65 but not for M98.
(b) The sequence number can be designated for M98 but no for G65, G66 and G66.1.
(c) M98 executes a subprogram after all the commands except M, P, H and L in the M98 block
have been executed, but G65 branches to the subprogram without any further operation.
(d) When any address except O, N, P, H or L is included in the M98 block, single block stop
results. This is not the case with G65.
(e) The level of the M98 local variables is fixed but it can be varied in accordance with the
nesting depth for G65. (#1, for instance, has the same significance either before or after M98
but a different significance in each case with G65.)
(f) The M98 nesting depth extends up to 8 levels in combination with G65, G66 and G66.1. The
G65 nesting depth extends up to only 4 levels in combination with G66 and G66.1.
188
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.)
(1) Use of multiple variables
When the user macro specifications applied, variable numbers can be turned into variables
(multiple use of variables) or replaced by <formula>. Only one of the four basic arithmetic rule (+,
, , ) operations can be conducted with <formula>.
(Example 1)
#1 = 10 #10 = 20 #20 = 30 ;
#5 = #[#[#1]] ;
#1 = 20 #10 = 20 #20 = 30 #5 = 1000 ;
#[#[#1]] = #5 ;
(Example 2)
#10 = 5
In which case ##10 = 100 ; #5 = 100
(Example 3)
#10 = 5 ;
#[#10 + 1] = 1000 ;
#[#10 1] = 1000 ;
#[#103] = 100 ;
#[#10/2] = 100 ;
#1 = <vacant>
#2 = 1
#3 = 1
#4 = 0
#5 = 0
189
When #101 = 0
#101 EQ #0
<Vacant> = <Vacant> established
#101 EQ #0
0 = <Vacant> not established
#101 NE 0
<Vacant> 0 established
#101 NE 0
0 0 not established
#101 GE #0
<Vacant> <Vacant> established
#101 GE #0
0 <Vacant> established
#101 GT 0
<Vacant> > 0 not established
#101 GT 0
0 > 0 not established
#101 LE #0
<Vacant> <Vacant> established
#101 LE #0
0 <Vacant> established
#101 LT 0
<Vacant> < 0 not established
#101 LT 0
0 < 0 not established
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.
List of condition establishment and establishment failure
(conditional expression containing non-defined variables)
Right side
EQ
NE
Blank
Constant
Blank
Constant
Left side
Blank
GT
Constant
{
Blank
LT
Constant
190
Blank
GE
Constant
{
LE
Blank
Constant
Blank
Constant
13.7.4
Types of variables
(Note)
P1 = Program number
l1 = Number of repetitions
The following table shows the correspondences between the addresses designated by argument
and the local variable numbers used in the user macro main bodies.
[Argument specification I]
Call
command Argument
address
G65
G66.1
G66
A
B
C
D
E
F
*
G
H
I
J
K
*
L
M
*
N
O
*
P
Local
variable
number
#1
#2
#3
#7
#8
#9
#10
#11
#4
#5
#6
#12
#13
#14
#15
#16
Call
command Argument
address
G65
G66.1
G66
Q
R
S
T
U
V
W
X
Y
Z
Local
variable
number
#17
#18
#19
#20
#21
#22
#23
#24
#25
#26
#27
#28
#29
#30
#31
#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.
"" denotes that a corresponding address is not available.
191
Variable in
macro
Argument specification
II address
Variable in
macro
#1
#2
#3
#4
#5
#6
#7
#8
#9
#10
#11
#12
#13
#14
#15
#16
#17
#18
I6
J6
K6
I7
J7
K7
I8
J8
K8
I9
J9
K9
I10
J10
K10
#19
#20
#21
#22
#23
#24
#25
#26
#27
#28
#29
#30
#31
#32
#33
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.
Main program
G65P9900A60.S100.F800;
Subprogram (9900)
To subprogram
M02;
#5=#4010;
G91G01X [#19COS [#1] ]
Y [#19SIN [#1] ] F#9;
M99;
Refer to the local
variables and control the
movement, etc.
Local variable
data table
192
A(#1)=
60.000
F(#9)=
800
S(#19)= 100.000
Subprogram (1)
#30=FUP [#2/#5/2]
#5=#2/#30/2 ;
M98H100L#30 ;
X#1 ;
M99 ;
N100 G1 X#1 F#9 ;
Y#5 ;
X-#1 ;
Y#5 ;
M99 ;
J
Local variables set by argument
A(#1) 100.000
B(#2) 50.000
F(#9)
500
J(#5) 10.000
(#30)
8.333
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
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)
M99;
M99;
M02;
M99;
#1
#2
#3
A (#1) 1.000
B (#2) 2.000
C (#3) 3.000
D (#7)
A (#1) 10.000
B (#2) 20.000
C (#3) 30.000
D (#7)
A (#1) 100.000
B (#2) 200.000
C (#3)
Z(#26)
Z(#26)
Z(#26)
#32
#32
#32
#32
0.100
0.200
0.300
The status of the local variables appear on the setting and display unit.
Refer to the Instruction Manual for details.
194
No. of
points
Interface input
signal
System
variable
No. of
points
Interface input
signal
#1000
#1001
#1002
#1003
#1004
#1005
#1006
#1007
#1008
#1009
#1010
#1011
#1012
#1013
#1014
#1015
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
#1016
#1017
#1018
#1019
#1020
#1021
#1022
#1023
#1024
#1025
#1026
#1027
#1028
#1029
#1030
#1031
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
System
variable
No. of
points
Interface input
signal
#1032
#1033
#1034
#1035
#1036
#1037
#1038
#1039
#1040
#1041
32
32
32
32
32
32
32
32
32
32
195
No. of
points
Interface input
signal
System
variable
No. of
points
Interface input
signal
#1100
#1101
#1102
#1103
#1104
#1105
#1106
#1107
#1108
#1109
#1110
#1111
#1112
#1113
#1114
#1115
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
#1116
#1117
#1118
#1119
#1120
#1121
#1122
#1123
#1124
#1125
#1126
#1127
#1128
#1129
#1130
#1131
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
System
variable
No. of
points
Interface input
signal
#1132
#1133
#1134
#1135
#1136
#1137
#1138
#1139
#1140
#1141
32
32
32
32
32
32
32
32
32
32
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
Input signal
(R124, R125)
#1032 (R72,R73)
#1032(R172,R173)
(R24, R25)
#1132
#1000
#1100
#1001
#1101
#1002
#1102
#1003
#1103
Read only
#1029
#1030
#1031
32
Read/write
Macro instructions
#1028
Output signal
#1128
#1129
#1130
#1131
(R26, R27)
#1033
32
bit
#1133
(R128, R129)
(R28, R29)
#1034
#1134
#1035
#1135
(R130, R131)
(R30, R31)
Details
Machining parameter "#330015 Normal C axis turn R"
Machining parameter "#330016 Norm C insrt radius"
Type 1
Type 2
#10001 ~ #10000 + n
#2001 ~ #2000 + n
(Length dimension)
#11001 ~ #11000 + n
#2201 ~ #2200 + n
(Length wear)
#16001 ~ #16000 + n
#2401 ~ #2400 + n
(Radius dimension)
#17001 ~ #17000 + n
#2601 ~ #2600 + n
(Radius wear)
197
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.
Programming example
#101=1000;
#10001=#101;
#102=#10001;
(Example 1)
Common variables
After
execution
#101=1000.0
H1=1000.000
#102=1000.0
G28Z0T01 ;
M06 ;
#1=#5003 ;
G00 Z-500. ;
G31 Z-100. F100;
#10001=#5063-#1 ;
G00
H1
G31
Sensor
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
Axis 1
Axis 2
Axis 3
Axis 4
Remarks
#5201
#5202
#5203
#5204
#5221
#5241
#5261
#5281
#5301
#5321
#5222
#5242
#5262
#5282
#5302
#5322
#5223
#5243
#5263
#5283
#5303
#5323
#5224
#5244
#5264
#5284
#5304
#5324
(Example
(Example 1)
N1
-90.
N1 G28 X0Y0Z0 ;
N2 #5221=-20. #5222=-20. ;
N3 G90 G00 G54 X0 Y0 ;
-20.
N3
W1
N10 #5221=-90. #5222=-10. ;
N11 G90 G00 G54 X0Y0 ;
M02 ;
N11
-10.
-20.
W1
G54 workpiece
work coordinate
G54
system defined
by
coordinate
system
N10
defined
by N10
G54
G54workpiece
work coordinate
coordinate
system
system defined
by
defined
by N2
N2
Base machine coordinate system
External workpiece offset
(Example
(Example 2)
G55
G54
W2 (G55)
Coordinate system
before change
N100 #5221=#5221+#5201 ;
#5222=#5222+#5202 ;
#5241=#5241+#5201 ;
#5242=#5242+#5202 ;
#5201=0 #5202=0;
W1 (G54)
G55
G54
Coordinate system
after change
W2 (G55)
W1 (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
Axis 1 to Axis 4
P1
#7001 to #7004
P25
#7481 to #7484
P2
#7021 to #7024
P26
#7501 to #7504
P3
#7041 to #7044
P27
#7521 to #7524
P4
#7061 to #7064
P28
#7541 to #7544
P5
#7081 to #7084
P29
#7561 to #7564
P6
#7101 to #7104
P30
#7581 to #7584
P7
#7121 to #7124
P31
#7601 to #7604
P8
#7141 to #7144
P32
#7621 to #7624
P9
#7161 to #7164
P33
#7641 to #7644
P10
#7181 to #7184
P34
#7661 to #7664
P11
#7201 to #7204
P35
#7681 to #7684
P12
#7221 to #7224
P36
#7701 to #7704
P13
#7241 to #7244
P37
#7721 to #7724
P14
#7261 to #7264
P38
#7741 to #7744
P15
#7281 to #7284
P39
#7761 to #7764
P16
#7301 to #7304
P40
#7781 to #7784
P17
#7321 to #7324
P41
#7801 to #7804
P18
#7341 to #7344
P42
#7821 to #7824
P19
#7361 to #7364
P43
#7841 to #7844
P20
#7381 to #7384
P44
#7861 to #7864
P21
#7401 to #7404
P45
#7881 to #7884
P22
#7421 to #7424
P46
#7901 to #7904
P23
#7441 to #7444
P47
#7921 to #7924
P24
#7461 to #7464
P48
#7941 to #7944
200
Stops with
NC alarm
<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
Type
Variable
number
Integrating
(run-out) time 1
3001
Integrating
(run-out) time 2
3002
Contents when
power is turned
ON
Unit
1ms
Same as when
power is turned
OFF
Initialization of
contents
Count condition
The integrating run time returns to zero in about 2.44 1011 ms (approximately 7.7 years).
O9010
#3001=0 ;
WHILE [#3001LE#20] DO1 ;
(allowable
(allowabletime)
G65P9010T time)
ms;
To
subprogram
END1 :
M99 ;
Entered in local
variable #20
Local variable
T#20
(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.
#3003
Not suppressed
Awaited
Suppressed
Awaited
Not suppressed
Not awaited
Suppressed
Not awaited
202
Bit 1
Bit 2
Feed hold
Feedrate override
G09 check
Valid
Valid
Valid
Invalid
Valid
Valid
Valid
Invalid
Valid
Invalid
Invalid
Valid
Valid
Valid
Invalid
Invalid
Valid
Invalid
Valid
Invalid
Invalid
Invalid
Invalid
Invalid
#3004
Contents (value)
( TAKE FIVE ) :
Message
The message should not be longer than 31 characters and it should be enclosed within round
(
) parentheses.
15
14
13
12
11
10
nth axis
203
Bit 0
Miscellaneous function lock
Valid
Invalid
Variable number
#3011
#3012
204
Execution block
#4001
#4201
Function
Interpolation mode
#4002
#4202
Plane selection
#4003
#4203
#4004
#4204
No variable No.
#4005
#4205
Feed designation
: G94:94, G95:95
#4006
#4206
Inch/metric
: G20:20, G21:21
#4007
#4207
#4008
#4208
Fixed cycle
#4009
#4209
#4010
#4210
Return level
: G98:98, G99:99
#4011
#4211
Scaling
: G50:50, G51:51
#4012
#4212
#4013
#4213
Acceleration/deceleration : G61~G64:61~64
#4014
#4214
#4015
#4215
: G40.1:40.1, G41.1:41.1,
G42.1:42.1
#4016
#4216
Coordinate rotation
: G68:68, G69:69
#4017
#4217
Mirror image
#4018
#4218
#4019
#4219
#4020
#4220
#4021
#4221
G50.1:50.1, G51.1:51.1
(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
Modal information
Variable number
Modal information
Pre-read Execution
#4101
#4301
#4111
#4311
#4102
#4302
#4112
#4312
#4103
#4303
#4113
#4313
Miscellaneous function M
#4104
#4304
#4114
#4314
Sequence number N
#4105
#4305
#4115
#4315
Program number O
#4106
#4306
#4116
#4316
#4107
#4307
#4117
#4317
#4108
#4308
#4118
#4318
#4109
#4309
#4119
#4319
Spindle function S
#4110
#4310
#4120
#4320
Tool function T
Tool radius
compensation No. D
Feedrate F
End point
coordinate
of block
immediately
before
Machine
coordinate
Workpiece
coordinate
Skip
coordinate
Tool
position
offset
amount
Servo
deviation
amount
#5001
#5021
#5041
#5061
#5081
#5101
#5002
#5022
#5042
#5062
#5082
#5102
#5003
#5023
#5043
#5063
#5083
#5103
#5004
#5024
#5044
#5064
#5084
#5104
Remarks (reading
during movement)
Yes
No
No
Yes
No
Yes
Axis No.
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
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
Read
command
G00
Gauge, etc.
G01
Skip coordinates
Read
command
[End point
coordinates]
Workpiece
Work coordinate
system
coordinate
system
W
[Work
[Workpiece
coordinates]
coordinates]
[Machine
coordinates]
Machine coordinate
system
Skip signal
G31
F (feedrate)
W
[Input coordinates
of skip signal]
Workpiece
Work coordinate
coordinate
system
system
[Workpiece
[Work
coordinates]
coordinates]
Machine coordinate
system
M
[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
(Example 1)
An example to measure the distance from the measured reference point to the workpiece
edge is shown below.
Argument
<Local variable>
F(#9)
200
X(#24)100.000
Y(#25)100.000
Z(#26) -10.000
Main program
G65P9031X100.Y100.Z-10.F200;
O9031
To subprogram
<Common variable>
#101
87.245
#102
87.245
#103 123.383
Skip input
N1 #180=#4003;
N2 #30=#5001 #31=#5002;
N3 G91 G01 Z#26 F#9;
N4 G31 X#24 Y#25 F#9;
N5 G90 G00 X#30 Y#31;
N6 #101=#30-#5061 #102=#31-#5062;
N7 #103=SQR [#101#101+#102*#102] ;
N8 G91 G01Z-#26;
N9 IF [#180 EQ 91] GOTO 11;
N10 G90;
N11 M99;
#102
Start point N4
N3
#103
N5
Y
#101
X
Z N8
#101
#102
#103
(Example 2)
-75
-25
N1 G91G28X0Y0;
N2 G90G00X0Y0;
N3 X0Y-100.;
N4 G31X-150.Y-50.F80;
N5 #111=#5061#112=#5062;
N6 G00Y0;
N7 G31X0;
N8 #121=#5061#122=#5062;
N9 M02;
Y X
-50
-75
-100
-Y
Skip signal
#111 = 75. +
#112 = 75. +
#121 = 25. +
#122 = 75. +
is the error caused by response delay. (Refer to the section on the skip function for details.)
#122 is the N4 skip signal input coordinates as there is no Y command at N7.
208
#30001
#30002
.
.
#30016
#30020
#30021
#30022
.
.
#30036
#30040
#30041
#30042
.
.
#30056
Details
External mirror image valid axis
bit 0: 1st axis external mirror image valid axis
bit 1: 2nd axis external mirror image valid axis
.
.
bit 15: 16th axis external mirror image valid axis
1st axis external mirror image center coordinate value
2nd axis external mirror image center coordinate value
.
.
16th axis external mirror image center coordinate value
Parameter mirror image valid axis
bit 0: 1st axis parameter mirror image valid axis
bit 1: 2nd axis parameter mirror image valid axis
.
.
bit 15: 16th axis parameter mirror image valid axis
1st axis parameter mirror image center coordinate value
2nd axis parameter mirror image center coordinate value
.
.
16th axis parameter mirror image center coordinate value
G command mirror image valid axis
bit 0: 1st axis G command mirror image valid axis
bit 1: 2nd axis G command mirror image valid axis
.
.
bit15: 16th axis G command mirror image valid axis
1st axis G command mirror image center coordinate value
2nd axis G command mirror image center coordinate value
.
.
16th axis G command mirror image center coordinate value
209
Details
Parameter coordinate rotation center horizontal axis No.
Parameter coordinate rotation center vertical axis No.
Parameter coordinate rotation center coordinate value horizontal axis
Parameter coordinate rotation center coordinate value vertical axis
Parameter coordinate rotation angle
Parameter coordinate rotation SIN data
Parameter coordinate rotation COS data
Parameter coordinate rotation horizontal axis length
Parameter coordinate rotation vertical axis length
Program coordinate rotation center horizontal axis No.
Program coordinate rotation center vertical axis No.
Program coordinate rotation center coordinate value horizontal axis
Program coordinate rotation center coordinate value vertical axis
Program coordinate rotation angle
Program coordinate rotation SIN data
Program coordinate rotation COS data
(23) Scaling
The scaling information can be read using the variable numbers #30080 to #30097
Variable No.
#30080
#30081
#30082
.
.
#30096
#30097
Details
Scaling valid axis
bit 0: 1st axis scaling valid
bit 2: 2nd axis scaling valid
.
.
bit 15: 16th axis scaling valid
1st axis scaling center coordinate value
2nd axis scaling center coordinate value
.
.
16th axis scaling center coordinate value
Scaling magnification
210
:
Head number of variable to be named
#n name (variable name)
#n + 1 name (variable name)
:
(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.
(Example 1) G01X [#POINT1] ;
[#NUMBER] = 25 ;
(c) The variable numbers, data and variable names appear on the screen of the setting and
display unit.
(Example 2)
[Common variables]
#500
-12345.678
A234567
#501
5670.000
DIST
#502
-156.500
TOOL25
#518
10.000
Common variable
NUMBER
211
13.7.5
Arithmetic commands
(2)
(3)
(4)
Definition and
substitution of
variables
Addition arithmetic
Multiplication
arithmetic
Functions
#i = #j
Definition, substitution
#i = #j + #k
#i = #j #k
#i = #j OR #k
#i = #j XOR #k
Addition
Subtraction
Logical sum (at every bit of 32 bits)
Exclusive OR (at every bit of 32 bits)
Multiplication
#i = #j #k
#i = #j / #k
#i = #j MOD #k
#i = #j AND #k
#i = SIN [#k]
#i = COS [#k]
#i = TAN [#k]
#i = ATAN [#j]
#i = ACOS [#j]
#i = SQRT [#k]
#i = ABS [#k]
#i = BIN [#k]
#i = BCD [#k]
#i = ROUND [#k]
#i = FIX [#k]
#i = FUP [#k]
#i = LN [#k]
#i = EXP [#k]
Division
Remainder
Logical product (at every bit of 32 bits)
Sine
Cosine
Tangent (sin/cos used for tan)
Arctangent (ATAN or ATN may be
used)
Arc-cosine
Square root
(SQRT or SQR may be used)
Absolute value
Conversion from BCD to BIN
Conversion from BIN to BCD
Rounding off
(ROUND or RND may be used)
Discard fractions less than 1
Add for fractions less than 1
Natural logarithm
Exponent with e (=2.718 .....) as bottom
Note 1) A value without a decimal point is basically treated as a value with a decimal point at the
end (1 = 1.000).
Note 2) Offset amounts from #10001 and 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
#10001 = #101
#102
#101
#102
1000.000
1000.000
= #10001 ;
Note 3) The <formula> after a function must be enclosed in the square parentheses.
212
Function
(2)
Multiplication arithmetic
(3)
Addition arithmetic
#1 = 1000
#2 = 1000.
#3 = #101
#4 = #102
#5 = #5041
#11 = #1 + 1000
#12 = #2 50.
#13 = #101 + #1
#14 = #5041 3.
#15 = #5041 + #102
#3 = 100
#4 = #3OR14
(5) Exclusive OR
(XOR)
#3 = 100
#4 = #3XOR14
213
#1
#2
#101
#102
#1
#2
#3
#4
#5
10.0000
20.0000
100.0000
200.0000
1000.0000
1000.0000
100.0000
200.0000
-10.0000
#11
2000.0000
#12
950.0000
#13
1100.0000
#14
-13.0000
#15
190.0000
#3 = 01100100
14 = 00001110
#4 = 01101110 = 110
#3 = 01100100
14 = 00001110
#4 = 01101010 = 106
From common
variables
From offset
amount
(6) Multiplication
#21 = 100100
and division (,/) #22 = 100.100
#23 = 100100
#24 = 100.100.
#25 = 100/100
#26 = 100./100.
#27 = 100/100.
#28 = 100./100.
#29 = #5041#101
#30 = #5041/#102
Remainder
#31 = #19MOD#20
(MOD)
(7) Logical product #9 = 100
(AND)
#10 = #9AND15
(8) Sin (SIN)
(11) Arctangent
(ATAN or ATN)
(12) Arc-cosine
(ACOS)
214
#21
#22
#23
#24
#25
#26
#27
#28
#29
#30
10000.0000
10000.0000
10000.0000
10000.0000
1.0000
1.0000
1.0000
1.0000
-1000.0000
-0.0500
#541
#542
#543
#544
#545
#546
0.7071
0.7071
707.1068
707.1068
707.1068
707.1068
#551
#552
#553
#554
#555
#556
1.7321
1.7321
1732.0508
1732.0508
1732.0508
1732.0508
#561
#562
#563
#564
#565
#521
#522
#523
#524
#525
60.0000
60.0000
60.0000
60.0000
59.9993
44.9999
44.9999
45.0000
44.9995
45.0087
(17) Discarding
fractions below
decimal point
(FIX)
(19) Natural
logarithms (LN)
(20) Exponents
(EXP)
215
#571
#572
#573
#574
31.6228
31.6228
22.3607
190.4442
#576
#577
-1000.0000
1000.0000
#580
120.0000
#11
#12
#21
#22
#23
#24
#25
#26
#27
#28
#21
#22
#23
#24
#25
#26
#27
#28
#21
#22
#23
#24
#25
#26
#27
#28
#101
#102
Error
#104
#105
#106
64.0000
256.0000
5.0000
5.0000
5.0000
5.0000
-5.0000
-5.0000
-5.0000
-5.0000
4.0000
4.0000
4.0000
4.0000
-4.0000
-4.0000
-4.0000
-4.0000
5.0000
5.0000
5.0000
5.0000
-5.0000
-5.0000
-5.0000
-5.0000
1.6094
-0.6931
"PR0282"
7.3891
2.7183
0.1353
13.7.6
Control commands
When the condition is satisfied, control branches to "n" and when it is not satisfied, the next block
is executed.
IF [conditional expression] can be omitted and, when it is, control passes to "n" unconditionally.
The following types of [conditional expressions] are available.
#i EQ #j
#i NE #j
#i GT #j
#i LT #j
#i GE #j
When #i is #j or more
#i LE #j
When #i is #j or less
Branching to
N100 when
content of #2 is 1
Branch
search
"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.
N100
Y#23;
Branch
search
With
N10
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
(2) Iteration
WHILE ~ DO1 ;
END1 ;
WHILE ~ DO1 ;
Possible
WHILE ~ DO3 ;
END1 ;
END3 ;
Possible
WHILE ~ DO1 ;
WHILE ~ DO2 ;
Possible
END2 ;
END1 ;
WHILE ~ DO1 ;
END1 ;
DO1
WHILE ~ DO1 ;
WHILE ~ DO1 ;
DO2
DO27
WHILE ~ DO28;
Possible
:
WHILE~DO27;
END 28;
END 27 ;
END 3 ;
:
END 2 ;
END 2 ;
END 1 ;
END 1 ;
217
Not possible
WHILE ~ DO2 ;
:
WHILE ~ DO3 ;
WHILE ~ DO2 ;
END 1 ;
Not
possible
Not
possible
WHILE ~ DO1 ;
WHILE ~ DO1 ;
END 1 ;
~ ~
WHILE ~ DO1 ;
Not
possible
IF ~ GOTOn ;
WHILE ~ DO2 ;
END 1 ;
END 1 ;
Possible
END 2 ;
Nn
WHILE~DO1;
WHILE~DO1;
Nn;
END1;
Main program
IF~GOTOn;
WHILE~DO1;
Possible
IF~GOTOn;
Not possible
Not possible
END1;
WHILE~DO1;
Nn;
M99;
Subprogram
Main program
M98
P100;
To subprogram
Subprogram
WHILE
~DO1;
WHILE ~ DO1 ;
M02;
To subprogram
M99;
Don ENDn
constitutes
illegal usage.
END 1 ;
END 1 ;
Possible
G65 P100 ;
END2;
END1;
WHILE ~ DO1 ;
WHILE~DO02;
To subprogram
M02;
END1;
Main program
G65
P100;
Subprogram
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.7.7
(1) Outline
The external output commands are designed to output the variable values or characters via the
RS-232C interface.
(a) Types
POPEN
PCLOS
BPRNT
DPRNT
POPEN
Open command
DPRNT
PCLOS
Closed command
POPEN
POPEN ;
(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.
(3) Close command :
Command format :
PCLOS
PCLOS ;
(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
BPRNT
Command format
BPRNT [ l 1 # v 1 [ c 1 ] l 2 # v 2 [ c 2 ] ]
l_ : Character string
v_: Variable number
c_: Significant digits below decimal point
(a) Character output and binary output of variable values are executed.
(b) The designated character string is output as ISO codes.
Alphanumeric characters (A to Z, 0 to 9) and special characters (+, , , /) can be used.
Note that asterisk (*) is output as a space code.
(c) All variables are saved with decimal points, so the number of digits required after the decimal
point are commanded in brackets [ ]. The variable value is handled as 4-byte (32-bit) data,
and is output as binary data from the high-order byte. (minus) data is handled as the
complement of this data.
(Example) If three digits are designated for 12.3456, the fourth digit after the decimal point
will be rounded up, and [12.346 103] = 12346 (0000303A) will be output as
binary data.
(Example) When zero digits is designated with 100.0, 100 (FFFFFF9C) will be output as
binary data.
(d) After the designated data is output, the EOB code will be output as an ISO code.
(e) A <blank> variable will be interpreted as 0.
(5) Data output command :
DPRNT
Command format
DPRNT [ l 1 # v 1 [ d 1 c 1 ] l 2 # v 2 [ d 2 c 2 ] ]
l_ : Character string
v_: Variable number
d_: Significant digits above decimal point
c_: Significant digits below decimal point
c+d8
(a) The character output and decimal output of the variable values are done with ISO codes.
(b) The commanded character string is output as is by the ISO code.
Alphanumerics (A ~ Z, 0 ~ 9) and special characters (+, , , /) can be used.
(c) The required significant digits above and below the decimal point in the variable values are
commanded within square parentheses. As a result, the variable values equivalent to the
commanded number of digits including the decimal point are output in ISO code in decimal
notation from the high-order digits. Trailing zeroes are not omitted.
(d) Leading zeroes are suppressed.
The leading zeroes can also be replaced by blank if so specified with a parameter (#110090
DPRINT leading 0). This can justify printed data on the last column.
220
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
G92X0Y0Z0
(1)
(2)
G00X-100.Y-100.
(3)
;
;
(4)
(5)
G01X#101Y#102F800 ;
Macro statement
(6)
Macro single ON
Flow of processing
Program analysis
N1 N2
N3
N4
N4
N2
N1
Block in execution
Program analysis
N1 N2
Execution
Statement
process
N6
N1
N2
221
N6
N5
N4
N3
N2
N7
N3
N4
N7
N5
N3
N2
N3
N6
N5
N6 N7
N5
N6
N3
N7
N6
Macro single ON
[In execution]
N3
[Next command]
N4
G00
X-100. Y-100. ;
#101=100.
*COS [210.]
222
13.7.9
SIN curve
(SIN) Y
a1;
b1;
c1 ;
f1 ;
Initial value 0
Final value 360
R of RSIN
Feedrate
100.
X
0
90.
180.
270.
360.
-100.
Main program
O9910 (Subprogram)
G65P9910A0B360.C100.F100;
To
subprogram
(Note 1)
#1=#1+10.;
Local variable
set by argument
#1=0
END1;
#2=360.000
M99;
#3=100.000
#9=100.000
(Note 1) Commanding with one block is possible when
G90G01X#1Y [#3SIN [#1]] F#9 ; is issued.
223
(Example 2)
After defining the hole data with fixed cycle (G72 to G89), the macro command is issued as the
hole position command.
x1
-X
W
Main program
G81Z100.R50.F300L0
G65P9920Aa1Bb1Rr1Xx1Yy1 ;
a1
b1
r1
x1
Start angle
No. of holes
Radius
X axis center
position
y1 ; Y axis center
position
To subprogram
#120=#24+#18COS [#111] ;
(Note 1)
1)
#121=#25+#18SIN [#111] ; (Note
#122=#120 #123=#121 ;
IF [#102EQ90] GOTO100 ;
#103=#120
#104=#121
-Y
0 #101
G90, G91 mode
Read in #102
Read previous coordinates
X #103
Y #104
Start angle 111
(Note 1)
#122=#120 #103 ;
#123=#121 #104 ;
y1
O9920
O9920 (Subprogram)
#101=0 ;
#102=#4003 ;
#103=#5001 ;
#104=#5002 ;
#111=#1 ;
a1
;
;
;
;
N
END
Y
RadiusCOS [#111]
+ Center coordinates X#120
RadiusSIN [#111]
+ Center coordinates Y#121
#120 #122
#121 #123
(Note 1)
(Note
#102=90
(Note 1)
N100 X#122Y#123 ;
#101=#101+1 ;
#111=#1+360.#101/#2 ;
(Note 1)
#120-#103 #122
#121-#104 #123
#120 #103
#121 #104
N100X#122Y#123
END1 ;
M99 ;
#101+1 #101
360 deg.#101/
No. of holes+#1 #111
224
G28 X0 Y0 Z0;
T1 M06;
G90 G43 Z100.H01;
G54 G00 X0 Y0;
G81 Z-100.R3.F100 L0 M03;
G65P9920X-500.Y-500.A0 B8R100.;
G65P9920X-500.Y-500.A0 B8R200.;
G65P9920X-500.Y-500.A0 B8R300.;
-X
To subprogram
-500.
300R
200R
To subprogram
-500.
To subprogram
100R
-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.
-X
i1
Subprogram is
on next page
G28 X0 Y0 Z0;
T1 M06;
G90 G43 Z100.H01;
G54 G00 X0 Y0;
G81 Z-100.R3.F100 L0 M03;
G65P9930 X0 Y0 I-100. J-75. A5B3;
G84 Z-90. R3. F250 M03;
G65P9930 X0 I-100. J-75. A5B3;
x1
y1
j1
-Y
100.
-X
100.
100.
W
-75.
To subprogram
-75.
To subprogram
-Y
-X
-100.
-Z
225
O9930 (Subprogram)
O9930
Start point X coordinates : x1#101
Start point Y coordinates : y1#102
#101=#24 ;
#102=#25 ;
X axis interval
: i1#103
Y axis interval
: j1#104
(Note 1)
#104=#5 ;
#106 > 0
#106=#2 ;
END
Y
No. of holes in X direction: a1 #105
#105 > 0
#105=#1 ;
X#101
Y#102
Positioning, drilling
#105 1 #105
G90 X#101 Y#102 ;
X coordinates update
#101=#101+#103 ;
(Note 1)
#105=#1051 ;
END2 ;
#101 #103 #101
#102 + #104 #102
X coordinates revision
Y coordinates update
#101=#101-#103;
#103 #103
#102=#102+#104;
(Note 1)
#106 1 #106
#103=#103 ;
#106=#1061 ;
END1 ;
M99 ;
226
13.8
(1) Outline
The end point is automatically calculated by commanding the linear angle and one element of the
end point coordinates (one element of the selected plane).
(2) Command format
G17
Xx1
Selected plane
Or G17
Aa1
One element
Angle
Yy1
Aa1
(Example)
G17 G91 X100. A60. ;
Y
End point
(Automatically operated and
calculated)
Y?
60
Start point
X100.
(a) The angle is from the + direction of the 1st axis horizontal axis on the selected plane. The
counter-clockwise (CCW) direction is considered to be + and the clockwise direction (CW) .
(b) Either of the axes on the selected plane is commanded for the end point.
(c) The angle is ignored when the angle and the coordinates of both axes are commanded.
(d) When only the angle has been commanded, this is treated as a geometric command.
(e) The angle of either the start point or end point may be used.
(f) If address A is used for the axis name or as the 2nd miscellaneous function, the setting is
interpreted as the A axis command or 2nd miscellaneous function command, and cannot be
used for the linear angle.
(g) This function is valid only for the G01 command; it is not valid for other interpolation or
positioning commands.
(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.9
Geometric Command
(1) Outline
(a) Geometric command I
When it is difficult to determine the intersecting point of two straight lines during continuous
linear interpolation command, the intersecting point of the two straight lines can be
automatically calculated by creating a program that commands the angles of the straight lines.
(2) Command format
N1
G17
Aa1
Selected plane
Angle
N2
Xx2, Yy2,
Aa2
Angle
;
;
(Example)
N1 G01 Aa1 Ff1 ;
N2 Xx2 Zz2 Aa2 ;
X
End point (x2, z2)
N2
a2
Automatic
intersection
calculation
N1
a1
Start point
Z
W1
228
13.10
(1) Outline
When the same pattern is repeatedly used on a concentric circle, one rotation machining pattern
can be registered as a subprogram. By designating the rotation center when calling the
subprogram from the main program, the analog rotation type path can be easily created on the
concentric circle by this function. This allows programs to be created easily.
(2) Command format
M98
Call
command
Ii1
Jj1
Pp1
Rotation center
coordinates
Hh1
l1 times
Ll1
Number of repetitions
Basic pattern
j1
Rotation center
i1
229
(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.
(5) Program example
Basic pattern
100.
Subprogram (O2200)
200.
100.
230
300.
13.11
(1) Outline
When machining a complicated shape at a position rotated in respect to the coordinate system,
the shape before rotation can be programmed on the local coordinate system, the parallel
movement amount and rotation angle designated with the program coordinate rotation command,
and the rotated shaped machined.
(2) Command format
Xx1
Gn G68
Call
command
Yy1
Rotation center
coordinates
Rr1
ON
Coordinate
rotation
Rotation angle
(Rotation angle)
y1
r1 (Rotation
(x1, y1) center)
Y'
X'
x1
X
(Original
W local
coordinate
system)
(5) Example
N01
N02
N03
N04
N05
N06
N07
N08
N09
G28
G54
G90
G68
M98
G69
G54
G00
M02
XYZ;
G52 X150. Y75. ;
G01 G42 X0 Y0 ;
X0 Y0 R30. ;
H101 ;
;
G52 X0 Y0 ;
G40 X0 Y0 ;
;
200.
Subprogram
(Shape programmed with original coordinate system)
N101
N102
N103
N104
N105
N106
N107
N108
N109
Actual
machining
shape
100.
30
(Programmed
coordinates)
W
232
100.
200.
X
300.
13.12
(1) Outline
If a deviation occurs between the workpiece reference line and machine coordinate system
coordinate axis while the workpiece is installed, the machine can be controlled to rotate the
machining program coordinates according to the workpiece reference line deviation. The
coordinate rotation amount is set with parameters. The parameters can be set from the setting
display unit or with the G10 command. Note that when using the G10 command, the separate
additional specifications "Program parameter input" are required.
(2) Setting parameters
Set the plane, center coordinates, vector component and angle for the coordinate rotation control.
No.
Item
33 0017 Coord rot plane
(H)
33 0018 Coord rot plane
(V)
33 0019 Coord rot center
(H)
33 0020 Coord rot center
(V)
33 0021 Coord rot vector
(H)
33 0022 Coord rot vector
(V)
33 0023 Coord rotation
angle
Setting details
Set the plane, center coordinates, vector component and
angle for coordinate rotation control.
Coordinate rotation plane (horizontal axis):
Set the axis name for the 1st axis during rotation
measurement.
If no axis name is set, the X axis will be automatically
set.
Coordinate rotation plane (vertical axis):
Set the axis name for the 2nd axis during rotation
measurement.
If no axis name is set, the Y axis will be automatically
set.
330018
Coord rot plane (V)
Center
coordinates
330020
Coord rot
center (V)
330023
Coord
rotation
angle
330022
Coord rot vector (V)
330021
Coord rot vector
(H)
M
330019
Coord rot center (H)
330017
Coord rot plane (H)
Ym
Rotation center
G56
G57
W4'
rotation angle
W3'
W2
W1
G55
G54
M
W1'
W2'
Basic machine coordinates
Xm
233
(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
To use for compensating positional deviation of pallet changer
N01 G28 X0 Y0 Z0 ;
N02 M98 P9000 ;
Pallet deviation measurement
Parallel movement amount shift
N03 G90 G53 X0 Y0;
Parallel movement amount definition
N04 G92 X0 Y0 ;
Rotation amount definition
N05 G10 K15. ;
N06 G90 G54 G00 X0 Y0 ; G54 workpiece
machining
N07 M98 H101 ;
N08 G90 G55 G00 X0 Y0 ; G55 workpiece
machining
N09 M98 H101 ;
Y
N10 G90 G56 G00 X0 Y0 ; G56 workpiece
machining
N11 M98 H101 ;
G57 workpiece
N12 G90 G57 G00 X0 Y0;
machining
N13 M98 H101 ;
N14 G27 X Y Z ;
N15 M02 ;
G57
G56
G55
Machining shape program
N101 G91 G01 G42 D01 F300 ;
N102 X100 ;
N103 G03 Y50. R25. ;
N104 G01 X-100. ;
N105 G03 Y-50. R25. ;
N106 G01 G40;
N107 M99 ;
G54
Rotation
movement
(15)
M
X
234
13.13
(1) Outline
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
(2) Detailed description of common functions
(a) Before commanding the special fixed cycle, always command the fixed cycle for drilling, and
register the hole machining data. (If there is no positioning data, the hole drilling fixed cycle will
not be executed, and only the data will be registered.)
(b) When the special fixed cycle is executed, the axis will be positioned to the hole drilling position.
The hole drilling operation is executed with the hole drilling fixed cycle.
(c) Even after the special fixed cycle is executed, the registered hole drilling fixed cycle is held
until canceled.
(d) If the special fixed cycle is executed when not in the hole drilling fixed cycle mode, only
positioning will be executed, and the hole drilling operation will not take place.
(e) If a special fixed cycle is commanded without commanding the hold drilling fixed cycle,
positioning will follow the modal G code of the 01 group.
235
3) Example
G91
G81
G90
G80
G90
;
Z-10.000 R5.000 L0 F200 ;
G34 X200.000 Y100.000 I100.000 J20.000 K6 ;
; ..................... (G81 cancel)
G0 X500.000 Y100.000 ;
X1=200mm
n=6 holes
20
Y1=100mm
I=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
n=5 holes
d=100mm
=30
X
y1=100mm
W
X1=200mm
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
3) Example
n=6 holes
=15
=10
Y1=100mm
W
X1=300mm
238
ny=8 holes
y=100m
y1=100mm
x=50mm
nx=10 holes
x1=300mm
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.14
(1) Outline
Circular cutting is a function which performs a series of operations: the tool is made to depart from
the center of the circle and while cutting the inner circumference of the circle, it describes a perfect
circle, and then it is returned to the center of the circle. The position where G12/13 is commanded,
is the circle center.
(2) Command format
The program format is as follows.
G12/G13
Circular cutting
command
Ii
Dd
G code
Ff
Speed
Function
G12
G13
CW (Clockwise)
CCW (Counterclockwise)
Circle
radius
1
0
4
Compensation
amount
2
6
(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.15
Scaling; G50/G51
(1) Outline
With this command, the shape commanded in the program can be enlarged or reduced by
applying a magnification to the movement axis command value in the commanded range.
G code
Function
G50
G51
Scaling cancel
Scaling ON
Xx1
Yy1
Zz1
Pp1
Magnification
Y
sc
s1
y1
p1
sc:
Scaling center
p1, p2, p3:
Program shape
s1, s2, s3:
Shape after scaling
s3
s2
p2
p3
X
x1
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.
3) A program error will occur in the following cases.
a. If scaling is commanded when scaling specifications are not provided.
b. If the upper limit of the magnification command range is exceeded in the same block as
G51.
(b) Scaling cancel
The scaling mode is canceled when G50 is commanded.
(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.
(5) Combination with other functions
(a) G27 reference point compare command
If G27 is commanded during scaling, the scaling will be canceled when the command is
completed.
(b) Reference point return command (G28, G29, G30)
If G28, G30 or reference point return is commanded during scaling, the scaling will be
canceled at the middle point, and the axis will return to the reference point. If the middle point
is ignored, the axis will return directly to the reference point.
If G29 is commanded during scaling, the scaling will be applied to the movement after the
middle point.
(c) G60 (uni-directional positioning) command
If G60 (uni-directional positioning) is commanded during scaling, the scaling will be applied at
the final positioning amount, and will not be applied on the creep amount. In other words, the
creep amount is constant regardless of the scaling application.
(d) Workpiece coordinate system changeover
If the workpiece coordinate system is changed during scaling, the scaling center will be shifted
by the difference of the new workpiece coordinate system and old workpiece coordinate offset
amounts.
(e) Figure rotation command
If figure rotation is commanded during scaling, the scaling will be applied on the figure rotation
center and rotation radius.
242
243
13.16
(1) Outline
If the C axis is set as the normal line control axis, the C axis (rotation axis) turning will be
controlled so that the tool constantly faces the normal line direction control in respect to the XY
axis movement command during program operation.
At the block seams, the C axis turning is controlled so that the tool faces the normal line direction
control at the next block's start point.
During arc interpolation, the C axis turning is controlled to be synchronized with the arc
interpolation speed operation.
This can be used in spring machining, or stitching such as with a sewing machine or for carpets.
Only one axis is valid for the C axis (rotation axis).
C axis center (rotation axis)
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.
Normal line control
type
Turning direction
Turning speed
Application
Type I
Parameter speed
Cutting machining
Type II
As a principle, the
commanded direction
Feedrate
Spring machining
Xx1
G
G40.1
G41.1
G42.1
Yy1
Ff1 ;
Function
244
245
R
R
F
Fc
C axis
turning
speed
during
circular
interpolation
(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
Notes
Uni-directional
positioning
Helical cutting
Spiral interpolation
The start point and end point are not on the same arc, so normal line
control is not applied correctly.
Synchronous feed
When using the spindle for C axis control, the correct feedrate will not be
reached.
The operation will not decelerate and stop for the turning movement of
the normal line control axis.
Error detect
The operation will not decelerate and stop for the turning movement of
the normal line control axis.
Override
Figure rotation
Coordinate rotation
Scaling
Mirror image
Linear angle
designation
Normal line control is applied to the shape after the linear angle
command.
Geometric
designation
Normal line control is not applied on the movement to the middle point
position.
If the control parameter "G00 interpolation OFF" is OFF in respect to the
movement from the middle point to a position designated in the program,
normal line control is applied.
Workpiece
coordinate system
offset
The normal line control axis operates in the program coordinate system
set during normal line control.
Local coordinate
system offset
The normal line control axis operates in the program coordinate system
set during normal line control.
Program restart
Dry run
The feedrate is changed by the dry run signal even in respect to the
turning movement of the normal line control axis.
Machining time
calculation
The time of the section turned by the normal line control is also
calculated.
Graphic check
248
13.17
(1) Outline
By inputting a user macro interrupt from the PLC, another designated program (interrupt program)
can be called as a priority to the program currently running.
Examples of this interrupt program include programs for evading abnormalities such as escaping
at a tool breakage, or returning.
The following two types of interrupt can be selected with parameters.
[Interrupt type 1] The running block is immediately stopped, and the interrupt program is
executed.
[Interrupt type 2] The interrupt program is executed after completing the running block.
(2) Command format
The program format is as follows.
M96 P_ H_ ;
User macro interrupt valid
P: Interrupt program number
H: Interrupt sequence number
M97 ;
:
:
M96Ppi;
:
:
:
:
:
Interrupt signal
:
:
M97;
:
:
:
:
:
:
:
:
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
(Note)
250
Subprogram type
interrupt
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.
251
Modal information
#4401
to
#4421
G code (Group 1)
to
G code (Group 21)
#4507
D code
#4509
F code
#4511
H code
#4513
M code
#4514
Sequence number
#4515
Program number
#4519
S code
#4520
T code
These variables can be used only in the user macro interrupt program.
An error will occur if used in programs other than the user macro interrupt program.
(i)
(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.18
13.18
(1) Outline
In respect to the X, Y and Z axes of the currently set workpiece coordinate system, the new
coordinate system in which rotation and zero point parallel movement have been carried out can
be defined. By using this function, a random plane in the space can be defined, and machining
can be carried out by commanding normal programs in respect to that plane.
Radius direction Y
Axis direction
G68 program coordinate system
Radius direction X
Z
Machine coordinate system
G68
Three-dimensional
coordinate conversion
mode command
Yy
Zz
Rotation center
coordinates
Ii
Jj
Kk
Rr
Rotation angle
: If the rotation center axis is the X axis, set "1" in i. If not the rotation center axis, set "0".
x, y, z
i, j, k
Rotation angle
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.18
254
13.18
Z0
Z0
I0
I1
J1
J0
K0
K0
R-30. ;
R45. ;
a. With N1, the center is shifted by [x, y, z] = (10., 0, 0) in respect to the currently set
coordinate system. The new program coordinate system (A in the following figure)
rotated 30 in the counterclockwise direction using the Y axis as the center is set.
b. With N2, the center is shifted by [x, y, z] = (0, 10., 0) in respect to the newly set program
coordinate system (A in the following figure). The new program coordinate system (B in
the following figure) rotated +45 in the counterclockwise direction using the X axis as
the center is set.
c. With N3, the program coordinate systems that have been set are all canceled, and the
state where the first G68 is commanded is returned to.
+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)
G68 program coordinate system (A)
+X
* If the local coordinate system offset is not applied, the local coordinate system is the
same as the workpiece coordinate system.
255
13.18
2)
cos R
sin R
sin R
cos R
3)
sin R
sin R
cos R
sin R
sin R
cos R
Tn conversion row
256
13.18
N10 G69;
N11 M02;
+Y
+Z
+Y
N4
N6
N3
N9
N7
P (0, 0, 200)
N1
N2
N8
P (0, 0, 0)
+Z
+X
+X
257
13.18
2)
N02 F2000;
N03 G00 X100. Y100. Z-600.;
N04 G52 X100. Y100. Z-600.;
N05 G00 X100. Y10. Z 200.;
N06 G91;
N07 G81 Z-10. R5. L0 F2000;
N08 G34 X100. Y200. I90. J270. K10.;
N09 G80;
N10 G91 G00 X-200.;
N11 G90 G52 X0 Y0 Z0;
N12 G90 G00 X0 Y0 Z0;
N13 G00 X100. Y100. Z-400.;
N14 G68 X100. Y100. Z-400. I0 J1 K0 R90.;
+Y
N1
O (0, 0, 0)
N12
+X
N20
+Y
N10
-Z
N13
N7~N9
+Z
N3
+Y
O (100, 100, -400)
N15
N17~N19
N5
258
13.18
3)
4)
3)
4)
5)
For the rotation angle, the counterclockwise direction looking at the rotation center from
the plus direction of the rotation center axis is the plus (+) direction.
If a value with no decimal point is designated for the rotation angle, the value obtained by
dividing the designated value by 1000 will be used.
When either of the following are designated, the rotation angle will be 45.0.
G68 X0.Y0.Z0. I0J0K1 R45.
G68 X0.Y0.Z0. I0J0K1 R45000
If the rotation angle is omitted, the rotation angle will be handled as 0.
The modal display's rotation angle for three-dimensional coordinate conversion
overwrites the modal display's rotation angle for the program coordinate conversion.
The modal display's rotation angle when three-dimensional coordinate conversion is
carried out two or more times, will be the rotation angle of the three-dimensional
coordinate conversion carried out last.
2)
3)
The G68 rotation center coordinate system is commanded with the local coordinate
system (G68 program coordinate system during the three-dimensional coordinate
conversion modal).
The rotation center coordinate designation is handled as an absolute value designation
regardless of whether an absolute/incremental modal (G90/G91) is being executed.
If the rotation center coordinate (address X, Y, Z) is omitted, it will be handled as if the
zero point for the current local coordinate (G68 program coordinate system during the
three-dimensional coordinate conversion modal) is designated for the omitted address's
axis. (The same as when 0 is just set.)
259
13.18
R90.
R90.
X axis rotation 90
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
G68 X0.Y0.Z0. I0J0K1
R90.
R-90.
X axis rotation 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.18
(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.
1)
2)
Example in which "Arc end point deviation large" alarm occurs (1)
G90 G28 XYZ
F3000 G17
G68 X100. Y0. Z0. I0J0K1 R0.
G02 X100. I50.
End point
(X 50, Y 0)
End point
X
(X 100, Y 0)
Current
position
Arc center
Arc center
End point
End point
Arc end point
deviation large
(X 150, Y 150)
150
X
X
(X 100, Y 0)
Current
position
(X 100, Y 0)
50
Arc center
Current position
X
Arc center
X
50
(X 100, Y 0)
(X 100, Y 0)
End point
No three-dimensional
coordinate conversion
(X 150, Y -50)
261
(X 150, Y 0)
Current position
13.18
Radius50
Radius=50
End point
End point
X
Current
position
(X 100, Y 0)
(X 100, Y 0)
End point
X
(X 100, Y 0) X
Can't calculate
arc center
In three-dimensional coordinate conversion
(X 200, Y 0)
Current position
Y
Can't calculate
arc center
Radius50
Radius=50
(X 100, Y 0)
Current position
X
(X 200, Y 0)
(X 100, Y 0)
262
End point
Current position
13.18
+X
200
G68 program
coordinate system
N4
200
100
(0, 70.710, 0)
N2
50
45
50
263
+X
100
G54 workpiece
coordinate system
13.18
+X
500
300
400
200
300
100
G28 XYZ;
N1 G90 G01 X200. F2000;
N2
G51.1 X0.;
N3
G68 X200. Y200. I0J0K1 R90.;
N4 G90 G00 X100. Y0 Z0;
Three-dimensional
coordinate conversion
center
+Y
200
100
N3
100
N2
200
N1
+X
200
Mirror center
(with no three-dimensional coordinate conversion)
Mirror center
(during three-dimensional coordinate conversion)
G28 XYZ;
N1 G91 G01 X200. F2000;
N2
G51.1 X0.;
N3
G68 X200. Y200. I0J0K1 R90.;
N4 G90 G00 X100. Y0 Z0;
+X
500
300
400
200
300
100
+Y
200
N3
Three-dimensional
coordinate conversion
center
100
100
+X
200
N1
Mirror center
(with no three-dimensional coordinate conversion)
Mirror center
(during three-dimensional coordinate conversion)
200
N2
13.18
(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.;
N4 G90 G01 X100. Y100. Z0;
N4
300
500
400
300
100
N3
200
N2
Three-dimensional
coordinate conversion
center
100
+Y
100
+X
N1
200
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)
+X
300
400
200
300
100
500
200
N2
100
N4
100
+Y
G28 XYZ;
+Y
N1 G91 G01 X200. F2000;
N2
G68 X200. Y200. I0J0K1 R90.;
N3
G51.1 X200.;
N4 G90 G01 X100. Y100. Z0;
N3
Three-dimensional
coordinate conversion
center
+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.18
Y axis rotation 90
( 0,
0, 100) (100,
Coordinate before
conversion
0,
Coordinate after
conversion
0) (100,
0,
0)
Movement destination
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.
G01 X100. Y100.
Y axis rotation 90
(100, 100,
0) (
Coordinate before
conversion
266
0, 100, 100) (
Coordinate after
conversion
0, 100,
0)
Movement destination
coordinate
13.18
Tool path
0,
0,
0,
0,
Original path
0,
0,
100,
0,
0
100,
0,
0
100, 0, 0
<Three-dimensional coordinate conversion start>
100,
0, 100
100, 100,
0
100,100, 0
0,
0, 100
0, 100,
0
0,100, 0
<Three-dimensional coordinate conversion cancel>
0,100, 100
0,100, 100
0, 0, 0
0,
0, 50
0
0, 50
0, 0, 50
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)
(e) High-accuracy control/initial high-accuracy
Three-dimensional coordinate conversion
simultaneously.
and
high-accuracy
control
can
be
used
267
13.18
268
13.19
(1) Outline
When the cutting mode command is issued, the NC will enter the cutting mode that allows a
smooth cutting surface to be achieved. As opposed to the exact stop check mode (G61), the
operation will not decelerate and stop between cutting feed blocks. Instead, the next block will be
continuously executed. The cutting mode state is entered when the power is turned ON.
(2) Command format
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.20
(1) Outline
This function automatically applies an override on the cutting feedrate so that the cutting amount is
not increased per constant time at the corner. This prevents strain on the machining surface due
to an increase in the cutting load when cutting corners.
The automatic corner override is valid only during tool radius compensation.
(2) Command format
G62 ;
The automatic corner override turns ON with the G62 command, and is canceled with the
following G commands.
G40 Tool radius compensation cancel
G61 Exact stop check mode
G63 Tapping mode
G64 Cutting mode
G61.1~G61.5 High-accuracy control mode
(3) Detailed description
(a) Description of operation
Machining allowance
Workpiece
Workpiece surface
shape
(3)
(2)
Program path
(finished shape)
(1)
Machining
allowance
Ci
Deceleration
area
Tool
: Max. angle at inside corner
Ci : Deceleration area (IN)
270
13.21
(1) Outline
This function controls the operation so the lag is eliminated in control systems and servo systems.
With this function, improved machining accuracy can be realized, especially during high-speed
machining, and machining time can be reduced.
The high-accuracy control function is configured of the following functions.
Speed control
Servo control
Pre-interpolation
acceleration/
deceleration control
High-accuracy
control command
Optimum corner
deceleration control
Function
Cutting feed
Pre-interpolation
acceleration/
deceleration
Optimum corner
deceleration
Feed forward control
Rapid traverse
positioning
Positioning time for
micro-distances is
reduced.
Positioning time is
reduced by reducing
the tracking lag error.
G02/G03
Command path
R
Path during 0% feed
forward gain in the
high-accuracy
control mode
Conventional
Conventional
T
Optimum corner deceleration
271
P
N001
N002
N002
Pre-inter polation
acceler ation/
deceleration
inclin e (acceler ation)
Deceleration to V0
F : Cutting feedrate
V0 V0: Max. tolerable deceleration
Tim e
Kp
Kp :
Kv :
M :
S :
Kv
M
Detector
272
P2
P1
P11
P3
P12
Path B
P14
P13
P21
P4
P15
P22
P16
Wave or step
P23
Path C
P25
P26
P24
P8
P9
P7
P1
Path A
P6
Path B
P16
P5
P41
P21
P17
P42
P15
P4
P22
P43
P32
P44
Path D
P14
P3
P13
P2
P1
P31
P23
P12
P24
P2
P11
Path C
P33
P34
Path B
P25
Path A
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.
(e) High-accuracy control deceleration check
During the high-accuracy control mode (G61.1, G61.2, G61.3, G61.5), deceleration check is
not carried out at the joint of the positioning command (G0) and cutting feed command (G1)
blocks. Instead, the corner is judged and when found to be a corner, in-position check is
carried out. This allows the machining time to be shortened in a program with many hole
drilling steps, etc.
When the control parameter 2 "Prec ctrl dec chk2" is turned ON, if the positioning command
(G0) and cutting feed command (G1) movement directions do not change, movement with the
cutting feed command (G1) will start before the movement speed with the positioning
command (G0) reaches 0. Deceleration check is not carried out at the joint of the cutting feed
command (G1) and positioning command (G0) blocks, and instead optimum corner
deceleration is carried out.
273
1)
Operation
Previous Next
block
block
(N1)
(N2)
G0
G0
Changes in movement
direction
When movement direction
changes
N1 G0
Deceleration check
at block joint
G0 in-position width is checked.
N1
N2
N2 G0
G0
G0
G0 in-position width
Block joint
N2 G0
N2
N1
Block joint
G0
G1
N1 G0
N2
N1
N2 G1
G0 in-position width
Block joint
G0
G1
N1 G0
N2 G1
N2
N1
Block joint
G1
G0
N1 G1
N2 G0
N2
N1
Block joint
G1
G0
N1 G1
N2 G0
N1
N2
Block joint
274
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
G0
G1
G1btL2
G1btL2
3)
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.22
13.22
(1) Outline
This function allows free curves to be machined at a high-accuracy with fine segment commands.
By using this in combination with the high-speed machining function, high-speed and
high-accuracy machining can be carried out.
The function for controlling the machining program commanded with fine segments at a high
accuracy is configured of the following functions.
Die machining
command
Fine segment
command
(CAM data)
Fine segment
commands
(Height sensor
data)
Function
Path analysis
Image data
compression
Image data
compression of
noncontinuous
points
Fairing
Revision to
smooth path
Speed control
Pre-interpolation
acceleration/
deceleration
control
Interpolation
Spline
interpolation
Optimum
corner
deceleration
control
Cutting feed
Servo control
Feed
forward
control
Image data
compression
Fairing
Pre-interpolation
acceleration/
deceleration
Optimum corner
deceleration
Spline interpolation
276
13.22
Tolerance
amount
Commanded
point
Revised
point
(Note)
The block will not stop at the image data compression command point. The block will
stop at the revised point.
277
13.22
Machining
path
Tangent direction
feedrate
Kp
Kv
M
Detector
Kp :
Kv :
M :
S :
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.23
13.23
(1) Outline
This function carries out the machining commanded with linear interpolation or arc interpolation at
a high-accuracy. This function is effective for high accuracy machining of shapes configured of
linear lines and arcs instead of free curves commanded with fine segments.
Function
Cutting feed
ACCS control
Pre-interpolatio
n acceleration/
deceleration
279
Tangent direction
feedrate
Machining
path
13.23
When using arc interpolation, the arc radius decrease error is improved as follows.
F
Command path
F
Actual path
Exponential
acceleration/
deceleration
Linear
acceleration/
deceleration
High-accuracy control mode ON
(acceleration/deceleration before
interpolation)
High-accuracy control
mode OFF
(acceleration/decelera-ti
on after interpolation)
R
R
:
:
:
:
R =
3
1
F 10 2
1
1
2
2
(
Ts + 2 Tp ) (
) (mm)
60
R
2
R =
F 10 2
1
1
1
2
2
(
Ts +
Tp ) (
) (mm)
60
R
24
2
F 10 2
1
. 1
2
2
R =. R (0 + 2 Tp (1 Kf )) (
60 ) (mm)
Ts :
Tp :
Kf :
F :
280
13.24
(1) Outline
The parameters designated from the setting and display unit can be changed from the machining
program. The parameter input command is carried out by the parameter setting command after
the data setting command.
(2) Command format
G10
L70
Pp
Ss
Nn
Aa
Dd ;
;
(Parameter data designation)
Address
P
Meaning
Data group No.
(Section No.)
System No.
Data number
(Sub-section No.)
Data sub-No.
(Axis, spindle
number)
Data
G11
Command details
The parameter data's section No. is commanded with a
two-digit value (positive integer) following P.
This is equivalent to the first two digits of the parameter
number.
Set "0" when parameters are common for all systems.
Set the system No. (1 or 2) when parameters must be set for
each system.
The parameter data's data number (characteristic value for
each data) is commanded with a four-digit value (positive
integer) following N.
This is equivalent to the first four digits of the parameter
number.
If the input data is independent for the axis, the independent
data for each control axis (1: 1st axis, 2: 2nd axis, ...) can be
set with the axis number following A. (The number of control
axes is characteristic to each model.)
An alarm will occur if this address is used for axis common
data.
The parameter value is commanded with the value following D.
13.25
(1) Outline
The tool offset and workpiece offset can be set and changed from tape.
(2) Command format
(a) Workpiece coordinate system compensation input
The workpiece coordinate system value selected with G54 to G59 can be set or changed with
program commands.
The workpiece coordinate setting command format is as follows.
G10
Pp1
L2
Xx1
Yy1
Zz1
Setting value
L2
L2
L2
L2
L2
L2
L2
Function
P0
P1
P2
P3
P4
P5
P6
Ll1
Compensation
amount setting
command
Pp1
Compensation
number
Rr1
Compensation
amount
(Note) If Ll1 is omitted, the tool shape compensation amount will be set. A program error will
occur if Pp1 is omitted.
G code
G10
G10
G10
G10
L10
L11
L12
L13
Function
Tool length shape compensation amount setting
Tool length wear compensation amount setting
Tool radius shape compensation amount setting
Tool radius wear compensation amount setting
L20
Pn
Xx
Yy
n = 1 to 96
Zz ;
282
283
13.26
(1) Outline
If there is a single sequence number (N number) during cutting feed (G01), or if the sequence No.
is commanded in the same block as the macro control statement, the tool may decelerate at the
block joint, and may cause cutter marks on the machined surface. By validating this function, the
single N number can be skipped to prevent deceleration at the block joint. This realizes a smooth
machining surface.
(2) Example of program
(a) For single N number
N1G90G54X0Y0
N2G00X-10.Y-10. ;
Y
X
G54 (0, 0)
N3G91G43H1Z-50. ;
N4 X-10.Y-5. ;
N4
N5 X-10.Y-5.;
N5
N6
N8 N7
N6 ;
N7;
N9
N8X-10.Y-5. ;
N9X-10.Y-5 ;
Speed
N10G01Z-20.F500 ;
Time
N2G00X-10.Y-10. ;
Y
X
G54 (0, 0)
N3G91G43H1Z-50. ;
N4 X-10.Y-5. ;
N4
N5 X-10.Y-5. ;
N6 ;
Skip
N7 ;
Skip
N5
N8
N9
N8X-10.Y-5. ;
N9X-10.Y-5 ;
Speed
N10G01Z-20.F500 ;
Time
284
N2G00X-10.Y-10. ;
Y
X
G54 (0, 0)
N3G91G43H1Z-50. ;
N4 X-10.Y-5. ;
N4
N5 X-10.Y-5.;
N5
N6
N7
N6
N8
IF[#5023EQ-50.]GOTO9;
N7 X-10.Y-5. ;
Speed
N8 X-10.Y-5 ;
N9 G01Z-20.F500 ;
Time
N2G00X-10.Y-10. ;
Y
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
(1) Outline
If a skip signal is input from an external source during linear interpolation by the G31 command,
the machine feed will stop immediately, the remaining distance will be discarded, and the next
block command will be executed. The feed by the G31 is normally time constant 0ms.
Xx1
Yy1
Zz1
Command value
Ff1
Feedrate
Feedrate
Program end point
Remaining
distance
Position
Command value
286
Skip command
The skip signal input coordinates (workpiece coordinate system)
are read out in variables #101.
F
= 60 t2
F
t2
+1
60
Feedrate (mm/min)
-1
287
Skip command
Machine stop check
Skip command
Machine stop check
Skip signal input coordinate
readout
Coasting amount based on
response delay time
Coasting amount based on
position loop time constant
Skip signal input
coordinates
14.2
(1) Outline
By designating the combination of skip signals input from the external source, the program can be
skipped at those conditions. The skip signals that can be used are 1 to 8.
When measuring, multi-step skip can be used to shorten the measurement time by changing the
speed in stages.
Command the skip speed with the command speed F or a parameter. Note that the F modal is not
updated.
There are two multi-skip command formats differing by the method that the skip signal
combination is designating.
When the skip signal is input with the preset conditions during dwell, the remaining dwell time will
be canceled.
Skip input signal
Feedrate
Remaining
distance
Command value
Xx1
Yy1
Zz1
1: Follows G94/G95.
2: Follows G90/G91.
Ff1 ;
Feedrate
1
(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
Skip
command
Xx1
Yy1
Zz1
Pp
Ff1 ;
Feedrate
1
1: Follows G94/G95.
2: Follows G90/G91.
Xx ;
Dwell
command
Dwell time 1
1: Follows G94/G95.
289
Skip speed
20.0mm/min(f1)
5.0mm/min(f2)
1.0mm/min(f3)
f
Operation
N10
(f1)
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.
(4) Detailed description
(a) Skip feedrate
The skip feedrate is commanded with the program command or with parameters.
1) When there is an F command in the program, the feedrate will follow the program
command.
2) When there is no F command in the program, the feedrate will follow the parameter
settings.
Refer to the Parameter Manual for details on the parameters.
Note that in either case, the F modal will not be updated.
If there is no F command in the G31.n command and the parameter speed is "0", the program
error "PR0603 Skip speed 0" will occur.
(b) Skip conditions
The skip conditions are commanded with the program command or parameters.
1) Method 1 or dwell skip
The skip signal combinations are designated with the parameters, and when even one of
the combination signals is input, the skip operation will take place.
Refer to the Parameter Manual for details on the parameters.
Refer to the following table for the relation of the skip conditions and valid signals.
2) Method 2
The skip signal combination is designated with the P following G31. When even one of the
combination signals is input, the skip operation will take place.
Command P in the range of 1 to 255. If the command range is exceeded, the program error
"PR0035 Address range over" will occur. When commanded with a decimal, the value after
the decimal point will be ignored.
Refer to the following table for the relation of the P value and valid signals.
290
Skip signal
command P
1
2
3
4
5
6
7
8
:
253
254
255
291
14.3
(1) Outline
By using G37, the tool length can be automatically measured with program commands.
When this command is issued, the tool end is moved to the tool measurement position. When the
sensor is contacted, the tool immediately stops, and the remaining commands are canceled. At
the same time, the difference of the coordinate value when measurement point is reached and the
G37 start position is calculated, and registered as the tool length compensation amount.
(2) Command format
G37
Zz1
Measurement
command
Command
value
Z:
R:
D:
F:
Rr1
Dd1
Ff1
If R_, D_, and F_ are omitted, the values set in the parameters will be used.
(3) Detailed description
(a) Example of execution and operation
Program example
Tool
G28
T01 ;
M06
G43
G37
Tool
length
Z0 ;
T02 ;
G00 Z0 H01 ;
Z-300. R10. D2. F10 ;
Movement
amount by
tool length
measurement
Z0
A region
A region
: Move with G0
B1, B2 region
: Move at measurement feedrate
B1 region
: Error when sensor signal is input
B2 region
: Error when sensor signal is not input
Tool length
measurement point
(Za1)
B1
region
Sensor
r1
f1
B2
region
d1
Z1
d1
292
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.1
(1) Outline
By commanding the boundaries from the program with coordinate values on the machine
coordinate system, machine entry into that boundary can be prohibited. This can be set only for
the three basic axes.
While the normal stored stroke limit stops entry before the prohibited area, this function causes a
program error before movement to the block if a command exceeding the valid movement area is
issued.
G code
Function
G22
G23
G22
Pre-movement
stroke check ON
Yy1
Zz1
Point 1 coordinate
Ii1
Jj1
Kk1
Point 2 coordinate
Pre-movement
stroke cancel
Point 3
Machine coordinate
system
Point 1 (XYZ)
Entry prohibited
area by G22
Point 2 (IJI)
Point 4
-setting value
+setting
value
(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.1
(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.
45
2)
3)
45
0
360
0
360
315
-115
225
-45
315
295
-45
315
Details
Read Write
Blank
Local variable
Argument designation I
#
Argument
address
10
11
12
13 14 to 26 27 to 33
10 to 27 28 29
N to Z
Argument designation II
#
Argument
address
100 to 199
500 to 999
450 to 499
1000 to
1031
1032 to
1041
1100 to
1131
1132 to
1141
I1
J1
K1
I2
J2
K2 I3 to K8
I9
J9
30
31
32
33
Common variable
100 sets: 100 to 149, 500 to 549
200 sets: 100 to 199, 500 to 599
300 sets: 100 to 199, 500 to 699
600 sets: 100 to 199, 500 to 999
Machine maker macro variables (Can be used only in machine maker macro
program.)
Macro I/F input
#
Details
#
Details
1000 Register R 124 bit0
1034 Register R 128, R 129
to
1035 Register R 130, R 131
1015 Register R 124 bit15
1036 Register R 140, R 141
1016 Register R 125 bit0
1037 Register R 142, R 143
to
1038 Register R 144, R 145
1031 Register R 125 bit15
1039 Register R 146, R 147
1032 Register R 124, R 125
1040 Register R 148, R 149
1033 Register R 126, R 127
1041 Register R 150, R 151
Macro I/F output
#
Details
1100 Register R 24 bit0
to
1115 Register R 24 bit15
1116 Register R 25 bit0
to
1131 Register R 25 bit15
1132 Register R 24, R 25
1133 Register R 26, R 27
#
1134
1135
1136
1137
1138
1139
1140
1141
Details
Register R 28, R 29
Register R 30, R 31
Register R 40, R 41
Register R 42, R 43
Register R 44, R 45
Register R 46, R 47
Register R 48, R 49
Register R 50, R 51
(Note) Variables compatible with additional specifications can be used when those additional
specifications have been added.
296
: Reading/writing possible
: Writing not possible
: Unrelated to reading/writing
Variable
No. (#)
1900
1901
3000
Machining parameter
C axis rotation radius
Machining parameter
C axis insertion radius
NC alarm (alarm display in the macro program)
3001
3002
3003
3004
3006
Cumulative time 1
Cumulative time 2
Control of single block stop and miscellaneous function finish signal wait
Feed hold, feedrate override, G09 valid/invalid
Message display/stop (message display in the macro program, block stop)
3007
3008
3009
3011
3012
4001 to
4520
Mirror image
Miscellaneous function lock state
Miscellaneous function lock invalid
Clock (year/month/day)
Clock (hour/min./sec.)
Modal information
Details
5001 to
5114
4001
4019
4107
4109
4111
Read Write
Execut-i
Modal
Pre-re Execut-i Inter-r
Interrupt
ng
information
ad
ng
upt
4201
4401
M code
4113
4313
4513
N code
4114
4314
4514
4219
4419
O code
4115
4315
4515
S code
4119
4319
4519
4307
4507
T code
4120
4320
4520
4309
4509
4311
4511
Position information
Axis
1st axis
Position
information
Block end point
5001
Machine coordinates
5021
Workpiece coordinates
5041
Skip coordinates
5061
Tool position offset amount
5081
Servo deviation amount
5101
2nd axis
3rd axis
4th axis
5th axis to
14th axis
5002
5022
5042
5062
5082
5102
5003
5023
5043
5063
5083
5103
5004
5024
5044
5064
5084
5104
5005 to 5014
5025 to 5034
5045 to 5054
5065 to 5074
5085 to 5094
5105 to 5114
(Note) Variables compatible with additional specifications can be used when those additional
specifications have been added.
297
: Reading/writing possible
: Writing not possible
: Unrelated to reading/writing
Variable
No. (#)
5201 to
5334
7001 to
8914
10001
to18040
2001 to
2940
Details
Read Write
1st axis
2nd axis
3rd axis
4th axis
5th axis to
14th axis
5201
5221
5241
5261
5281
5301
5321
7001
:
8901
5202
5222
5242
5262
5282
5302
5322
7002
:
8902
5203
5223
5243
5263
5283
5303
5323
7003
:
8903
5204
5224
5244
5264
5284
5304
5324
7004
:
8904
5205 to 5214
5225 to 5234
5245 to 5254
5265 to 5274
5285 to 5294
5305 to 5314
5325 to 5334
7005 to 7014
:
8905 to 8914
Tool offset
The tool data can be read and a value can be substituted using the variable
number.
Either the #10000 address or #2000 address variables can be used.
The last three digits of the variable number correspond to the tool offset
number.
Variable number range
#10001 to #10000 + n
#2001 to #2000 + n
Type I
#11001 to #11000 + n
#2201 to #2200 + n
#16001 to #16000 + n
#2401 to #2400 + n
#17001 to #17000 + n
#2601 to #2600 + n
Type II
298
2.1
Caution
Do not change fixed cycle programs without the prior approval of the machine manufacturer.
2.1
The "INPUT/OUTPUT SCREEN" and "EDIT" screens are used to input/output and edit subprogram
data for each G70 to G89 fixed cycle, the same as the operation for normal user-created machining
programs. However, the parameter (basic common parameter 110007 Fix_P) must be set beforehand.
(1) Turn ON the parameters for fixed cycle operation.
(1)
(2)
INPUT
(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
2.2
The fixed cycle programs are transferred (input/output with external devices) on the INPUT/OUTPUT
SCREEN. Confirm that the fixed cycle operation parameter "110007 Fix_P" on the BASIC COMMON
PARAMETER SCREEN is set to "1".
The operation method is the same as that for transferring user machining programs.
(1) Input (external device memory)
The operation method is the same as that for user machining programs.
Generally, 12 groups of fixed cycle subprograms configure one set. Thus, when inputting, it is
convenient to create types that can be continuously input.
When the data transfer starts, the message "Transferring" is displayed. When the EOR code is
read, the data transfer finishes and the message "Transfer complete" is displayed.
After inputting, use the program list and EDIT screen to confirm that the data was correctly
registered.
(2) Output (memory external device)
The operation method is the same as that for user machining programs.
The registered fixed cycle programs can be output one at a time or as a batch of programs.
When the data transfer starts, the message "Transferring" is displayed. When the EOR code is
read, the data transfer finishes and the message "Transfer complete" is displayed.
After outputting, verify the data to confirm that there are no output errors.
(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
2.3
G. 1 ;
IF [#30] GOTO1 ;
G0 Z#2 G#6 H#7 ;
#2 = ##5
#3003 = #8 OR 1 ;
G1 Z#3 ;
#3003 = #8 ;
G0 Z #3 #2 ;
N1 M99%
G82 (O100000820)
G. 1 ;
IF [#30] GOTO1 ;
G0 Z#2 G#6 H#7 ;
#2 = ##5
#3003 = #8 OR 1 ;
G1 Z#3 ;
IF [#4 EQ #0] GOTO5 ;
G4 P#4 ;
N5 #3003 = #8 ;
G0 Z #3 #2 ;
N1 M99%
G83 (O100000830)
Retract.
G. 1 ;
IF [#30] GOTO2 ;
#29 = #11
#28 = 0 ;
G0 Z#2 G#6 H#7 ;
#2 = ##5
#3003 = #8 OR 1 ;
DO 1 ;
#28 = #28 #11
#26 = #28 #29
Z#26 ;
IF [ABS [#28] GE [ABS [#3] ] ] GOTO 1 ;
G1 Z#29 ;
301
G84 (O100000840)
Retract.
Define the cutting amount for block 2 and after.
Cutting feed
Retract.
Tap cycle
Fixed cycle block 1 movement command.
Check for fixed cycle invalidity.
G. 1 ;
IF [#30] GOTO1 ;
G0 Z#2 G#6 H#7 ;
#2 = ##5
#3003 = #8 OR 1 ;
#3004 = #9 OR 3 ;
G1 Z#3 ;
IF [#4 EQ #0] GOTO5 ;
G4 P#4 ;
N5 M4 ;
#3900 = 1 ;
G1 Z #3 ;
#3004 = #9 ;
IF [#4 EQ #0] GOTO6 ;
G4 P#4 ;
N6 M3 ;
#3003 = #8 ;
G0 Z #2 ;
N1 M99%
G85 (O100000850)
Dwell.
Rotate the spindle reversely.
Dwell.
Rotate the spindle forward.
Retract.
Boring 1
Fixed cycle block 1 movement command.
Check for fixed cycle invalidity.
G. 1 ;
IF [#30] GOTO1 ;
G0 Z#2 G#6 H#7 ;
#2 = ##5
#3003 = #8 OR 1 ;
G1 Z#3 ;
#3003 = #8 ;
Z #3 ;
G0 Z #2 ;
N1 M99%
Retract.
302
G86 (O100000860)
Boring 2
Fixed cycle block 1 movement command.
Check for fixed cycle invalidity.
G. 1 ;
IF [#30] GOTO1 ;
G0 Z#2 G#6 H#7 ;
#2 = ##5
#3003 = #8 OR 1 ;
G1 Z#3 ;
IF [#4 EQ #0] GOTO5 ;
G4 P#4 ;
N5 M5 ;
G0 Z #3 #2 ;
#3003 = #8 ;
M3 ;
N1 M99%
G87 (O100000870)
Back boring
G. 1 ;
IF [#30] GOTO1 ;
#3003 = #8 OR 1 ;
#26 = #30064 + #30074 ;
#28 = #12 COS [#26] + #13 SIN [#26] ;
#29 = #13 COS [#26] #12 SIN [#26] ;
M19 ;
X#28 Y#29 ;
#3003 = #8 ;
G0 Z#2 G#6 H#7 ;
#3003 = #8 OR 1 ;
G1 X #28 Y #29 ;
#3003 = #8 ;
M3 ;
#3003 = #8 OR 1 ;
Z#3 ;
M19 ;
G0 X#28 Y#29 ;
Z #2 #3 ;
#3003 = #8 ;
X #28 Y #29 ;
M3 ;
N1 M99%
303
G88 (O100000880)
Boring 3
Fixed cycle block 1 movement command.
Check for fixed cycle invalidity.
G. 1 ;
IF [#30] GOTO1 ;
G0 Z#2 G#6 H#7 ;
#2 = ##5
#3003 = #8 OR 1 ;
G1 Z#3 ;
IF [#4 EQ #0] GOTO5 ;
G4 P#4 ;
N5 #3003 = #8 ;
M5 ;
#3003 = #8 OR 1 ;
G0 Z #3 #2 ;
#3003 = #8 ;
M3 ;
N1 M99%
G89 (O100000890)
Dwell.
Cancel single block stop inhibition.
Rotate the spindle forward
Inhibit single block stop.
Retract.
Cancel single block stop inhibition.
Rotate the spindle forward.
Boring 4
Fixed cycle block 1 movement command.
Check for fixed cycle invalidity.
G. 1 ;
IF [#30] GOTO1 ;
G0 Z#2 G#6 H#7 ;
#2 = ##5
#3003 = #8 OR 1 ;
G1 Z#3 ;
IF [#4 EQ #0] GOTO5 ;
G4 P#4 ;
N5 #3003 = #8 ;
Z #3 ;
G0 Z #2 ;
N1 M99%
Dwell.
Retract.
304
G73 (O100000730)
Step cycle
G. 1 ;
IF [#30] GOTO2 ;
#29 = 0
#28 = #11
G0 Z#2 G#6 H#7 ;
#2 = ##5
#3003 = #8 OR 1 ;
DO 1 ;
#29 = #29 + #11 ;
IF [ABS [#29] GE [ABS [#3] ] ] GOTO1 ;
N5
N1
N6
N2
G1 Z#28 ;
IF [#4 EQ #0] GOTO5 ;
G4 P#4 ;
G0 Z #14 ;
#28 = #11 + #14 ;
END1 ;
G1 Z#3 #29 + #28 ;
IF [#4 EQ #0] GOTO6 ;
G4 P#4 ;
#3003 = #8 ;
G0 Z #3 #2 ;
M99%
G74 (O100000740)
G. 1 ;
IF [#30] GOTO1 ;
G0 Z#2 G#6 H#7 ;
#2 = ##5
#3003 = #8 OR 1 ;
#3004 = #9 OR 3 ;
G1 Z#3 ;
IF [#4 EQ #0] GOTO5 ;
G4 P#4 ;
N5 M3 ;
#3900 = 1 ;
Z #3 ;
#3004 = #9 ;
IF [#4 EQ #0] GOTO6 ;
G4 P#4 ;
N6 M4 ;
#3003 = #8 ;
G0 Z #2 ;
N1 M99%
Dwell.
Rotate the spindle forward.
Dwell.
Rotate the spindle reversely.
Retract.
305
G76 (O100000760)
Fine boring
IF [#30] GOTO1 ;
G. 1 ;
IF [#30] GOTO1 ;
G0 Z#2 G#6 H#7 ;
#2 = ##5
#26 = #30064 + #30074 ;
#28 = #12 COS [#26] + #13 SIN [#26] ;
#29 = #13 COS [#26] #12 SIN [#26] ;
#3003 = #8 OR 1 ;
G1 Z#3 ;
M19 ;
X#28 Y#29 ;
G0 Z #3 #2 ;
#3003 = #8 ;
X #28 Y #29 ;
M3 ;
N1 M99%
306
2.4
Command
address
R_
P_
G43/G44/G49
H_
#3003
#3004
Z_
Q_
I_
J_
Parameter
D_
R_
Z_
Q_
I_
J_
K_
Contents
Null data
Between I and R point distance
R point positioning amount (incremental)
Total cutting amount (incremental)
Dwell time
R point/initial point (G99=0/G98=1)
Tool length offset G code
Tool length offset No.
System variable #3003 copy
System variable #3004 copy
Absolute value of command value Z (only when an absolute
value is commanded, this variable can be set.)
Cutting amount/shift amount (incremental)
Shift amount [horizontal axis] (incremental)
Shift amount [vertical axis] (incremental)
G73 return amount/G83 clearance amount
User release variable
User release variable
User release variable
User release variable
User release variable
User release variable
User release variable
System reserve (do not use)
Temporary variable
Command
address
Contents
Axis, R, Z command present/absent flag
Command axis address flag
Incremental/absolute value flag
1st axis data
2nd axis data
3rd axis data
4th axis data
5th axis data
6th axis data
Special fixed cycle variable
Temporary variable
System reserve
Control unit
307
Program Errors
These alarms occur during automatic operation, and the causes of these alarm are mainly program
errors which occur, for instance, when mistakes have been made in the preparation of the machining
programs or when programs conform to the NC specification have not been prepared. (The error No.
and message appear on the screen.)
Error No.
Message
Details
Remedy
PR0001
Mode mismatch
PR0002
PR0003
Device invalid
A nonexistent or inoperable
device was designated.
PR0004
No file designation
PR0005
No file
PR0006
No N/B number
PR0010
No. of simultaneous
axes over
PR0011
PR0020
Division error
PR0032
Illegal address
PR0033
Format error
PR0034
Illegal G code
PR0035
PR0036
Error No.
PR0037
Message
Details
Remedy
The program numbers are
designated across a range from
1 to 99999999.
The sequence numbers are
designated across a range from
1 to 99999.
PR0038
No additional Op
block skip
PR0039
No EOB
PR0040
Unused address
exists
PR0041
Overlap G code
exists
PR0042
PR0043
No end point
operation in arc
PR0050
No inch/mm spec.
PR0060
Compensation
length over
PR0061
No 1-direction
positioning spec.
No F command
PR0062
309
Error No.
Message
Details
Remedy
PR0063
PR0070
PR0072
No heircal spec.
PR0073
No scroll spec.
PR0080
No hypothetic axis
spec.
PR0090
No thread cutting
spec.
PR0093
PR0100
No cylinder
interpolation spec.
PR0101
PR0110
Plane selected
during pattn rot
PR0111
Coord rotation plane A plane selection command (G17, Upon completion of the G68
selection
G18, G19) has been issued in a
command, the plane selection
coordinate rotation command
command must be issued
(G68).
following the G69 command
(coordinate rotation cancel).
(For the program based on the
M2/M0 format, the coordinate
rotation command is G68.1 and
the coordinate rotation cancel
command is G69.1.)
310
Error No.
Message
Details
Remedy
PR0112
Plane selected
during R compen
PR0120
No synchronous
feed spec.
PR0121
In F0 arc modal
mode
PR0122
No auto corner
override spec.
PR0124
No G93 spec.
PR0125
PR0140
No t-pos offset
PR0141
T-pos during
pat/cood rot
PR0142
PR0150
No nose radius
compensation
PR0151
Radius compen in
arc modal
311
Error No.
Message
Details
Remedy
PR0152
No intersection
PR0153
Compensation
interference
PR0154
No
3D-compensation
spec.
PR0155
PR0164
No optional
backward spec.
PR0170
No compensation
number
PR0171
No G10 spec.
PR0172
PR0174
No G11 spec.
PR0180
No fixed cycle
PR0181
No spindle
command
(Tap cycle)
312
Error No.
PR0182
Message
Synchronous tap
error
Details
Connection with the spindle unit
was not established.
Remedy
Check the connection with the
spindle.
Check that the spindle encoder
exists.
PR0183
No pitch/thread
number
PR0184
PR0220
No special fixed
cycle spec.
PR0221
PR0222
PR0223
G12/G13 radius
error
PR0224
No G12/G13 spec.
PR0230
Sub-program
nesting over
PR0231
No N-Number
PR0232
No program No.
PR0240
No variable
command
PR0241
No variable number
PR0242
Variable definition =
none
PR0243
PR0244
313
Error No.
Message
Details
Remedy
PR0250
No pattern rotation
PR0251
Pattern rotation
duplicated
PR0252
PR0260
No coordinates
rotation
PR0270
No user macro
PR0271
No macro interrupt
PR0272
NC text/macro text
simultaneous
PR0273
PR0275
Variable number
illegal
PR0276
PR0277
Macro alarm
message
Refer to OPERATOR
MESSAGE on DIAGN screen.
Refer to instruction manual
issued by machine
manufacturer.
PR0280
PR0281
PR0282
Can't calculate
314
Error No.
Message
Details
Remedy
PR0283
Zero division
PR0284
Overflow value
PR0285
Float value overflow The variable data has overflowed. Reconsider the variable data in
the program.
PR0290
IF statement error
PR0291
WHILE statement
error
PR0292
SETVN statement
error
PR0293
DO-END nesting
over
PR0294
PR0295
PR0300
PR0301
Variable name
duplicated
PR0350
No scaling spec.
PR0360
No program mirror
spec.
PR0380
No corner R/C spec. A command was issued for corner Check the specifications.
rounding or corner chamfering
Remove the corner rounding or
even though there are no such
chamfering command from the
specifications.
program.
PR0382
No corner
movement
Error No.
Message
Details
Remedy
PR0383
Corner movement
short
PR0384
Corner next
movement short
PR0385
Corner during
G0/G33
PR0386
Can't execute corner The corner R/C movement cannot Reconsider the program.
R (C)
be created.
PR0390
No geometric spec.
PR0391
No geometric arc
spec.
PR0392
PR0393
PR0394
No linear move
The second block of the
command (GEOMT) geometric command was not
linear.
PR0395
Illegal address
(GEOMT)
Plane selected in
GEOMT ctrl
PR0420
No parameter input
spec.
316
Error No.
Message
Details
Remedy
PR0421
Parameter input
error
PR0430
Return incomplete
axis exists
PR0431
No 2nd 3rd 4th ref-p The 2nd, 3rd and 4th reference
Check the specifications.
ret spec.
point return was commanded
even though there are no 2nd, 3rd
and 4th reference point return
specifications.
PR0435
G27 and M
commands in same
block
PR0436
G29 and M
commands in same
block
PR0437
PR0438
PR0451
No check-beforemove spec.
PR0452
Movement limit
PR0460
317
Error No.
PR0461
Message
File I/O
Details
A file of the machining program
cannot be read.
Remedy
If this error occurs during
memory operation, the program
stored in the memory may be
destroyed.
Output the program and all
other tool data and work offset
data, then format the memory.
When using the FD, replace the
floppy disk.
During IC card operation,
confirm that the IC card is
correctly inserted.
PR0462
PR0463
PR0470
PR0471
PR0490
No disk operation
PR0491
No FLD operation
PR0492
PR0493
No dataserver
operation
PR0600
No auto TLM
PR0601
No skip
PR0602
No multi skip
PR0603
Skip speed 0
318
Error No.
Message
Details
Remedy
PR0604
PR0605
H and G37
commands in same
block
PR0606
H command not
found before G37
PR0607
Signal turned
illegally with G37
PR0608
Designate a radius
compensation cancel command
(G40), or remove the skip
command.
PR0611
No hi-preci (G61.1)
spec.
No hi-preci die
(G61.2/3) spec.
A high-accuracy (die)
(G61.2/G61.3) command was
issued even though there are no
such command specifications.
No hi-preci part
(G61.5) spec.
PR0621
PR0622
PR0623
PR0624
PR0625
PR0612
PR0615
No NURBS spec.
Error No.
Message
Details
Remedy
PR0900
No normal control
PR0901
G92 command on
normal axis
PR0902
PR0903
PR0920
No 3DIM coord
conversion spec.
There is no three-dimensional
coordinate conversion function.
PR0921
PR0922
A three-dimensional coordinate
conversion command was issued
in a modal incapable of
three-dimensional coordinate
conversion.
PR0990
Illegal process
320
3.2
Program Warnings
No.
Message
Details
PRW0001
Overlap address
exists
PRW0002
Overlap G code
exists
PRW0003
Ignored G code
exists
PRW0004
Unused address
exists
PRW0005
PRW0006
No end point
operation in arc
PRW0007
Cylinder mode
warning
321
Remedy
Revision History
Date of revision
Manual No.
Revision details
Jan. 1998
BNP-B2239*
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
Feb. 2000
BNP-B2239C
The details are revised to correspond to the MELDAS 600M Series Version D0.
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.
Mar. 2001
BNP-B2239D
The details are revised to correspond to the MELDAS 600M Series Version F0.
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.
Mar. 2002
BNP-B2239E
Jun. 2003
BNP-B2239F
Apr. 2006
BNP-B2239G
CHINA FA Center
EUROPEAN FA Center
KOREAN FA Center
ASEAN FA Center
HONG KONG FA Center
TAIWAN FA Center
Notice
Every effort has been made to keep up with software and hardware revisions in the
contents described in this manual. However, please understand that in some
unavoidable cases simultaneous revision is not possible.
Please contact your Mitsubishi Electric dealer with any questions or comments
regarding the use of this product.
Duplication Prohibited
This instruction manual may not be reproduced in any form, in part or in whole,
without written permission from Mitsubishi Electric Corporation.