Search This Blog

Showing posts with label NC Programming. Show all posts
Showing posts with label NC Programming. Show all posts

Tuesday, September 22, 2015

M41-M42 Force Gear speed



             These M-codes are used rarely in NC programming for Milling and Used more in turning, any ways it’s good to know about the functions.
While working in CNC Machines We may have to select the Speed 100 to 1000rpms, whenever we work on the bigger diameters we may have to decrease the Speed and When We Work on the smaller diameters we may have to increase the speed, Increasing and Decreasing the speed can be done by changing the Gears on CNC machine.  Miscellaneous code called M-code control the machine controls.
M code 41, i.e., 
M41 is activated to select the Low gear to Decrease the speed.
M42 is activated to select the high gear to increase the speed;

These M-codes also used in Milling machines like Mandeli 5- axis machines.

Vericut Simulation takes more time while simulating M42???

In Vericut Simulation software When M42 code runs, the simulation take long time to finish the cycle.
You can follow the below step to overcome this slow Simulation problem in Vericut.
M42: Force High Gear.
1) Click on Collision
2) Uncheck visible stock and active tools’ Holders.
This makes the simulation faster and you can check this after finishing M42 Operation.



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.

Step #9: PROGRAM PROVE OUT.
-       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



Friday, December 05, 2014

G28 Return Home

G-Code G28 Return home:

G28 Is the G-Code that instructs the Controller of the machine to move the tool automatically to the reference point.  The Reference point is the fixed position on the machine, to which the tool can be moved.  This reference point is also called the “Home position”. Machine has the reference point for  X, Y and Z Axis.

G28 G-Code Format:

N170 G90 G28 X_ Y_ Z_; (Absolute Code)
Or
N170 G91 G28 X_ Y_ Z_; (Incremental Code)
                    Where X, Y and Z can be used to indicate an intermediate point, through which the tool will pass, before continuing to the reference point.  If the intermediate point is not set, tool may move in non-vector type path.  It may collide with the part or the fixture, so you can put the intermediate values in X, Y and Z to move the tool first to safety plane.
                     The move to any intermediate point and the reference point are performed at a rapid traverse rate.

Example Below shows the collision scenario 1:

 The diagram below shows how the tool could collide with the billet when moving towards the reference point with Non-vector type movement.
To avoid this collision, the tool is sent on a path which includes intermediate point P2. The intermediate point is used to allow the tool to move completely clear from the billet, before continuing onto the reference point, P3.
The above tool path can be programmed as follows (In absolute mode, G9Ø):
G90 G28 X60 Z60;
The above tool path can be programmed as follows (In incremental mode, G91):
G91 G28 X0 Z40;
So that the Tool moves to the safety plane before it reaches the Reference Point.

Example Below shows the collision scenario 2:

In the diagram below, the tool is in a position (P1) where there is no obstacle to collide. The intermediate point, in this case, is not required, so the block can be written as follows:
(In incremental mode, G91): G91 G28 X0 Y0 Z0; 

NOTE :  G28 is a non-modal G code. It is only active in the block in which it is programmed.

NOTE: If no X, Y, Z, or A is specified, all axes will be moved directly to machine zero. Any auxiliary axes (B, C...) are returned to the machine home after the X, Y, Z, and A axes. G28 will not recognize any tool length offsets in this move.






Sunday, November 16, 2014

"What is M-CODE M97, M98 & M99 (Sub Programs or Sub Routines) Mean in CNC Programming"

M-Code M97, M98 and M99 Subprogramming M-Codes

M97 Local Sub-Program Call (P, L):  

M97 is the M-code Used to call a Subprogram with the reference of the line number N within the same program. Pxxxx code is used as a line number to be repeated. Xxxx is the line number in the same program. This is used for the simple program within the program and does not require complication of creating a sub program. A local sub-program must end with an M99. If there is a repetition of the loop of subprogram L count on the M97 line, the sub-program will be repeated L number of times.

M97 Program Format:


M97 Pxxxx Lnn
Whereas,        xxxx is the line number
                        nn is the number of repetitions

Example:


Main program:
O01234 (Program number and Start of main program)
N0001 T02 M06;
N0002 T03
N0003 G54 G90 G00 Z50
...
...
...  (Part program)
...
M97 P0015 L3 (Jumps to line N0015, after the M30, to execute a local sub-program for 3 times)
...         (The M99 at the end of the sub-program will cause it to jump back here.)
...
...
... (Finish part program)
...
M30 (End of main program)
N0015 (Identifies the start of the Local Sub-Program called up by M97 P0015)
...
... (Local sub-program portion of Main program)
...
M99 (Jumps back to the line after local sub-program call in the main program)

