Showing posts with label M98. Show all posts
Showing posts with label M98. Show all posts

Saturday, September 05, 2015

CNC Procedure Step by step procedure

In a CNC machine we can create a CNC Program in hundreds of ways to machine the same work piece and all the ways we can expect the same finished part.
                                When you receive a 3D model to do CNC program, check the 3D Model for the numbers of ways we can place fixtures and number of setups required to finish the part. But, in addition to creating the CNC program, there is many other factors need to Know to machine the work-piece. There are many questions on your mind about how to hold the work, which cutting tools to be selected and which machining conditions to be used to get a perfect part on CNC machine.

Step #1: Selecting a Machine.
-       As described above we can machine a part in hundreds ways, but it’s wise to select the machine if you have many options in your shop floor. 
-       If the machining part has a difficult angles and surface profile, an ideal 3-axis machine may take number of setups consuming time and may be difficult to achieve the tolerance.
-       A 5-Axis machine can reduce the setup and give the best tolerance for the complicated parts.
-       A simple part can’t be machine on a 5-axis machine due to the high cost. So we need to decide wisely keeping in mind of machining time and the labour.

Step #2: Work holding Selection for the Part.
-       There are number of ways to hold a part on the machine, it always depends on the billet you are using. Billet may be a rectangular block, forging stock, casting block.
-       If you are using a rectangular block, you can use a machine wise on the machine table. If the block is big for machine wise you can use the push clamps to hold the block on machine table.
-       If the stock is an forging or a casting then you need to design the special fixture which can hold the stock comfortable and rigid.

Step #3: Choose the cutting Tools.
-       Choosing the tools for cutting the part is an important factor for the finishing the part. We need to choose the cutting tools depending on the type of material we are cutting.
-       For aluminium stainless steel cutting tools can perform well, but for the hard material like titanium and steel better consideration are carbide tools.
-       Before generating the programs it’s better to check the tools available in the shop floor, instead of waiting for the tools to be ordered.
-       Always shorter tools give more accurate results than the longer tools, so wisely use the tools in your programs depending on the height and depth of the part.

Step #4: Gather all Cutting Condition Data.
-       After the tools have been decided, calculate your cutting data such as speed & feed which can suit easy removal of material.
-       Recommended to use the cutting data given by the tools catalog given from tool manufacturers.
-       You can experiment using the different feeds and speeds later while optimizing the programs.

Step #5: NC-Axis Selection on the Part.
-       Decide the NC axis Point on the part. Example: you can select a corner of the part where X, Y and Z meet.
-       Selection of NC axis must make the machine operator to probe the part X, Y and Z easily. There is only on machine Zero axis, But you can create a number of NC axis i.e., Work co-ordinate offset.
-       If you are using a rectangular block, you can select the corner of the block for your NC axis XYZ=0, operator can probe the three walls of the block to make XYZ=0 on the machine and store the value on the machine Work offset. Usually we can use G54 which is standard..
Step #6: Creating a CNC PROGRAM.
-       An NC Program can be created in many ways, now a day’s using software like UNIGRAPHS, Catia, Mastercam etc. is the common way to create a NC program.
-       If it’s a simple program it can be done manually, such as program involving only drilling, reaming and tapping cycles.
-       After creating the tool paths’ using the software’s you can generate a NC-program which as G-codes directly within built postprocessor.
-       If you have a customized postprocessor loaded with the control of your machine, then the results are accurate.

Step #7: Checking the CNC PROGRAM.
-       There are number of ways to check the programs, program can be simulated for errors in the software’s used for generating the tool path.
-       You can use simulator software like Vericut, where we can build our machine and load the controls and test our G-code. The simulation can be actual like it’s been milled on machine.
-       If you want to verify only the tool paths you can use software’s like cimco edit. You can find much software on internet to visualize the tool paths.

Step #8: Setting up the CNC Machine.
-       Setting up your machine for testing the program is very important. Load all the fixtures decided to hold the part and mount the part as you designed while generating tool path.
-       Load the NC-program on the CNC machine memory or you can use the DNC software’s.
-       Load the tools into the tool magazine on the machine as per the tool numbers described in the program.
-       Define the individual tool offsets and store on the machine.
-       Probe and define NC program Zero and store G54 on the machine.

-       After all the setup. Here we go we can test our programs.
-       There are number of ways to test the programs if you are not sure of your program go well..
-       Testing the programs can be done on the dry run option on the machine.
-       Testing the programs can be done by cutting the wood instead of metal.

Good luck, have fun learning CNC Programming... 
If you have any questions and comments please let me know

Wednesday, June 11, 2014

How should be a CNC Programming structure ???

CNC Programming has a defined structure which machine can read the codes without errors. NC Programming can be categorized into 3 parts:

1.      Main Program.

2.      Part program.

3.      Sub program.

1.     Main Program Structure

The main program is first read or accessed on machine tool when the entire part program sequence is run. Normally, the controller operates according to one program. In this case the main program is also the part program. This controlling program can then call a number of smaller programs into operation. These smaller programs, called Sub Programs. These subprograms are generally used to perform repeat tasks, before returning control back to the main program.

Each block, or program line, contains addresses which appear in this order:

N, G, X, Y, Z, F, M, S, T;

This order should be maintained throughout every block in the program, although individual blocks may not necessarily contain all these addresses.

Meaning of addresses:

N          - Refers to the block number.

G          - Refers to the G code (Preparatory function).

X          - Refers to the distance travelled by the tool in the X axis direction.

Y          - Refers to the distance travelled by the tool in the Y axis direction.

Z          - Refers to the distance travelled by the tool in the Z axis direction.

F          - Refers to the feed rate.

M         - Refers to the M code (Miscellaneous function).

S          - Refers to the spindle speed.

T          - Refers to the tooling management.


A part program is a list of coded instructions with series of letters and numbers. The part program includes all the geometrical and technological data to perform the required machine functions and movements to manufacture the part.

The part program can be further broken down into separate lines of data, each line describing a particular set of machining operations. These lines run in sequence, are called blocks. A block of data contains words which is called codes. Each word refers to a specific cutting/movement command or machine function. The programming language recognised by the CNC, the machine controller, is an I.S.O. code, which includes the G-Code and M-code groups. Each program word is composed from a letter, called the address, along with a number.

BLOCK EXAMPLE:  N010 G01 X50 Y100 F100

Word Example: G01

Address Example: G

The part program can contain a number of separate programs, which together describe all the operations required to manufacture the part.


In order to simplify the main Program in case of repeated patterns or fixed sequences the Sub program is called in between the main program. The Sub program always ends with M99 which indicates the end of sub program. Sub program can be called any number of times in a main program. When the main program calls one sub program into operation, the process is called a one-loop sub program call. It is possible to program a maximum four loop sub program call within the main program. Shown below is an illustration of a two-loop sub program call.  


1.      If cutter compensation is required on a tool and the co-ordinates for the tool are within the sub program, the cutter compensation must be applied and cancelled within the sub program.

2.      A sub program call command (M98 P1000) can be specified along with a move command in the same block. For example, G01 X63.2 M98 P1000;

Sub Program Repeat:

A call command can be set to call a sub program repeatedly. This call can specify up to 999 repetitions of a sub program. A sub program repeat command has the following format:

M98 P000 0000

When the repetition is omitted, the sub program will be called once only.

For example,

M98 P100001

This command is read call the sub program number 0001 ten times.