0% found this document useful (0 votes)
64 views78 pages

CNC Turning Machine

This document provides an overview of basic concepts for creating programs for CNC turning machines. It discusses what a program is, the process for creating a program which involves checking drawings, determining machining processes and tools, and writing the program. It also outlines how the program is input into the machine's memory and describes the overall workflow from programming to machining and completing products. Finally, it defines common terms used in programming like program number, sequence number, addresses and data.

Uploaded by

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

CNC Turning Machine

This document provides an overview of basic concepts for creating programs for CNC turning machines. It discusses what a program is, the process for creating a program which involves checking drawings, determining machining processes and tools, and writing the program. It also outlines how the program is input into the machine's memory and describes the overall workflow from programming to machining and completing products. Finally, it defines common terms used in programming like program number, sequence number, addresses and data.

Uploaded by

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

COMPUTER NUMERICAL

CONTROL
CNC TURNING MACHINE
This chapter describes the basic considerations for creating a program.
CONTENTS
A : BEFORE PROGRAMMING

1. What is a Program? ...............................................................................A-1


2. What is "Creating a Program"? ...............................................................A-2
3. Inputting the Program to the Machine ......................................................A-3
4. Flow of Operation until Completion of Products ........................................A-4
5. Terms for Programming .........................................................................A-6
5.1 Program Number ........................................................................A-6
5.2 Sequence Number .....................................................................A-7
5.3 Part Program .............................................................................A-8
5.4 Address.....................................................................................A-9
5.5 Data...........................................................................................A-9
5.6 Word .........................................................................................A-9
5.7 Block ..........................................................................................A-10
5.8 Summary ...................................................................................A-11
6. Axis Control and Direction ......................................................................A-12
6.1 SL, AL-22, TL Series ...................................................................A-12
6.2 AL-22S.......................................................................................A-14
6.2.1 Controlled Axes in the Program .......................................A-15
7. Specifying the Dimension .......................................................................A-16
7.1 Absolute Command ....................................................................A-16
7.2 Incremental Command ................................................................A-19
7.3 Summary ...................................................................................A-22
8.. Specifying the Cutting Conditions ............................................................A-23
9. Functions ...............................................................................................A-24
10. List of Addresses ..................................................................................A-25
11. Basic Pattern of Program .......................................................................A-26
11.1 Chuck Work .................................................................................A-26
11.2 Center Work ................................................................................A-27
12. Cautions for Creating a Program ..........................................................A-28
12.1 Program Number .........................................................................A-28
12.2 Space between the Words in the Program ....................................A-28
12.3 Signs and Symbols ......................................................................A-28
12.4 Decimal Point ..............................................................................A-29
1. What is a Program?

What do you think of when you hear the


term "program"?

Do you think of a program for a sporting


event, an educational exercise, or for
operating a computer? Generally speaking, a
program is an instructional statement that
contains the contents of plan or is written to
work in conformity with certain rules.

A program is required to operate a NC


machine tool.

All operations of the machine, including "spindle


rotation", "tool movement", or "coolant
discharge" can be controlled by a program.

A good program is essential for the


operation of the NC machine tools.
Programs are specified by inputting an
alphabet and the numerals which succeed
it.
2. What is “Creating a Program”?

What kind of actions are required to create a


program ?

1) Checking a drawing to determine the


machining required.
The drawing must be checked carefully
to know what is required.

2) Examine the section to be machined,


and determine the fixtures and tools
that need to be used.

Some people start programming


immediately, as soon as they see
drawing. This kind of impatience can
lead to unproductive and very
dangerous operation of the machine.

3) Determine the machining processes


required based on the information*and
dimensions given in the drawing.

Machining process: O.D. rough cutting


in the first process, O.D. finishing in the
second process and thread cutting in the
third process.

4) To create the machining process, first


write down the program required as a
combination of letters and numerals on
paper.

5) After a program has been created,


carefully check its contents.

To create a program is called


"programming":
3. Inputting the Program to the Machine

After the program is created, input the program into


the NC memory using the keyboard on the NC
operation panel.

The contents of a program that has been input


can be checked on the screen. Execute the
program. The machine operates according to
the program commands.

For the methods required to input a program to the


NC, or to execute the program, refer to the
separate "OPERATION MANUAL".
4. Flow of Operation until Completion of Products

This section describes the flow of operation, including programming.

1) Examining the drawing to determine the


machining required.
Based on the drawing, determine what
clamping method must be used for the
workpiece during the machining process.

2) Determining the tools to be used


Determine the tools to be used for
machining and machining order.

3) Creating the program


Based on the drawing of the workpiece, the
shape of the blank workpiece and the tool to
be used, create a program for every process
required, for example, O.D. rough cutting and
I.D. rough cutting.

4) Inputting the program to memory


Input the program using the keyboard on the
NC operation panel.

For the operations required to input a


program, refer to the separate "OPERATION
MANUAL".
5) Setting up for machining
Measuring the tool offset

Set the workpiece zero point of the program


to the machine.
For the workpiece zero point, refer to page
A-13.

6) Checking the input program


Check and confirm the program on the screen
to prevent input error.

As a further check, carry out trial machining


using this program.

7) Machining

Machine a workpiece with the program that


has been input.

8) Completing the products


5. Terms for Programming

This section describes the terms used in creating a program.

5.1 Program Number


Several programs can be stored in the NC memory.
Program numbers are used to keep multiple programs arranged in numerical order.
Program numbers appear at the beginning of a program stored in the memory. A program
number is set by inputting numbers 4 digits or less after the alphabet "O". Numbers from 1
to 9999 can be used.