M98 Sub-Program Call (P, L):  

M98 is the M-code Used to call a Subprogram with the reference to the separate program created and loaded on the controller. The Pxxxx code is the sub-program number being called; it must be in the same block as the M98. A sub-program must end with an M99 to enter to main program after the subprogram. If there is a repetition of the loop of subprogram L count on the M98 line, the sub-program will be repeated L number of times before continuing to the next block.

M98 Program Format:


M98 Pxxxx Lnn
Whereas,        xxxx is the line number
                        nn is the number of repetitions

Example:

Main program:

O01234 (Program number and Start of main program)
N0001 T02 M06;
N0002 T03
N0003 G54 G90 G00 Z50
...
...
... (Part program)
...
...
M98 P111 (Jumps to program O00111 to execute sub-program)
... (The M99 at the end of the sub-program will jump back here)
...
... (Finish part program)
...
M30 (End of main program)

Sub-program:

O00111 (Identifies the start of a separate sub-program)
...
... (Sub-program portion of part)
...
M99 (Jumps back to the line after the sub-program call in the main program).

M99 End Sub-Program or Return or Loop:

           This M-code is used to end the sub-program.  If M99 is used in the main program, it will cause the program to loop back to the beginning and repeat over and over again without stopping.

Example:


Main program:


O01234
...
... (Complete part program)
...
...
M99 (This will cause the program to jump back to the beginning and repeat itself)
An M99 without a P code at the end of a sub-program will return to the main Program.)

Main program:


O01234
...
... (Part program)
...
M98 P111 (Jumps to program O00111 to run)
... (The M99 at the end of the sub-program will jump back here)
...
... (Finish part)
...
M30 (End of main program)

Sub-program:


O00111 (sub-program number)
...
... (Sub-program portion of part)
...

M99 (Jumps back to the line after the sub-program call)

Thursday, November 13, 2014

"What is M00-M01 (Optional stop) M-CODE in CNC Programming"


M-Code M00-M01 (Optional stop):

The M00 code is used to stop a program. When the controller reads M00 in the program, it stops all the axes, spindle, turns off the coolant (including Through Spindle Coolant). In The next block after the M00 will be highlighted when viewed in the program editor so you can insert a comment for operator what to do when M00 Called. For example, comment to clean the chips or check the tool etc. Pressing Cycle Start button will continue program operation from the highlighted block after the operator has confirmed the note inserted.

M01 works the same as M00, except the Optional Stop button the machine control board must be on.
If no Optional Stop button is OFF on the controller board, then the machine will not stop when it reads M01.

NOTE: If anything very Important to stop the machine while program execution it is better to use M00 instead ofM01. Since if operator forgets to put ON the Optional stop Button then also the machine will stop at M00.

Example Program M00:


N170 G0 Z10.0
N171 M05 (Spindle Off)
N172 M00 (Clean the Chips)
N173 M03 S3000 (Turn ON the spindle)

Example Program M01:

N170 T6 M06
N171 G43 H6 (Call Tool Length offset)
N172 M01 (Check the tool for damage) (If operator has put new tool he may not switch ON Optional stop Button)
N173 M03 S3000 (Turn ON the spindle)

APT Command to insert in Your Program = STOP

"How the Block delete Command works on CNC Programming"

"How the Block delete Command works on CNC Programming"

Block delete (/):

Block delete is used in a program by placing a forward slash (/) at the beginning of the line.  It is a useful function which allows the operator to skip the blocks within the program. Block delete will not actually delete the blocks in the program but the block will be still there and those blocks will be ignored by the controller.
Block delete works same as Optional stop M01, so operator has to switch ON the Block delete switch on the control board, so controller will skip the blocks which are marked with forward slash (/) symbol in the beginning of the line or block. If the Operator forgets to Switch ON the Block delete Button then the Blocks marked with forward slash (/) symbol in the beginning of the line or block will be executed normally by the controller.

Example: In the example show below is the same program segment for two similar parts, except the part B has the addition of drilling holes.

Part A:  3 position of drilling holes (With Block delete ON in controller)
Part B:  6 Position of drilling holes. (With Block delete OFF in controller)

Program:

N170 G80 X0 Y10 Z-10 R02 F50
N171 X0 Y20
N172 X0 Y30
/N173 X10 Y10 (Used only for part B)
/N174 X10 Y20 (Used only for part B)
/N175 X10 Y30 (Used only for part B)

