Writing a Milling operation program:
The Milling operation program is written by removing the leftover material through the relative displacement between a rotating cutting tool and a stationary workpiece. This process is carried out to achieve the desired dimensions. To accomplish this, a comparative axis movement command is used, which corresponds to the cutting tool with the spindle in milling programming. The cutting tool and spindle movement, along with the Z-axis drive (in vertical milling operations), are responsible for eliminating material from the workpiece. The Z-axis positions itself at specific locations, while the movements of the X and Y axes shape the workpiece as required. In some cases, the Z-axis movements and interpolation (linear or circular) occur between two axes. The following example demonstrates a step-by-step simple milling operation programming with a CNC Milling machine. Additionally, the provided pictures depict a workpiece blank and the final product after machining operations.
Preparing a 2D workpiece drawing:
Before writing a program, it is necessary to create a two-dimensional drawing of the workpiece, which includes different working parameters. Previously, the drawing was done on a sheet, but now it has become simpler with the use of CAD (Computer-Aided Design) software. The picture below shows a two-dimensional sketch of the finished workpiece.
Setting the workpiece with the machine coordinate system:
In the previous picture, point P represents the projection of the workpiece, and it serves as the Workpiece Zero point. All axis positions within the program are relative to this point. The distance between this P point and the 'Machine Zero' is considered as the 'Zero offsets' of the machine axes. The picture below illustrates how the workpiece aligns with the machine's Coordinate System.
In this case, the X and Y axis zero offsets are set as X=50 and Y=25, respectively. Let's assume Z=-500 (not shown in the picture). These values are stored as G54 offset values inside the CNC controller. When a G54 command is executed at the beginning of the program, all the axes (X, Y, and Z) temporarily consider the P point as the zero-point instead of the machine zero point. All axis positions will be shown as 0.000 at this P point. All axis movements and measurements in the program will be based on this temporary zero point at P. If it becomes necessary to cancel the workpiece zero and revert to the machine zero, a G53 code can be used within the program.
Selection of cutting tool:
After positioning the workpiece and compensating for the Machine Coordinate System, it is necessary to select the cutting tools for the machining operations. In this case, we are using an 'End-mill Cutter' with a length of 50 mm and a diameter of 10 mm (shown in the following image). These values are stored in the CNC controller's memory as tool offset data. When the program requests the tool offset data (D1 in this case), the actual movement of the Z-axis takes into account the tool length value (50 mm less in this case). Similarly, when the Cutter radius compression command is given (G41 or G42), the actual movement of the X and Y axes considers the tool diameter (10 mm in this case). The dotted line in the following picture represents the exact Cutter path to achieve the accurate dimensions of the workpiece. However, the actual axis movement commands will be relative to the workpiece coordinate system.
Defining the Coordinate System and Measuring System:
After selecting the cutting
tool, it is necessary to define the coordinate system for dimensioning and
measuring in the programming process. The Cartesian and Absolute measuring
systems are used in this program for all measurements. It is also important to
consider the clamping arrangements of the workpiece before initiating the
program, ensuring that they do not obstruct the tool-cutting line. If needed,
the machining operation can be split into two or three setups. This program
does not include any clamping arrangements and is written for convenience and clarity.
Work-piece Programming (with SIEMENS Controller):
This program, marked as %1234, restricts individual blocks by using 'N' followed by a number (N5, N10, etc.) for easy identification of expressions. However, it is unnecessary to represent each program block with N numbers. Each programming block can be distinguished by the symbol '¶' or a line finish symbol. The following example demonstrates the functionality of each program block in the machining process and later provides detailed explanations of all the function blocks.
%1234
(Test work-piece)
N05 G21 G90 G94 ¶
N10 T1 M06 ¶
N15 M03 S1000 M07 ¶
N20 G00 G54 D1 X-10 Y0 Z5 ¶
N25 G01 Z-5.5 F150 ¶
N30 G42 X0 Y0 ¶
N35 X45 ¶
N40 Y15 ¶
N45 X75 ¶
N50 Y0 ¶
N55 X120 ¶
N60 Y40 ¶
N65 G03 X100 Y60 I-20 J0 F100 ¶
N70 G01 X20 F150 ¶
N75 G03 X0 Y40 I0 J-20 F100 ¶
N80 G01 Y0 F150 ¶
N85 Z5 ¶
N90 G00 G40 G53 X0 Y0 Z0 M05 M09 ¶
N95 M30 ¶
Program blocks:
Writing % 1234
at the beginning of the program represents program number 1234. The text
"Test Workpiece" is written inside parentheses to indicate the name
or type of program. The CNC controller does not interpret any word written
within the first set of parentheses in a program. Sometimes the first set of
parentheses is also used to provide special remarks or statements for easy
recognition in a long program.
N05 G21 G90 G94 –
N10 T1 M06 -
N15 M03 S1000 M07 -
N20 G00 G54 X-10 Y0 Z5 D1 –
N25 G01 Z-5.5 F150 -
N30 G42 X0 Y0 –
N35 X45 -
N40 Y15 – The Y-axis will move 15 mm in the positive direction (Y15).
N45 X75 –
N50 Y0 –
N55 X120 –
N60 Y40 –
N65 G03 X100 Y60 I-20 J0 F100 -
N70 G01 X20 F150 -
N75 G03 X0 Y40 I0 J-20 F100 -
N80 G01 Y0 F150 –
N85 Z5 –
N90 G00 G53 G40 X0 Y0 Z0 M05 M09 -
N95 M30 -
No comments:
Post a Comment