EXAMPLE
00001: Program number
N1;
G50 S2000;
G00 T0202 (M41);

G00 X100.0 Z150.0;


M01;
N2:
G50 S2500;
G00 T0404 (M42);

M30;

NOTE: 1) The program number can have less than four significant digits. It can be
input using less than four digits. For example, even if a program
number is input as 01-, the screen will automatically display
"00001 ".
2) If a program number to be input is already in the memory, that
number, and therefore that program cannot be input. Change its
number to input the program.
5.2 Sequence Number

The sequence number is used to search for or call the position that is being executed, or to
facilitate finding the position you want to edit in the program easily.

Generally, a sequence number is entered at a key point in the program (e.g. part program
for each tool).

The sequence number is expressed as a number of 4 digits or less (1 to 9999), following the
alphabet "N".

EXAMPLE

00001:
N1; Sequence number
G00 T0202 (M41);

G00 X100.0 Z150.0;


M01;

N2: Sequence number


G50 S2500;
G00 T0404 (M42);

M30;

NOTE: The sequence number is not necessarily specified. Also, it is not


necessary to input numbers with four significant digits.

If a program is too long and exceeds the memory capacity, put the sequence
numbers at the beginning of the program for each process, or do not specify
these numbers. This will help save memory capacity.
5.3 Part Program

The part program is used to specify the machining process for a single cutting tool.

Each process (1st process, 2nd process...) for machining a component contains the part
programs for as many tools as are necessary to complete each process.

EXAMPLE
00001:
N1;

G00 T0202 (M41);


Part program for the tool No. 2
G00 X100.0 Z150.0;
M01;

N2:
G50 S2500;
G00 T0404 (M42); Part program for the tool No. 4

M30;
5.4 Address
An address is expressed using letters.

5.5 Data

The numbers (including the sign and decimal point) that follow the address are called the
"data".

In addition, the information (program and other) to be input to the NC for machining the
workpiece is also called the data.

Determine the type of data from the explanation of the statement.

5.6 Word

A word is the minimum unit for specifying functions. A word consists of a numerical value
and the data.
5.7 Block

A block is the minimum command unit necessary to operate a machining center. It is


also the minimum unit used to create a part program. A block consists of words.

1) On the program sheet, each one line corresponds to one block.


00001;...........................................................................................First block
N1 G50 S2000; ............................................................................Second block
G00 T0202 M41; .........................................................................Third block

Specify the end of a block with [ ; ].

2) On the tape (program), the portion enclosed by the end of blocks (CR) is one block.
5.8 Summary
6. Axis Control and Direction

6.1 SL, AL-22, TL Series

In this NC lathe, movement takes place along two axes. These axes are called the
X-axis and the Z-axis.

This section describes movement along the axes and its relationship with the program.

Knowing the direction of the controlled axes is essential when creating a program.

<Movement along the controlled axes>

The controlled axes and their directions are determined as follows:


<Controlled axes in a program>

Workpiece zero point ......To program, the workpiece zero point in a program must be
determined in advance. This workpiece zero point (XO,
ZO) is treated as the reference for programming the starting
travel.
X-axis ...............................Radial dimensions of the workpiece are described with
address X. The spindle center line is X0.
Z-axis ...............................Longitudinal dimensions of the workpiece are described with
address Z. The workpiece finished end surface is Z0.

Chuck Work
6.2 AL-22S

In the AL-22S, movement takes place along three axes. These axes are called the X-axis,
Z-axis and B-axis.

This section describes movement along the axes and their relationships in the program.

Knowing the direction of motion along the controlled axes is essential when creating a
program.

<Movement along the controlled axes>

The controlled axes and their directions are determined as follows:


6.2.1 Controlled Axes in the Program

Workpiece zero point .............To program, the workpiece zero point in a program must be
determined in advance. This workpiece zero point
(XO, ZO) is treated as the reference for programming the
starting travel.

X-axis ....................................Diametral dimensions of the workpiece are described with


address X. The spindle center line is XO.

Z-axis .....................................Longitudinal dimensions of the workpiece are described


with address Z. The workpiece finished end surface is
ZO.

NOTE: In the cutting-off process, headstock 2 moves along the Z-axis when a
workpiece is transferred from headstock 1 to headstock 2.

This cuffing-off movement is controlled in the B-axis.


7. Specifying the Dimension

The following two methods can be used to specify movement of a tool from one point
to the next point.
1) Absolute command
2) Incremental command

How these two commands work must be fully understood to create a program.

7.1 Absolute Command


Specify the distance from the workpiece zero point (XO, ZO) using a numerical value
with a (+) or (-) sign.

EXAMPLE 1
To move the tool from point 1 to 2 in the figure below, specify the following:
From 1 X 20.0 Z10.0;
To 2 X 10.0 Z-5.0;

NOTE: 1) An X value is specified in diameters.


2) The (+) sign can be omitted.
(X+10.0 -+ X10.0)
The (-) sign cannot be omitted.
3) In the figure, (0, 0) indicates the coordinates of (X, Z).
EXAMPLE 2
When the tool moves from 1 2 3 4 5 as in the figure below,
specify the following commands.
1 X40.0 Z0;
2 X50.0 Z-5.0;
3 (X50.0) Z-50.0;
4 X80.0 (Z-50.0);
5 X100.0 Z-60.0;
Since the commands in parentheses are the same value as in the previous block, they can
be omitted.
The X coordinate of point 1 : According to the C5 command, the chamfer size 5 mm is
subtracted from this 50 mm diameter. Since the X-axis dimensions are all diametral values,
the chamfer size of 5 mm is first converted into a diametral value.
5mmx2=10 mm
This is then subtracted from 50 mm.
50-10=40
The X coordinate of point 1 is determined to be 40.0.