N176 M05

A to Z Letter address used on CNC Machining

A to Z Letter address used on CNC Machining


Letter Address
 Description
Refers to



A
 Angular Value about the X-axis. Measured in degrees
 Axis nomenclature



B
 Angular Value about the Y-axis. Measured in degrees
 Axis nomenclature



C
 Angular Value about the Z-axis. Measured in degrees
 Axis nomenclature



D
the tool diameter or radius used for cutter
compensation
Cutter compensation Parameter



E
second feed function
accuracy required when cutting a corner



F
Feed word (code)
Feed words



G
Preparatory word (code)
G-code Words



H
Unassigned/specifying for tool height compensation




I
 Interpolation parameter or thread lead parallel to the X-axis
Circular interpolation and threading



J
 Interpolation parameter or thread lead parallel to the Y-axis
Circular interpolation and threading



K
 Interpolation parameter or thread lead parallel to the Z-axis
Circular interpolation and threading



L
Unassigned




M
Miscellaneous or auxilliary function
Machine Control Codes



N
Sequence number
Program Line numbers



O
 Sequence number for secondary head only
Indicates Program Number



P
P address character is used for a dwell time
Delay of time



Q
character is used in canned cycles
Depth specification



R
used in canned cycles or circular interpolation
 Axis nomenclature



S
Spindle-speed function
 Spindle speed



T
Tool Change function
 Tool function



U
Secondary-motion dimension parallel to X
 Axis nomenclature



V
Secondary-motion dimension parallel to Y
Axis nomenclature



W
Secondary-motion dimension parallel to Z
Axis nomenclature



X
Dimension of Tool movement in X direction
Axis nomenclature



Y
Dimension of Tool movement in Y direction
Axis nomenclature



Z
Dimension of Tool movement in Z direction
Axis nomenclature


ALPHABETICAL ADDRESS CODES

The following is a list of the Address Codes used in programming the Mill.

A -  FOURTH AXIS ROTARY MOTION:

The A address character is used to specify motion for the optional fourth, A- axis, which is angular value about X-axis. It specifies an angle in degrees for the rotary axis. It is always followed by a signed number and up to three fractional decimal positions. If no decimal point is entered, the last digit is assumed to be 1/1000 degrees.

B -  FIFTH AXIS ROTARY MOTION:

The B address character is used to specify motion for the optional fifth, B, axis, which is angular value about Y-axis. It specifies an angle in degrees or the rotary axis. It is always followed by a signed number and up to three fractional decimal positions. If no decimal point is entered, the last digit is assumed to be 1/1000 degrees.

C -  AUXILIARY EXTERNAL ROTARY AXIS:

The C address character is used to specify motion for the optional external sixth, C, axis, which is angular value about Z-axis It, specifies an angle in degrees for the rotary axis. It is always followed by a signed number and up to three fractional decimal positions. If no decimal point is entered, the last digit is assumed to be 1/1000 degrees.

D - TOOL DIAMETER OFFSET SELECTION:

The D address character is used to select the tool diameter or radius used for cutter compensation. The number following must be between 0 and 200 (100 programs on an older machine). The Dnn selects that number offset register that is in the offset display which contains the tool diameter/radius offset amount when using cutter compensation (G41 G42). D00 will cancel cutter compensation so that the tool size is zero and it will cancel any previously defined Dnn.

E -  ENGRAVING FEED RATE / CONTOURING ACCURACY:

The E address character is used, with G187, to select the accuracy required when cutting a corner during high speed machining operations. The range of values possible is 0.0001 to 0.25 for the E code.

F - FEED RATE:

The F address character is used to select the feed rate. It is either in inches per minute with four fractional positions or mm per minute with three fractional positions.

G - PREPARATORY FUNCTIONS (G codes):

The G address character is used to specify the type of operation to occur by the tool in the block containing the G code. The G is followed by a two or three digit number between 0 and 187. Each G code defined in this control is part of a group of G codes.

H - TOOL LENGTH OFFSET SELECTION:

The H address character is used to select the tool length offset entry from the offsets memory. The H is followed by a two digit number between 0 and 200 (100 programs on an older machine). H0 will clear any tool length offset. You must select either G43 or G44 to activate a tool length (H) offsets. The G49 command is the default condition and this command will clear any tool length offsets.

I - CIRCULAR INTERPOLATION / CANNED CYCLE DATA:

The “I” address character is used to specify Interpolation parameter or thread lead parallel to the X-axis. It is defined in inches with four fractional positions or mm with three fractional positions.

J - CIRCULAR INTERPOLATION / CANNED CYCLE DATA:

The J address character is used to specify Interpolation parameter or thread lead parallel to the Y-axis. It is defined in inches with four fractional positions or mm with three fractional positions.

K - CIRCULAR INTERPOLATION / CANNED CYCLE DATA:

The K address character is used to specify Interpolation parameter or thread lead parallel to the Z-axis. It is defined in inches with four fractional positions or mm with three fractional positions.

L - LOOP COUNTS TO REPEAT A COMMAND LINE:

The L address character is used to specify a repeat count for some canned cycles and auxiliary functions. It is followed by a number between 0 and 32767.

M - M-CODE MISCELLANEOUS FUNCTIONS:

The M address character is used to specify an M code. These codes are used to control miscellaneous machine functions.

N - NUMBER OF BLOCK:

The N address character is used to identify or number each block of a program. It is followed by a number between 0 and 99999.

O - PROGRAM NUMBER:

The O address character is used to identify a program. It is followed by a number between 0 and 99999. You can have up to 500 program numbers (200 programs on an older machine) in your List of Programs.

P - DELAY OF TIME / M98 PROGRAM NUMBER Call:

The P address character is used for either a dwell time in seconds with a G04, or in canned cycles G82, G83, G86, G88, G89 and G73. When used as a dwell time, it is defined as a positive decimal value between 0.001 and 1000.0 in seconds. When ‘P” is used to search for a program number with an M98, or for a program number block in an M97. When P is used in a M97 or M98 the P value is a positive number with no decimal point up to 99999.

Q - CANNED CYCLE OPTIONAL DATA:

The Q address character is used in canned cycles and is always a positive number in inches between 0.001 and 100.0.

R - CIRCULAR INTERPOLATION / CANNED CYCLE DATA:

The R address character is used in canned cycles or circular interpolation. It's either in inches with four fractional positions or mm with three fractional positions. It is followed by number in inches or metric. It's usually used to define the reference plane for canned cycles.

S - SPINDLE SPEED COMMAND:

The S address character is used to specify the spindle speed; The S is followed by an unsigned number between 1 - 99999. The S command sets the desired speed.

T - TOOL SELECTION CODE:

The T address character is used to select the tool for the next tool change. The number following must be a positive number between 1 and (20) the number in Parameter 65.

U - AUXILIARY EXTERNAL LINEAR AXIS:

The U address character is used to specify motion for the optional external linear, U-axis.
It specifies a position of motion in inches. It is always followed by a signed number and up to four fractional decimal positions. If no decimal point is entered, the last digit is assumed to be 1/10000 inches. The smallest magnitude is 0.0001 inches, the most negative value is -8380.0000 inches, and the largest number is 8380.0000 inches.

V - AUXILIARY EXTERNAL LINEAR AXIS:

The V address character is used to specify motion for the optional external linear, V-axis.
It specifies a position of motion in inches. It is always followed by a signed number and up to four fractional decimal positions. If no decimal point is entered, the last digit is assumed to be 1/10000 inches.

W - AUXILIARY EXTERNAL LINEAR AXIS:

The W address character is used to specify motion for the optional external linear, W-axis.
It specifies a position of motion in inches. It is always followed by a signed number and up to four fractional decimal positions. If no decimal point is entered, the last digit is assumed to be 1/10000 inches.

X - LINEAR X-AXIS MOTION:

The X address character is used to specify motion for the X-axis. It specifies a position or distance along the X-axis. It is either in inches with four fractional positions or mm with three fractional positions. It is followed by a signed number in inches or metric. If no decimal point is entered, the last digit is assumed to be 1/10000 inches or 1/1000 mm.

Y - LINEAR Y-AXIS MOTION:

The Y address character is used to specify motion for the Y-axis. It specifies a position or distance along the Y-axis. It is either in inches with four fractional positions or mm with three fractional positions. It is followed by a signed number in inches or metric. If no decimal point is entered, the last digit is assumed to be 1/10000 inches or 1/1000 mm.

Z - LINEAR Z-AXIS MOTION:

The Z address character is used to specify motion for the Z-axis. It specifies a position or distance along the Z-axis. It is either in inches with four fractional positions or mm with three fractional positions. It is followed by a signed number in inches or metric. If no decimal point is entered, the last digit is assumed to be 1/10000 inches or 1/1000 mm.