Professional Documents
Culture Documents
programming
-- CNC Automatic Lathe --
Ver. 2.0
(Nov. 2006)
HANWHA TechM
Machine Tool Division (Customer satisfaction team)
6-1
Our HANWHA TechM is manufacturing and selling the machine as like below.
There is excise part at the end of each chapter in order to review it. Someone will be
difficult to solve it because they are first learned programs, but it is enough to solve the
excise part if you learned fully each chapter.
NC(Numeric control or its unit) is electronic device, some of logical cells and memory
cells are consisted in this device and this device will do something if you give command
by program.
CNC machine is worked by CNC program that has to use programming language. It’s
says them with NC language.
CNC machines are consisted of CNC unit of brain, servo device as arms and legs.
Servo is descended from Greek. The mean of servo in Greek is servant. Main parts of
servo device are servomotor is controllable.
CNC machine is available solenoid valve and pneumatic cylinder with servo device.
CNC auto lathe of HANWHA is consisting of CNC with servo device and pneumatic
device.
There is many company of CNC in the world but we provide FANUC CNC and
SIEMENS CNC in our machine. This textbook describes a machine installed with
FANUC controller.
Data input or output from CNC machine can use RS232 or a memory card, direct
input by manual.
6-3
Head stock sliding machine is moving the main spindle to material direction (Z-axis
direction). The feature of this system is existence of a Guidebush. A guide bush guide a
material and tools touch with material at the near place of guide bush.
2) Bar feeder
This is material supplying machine. Bar feeder is sure to use with an automatic lathe.
Control axis number shows a machine capacity except rotating axis. Example, we
says as three axis machine if the axis have three as ‘X, Y, Z’ in the machine. In case of
XD20H is seven-axis machine. X1 axis and Z1, Y, C1, X2, Z2, C2 are called moving
axis. The name of each axis is refers to page 3-2.
Most of automatic lathe has sub spindle with main spindle. The sub spindle is
independently other working during main spindle working. Cutoff is working at the main
side while the sub spindle is clamping the material. This result make good cutting face
and cut parts extract from sub chuck at next cycle process.
A main spindle and a sub spindle use chuck as name a collet chuck. Main collet
and sub collet shape is same but there are several grooves inside main collet for
clamping power up. There is use to say as guide bush at the guide bush unit. They can
divide according to material size and shape, inner diameter.
Our machine available milling function and drilling that is driven tool at material
direction and cross. This function is added at the general lathe.
6-5
Below pictures are described the name of each part of machine and help to you to
understand this textbook. It has different name according to machine type.
Following picture is coordinate system of each tool post group and each designated
tool post number to calling. Arrow mark of axis is written to “+” direction and this is
coordinate system for programming based on tool. Therefore a headstock and a
material are moved to reverse against arrow mark.
6-9
1) 2 path control
The feature of our machine has sub spindle and this means sub spindle is working by
back tool just before machined parts simultaneously and ejects while main spindle is
working. And then, the sub spindle is move to the guide bush direction for pick up the
machined parts when cut off after head1 side is working done. A Machining by sub
spindle is working separately with main spindle, so it is working by other program.
Controller is divided main spindle part and sub spindle part. We call main spindle part is
Head1 and sub spindle part is Head2.
Following picture is shown Head1 side tools.
Offer center drill belongs to Head2 side but machining target is the material of Head1.
Such kind of example attached at the appendix.
10
2) Program structure
Program is collection of each block. The block is consisted of several words and it
means one line in the program. Each word is consisted one Alphabet with figure.
Program example)
M10 ;
G0 X40.0 Z-1.0 ;
M3 S2500 ;
G4 P100 ;
In the above example ‘;’ is EOB(END OF BLOCK) that is means end of each block
and divide with next block.
Some of figure has to decimal point but any figure never to write decimal it is
depends. The detail condition will be described as follows.
The program is processing as ‘program start → each process → end of process’.
Used axis in the machine is as like previous described picture. A rotating axis is
different concept as main, sub spindle. Rotating axis in the head1 and head2 side can
add C-axis. (C-axis is contour control axis and this is an option)
When indicating an axis name from inside program, the number which shows the
location of the head does not write but only one alphabet letter write. Z1-axis in the
head1 is written ‘Z’ as upper program and figure is means coordinate position. Z1-axis
in the head1 is written as 'Z’ in the program, the figure (-1.0) is coordinate position.
The axis name using in the program is X, Y, Z, C. And followed axis name is using
when related movement is expressing.
X ←→ U Y ←→ V Z ←→ W C ←→ H
6-11
Program origin is the origin of coordinate system (X0, Z0, Y0) when make the
program.
* To easy explain the concept, face cutting part is omitted in the above picture.
Origin line is hypothetical line and it is contacted with the bottom of outer bite.
In case of above picture had been cutoff state for one part finished or cut part for
good face. Above condition after cutoff is for the program start.
Remark) Dimension of X-axis direction is diameter value.
Example, if 2.0mm distance from center then X-axis position is X4.0.
12
The value for tool location shows related location against material is coordinate
position and it becomes target of rapid traverse and cutting traverse. Command of
coordinate value is consisted a moving axis name with figure. There is absolute
method and incremental method when coordinate position is commanded.
Following of ① and ② is each command usage. And then, G00 is rapid traverse
of axis. (‘4-1) refers to rapid traverse G00’. )
6-13
Traverse means one or more axis move from present location to commanded
position. It has rapid and cutting traverse. Traverse in here means cutting traverse.
Traverse speed is commanded using F address. This address is corresponding with
G01 code. This code is possible to omit. If it omits, traverse speed has effective as the
previous one.
G98 or G99 code declares to use F address’s value of traverse per revolution or
traverse per minute. If it's declared one time, its block or after is effective until G98 or
G99 designate again.
* Until other code declare, G98 and G99 is regarded as same group. It is continuously
effective if one time designated. We call this a MODAL code.
G98
G99 G00
G01
G02
G03
14
CNC machine is used several tools that it’s installed at the tool post. It's located at their
place to select designated tool, if it is called the tool post. The location is changed
depend on offset value. Each tool post has different position.
T△△□□
△△ : Tool number
□□ : Offset number
By above command its tool move rapidly to compensated dimension as well as offset
value. The tool number says that used tool and offset number is usd as same tool
number.
Normally tool and offset number use same as example T0202 but it is need one more
offset at the same tool then use another one.
If it is not need tool offset then use ‘00’ instead of offset number. Example, we call the
sub spindle for ‘T2100’.
Screen search: X & Z-axis offset is pressed of ‘OFFSET’ button; Y-axis offset is pressed of
‘CUSTOM” button.
6-15
is compensated not only small dimension for tool set up but also inadequate dimension
because of tool wear. Geometric offset is shown as ‘G’ in the screen and wear offset is ‘W’.
When geometric offset input/setting, be careful to applying of Z-axis offset of HEAD1 because
of head-stock spindle type. In this case can’t use ‘MEASURE’. Please do input directly a figure.
Back tool: When back tool set up, input big amount distance (about 200mm) into geometric
offset of back tool post as T22~T27 before operation. It is prevent for crashing during machine
operation.
16
6-17
As previous said that the rapid traverse transfers to the target position by maximum
speed. Rapid traverse code is G00 or G0. Speed is decided by parameter. It is set
maximum speed when delivery time. Case of slant traverse first move until forty-five
degrees and next remained distance is moved straight along to axis.
G00 X10.0 Z20.0; Two axis together move rapidly from present to X10.0 and Z20.0
* Upper example pictures are assumption that is started from present location X20.0, Z-0.5.
18
G01 Z5.0 F0.05; It’s moved to Z5.0 with the F0.05 (mm/rev) cutting traverse.
G01 X10.0 Z12.0 F0.05; It’s moved to (X10.0, Z12.0) with the F0.05 cutting traverse.
6-19
G03
G02
Program Ex.)
20
Follow is each address usage and all are designated 0.5 second.
G04 U0.5 ;
G04 X0.5 ;
G04 P500 ;
Example, when a tool come at the corner during outer diameter turning, the corner
shaper didn’t make well if give not dwell time. Dwell is make minimum revolution hold
moving at the corner.
G04 waiting is called DWELL.
Above three case addresses means waiting time and it is not related coordinate
system or traverse distance. And there is no limitation to use anyone of three kind of
codes. Use it your favorite.
6-21
From here explain about G32 code of threading on the foundation. Threading can
not one passing process, it have to pass several times its path with different depth.
When the threading, normally both end is occurred uncompleted thread for NC
character. Therefore it has to cut longer than the actual length. Feedrate (Feed % dial
and function) is ignored during G32 working. G32 code is effective in G99 mode.
<예>
Lead = 1.25 G00 X11.0 Z-2.0 ;
δ1 = 2 mm X7.0 ;
δ1 = 1 mm G32 Z9.0 F1.25 ;
1time cut = 0.5 mm G00 X11.0 ;
Z-2.0 ;
X6.0 ;
G32 Z9.0 F1.25 ;
G00 X11.0 ;
22
G92 is thread cut cycle and convenient than G32. Operator like this than G32 but
special case as like taper and straight are together connected thread must use G32
code.
6-23
The nose of tool is normally round. Therefore, machined dimension become bigger or
smaller than the actual size after machining. This case uses these codes.
OFFSET
NO. X Z R T
01 0.000 0.000 0.000 0
02 0.000 0.000 0.000 0
03 0.000 0.000 0.000 0
04 0.000 0.000 0.000 0
05 0.000 0.000 0.000 0
06 0.000 0.000 0.000 0
07 0.000 0.000 0.000 0
08 0.000 0.000 0.000 0
Nose R size is inputted in the R parts of related offset number as upper right picture.
Nose direction number is inputted in the T. There is no difference input in the
geometric offset or wear offset screen. Offset value has to input which one place.
24
A. Outer turning
T0202 M3 S3000 ;
G0 Z-2.0 X20. ;
G41 ;
G0 Z-0.5 X12.0 ;
G99 G1 X13.6 Z0.3 F0.03 ;
Z4.0 F0.06 ;
G4 P200 ;
X15.6 F0.05 ;
X16.4 W0.4 F0.03 ;
G40 ;
G0 X60.0 ;
;
B. Inner boring
T1414 M3 S3000 ;
G42 ;
G0 X8.8 Z-0.2 ;
G1 X8.0 Z0.2 F0.02 ;
Z4.0 F0.02 ;
X5.0 F0.03 ;
G40 ;
G0 Z-2.0 ;
;
6-25
θ
각도 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85
2fx .017 .032 .047 .060 .073 .085 .096 .107 .117 .127 .137 .146 .156 .165 .174 .183 .191
fz .096 .091 .087 .082 .078 .073 .068 .064 .059 .053 .048 .042 .036 .032 .023 .016 .008
※ However, R=0.1
If it is difficult to understand the program same days ago or other person, substitute
formula for figure.
Just that, input X[10-0.085*4] instead of X9.66 but must use ‘[ ]’.
Some case can not use G41/G42 because can not keep constant direction or smaller
difference of outer diameter. In this case we recommand this kind of method and
change to dimension in the program.
26
G50 is almost same as geometric offset but it is use in the program. Therefore,
direction is opposite with geometric offset.
It move coordinate system axis temporary and it has to re-shift after process end.
Program example
G0 X60.0 ;
G50 W3.0 ;
;
6-27
Precaution: For safety during set-up, has to use long distance of G50 W( ).
Ex: G50 W-200.0 ;
When wear offset used, this is same to input previous long distance. (p3-6)
28
Drill end depth: 21.5, Feed: 0.04, 1 time machining: 2.0mm, Dwell time after
machining: 0.5,
~
G83 Z21.5 Q2000 F0.04 P500 ; G0 Z-2.0 ;
G80 ;
T1212 M3 S2500 ;
G83 Z21.5 Q2000 F0.04 P500 ;
G80 ;
;
Side drilling cycle G87
Tapping cycle G184/G185 is the code when it is make rigid tapping at the front tool
post and sub spindle side, back driven tool, cross driven tool. G184 is used right hand
tap, G185 is left hand tap. Under ‘D’ is dwell time to change revolution.
T1515 ;
G184 Z12.0 F1.0 S600 D1.0 ;
;
6-29
12) Machining origin return for Head1/ Coordinate system initiation G300, G150
G300 and G150 are explained that they have origin return or initiation meaning. The
location of G150 is come to just next block of G300.
The end of start of machining cycle is cutoff finish position, so talk little more strictly
says, X and T in G300 are a little bit formal. X in G300 is machine coordinate position
of X-axis of cutoff state. T is cutoff bite tool number and normally use as T0101. ( When
it is commanded to G300, compensation number 01 of T0101 is applied only Y
compensation value. )
Z value in G300 is Z-axis direction stroke to one cycle for parts machining.
X-axis is machine coordinate position: In general case, X-axis direction of cutoff tool did not have
geometrical compensation so program coordinate position is same to machine coordinate position.
X-axis goes to down to X-2.0 that the reason is to clean the cut face because insert tool’s shape has
some angle and not to make uncut part. If special tool is installed for cutoff and it needs 10.0mm
compensation, it will be X8.0 instead of X-2.0 in the G300 block.
30
Designated Z-axis coordinate position in the program become as like the above
picture compared with actual moving. So then, designated position in the G300 block
becomes Z0.0. “Z+” move advanced and Z- is move to back.
If there is block of ‘G150 Z-0.2’, we think there is 0.2mm spare face cutting allowance.
But if ‘G150 Z0.2’, cutting allowance is bigger that it becomes 0.2mm retract. Such
value is occurred relative position outer bite with cutoff bite. In the program, to
designate to “G150 Z-0.2”.
6-31
G310 is making to initial position of sub spindle for cycle start. Most of usage is follow.
‘Z210.0’ is set up the Z-axis position. It is normally maximum stroke. ‘T2100’ is X-axis
position and sub spindle calling code. That time of sub spindle move to centerline of
guide bush.
Default set up condition is G99. G99/G98 can use other G-code together in one
block.
32
This is jump to designated sequence number according to the GOTO behind number.
Example of program
If there is ‘GOTO 50’ after N10 process executed, jump over N20 and go to the N50
and execute from this block. GOTO can jump in advance block or back.
6-33
O2002 ;
M92003 ;
G0 G18 G40 T0 ;
M11 ;
G4 X0.5 ;
( ) X-2.0 Z42.0 T0101 ;
G150 Z-0.2 ;
M10 ;
G0 X60.0 Z-2.0 ;
;
T0404 M3 S2000 ;
G0 X12.0 Z-2.5 ;
M12 ;
( ) X7.5 Z6.5 F1.0 ;
X7.06 ;
X6.8 ;
X6,7 ;
34
T0303 ;
G0 X22.6 Z0.0 ;
( ) S200 ;
G50 S6000 ;
G1 X-1.0 F0.05
G0 X15.6 Z-0.2 ;
G1 X16.4 Z0.2 F0.05 ;
Z5.0 F0.08 ;
( ) X0.2 ;
X19.4 F0.08 ;
G1 X20.0 W0.3 F0.05 ;
Z11.2 F0.1 ;
( ) P200 ;
X21.6 F0.08 ;
U1.0 W0.5 F0.05 ;
G97 S2000 ;
G0 X60.0 ;
;
6-35
36
Maximum RPM of main spindle is 8,000 RPM / 10,000 RPM / 12,000 RPM that is
difference depend on machine type. Sun spindle is Max. RPM is 8,000 RPM.
Driven tool maximum is 4,000RPM including cross drill unit.
6-37
T2800 ;
M17 ;
M4 S200 ;
G0 Z150.0 ;
M21 ;
M78 ;
G4 P500 ;
( );
M18 ;
G28 W0. ;
;
2. Following is cross drilling process at the Head1. Fill out the blank.
M05 ;
;
T0707 ;
( );
M23 S2500 ;
G50 W-16.0 ;
G0 X10.6 Z12.0 ;
G1 X7.5 F0.03 ;
G4 P200 ;
G0 X60.0 ;
M25 ;
M51 ;
G50 W16.0 ;
;
38
[HEAD1] [HEAD2]
T0101 M3 S3000 ; T2100 ;
M550 ; M550 ;
M56 ; G0 Z35.0 ;
G0 X13.4 Z45.0 ; G98 ( ) Z22.0 F2000 ;
( ); M560 ;
G4 P500 ; ( );
M560 ; G28 W0 ;
M20 ; M580 ;
G99 G1 X-2.0 F0.03 ; M30 ;
M570 ;
M580 ;
M55 ;
M57 ;
M40 ;
M36 ;
M41 ;
( );
/ M92 ;
M96 ;
M97 ;
M30 ;
6-39
1) Preparation
Here we will study programming step by step using one parts example program. The
example component is as below drawing. It seems a little bit complicate but this can
understand to try it step by step. This example will make a program by XD20H machine.
40
After prepared all of chuck (Main/Sub chuck, Guide bush, Finger chuck), has to think
machining process according to drawing. And tools are prepared according to
machining process. Here let’s see just appropriate tools according to detail process.
A start and end of program are approximately similar. Let’s get see as follow.
Next is a start program pattern of Head1.
O0001 ;
M90001 ;
M7 ;
G40 G18 ;
/ M08 ;
M11;
G4 P500 ;
G300 X-2.0 Z32.0 T0101 ;
G150 Z-0.2 ;
M10 ;
G0 X50.0 Z-2.0 ;
;
O0001 ; Program number is O0001.
M90001 ; Start to O0001 of Head2.
M7 ; Auto check tool position and if it needs a cutoff, make an auto cutoff.
6-41
material is cut the face before auto cycle. Previous says that the end and start of cycle is a cutoff
finishing state. M7 code is make this automatically.
Before starting program, outer bite or cross tool (T01~T10) in the Head1 located near position of
material and it is started the cutoff working by M7 when the material is extruded as much as face
cut. But, if you want to use M7, it needs setting the parameter on the screen previously .
G40 G18 It makes initiate several kinds working mode. If there is not using
‘G41/G42’ or ‘G17/G19’ then can omit this block. G17/G18/G19 is
machining plane declaration. Default of Z-X plane is G18.
/ M08 Coolant on. But when block-skip is on then skip to another block. For
program check, if block-skip is on that you can see very well the
working condition because coolant did not blew when the cycle
executed.
M11 Collet chuck open.
G4 P500 It is need to give time to the bar feeder synchronized control working
time difference.
G300 Initial set position and movement.
X-2.0 X-axis coordinate position when a cutoff finished. This is also machine
origin. Most of case, this is correspond to absolute coordinate system
in used program. (Refer to p4-13)
Z32.0 Initial set position and movement. Z=25(Parts length)+2(Cutoff bite’ s
width with spare width)+5(spare length)
T0101 Tool number of the cutoff bite.
G150 Z-0.2: Set Z-axis position. Bites are used normally right side and position is
Z-2.0 when make the program. When you use a bite, you has to re-set
Z-position actually.
M10 Close chuck again.
G0 For next process, the tool is retracted. This is a rapid traverse.
X50.0 X-axis is rapid traversed approximately until this position. Sometimes
the tools come up more according to tool set up condition. When
called next tool, there is not to make trouble with other tool or tool post
is ok.
Z-2.0 This is made gap between material and tool to move the cutoff bite
when it retract because tool is contact with material.
42
O0001 ;
G40 G18 ;
G310 Z210.0 T2100 ;
;
G40 G18 Initiate several modes. It can omit not use among the program as G41
/ G42, G17 / G19.
G310 Return initial position.
Z210.0 This is maximum retracted position of Head2.
T2100 This is make to arrange with sub spindle center and guide bush center.
Above is head of head2 program. Follow is last process of program that was cutoff.
N10: Sequence number. This sequence number do not give any meaning to
the program but it‘s can easily understanding the process.
T0202 Call the tool T0202. There is installed outer bite.
M3 S3000 This means spindle revolution. RPM is 3,000.
6-43
Face cutting: Actual program origin of Z-axis is the place for face cutting. Face cutting is very
important because it is datum of parts dimension. If face cutting did not, parts total length will not
constant. It has to adjust that the Z-axis value in the G150 block is controlled to cut proper
quantity of face cutting from Z0.0 by outer tool when tool is installed. There is no standard for face
cutting but it needs 0.1~0.3mm cutting quantity. If you want to change the face cutting quantity,
change the Z-axis value in the G150. If less, compensation is “-“direction plus needed quantity
and exceed then “+” direction plus exceed quantity. If you want to 0.1mm increasing at the G150
Z-0.2, it will be G150 Z-0.3.
G99 This declares feeding method for G1 block and feed per revolution
mode. This mode is effective until G98 declaration.
G1 This is cutting mode G code. This G1 code is used cut for material by
tool.
X-1.0 X0.0 is center of material but cutting did over the center because a
tool end is not sharp when face cutting.
F0.05 This is feedrate. Face cutting is commanded 0.03~0.01 of feedrate
according to a material and a tool.
G0 Tool is retracted when the cutoff finished.
X50.0 This is retracted position of X-axis.
Z-2.0 Next process is drilling and Z-axis is prior retracted to prevent crashing
to the installed tool in the front tool post. It is meaning that the tool with
the material is making a gap by X-axis and Z-axis retreat.
Until now, it is face-cutting explanation. Don’t forget tool calling and material rotation
for machining. Material rotation has to prior command before all process as possible as.
44
A center drilling makes the point of guide for drilling. If a drill is bigger or material is
soft, that time can omit the center drilling.
6-45
To make M5 tap, it will prepare Φ4.3 drill. There needs calculation for 17.0mm depth
location to drill point. Roughly calculated the depth of triangle direction is the drill
diameter multiply to 0.3. Needed drilling depth will be L=17.0+4.3x0.3=18.3. If it need
more accurate depth demanded Z18.3, it has to repeat every time for adjusting the
depth if it is wrong. It also needs every time drill changes.
46
G0 Z-2.0 ;
(1) (2)
6-47
Chamfer quantity: Considering start position to finishing position, moving distance of tool is Z:
0.2-(-0.5) = 0.7, X: 5.5-6.9 = -1.4. It is resulted 0.7mm for chamfer. Actual chamfer is occurred at the
material. Material position is from Z0.0 and actual chamfer is become C0.2 as Z: 0.2-0 = 0.2. But it
is not accurate at the actual condition because of the nose R of tool. If it is made tool nose
compensation, the result will be better.
▶ ▶
(3) (4)
(4) G2 Circular interpolation G2 uses for R0.5 machining. The tool is moving
to clockwise direction.
X4.5 This means an end of radius. X: 5.5-0.5x2 = 4.5
Z6.0 This also means an end of radius of Z-axis. Z: 5.5+0.5 = 6.0
R0.5 This is a half of radius.
F0.02 This means feed rate for radius machining. In case of slant place
and radius decrease feed rate than X or Z direction.
Actually, tool nose is R0.2 but it is R0.7after machining. To compensate this as following,
Z5.7 F0.025 ;
G2 X4.9 Z6.0 R0.3 F0.02 ;
48
(5) (6)
5) Front Tap.
Next is tapping. The tap is installed at the T1111. It is installed into the normal holder
because of rigid tapping. The drill depth before tap is decided to consider that the tap
end shape is tapered. Tap approaching position is also decided to consider the tap
shape and incomplete thread potion. The tap has 14.0mm length of d3.0 on the
drawing, in here needs to drill to the 16.5mm.
▶ ▶
6-49
The tool use T0202 as previous N10 process. Tool nose R compensation is
considered as 0.2. For accurate dimension, the tool nose compensation tries to take
use the compensation table.
50
7) End-milling
Next will be make spanner seat by end-milling. T07~T10 of cross tools is cut for
material side face after main spindle stop. Main spindle is stopped by mechanical brake
or electrical brake after material rotating stop with M5 command. After main spindle
stop by M5, it is fixed by mechanical brake or with electrical brake. Mechanical brake is
M82 (release: M83) and electrical brake is M50 (release: M51). After M50 command
has to return angle origin that program block is ‘G28 H0’ or ‘G0 C0’.
If you want to more accurate position then need to use M82 additionally.
Mechanical brake system for main spindle is called ‘Main Spindle Indexing Unit’ or
‘Main Spindle Divide Unit’. This principle is that the assembled pulley to the main
spindle is fixed to push by pin with pneumatic cylinder. There is located on the head
6-51
Y0.0
52
M50: Main spindle clamping. Main spindle stopped already at the previous
process (N60).
G0 C0 Return to angle origin. Move to C0 position.
M82 Works mechanical brake.
M23 S2000 Cross tool rotating and RPM is 2,000.
G0: To approaching prepare. Picture (1).
X20.0: Approaching to the material (Ø10.0).
Y-7.0: Y-position for end-milling.
3.xx as picture. Consider as 4.0.
4.0+2.5+0.5(spare allowance)=7.0
Z14.0 Dimension on the drawing. This is
Coordinate position of end-mill.
X10.0 Move to cutting start position.
Picture (2).
G1 Cutting traverses.
6-53
If G50W13.0 is omitted, next process is not worked well because coordinated system is confused.
If your want do not use G50 coordinated shift, has to use geometric offset. This time has to omit
G50 of start of end of this block.
S2000 Grooving process is better to low RPM than normal bite machining.
RPM give effective to the groove’s appearance.
G0: Approach for grooving.
X13.0: Approach 0.5mm away from material outer diameter.
Z10.0: Position of groove.
54
9) Outer threading.
6-55
Next is tried to cross drilling using the cross drill unit. The cross drill holes are located
parallel with end-milled face. So the drilling direction is crossed each other. The end-
mill face is worked to C0 and C180.0 and the holes have to dilled at the C90.0 and
C270.0. Using the 90 degree center drill, both sides make the chamfers for holes.
Next is drilling to halves the material by Ø3.0 drill. It is enough to through the holes by
X0.0 drilling because of middle empty.
56
6-57
58
Head2 machining is working the part at the previous machined it. At this time is
simultaneously machined current Head1 side with previous parts of Head2.
The machining will be progress T24
of center drill and T25 drill, T26 tap.
The depth of center drill will try
4.5mm and drill will do Φ2.6.
6-59
T2424 Calling back side tool T2424. Sub spindle stop at the T24 position to
move to the X2 direction.
M3 S3000 Rotating sub spindle.
G0 Positioning to closed position by rapid traverse.
Z2.0 Go to 2.0mm away from tool. Tool move far away direction from guide
bush when direction is Z+. When you want to machining, you can use
Z- direction.
G99 This means the feedrate has to declare G99 before G1 starting in the
program properly.
G1 Start works by cut speed.
Z-4.5 Drilling to the 4.5mm depth.
F0.04 Feedrate (Feed per revolution)
G4 P100 Dwell.
G28 W0 Return to Z2 origin. Go to the end position of Z2. Don’t to write Z0 after
G28. Be sure to write W0.
T2525 Calling drill. Sub spindle stop at the T25 position.
M3 S5000 Sub spindle rotating command.
Z2.0 Approaching to closed position.
Z-9.0 Drilling to 9.0 depths. The end position of drill is empty because of
front Head1 side already worked.
F0.03 Feedrate is lower than other drill because it is small drill.
G28 W0 Sub spindle retracts.
M5 The sub spindle is stopped for use rotating tool T26.
T2626 Calling tool T26.
M50 Brake for sub spindle clamps. You can use M82-M83 additionally.
G184 Tapping cycle function.
Z-9.0 Tapping to 9.0 depths.
60
Next is parts eject by use pneumatic ejection device. Refer to machine manual to use
this device setting and working, maintenance. When the parts ejection, move to the
T2800 position. The sub spindle goes to the parts receiver beside the back tool post.
6-61
Cut off process is processing Head1 and Head2 simultaneously. Look under process.
HEAD1 HEAD2
Mutual waiting (M500~M599) : This use to match the process of Head1 and Head2.
It is waiting for until to meet the same Maaa if which program meets a Maaa in the H1
and H2 program. Finally, it is simultaneously go to the next block if there have same
Maaa in the both program.
M550 in above Head2 program, finished process is waiting for H1 of M550. If Head1
process is finished, the both process will be going to next block when meet the M550.
M560 and M570 is also same process.
This program became to start cut off preparing after M550 and it do at the M560.
When the cut off finished, go to M570
62
H1 S500 This low RPM prevent a scratch on the material with spindle when the
6-63
64
Generally, head2 program is going slowly to catch the parts for cutoff, but if the sub
spindle is long distance from the parts then rapid move to approach at the parts closely.
(Here close to Z25.0.) The reason is that outer bite has broken if a part is not cut
perfectly because sub spindle have possibility crashing with outer bite when it move
rapidly. Crashing is making the out of machine accuracy. But sub spindle is moved to
catch the parts by cutting speed; the machine makes an alarm instead of crash or
makes bad parts. The location of sub spindle after rapid traverse is not over the end of
parts. Let’s see calculate the catch point and approaching point of sub spindle through
under the picture.
6-65
Next we pictured as under to calculate the catch position. Sub spindle is going to
9.0mm apart from reference line that Z-axis coordinate position is Z-5.0. There will be
Z5.0 that is added 10.0mm because of special chuck.
66
6-67
[HEAD1]
68
6-69
70
O0001 ; G0 Z200.0 ;
G40 G18 ; M4 S200 ;
G310 Z210.0 T2100 ; M21 ;
; M78 ;
N10 T2424 M3 S3000 (CENTER) ; M28 ;
G0 Z2.0 ; G4 P1000 ;
G99 G1 Z-4.5 F0.04 ; M79 ;
G4 P100 ; M18 ;
G28 W0 ; M5 ;
; G28 W0 ;
N20 T2525 M3 S5000 (DRILL D2.6) ; T2100 ;
G0 Z2.0 ; ;
G1 Z-9.0 F0.03 ; N99 ;
G28 W0 ; M550 ;
M5 ; M4 S3000 ;
; G0 Z25.0 ;
N30 T2626 (TAP M3P0.5) ; G98 G1 Z5.0 F2000 ;
M50 ; M560 ;
G0 Z3.0 ; M570 ;
G184 Z-9.0 F0.5 S600 D0.5 ; G28 W0 ;
M51 ; M5 ;
G28 W0 ; M30
;
N90 T2800 (EJECT) ;
7-71
Z30.0 M5 ; N10 ;
; HEAD1 M500 ; HEAD2
M50 ; M510 ;
G0 C0 ; T2222 ;
M82 ; M4 S3000 ;
M510 (T22 DRILL) ; G0 X-7.0 Z1.0 ;
M520 ; G99 G1 Z-0.5 F0.025 ;
M83 ; G4 P50 ;
G4 P500 ; Z-8.0 F0.05 ;
G0 H180.0 ; G4 P100 ;
M82 ; G0 Z1.0 ;
M530 (T22&T23 TAP) ; M520 ;
M540 ; M530 ;
M83 ; G1 Z-0.5 F0.025 ;
G4 P500 ; G4 P50 ;
G0 H-180. ; Z-8.0 F0.05 ;
M82 ; G4 P100 ;
M550 (T23) ; G28 W0 ;
M560 ; M5 ;
M83 ; T2323 ;
G4 P500 ; G0 Z1.0 X-7.0 ;
M51 ; G184 Z-5.0 F0.5 S600 P500 ;
G0 Z0. ; M540 ;
M550 ;
G184 Z-5.0 F0.5 S600 P500 ;
G28 W0 ;
M560
M5
72
[OPER] button.
OPT.STOP ■ OFF ON
BLK. SKIP OFF ■ ON
MC.LOCK ■ OFF ON
WARMUP ■ OFF ON
WK.COUNT ■ OFF ON
PW.OFF ■ OFF ON
ZRN MODE ■ OFF ON
is pressed, process is continued again. This function makes spindle stop so ‘M01” location should
carefully use.
※ Block Skip
There is slash (/) on the head of block and ‘BLK.SKIP’ is on, the block is skipped.
Coordinated position also change. This function usually uses finding the grammatical error of the program.
※ WARM UP
If this function is used, all of detecting signal is become to invalidity. If this function is On, auto cycle
7-73
Below tables are elementary data, if you want more detail data, referring to toolmaker data
sheet.
● Cutting speed
Cutting speed(m/min) L/D Cutting rate
Material Outer diameter cut Hole cut 1 80%
Rotary bush Fixed bush Drill Reamer 2 70%
Brass 200~350(250) 120~200 40~60 8~14 3 60%
Aluminum 200~400(300) 100~180 40~80 6~20 4 50%
Free cutting steel
(SUM) 150~250(200) 90~150 30~50 5~15 5 40%
Structural Carbon Steel 100~200(150) 80~120 15~30 4~12 6 30%
Carbon Tool steel ( L= cutting length
120~200(160) 60~120 15~30 4~12
D= Inner diameter)
Alloy steel 80~180(140) 60~100 10~20 3~8
Alloy tool steel 60~120(100) 50~80 10~20 3~8
Stainless steel 80~160(120) 50~100 15~25 3~8
Stainless steel(Free) 60~120(80) 35~60 9~15 3~8
High hardness steel 30~50(40) 30~40 6~9
● Cutting feed
Cutting feed (㎛ / rev)
Outer cutting Internal
Material Hole cutting
X Axis Z Axis cutting
A B A B A B Φ 1~2 Φ 2~5 Φ 5~12
Brass 30 50 30 80 20 40 10~50 50~100 100~200
Aluminum 30 50 40 80 25 40 50~60 50~100 100~200
Free cutting steel 15 30 30 100 20 40 50~60 60~100 80~180
Structural Carbon Steel 15 30 20 60 15 30 50~60 60~100 80~180
Carbon Tool steel 15 30 20 60 15 30 50~60 60~100 80~180
Alloy steel 10 20 20 60 15 30 30~50 40~100 80~120
Alloy tool steel 10 15 20 40 15 25 30~50 40~60 80~120
Stainless steel 10 15 20 80 15 30 30~60 50~80 100~150
Stainless steel(Free) 10 15 20 60 10 25 30~50 40~60 80~120
High hardness steel 10 15 20 50 10 20
Remark, A: Fixed guide bush used, cutting depth quantity 2 mm below
B: Rotary guide bush used, cutting depth quantity 6 mm below
74
7-75
grade
δ 1 δ 2 δ 1 δ 2 δ 1 δ 2 δ 1 δ 2 δ 1 δ 2 δ 1 δ 2 δ 1 δ 2 δ 1 δ 2 δ 1 δ 2 δ 1 δ 2
(㎜)
0.30 1 0.14 0.05 0.18 0.07 0.28 0.10 0.37 0.14 0.46 0.17 0.55 0.20 0.68 0.25 0.91 0.33 1.13 0.42 1.36 0.50
0.40 1 0.20 0.07 0.26 0.09 0.39 0.14 0.52 0.18 0.65 0.22 0.78 0.27 0.97 0.33 1.29 0.44 1.62 0.55 1.94 0.66
0.60 1 0.31 0.10 0.41 0.14 0.62 0.20 0.82 0.27 1.03 0.33 1.23 0.40 1.54 0.50 2.05 0.66 2.56 0.83 3.07 0.99
1 0.39 0.52 0.78 1.04 1.30 1.56 1.96 2.61 3.26 3.91
0.75 0.13 0.17 0.25 0.33 0.42 0.50 0.62 0.83 1.04 1.24
2 0.35 0.46 0.69 0.91 1.44 1.37 1.71 2.28 2.84 3.41
1 0.56 0.75 1.12 1.49 1.86 2.23 2.79 3.71 4.64 5.57
1.00 0.17 0.22 0.33 0.44 0.55 0.66 0.83 1.10 1.38 1.65
2 0.50 0.66 0.99 1.32 1.64 1.97 2.47 3.29 4.11 4.03
76
1 0.90 1.20 1.79 2.39 2.99 3.58 4.48 5.97
1.50 0.25 0.33 0.50 0.66 0.83 0.99 1.24 1.65
2 0.80 1.07 1.60 2.13 2.67 3.20 4.00 5.33
N≤ 3000 x lead
1 1.21 1.62 2.42 3.23 4.04 4.85 6.06
● Imperfect thread length table when thread cutting
C2.0x30°
If the machining is start from left, X(S) and Z(S) is start point, X(E) and Z(E) is end point. We
only need calculation about X(S) because we already know Z(S)=5.0, X(E)=13.0, Z(E)=7.0.
Tangent
Tangent is slant rate. Mathematics’ symbol is “TAN” or “tan” and calculator use “TAN”.
tanα=
A
B
If the angle is α, the slant rate is A/B. Slant is height (A) per base (B).
G1 X10.69 ;
[HEAD2] M570
[HEAD1] M54 / M95
1-M79, 2-M50, 3-
5장
G96 / G4 / G4
/ W2.0, 3-G92, 4-
1-G300, 2-G50 / G1
4장
1-3, 2-2
3장
1-2, 2-3, 3-2, 4-3
2장
Test Answer
X13.0 W2.0 ;
7-77