The X coordinate of point 4 : According to the C10 command, the chamfer size 10 mm is
subtracted from the 100 mm diameter. Since the X-axis dimensions are all diametral values, the
chamfer size of 10 mm is first converted into a diametral value.
10 mm x2=20 mm
Then this is subtracted from 100 mm.
100-20=80
The X coordinate of point 4 is determined to be 80.0.

5. The Z coordinate of point 5 : the chamfer size of 10 mm is added to 50 mm. Since the
Z dimensions are all measured in the negative direction from the workpiece zero point, the Z
coordinate of point 5 is Z-60.0.
7.2 Incremental Command

This command indicates the direction and distance that you want to move from the current
tool position.

In the incremental mode, address U and W are used instead of X and Z, respectively.

EXAMPLE 1

When the tool moves from 1 to 2 , as in the figure below, this movement is specified
as follows:

NOTE: 1) A U value is specified in diameters.


2) The (+) sign can be omitted.
(U+10.0 -4 U10.0)
The (-) sign cannot be omitted.
3) In the figure, (0, 0) indicates the coordinates of (X, Z).
The X coordinate of point 2 is 50.0, which is 10 mm larger than the X coordinate of
point 1 ; 40.0. This means that the incremental distance from point 1 to point 2
is 10 mm, in diameters in the positive direction along the X-axis. The command to
define this distance should be U10.0.

The Z coordinate of point 2 is -5.0, which is 5 mm from the Z coordinate of point 1


; 0. This means that the incremental distance from point 1 to point 2 is 5 mm in the
negative direction along the Z-axis. The command to define this distance should be
W-5.0.

The X coordinate of point 4 is 80.0, which is 30 mm larger than the X coordinate of


point 3 ; 50.0. The command to define this distance should be U30.0.

From point 3 to point 4 , the tool moves only along the X-axis. W, therefore,
which defines movement along the Z-axis is not specified.

Movement along the X-axis from point 4 to point 5 is 20 mm in diameters in the


positive direction. This is specified as U20.0. Movement along the Z-axis is specified
as W-1 0.0. This indicates movement along the Z-axis of 10 mm in the negative
direction.
7.3 Summary

Generally, a program is created using an absolute command.

An incremental command is used for pitch machining at a constant interval.


8. Specifying the Cutting Condition

The cutting conditions that are set when creating a program have a great influence on the
machining efficiency and accuracy. These conditions must be checked carefully.
The following three cutting conditions are necessary for machining the workpiece with the
NC lathe.

Spindle speed (min -1) ..................................Spindle speed (cutting speed) is


specified
Cutting speed (Surface speed)(m/min) directly after the alphabet S (S function).
<How to specify>
400 min-1: S400 (G97)
200 m/min: S200 (G96)
NOTE: "min-1 ,means "rpm".

Cutting feedrate (mm/rev) ...........................Feedrate is specified directly after


(mm/min) the alphabet F (F function).
<How to specify>
0.1 mm/rev: F0.1 (G99)
100 mm/min: F100 (G98)

Depth of cut ..................................................There is no special function to specify


the depth of cut.

Specify the depth of cut using


movement along the X- or Z-axis.
9. Functions

A program. is created using alphabets which show functions, and numerical values.
The G, M, S, F, and T functions represent the main functions.

Details of each function are described in Chapter B and succeeding chapters.

The following table gives an overview of functions:


10. List of Addresses

This section describes the addresses used in the program and their functions.
11. Basic Pattern of Program

11.1 Chuck Work


When creating a part program for each tool (O.D. cutting tool, thread cutting tool etc.),
the following basic patterns are used.
11.2 Center Work
12. Cautions for Creating a Program

12.1 Program Number

This manual describes all program numbers as 4 digit integers. When actually creating or
inputting a program, it is not necessary to use a 4-digit number. The NC automatically
displays the input as a 4 digit number. (integer)

For example, if "01 " is input, it is automatically stored in the NC memory as "00001".
However, program numbers of five digits or more cannot be input.

12.2 Space between the Words in the Program

This manual describes the program as follows:

For example, in line 1 , a space is inserted


between "G50" and "S2000". It is not
necessary to input this space when inputting
the program to the NC.

When a program is input to the NC


memory, a space is automatically
inserted.

12.3 Signs and Symbols

The program is a combination of alphabet, (+, -) signs, and digits, including a


decimal point. Further, the sign ( ; ) (end of block) and ( / ) (slash) for block delete
function can be input.

Block delete function:


ON: Block command containing ( / ) is ignored.
OFF: Block command containing ( / ) is executed.

The following signs and symbols can be used in accordance with their purpose:
12.4 Decimal Point

It is possible to input a number value with a decimal point to the NC. A decimal point is
used to input any unit of distance, time, or speed. However, for some addresses, a decimal
point cannot be input. Inputting a decimal point is limited to "mm", "inch", "deg", or "sec".

X15.0 X15 mm or X15 inch


G04 X1.0 Dwell for 1 sec.
F10.0 10 mm/rev, 10 mm/min, 10 inch/rev, 10 inch/min

A decimal point can be input for the following addresses:


X, Z, U, W, I, K, F, R, C, H, B

