Writing a Turning operation program:
CNC turning programming
differs from milling programming. In turning operations, machining is performed
by rotating the workpiece while keeping the cutting tool stationary. Workpieces
used in turning operations are typically cylindrical. The cutting tool contacts
the rotating workpiece, removing material from its surface. Standard turning
operations involve two axes: the X-axis, which controls the diameter, and the
Z-axis, which controls the length. The X-axis moves toward the centerline of
the spindle, while the Z-axis moves toward the work-holding device. This means
that the X-axis moves vertically, while the Z-axis provides horizontal
movements for machining. The image below illustrates the movement directions of
the X and Z axes on a slant bed CNC turning machine, as well as the Tool
Reference Point, Machine Zero Point, and Workpiece Zero Point.
Machining with turning operations
Machining with turning
operations typically involves two steps. The first step, called "rough
turning," removes most of the material from the blank. The second step,
known as "finish turning," achieves the final shaping and surface
quality of the workpiece. These machining operations use two different cutting
tools: a rough turning tool and a finish turning tool. The images below explain
the two types of cutting tools commonly used in turning operations. The rough
turning tool removes the majority of the material from the workpiece through
two, three, or more cycles, leaving a small amount of material (usually 0.2 mm)
for the finish turning operation. The cutting load applied during rough turning
is much higher than that of finish turning, and the angle of the cutting tool
edge on the rough turning tool is larger to withstand the higher cutting load.
In contrast, Z-axis
movements do not have this complexity. Therefore, when programming turning
operations, it's important to remember that the movement command for the X-axis
is always double the actual physical change. Additionally, the axis feed
command differs for turning operations compared to milling. In Turning, the
axis feed command is specified as revolutions per minute (rpm) and depends on
the spindle rpm. For example, if the spindle speed is 1000 rpm and the feed
command is F0.1, the actual cutting feed will be 0.1 mm/rev.
Typically, CNC turning
machines are always programmed with G95 mode, which specifies the feed per
revolution. Sometimes, the G95 code is also used to provide the feed per minute
command, usually when programming with CNC turn-mill machines. It's customary
to have slower spindle speeds for rough turning operations and higher speeds
for finish turning processes.
Different offsets in turning operation.
The machine zero position
refers to the X and Z-axis coordinate zero positions, while the workpiece zero
or part zero always pertains to the workpiece. The tool reference point is the
position where the cutting tool changes and aligns with the cutting line. The
zero offsets of a particular workpiece are defined from the tool reference
point or tooltip point. Before starting the turning program, it is mandatory to
confirm the 'workpiece zero' position relative to the 'tool reference point.'
This involves defining the distance of the cutting tooltip from the workpiece
zero position and considering zero offsets like G54, G55, etc. For multiple
tools, a standard tool offset is measured, and others are compensated
accordingly and stored in tool offset data. Sometimes, the tool offset is
measured directly from the zero offset point when no zero offsets are
considered. The following pictures illustrate the work offset of a cutting
tool.
Turning operation programming
The step-by-step procedure
for writing a simple turning operation program is illustrated with the
following example. The next images show a cylindrical workpiece blank and the
outcome after machining. The program will proceed based on the dimensions
provided for the finished workpiece blank.
Rough Turning Programming
Programming for rough
turning typically involves multiple stepped movements with a rough turning
tool. After completing rough turning, a small amount of material (usually 0.2
to 0.3 mm) is left, which will be removed during the finish turning operation.
The following program represents a simple way of writing the code for the
SIEMENS controller (note that there may be minor differences with other
controllers). The accompanying picture illustrates the movement paths of the
rough cutting tool.
N5 G21 G90
N10 T1 D1
N15 M03 S1000 M08
N20 G0 G54 X60 Z0.2
N25 G01 X-4 F0.2
N30 Z0.5
N35 G0 X34
N40 G01 Z-79.8 F0.2
N45 X41
N50 G0 Z0.5
N55 X28
N60 G01 Z-79.8 F0.2
N65 X41
N70 G0 Z0.5
N75 X20.4
N80 G01 Z-79.8 F0.2
N85 X41
N90 G0 X53 Z220 M05 M09
N95 M30
% 5555 - Program Number 5555. The word "(Rough Turning)" within the brackets refers to the program name.
N5 G21 G90 - This block describes preparatory functions. G21 specifies that all measurements will be in millimeters, and G90 identifies the absolute measuring system.
N10 T1 D1 -
N15 M03 S1000 M07 -
In the
previous program, most of the material was removed from the workpiece through
Rough Turning. Now, the finish tool program will shape the workpiece to its
exact contour. Only 0.2 mm of material remains from the previous operation,
which will be removed to achieve the required dimensions. In the finish turning
process, the spindle speed is usually set higher, while the axis feed rate is
kept lower to achieve an excellent surface finish. The following program, along
with a schematic diagram, illustrates the finish turning operation according to
SIEMENS controllers.
N5 G21 G90
N10 T2 D1
N15 M03 S2000 M08
N20 G0 G54 X25 Z0
N25 G01 X-2 F0.05
N30 X0 Z0
N35 G03 X20 Z-10 R10 F0.05
N40 G01 Z-80 F0.05
N45 X42
N50 G0 G53 X200 Z220 M05 M09
N55 M30
Explanation of the program
blocks:
% 6666 - Program number 6666. The word "(Finish Turning)" within the brackets indicates the program name.
N5 G21 G90 - This block represents preparatory functions. G21 specifies that all measurements will be in millimeters, and G90 indicates the absolute programming system.
N10 T2 D1 - T2 selects the tool number for the cutting line, and D1 (offset value not considered here) compensates for the next axis movement.
N15 M03 S2000 M07 - Here, S2000 sets the spindle rotation speed to 2000 rpm, and M03 selects the clockwise direction. The cutting flash coolant is activated with M07.
N20 G00 G54 X25 Z0 - The X and Z axes rapidly move to position A using G00, considering the work offset value specified at G54. The position of point A is X25 and Z0.
N25 G01 X-2 F0.05 - The X-axis moves linearly (G01) to position X-2 with a feed rate of 0.05 millimeters per rotation (F0.05).
N30 X0 Z0 -
N35 G03 X20 Z-10 R10 F0.02 -
N40 G01 Z-80 F0.05 -
N45 X42 -
N50 G00 G53 X200 Z220 M05
M09 -
N55 M30 -
No comments:
Post a Comment