NOTE: 1) When specifying a dwell command, it is possible to input a decimal point for
the address X, but not possible for address R (Because P is also used for
specifying the sequence number.)
2) Please pay careful attention to inputting a decimal point.
Metric setting (G21 command is used.)

X1.0 X1 mm
X1 X0.001 mm (If a decimal point is not used, the value is
regarded as the least input increment.)

Inch setting (G20 command is used.) X1.0 X1 inch

X1 X0.0001 inch (if a decimal point is not used, the value is


regarded as the least input increment.)

3) It is possible to input a word using a decimal point, or the word without the
decimal in the same program.

X1000 Z23.7;

X10.0 Z22359;
This chapter describes the G functions.

The tool nose radius offset, outlined in Section 10, "G40, G41, G42 Tool Nose
Radius Offset" and the multiple repetitive cycles, outlined in Section 15, "G70-G76
Multiple Repetitive Cycle", are detailed in Chapter D, "AUTOMATIC TOOL NOSE
RADIUS OFFSET" and Chapter G, "MULTIPLE REPETITIVE CYCLES".
CONTENTS

B : G FUNCTIONS

1. G Code List...............................................................................B-1

2. G00
Positioning the Cutting Tool at a Rapid Traverse Rate ....................B-4

3. G01
Moving the Cutting Tool Along a Straight Path Cutting Feedrate ......B-8

4. G02, G03
Moving the Cutting Tool Along Arcs at a Cutting Feedrate .............B-10

5. G50
Setting the Spindle Speed Limit ................................................B-12

6. G96
Maintaining a Constant Surface Speed .....................................B-14

7. G97
Maintaining a Constant Spindle Speed .....................................B-16

8. G04
Suspending Axis Feed (Dwell) ..................................................B-18

9. G98, G99
Setting Feedrate Units .............................................................B-20

10. G40, G41, G42


Tool Nose Radius Offset ...........................................................B-24

11. G32
Thread Cutting .........................................................................B–26

12. G92
Thread Cutting Cycle ................................................................B-34

13. G90
O.D./I.D. Turning Cycle ...........................................................B-44
14. G94
Facing Cycle............................................................................B-50

15. G70-G76
Multiple Repetitive Cycle ........................................................B - 56

16. G01
Chamfering and Rounding Functions .....................................B - 58

17. G20, G21


Switching the Dimensioning System Between Inches and mm .......B - 62

18. G22, G23


Setting Barrier to Define the Inhibited Tool Entry Zone ..................B - 64

19. G27
Checking Zero Return .............................................................B - 68

20. G28
Returning the Axes to Machine Zero Automatically ......................B - 70

21. G50
Setting the Coordinate System ..............................................B - 72

22. G53
Selecting the Machine Coordinate System ............................B - 74

23. G54-G59
Setting a Work Coordinate System .......................................B - 76
1. G Code List

G codes are also called preparatory functions. The G codes, consisting of the address G
and a two-digit numerical value define the machining method and the axis movement
mode in a specified block. The NC establishes the control mode in response to the
specified G code.

The two-digit numerical value following address G defines the commands written in that
block. Depending on how the G codes remain valid, they are classified into the following
two types:

The following example program shows how the programmed blocks are governed by the
G codes; G00 and G01 are both modal.
* : With MORIC-T6FII, G71 is optional.

NOTE: 1) More than one G code, each belonging to a different G code group,
may be specified in the same block.
2) The NC establishes the G code modes, identified by the ► symbol,
when the power is turned on or when the reset key is pressed.
3) The G codes in group 00 are valid only once in the specified block.
2. G00 Positioning the Cutting Tool at a Rapid Traverse Rate

By specifying the G00 command, all axis


movement commands are executed at the rapid
traverse rate. In other words, the cutting tool is
positioned at the programmed target point at a
rapid traverse rate.

The G00 mode is normally used.for the following


operations:
1) At the start of machining:
move the cutting tool close to the workpiece.
2) During machining:
move the cutting tool, retracted from the
workpiece, to the next programmed target point.
3) At the end of machining:
move the cutting tool away from the workpiece.

<Command format>

GOO X(U)_ Z(W)_;

 GOO ...........Calls positioning at a rapid traverse rate.


 X Z .............Specifies the positioning target point.
The coordinates are specified in absolute values.
 U W ...........Specifies the positioning target point.
The coordinates are specified in incremental values in reference to the
current position.

NOTE: 1) Once the G00 command is specified, it remains valid until another G code in
the 01 group is specified. GO1, G02, and G03 are examples of G codes in
the 01 group. G codes that remain valid until another G code in the same group
is specified are called modal G codes. The G code groups are given in 1,"G
Code List".
2) The maximum rapid traverse rate varies among machine models. For
the maximum rapid traverse rate programmable with your machine, refer to
the maintenance manual or operation manual supplied with the machine.
3) The rapid traverse rate is adjustable by using the rapid traverse rate override
switch on the machine operation panel.
4) If the two axes are specified in the G00 mode at the same time, the
generated tool path is not always a straight line.
EXAMPLE I

To use the GOO mode to advance and retract the cutting tool to and from the workpiece.

1 To point A
Rapid traverse to a point near the workpiece.
2 Point A Point B
Rapid traverse

Part program

3 Point C
Rapid traverse to point C to retract the cutting tool from the workpiece.
4 Point C Point D
Rapid traverse to the position where the turret head is rotated.
Center work operation:

If the cutting tool interferes with the tailstock, move the Z-axis first when bringing
the cutting tool near the workpiece. Then move the X-axis to the cutting start point.
3. G01 Moving the Cutting Tool Along a Straight Path Cutting Feedrate

By specifying the G01 command, the cutting tool


is moved along a straight line to cut a workpiece.

The required feedrate is specified with an F code


by the distance the cutting tool should be fed
while the spindle rotates one turn, or the distance
to be fed in one minute.

<Command format>

G01 X(U)_ Z(W) F


 G01 ............Calls the linear interpolation mode.
 X, Z ............Specifies the cutting target point.
The coordinates are specified in absolute values.
 U, W ...........Specifies the cutting target point.
The coordinates are specified in incremental values in reference to
the current position.
 F .................Specifies the feedrate.
 In the G99 mode, the feedrate is specified in "mm/rev".
FO.2 ............0.2 mm/rev
 In the G98 mode, the feedrate is specified in "mm/min".
F200 ...........200 mm/min

NOTE: 1) Once the G01 command is specified, it remains valid until another G code in
the 01 group is specified. G00, G02, and G03 are examples of G codes
in the 01 group. G codes that remain valid until another G code in the same
group is specified are called modal G codes. The G code groups are
given in 1, "G CODE LIST".
2) The programmed feedrate is adjustable by using the feedrate override
switch on the machine operation panel.
3) The feedrate data is "0" until an F code is specified.
If the axis feed commands are read when a program is executed, the
machine will not operate, unless an F code displayed. In this case, an alarm
message will be displayed.
4) When the power is turned on, the NC will be in the G99 (feed per
revolution) mode.
EXAMPLE
To use the G01 mode for axis feed along the path A B C D E.

1 To point A
Rapid traverse to a point near the workpiece
2 Point A Point B
The cutting tool is moved at a feedrate of 2.0 mm/rev.
3 Point B Point C
The workpiece is cut at a feedrate of 0.2 mm/rev. The programmed feedrate 0.2
mm/rev remains valid up to point E.
4 Point C Point D
5 Point D Point E
6 Point E Point F
Rapid traverse to point F to retract the cutting tool from the workpiece.
7 Point F Point G
Rapid traverse to the position where the turret head can be rotated.
4. G02, G03 Moving The Cutting Tool Along Arcs at a Cutting Feedrate

By specifying the G02 or G03 command,


the cutting tool is moved along an arc to cut
a workpiece.

G02 .............Calls the circular interpolation mode in the


clockwise direction.
G03 .............Calls the circular interpolation mode in the
counterclockwise direction.
X, Z ..............Specifies the end point of the arc in absolute values.
U, W ...........Specifies the distance, in incremental values, from the start point to the end
point of an arc.
I ...................Specifies the distance, in a signed value, from the start point of the arc to the
center of the circle in the X-axis direction. The value shou be specified as
a radius.
K .................Specifies the distance, in a signed value, from the start point of the arc to the
center of the circle in the Z-axis direction.
R ..................Specifies the radius of the arc.
F ..................Specifies the feedrate.
 In the G99 mode, feedrate is specified in "mm/rev".
F0.2 ……….. 0.2 mm/rev
 In the G98 mode, feedrate is specified in "mm/min".
F200 ………. 200 mm/min
NOTE: If an R command and a pair of I and K commands are specified in the same block,
the R command is given priority and the I and K commands are ignored.
EXAMPLE

1 To point A
The programmed feedrate 0.2 mm/rev remains valid up to point E.
2 Point A Point B
3 Point B Point C
A clockwise arc wit a radius of 3 mm is defined.
4 Point C Point D
5 Point D Point E
A counterclockwise arc with a radius of 5 mm is defined.
5. G50 Setting the Spindle Speed Limit

The spindle speed limit for an automatic


operation is set with the G50 command.
In the G96 (constant surface speed control)
mode, the spindle speed increases as the
cutting tool approaches the center of the
workpiece. Near the center, it will reach the
allowable maximum speed of the machine.
In this case, the chucking force, cutting force,
and centrifugal force of the workpiece cannot
be balanced to hold the workpiece securely
in the chuck. The workpiece may fly out of
the machine and cause a serious accident.

To ensure safety, the spindle speed limit should


be set with the G50 command. If the
calculated speed exceeds this value, the
spindle speed will be clamped at the
specified limit.

The G50 block should be specified at the


beginning of a program.

<C om ma nd for m a t>


G50 S__;
 G50…... Calls the mode to specify the spindle speed limit for
automatic operation.
 S …….. Specifies spindle speed limit (min-1).

NOTE: 1) When a program is written in the G96 mode, the spindle speed limit must be
specified in the G50 block before entering the G96 mode.
2) For a program written in the G97 mode, designation of the spindle speed limit
using the G50 command is ignored.

G50 S2000;
G97 S2500 M03; The spindle rotates at 2500 min-1.

3) The spindle speed override function remains valid if the limit speed is set by
"G50 S_;"
The spindle speed override setting must be smaller than 100%.
EXAMPLE

To specify the spindle speed limit for facing operation:

1 The spindle speed limit for automatic operation is set to 2000 min -1.
2 A cutting speed of 200 m/min is specified.
The spindle speed is controlled to maintain the programmed cutting speed.
3 - 5
The facing operation is carried out toward the center (X0). Near the center, the
machine will reach its allowable maximum spindle speed. However, since the spindle
speed limit of 2000 min -1 has been specified in the G50 block, the spindle
speed is clamped at the specified speed.
6. G96 Maintaining a Constant Surface Speed

The G96 command is used to call the mode to


maintain a constant surface speed. The
surface speed is the distance the cutting tool
moves along the workpiece surface (periphery)
per minute.

When the cutting speed is specified with the


G96 command, the spindle speed is
automatically controlled to maintain the
constant surface speed, as the cutting
diameter varies. This constant surface speed
control is used to maintain a constant cutting
resistance.

For example, if the cutting speed (V) is specified at 100 m/min to cut a 30 mm diameter
workpiece, the spindle speed is calculated as indicated below.

N=

N=
N = 1061 (min-1)

Generally, the standard cutting speed is determined according to the material of the
workpiece and cutting tool.

<Command format>
G96__S;
 G96 ............Calls the constant surface speed control mode.
 S .................Specifies the cutting speed (m/min).

NOTE: In the G96 (constant surface speed control) mode, the spindle speed changes
as the cutting tool moves in the X-axis direction. In a facing operation, the
spindle speed increases and reaches the maximum allowable spindle speed to
maintain the constant cutting speed, as the cutting tool approaches the
center. This constitutes a hazardous situation since the workpiece may fly out of
the chuck. To ensure safety, it is necessary to set the spindle speed limit for the
constant surface speed control using "G50 S_;" before entering the G96 mode.
The spindle speed limit should be selected from the lowest speed among the
allowable maximum speeds of the spindle, chuck, and fixture.
EXAMPLE
To use the G96 mode for facing operation:

1 The spindle speed limit for an automatic operation is set to 2000 min-1.

2 The turret rotates to index tool No. 2.

3 The spindle starts rotating forward at a speed to provide a cutting speed of 120
m/min.

4 Positioning is carried out at X110.0 Z10.0.


N= (min-1)
At this position, the spindle rotates at 347 min-1 in the forward direction.,

5 Positioning is carried out at ZO at a rapid traverse rate.

6 Facing
The workpiece end face is cut at 0.2 mm/rev up to the center of the
workpiece. To maintain the constant cutting speed, the spindle speed increases as
the cutting tool approaches the center (X0). However, the spindle speed limit of
2000 mini has been specified in the G50 block, the spindle speed is clamped
at the specified speed.
7. G97 Maintaining a Constant Spindle Speed
The G97 command is used to call the mode in
which a constant spindle speed is maintained.
During automatic operation, the spindle rotates at
the programmed speed.
N=
N : Spindle speed (min -1)
V : Cutting speed (m/min)
D : Cutting diameter (mm)
: Circumference constant

For a thread cutting operation, always specify the G97 command to maintain the
constant spindle speed. During the thread cutting operation, the thread is cut
gradually by changing the cutting depth for each thread cutting path while
maintaining the start point of the thread. Therefore, if the spindle speed is not kept
constant, the start point shifts in each thread cutting cycle making constant lead
thread cutting impossible.

The G97 command is also specified for machining a straight workpiece. Of


course, the G96 mode may be used for such operation, it will cause a longer cycle
time since the NC checks spindle speed at all points from the start to end point of
cutting if the spindle speed is controlled according to the diameter being cut.

<Command format>
G97 S__;
G97 ........Calls the constant spindle speed command mode.
S ............Specifies the spindle speed (min-').

NOTE: 1) In the G97 mode, the spindle speed limit specified with the G50
command is ignored.
Example:
G50 S1500;
G97 S2000 M03;
The spindle rotates at 2000 min-1 and the spindle speed limit (1500
min-1) is ignored.
2) G96 S100;

G97;

If the spindle speed control mode is changed from G96 to G97 without
a spindle speed command (S code) specified for the G97 mode as
indicated above, the spindle speed obtained in the block preceding the
G97 block is used as the spindle speed.

EXAMPLE
O.D. thread cutting:

1 The turret rotates to index tool No. 4.


2 The spindle starts rotating forward at 1000 min-'.
3 Positioning is carried out at X40.0, Z10.0 at a rapid traverse rate.
Coolant is discharged.
4 Chamfering is carried out.
5 The G92 thread cutting cycle is executed.
6 The thread is cut gradually until the thread diameter reaches 27.3 mm.
7 The cutting tool returns to the position where the turret head can be rotated.

8. G04 Suspending Axis Feed (Dwell)


The G04 command is used to suspend axis
feed during automatic operation by the period
specified in the program. This function is called
the dwell function, and is used in operations
such as the grooving operation.
By specifying the dwell function at the bottom of
the groove cut, axis feed stops there. The
spindle keeps rotating if axis feed stops. By
rotating the spindle for more than one turn, the
bottom of the groove can be finished to improve
accuracy.

NOTE: 1) A decimal point is not allowed when address P is used to specify the
duration of the dwell period.
Dwell for 1.5 seconds…….. G 0 4 P 1 5 0 0 ;
Dwell for 2.3 seconds………G 0 4 P 2 3 0 0 ;
2) Programmable dwell period is 0.001 to 99999.999 seconds.
3) The dwell function is valid only in the specified block.
4) Dwell period per rotation of the spindle is calculated as follows:
60 (sec)
t (sec) =
Spindle speed (min-1)
5) An alarm occurs if a T command is written in the G04 block.
EXAMPLE

To cut a 5 mm wide groove:

1 To point A
Rapid traverse to position the grooving tool to point A.
2 Point A Point B
Grooving up to point B.
3 At point B
Dwelling for 0.1 seconds at the bottom of the groove. The period required for the
spindle to make one turn is calculated as indicated below if the spindle speed is 800
min-1.
60 (sec)
Period (sec) = = 0,075 (sec)
800 (min-1)
To finish the bottom of the groove, it is necessary to suspend axis feed for a period to
allow the spindle to rotate more than one turn; the dwell period should be set to 0.1
seconds.
4 Point B Point A
Returning to point A at the programmed feedrate.

9. G98, G99 Setting Feedrate Units


Axis feedrate units are determined by specifying
the following two G codes:

G98
The G98 command calls the mode in which
axis feedrates specified by F codes are
interpreted in units of mm per minute. This
mode is used when the bar feeder, the pull-
out finger, or the rotary tool is used.

G99
The G99 command calls the mode in which
the axis feedrates specified by F codes are
interpreted in units of mm per revolution.
This mode is used for general turning
operations such as O.D. cutting, I.D. cutting,
and thread cutting.

NOTE: 1) The G98 and G99 commands are modal. Therefore, once the G98
command is specified, it remains valid until the G99 command is specified, or vice versa.
2) When the power is turned on, the G99 (mm/rev) mode will be set.
EXAMPLE 1

O.D. cutting operation :

1 Since the G99 command is specified, the F codes are interpreted in units of mm/rev.
As indicated in the above program, the G99 command may be written in a program
to set the mm/rev mode. However, the G99 command is not usually written in a
program because the G99 mode is automatically established when the NC is reset
by the M02 or M30 command or when the power is turned on.
EXAMPLE 2

The bar work program using the pull-out finger.


The workpiece is pulled out of the chuck with the pull-out finger mounted in the turret while
the spindle is stopped.
1 The G98 command establishes the mm/min mode. The feedrate commands given in
the following blocks are interpreted in units of mm/min.
2 The pull-out finger moves to the bar stock at the feedrate of 500 mm/min. The chuck
unclamps the bar stock.
3 The bar stock is pulled from the chuck at 500 mm/min.
4 The chuck clamps the bar stock.
5 The pull-out finger releases the bar stock.
6 The mode changes from the mm/min mode to the mm/rev mode.
7 The feedrate commands given in the following blocks are interpreted in units of
mm/rev.
8 The part program is executed continuously.
10. G40, G41, G42 Tool Nose Radius Offset

The tool nose does not have a sharp edge but is rounded as
illustrated on the right. Therefore, the point of the tool nose used
for programming is offset from the actual cutting point. The tool
nose radius offset function is used to eliminate dimensional errors
caused by this difference.

If taper or arc cutting is programmed without taking into


consideration the tool nose radius, overcut or undercut
will occur.

The G41 and G42 commands are specified in


a program to automatically eliminate this
overcut or undercut by offsetting for the tool
nose radius.

For details on the G40, G41 and G42 commands, refer to Chapter D, "AUTOMATIC
TOOL NOSE RADIUS OFFSET".
EXAMPLE

1 To Point A
Positions to X50.0, Z10.0 at rapid traverse.
Since the G42 command is specified, the tool nose radius offset function becomes
valid from this block.
2 Point A Point B
The cutting tool is moved at a feedrate of 1.0 mm/min.
3 Point B Point C
The cutting tool is moved to Z-30.0 at the rate of 0.2 mm/min.
4 Point F Point G
The cutting tool retracts to a point (U1.0, Z10.0) at a rapid traverse.
This block is the cancel mode block because the G40 command is specified in this
block.
11. G32 Thread Cutting

The G32. command is used to carry out the


thread cutting cycle between points B and C.

In a thread cutting cycle, threads are not cut


in a single path, they are formed by repeating
the cycle in several paths. If the G32
command is used for thread cutting, all the
tool paths necessary to form the required
threads must be written in a program
repeatedly.

Generally, thread cutting is carried out by


specifying the G92 command that calls the
thread cutting cycle. In the G92 mode, the thread
cutting cycle is repeated by simply specifying the
diameter where the cycle is to be carried out.
For details on the G92 cycle, refer to 12, "Thread
Cutting Cycle" in this chapter.
<Incomplete thread portion>

At the start and end of axis feed, axis feed is automatically accelerated or decelerated
to avoid shock to the machine. Consequently, inaccurate thread leads are generated
where thread cutting starts and ends. These areas are referred to as incomplete
thread portions.

To explain incomplete thread portions more


completely, thread cutting from point A to point B
is used as an example.

When thread cutting starts from point A, axis


feed is accelerated causing incomplete
thread portion for L1. Similarly, incomplete
thread portion is generated for L 2 because
axis feed is decelerated at point B.

Therefore, to obtain the thread length of L, it is


necessary to carry out thread cutting in the range
of (Li + L + L2).

<Calculating the incomplete thread cutting portion>

The incomplete thread cutting portions are calculated using the following formula.
L1 = L1 = Incomplete thread portion (at the start of thread cutting) (mm)
L2 = Incomplete thread portion (at the end of thread cutting) (mm)
L2= N: Spindle speed (mine)
P: Lead (mm)

In actual programming, the incomplete thread portions should be taken a little larger
than the calculated lengths to avoid interference between the cutting tool and
workpiece and to allow for a margin of safety.
EXAMPLE 1
Straight thread cutting:
00001;
G00 T0404;
G97 S1200 M03;
X60.0 Z10.0;
X30.0;
G32 Z-52.0 F2.0;
G00 X60.0; Z10.0;
X29.0;
G32 Z-52.0;
G00 X60.0;
Z10.0;
X28.5;
G32 Z-52.0;
G00 X60.0;
Z10.0;
X28.0;
G32 Z-52.0;
G00 X60.0;
Z10.0;
X27.8;
G32 Z-52.0;
G00 X60.0;
Z10.0;
X27.62;
G32 Z-52.0;
G00 X60.0;
Z10.0;
X150.0 Z50.0;

NOTE: The thread cutting depth and the number of cuts are indicated in the table
given on Page B - 43. For the actual thread cutting operation, use a
thread gage to measure the dimensions since the values in the table
are only for reference.
EXAMPLE 2
Tapered thread cutting (PT-2 ½) :
00001;
G00 T0404;
G97 S424 M03;
X80.0 Z8.0;
X73.59;
G32 X75.84 Z-28.08 F2.3091;
G00 X80.0;
Z8.0;
X72.59;
G32 X74.84 Z-28.08;
G00 X80.0;
Z8.0;
X71.59;
G32 X73.84 Z-28.08;
G00 X80.0;
Z8.0;
X70.7;
G32 X72.95 Z-28.08;
G00 X80.0;
Z8.0;
X70.63;
G32 X72.88 Z-28.08;
G00 X80.0;
Z8.0;
X150.0 Z100.0;
EXAMPLE 3

Scrolled thread cutting on face

An example program to carry out thread cutting three times with a 1 mm depth of
cut for each cycle.

00001;
G0 0 T0 4 0 4 ;
G97 S318 M03;
X106.0 Z20.0;
Z-1.0;
G32 X68.0 F4.0;
G00 Z20.0;
X106.0;
Z-2.0;
G32 X68.0;
G00 Z20.0;
X106.0;
Z-3.0;
G32 X68.0;
G00 Z20.0;
X106.0;
G00 X200.0 Z100.0 M05;
M30;
<Determining the spindle speed>
1) Limits due to rapid traverse rate

Spindle speed for thread cutting is determined to be 318 min-1.

NOTE: The above numerical values are only for reference. Depending on the
selected cutting conditions, the cutting load may become excessive. If a servo
alarm occurs, change the cutting conditions.

<Calculating incomplete thread portions>

When writing a program, L1 and L2 should be longer than the calculated theoretical
values. Therefore, Li and L 2 should be set to 3 mm and 1 mm, respectively.

<Precautions when using the G32 thread cutting cycle>

1) During the thread cutting operation, the feedrate override* setting is ignored.
*Override: The feedrate override function is used to change the feedrate with the
switch on the operation panel.
2) Thread cutting must be carried out while the spindle rotates at a fixed speed.
Therefore, specify the G97 command to carry out thread cutting.
3) The feedrate during thread cutting is limited by the value calculated in the following
formula.

(Rapid traverse rate varies depending on the machine models.)


N: Spindle speed (mini)
R: Rapid traverse rate (mm/min)
P: Lead (mm)
12. G92 Thread Cutting Cycle

The G92 command is used to carry out the


thread cutting operation. In the thread cutting
cycle called by the G92 command, the tool
paths A -- B - C -* D is treated as the cycle; by
simply specifying the diameter at which the
thread is cut, the cycle is repeated to finish the
required thread.
<Incomplete thread portion>

At the start and end of axis feed, axis feed is automatically accelerated or decelerated
to avoid shock to the machine. Consequently, inaccurate thread leads are generated
where thread cutting starts and ends. These areas are referred to as incomplete
thread portions.

To explain incomplete thread portions more


completely, thread cutting from point A to point B
is used as an example.

When thread cutting starts from point A, axis


feed is accelerated causing incomplete
thread portion for L1. Similarly, incomplete
thread portion is generated for L 2 because
axis feed is decelerated at point B.

Therefore, to obtain the thread length of L, it is


necessary to carry out thread cutting in the range
of (Li + L + L2).

<Calculating the incomplete thread cutting portion>

The incomplete thread cutting portions are calculated using the following formula.
L1 = L1 = Incomplete thread portion (at the start of thread cutting) (mm)
L2 = Incomplete thread portion (at the end of thread cutting) (mm)
L2= N: Spindle speed (min -1)
P: Lead (mm)

In actual programming, the incomplete thread portions should be taken a little larger
than the calculated lengths to avoid interference between the cutting tool and
workpiece and to allow for a margin of safety.
EXAMPLE 1

O.D. thread cutting :


3 The G92 thread cutting cycle is executed.
 X49.3 ...Specifies the diameter where the first thread cutting cycle is executed.
 Z-28.0 . Specifies the Z coordinate value of the thread cutting end point,
including an incomplete thread length (L2) of 1 mm.
 F1.5 .... Lead

4 The thread cutting cycle is executed in the specified diameters.


The final thread cutting cycle is executed at X48.22.
EXAMPLE 2

I.D. thread cutting


<Precautions when using the G92 thread cutting cycle>
1) During the thread cutting operation, the feedrate override* setting is ignored.
* Override: The feedrate override function is used to change the feedrate with the
switch on the operation panel.
2) If the feed hold switch is pressed
while in the G92 thread cutting cycle, the cutting tool immediately retracts from
the workpiece along the chamfering path and returns to the start point in the order
of the X-axis and Z-axis.
This function is called the retract function.
3) Thread cutting must be carried out while the spindle rotates at a fixed speed.
Therefore, specify the G97 command to carry out thread cutting.
4) The feedrate during thread cutting is limited by the value calculated in the following
formula.
(Rapid traverse rate varies depending on the machine models.)
N: Spindle speed (min-1)
R: Rapid traverse rate (mm/min)
P: Lead (mm)

You might also like