This is the basic of CNC Programming .Here you will get a complete idea about the programming for CNC machine.Here you will learn about the codes,defining part of the program,Operation part of the program and closing part of the program.You will learn about some simple example of programming.
Basic of CNC programming is to learn about G codes,M codes and all the steps.It is to learn about all steps of a program to complete a machining process.
CNC machine language which control the movement of axis /Tools.
What is m code..?
CNC machine language which control the machine function.
Here we are going to learn about Basic programming of FANUC (Oi-TB)and SIEMENS(802d/802dSL/828d).
Siemens G code list-802d
Codes
Function
G00
Linear interpolation at rapid traverse rate
G01
Linear interpolation at feed rate
G02
Circular interpolation clockwise
G03
Circular interpolation counter clockwise
G04
Dwell time
G18
Z,X-Plane(Standard turning)
G33
Thread cutting with constant lead
G40
Tool radius compensation off
G41
Tool radius compensation left of contour
G42
Tool radius compensation right of contour
G53
Settable work- offset–Non- modal skipping
G54
1st settable work offset
G55
2nd settable work offset
G56
3rd settable work offset
G57
4th settable work offset
G58
5th settable work offset
G59
6th settable work offset
G71
Metric dimension data input
G90
Absolute dimension data input
G91
Incremental dimension data input
G95
Feed rate F in mm/Spindle revolutions
G codes
Siemens M code list-802d
Codes
Functions
M00
Programmed stop
M01
Optional stop
M02
End of the program with return to program start
M03
Clockwise rotation of spindle
M04
Counter clockwise rotation of spindle
M05
Spindle stop
M08
Coolant ON
M09
Coolant OFF
M30
End of program(as M02)
M codes
Fanuc G codes-Series Oi-TB
Codes
Function
G00
Rapid traverse
G01
Linear interpolation
G02
Circular interpolation-CW
G03
Circular interpolation-CCW
G04
Dwell command
G10
Programming data input offset
G20
Outer/inner dia cutting cycle
G21
Thread cutting cycle
G24
End face turning cycle
G27
Reference point return check
G28
Reference point return
G33
Threading
G40
Tool nose radius comp. Cancel
G41
Tool nose radius comp.Left
G42
Tool nose radius comp.right
G53
Cancel work offset
G54
Work coordinate system 1 (optional)
G55
Work coordinate system 2 (optional)
G56
Work coordinate system 3 (optional)
G57
Work coordinate system 4 (optional)
G58
Work coordinate system 5 (optional)
G59
Work coordinate system 6 (optional)
G65
Macro calling
G70
Inch programming(Optional)
G71
Metric programming (optional)
G72
Finishing cycle( optional)
G73
Stock removal in turning(Optional)
G74
Stock removal n facing(Optional)
G75
Pattern repeating(Optional)
G76
Peck drilling in z axis (Optional)
G77
Grooving in X axis (Optional)
G78
multiple thread cutting cycle(Optional)
G90
Absolute programming
G91
Incremental programming
G92
Position preset & spindle speed clamp in css mode during S word.
G94
Per minute feed
G95
Per revolution feed
G96
Constant surface speed
G97
Direct RPM programming
Fanuc M codes-Oi-TB
Codes
Function
M00
Program stop
M01
Optional stop
M02
End program
M03
Spindle ccw
M04
Spindle cw
M05
spindle stop
M08
Coolant ON
M09
Coolant OFF
M10
Chuck /Collet Close
M11
Chuck / Collet Open
M12
Low chucking pressure(Optional)
M13
High chucking pressure(Optional)
M18
Tailstock swing IN(Optional)
M19
Tailstock swing OUT(Optional)
M20
Quill LEFT(Optional)
M21
Quill RIGHT(Optiional)
M22
Turret Index reverse
M23
Turret index Forward
M24
Steady rest-1 Open(Optional)
M25
Steady rest-1 Close(Optional)
M26
Steady rest-2 Open(Optional)
M27
Steady rest-2 Close(Optional)
M28
parts catcher open(Optional)
M29
Parts catcher Closr(Optional)
M30
Program reset and rewind
M36
Cancel M37
M37
Ignore upto speed feedhold signal
M40
Dry run spindle OFF
M41
Dry run spindle ON
M42
Dry run cancel
M48
Cancel M49
M49
Feed rate and Spindle speed overrides inactive
M62
Spindle Hold OFF
M63
Spindle Hold ON
M76
Low quill pressure ON(Optional)
M77
Low quill pressure OFF(Optional)
M78
Select quill zero pressure(Optional)
M90
In position check ON
M91
In position check OFF
M92
Soft jaw boring
M98
Sub program call
M99
Sub program end
Programming systems
There are two types of programming mode used in CNC.
Absolute
Incremental
Incremental progamming mode(G91)
This is the programming mode where the movement (tool/bed/spindle) based on its last(Current) position.
Absolute progamming mode(G90)
This is the programming mode where all the movement measures from Origin point.
Difference between absolute and incremental programming in CNC
Incremental Dimension
Incremental Dimension
Absolute dimension
Absolute dimension
CNC Positioning System
Point To point
Continuous path(contouring)
Point to point Positioning
Positioning(tool/spindle/Bed) from one coordinate(X,Y) to another to perform operation like drilling,Boring,reaming,taping..etc.
Continuous path(contouring)
The cutting tool travel from one point to another in Contact with work piece .Example- Turning .Milling
Zero Point Setting
Zero point can be set by any one method.
Operator
Manually by program
Work coordinate
What is work offset in CNC?
This is also called work coordinate.This method is used to set zero point of the machine.Example- G54 X_ Z_.This is for master tool only.For other tool we need to set the tool geometry.
How to set work offset in CNC?
Practical of Work offset setting.-Touch the tool tip on face of raw material/workpiece and go to work offset G54 and set the Z value 0.0.Again touch the tool tip on OD of the work piece and set the X value .That is OD value.
What is Tool geometry offset in CNC?
This is the work offset for individual tool.Work offset required for other tool to perform the different operation.
What is Tool wear offset in CNC?
This offset is used to compensate tool wear.For example if there is 0.1mm of material remain after finishing cut.Then we need to input -0.1 in tool wear section and again to run the finishing cut program to remove remain material.
Interpolation
This method is the movement of Cutting tool from one point to another.
Linear
Circular
Helical
Parabolic
Cubic
Linear Interpolation(G00/G01)
In this method the cutting tool move in a straight line.
Circular Interpolation(G02/G03)
In this method the cutting tool moves as circle or arc.This is of two types.Clockwise and counter clockwise
Block(CNC information)
Its consists of 5 word written in Horizontal line.This is recognized by MCU((Machine control Unit).
How to cnc programming
Step-1 : DATUM SETTING
Example:-
G00 G54 G90 G95 X_ Z_;
Step-2 : TOOL CALL
Example;-
T1 D1;
Step-3 : Spindle/Chuck-RPM & Direction
Example:-
M03 S90 ;
Step-4 : Safety Distance
Bring the Tool to a Safety Distance
Step-5 : Main operation
Example:-Turning/Facing/Grooving/Chamfer/Radius
G01 X_ Y_;
Step-6 : Safety Distance
Return the tool to a safety distance.
Step-7 : Spindle /Program Stop
Example:- M05 M30;
CNC programming example-fanuc(Lathe)
O0001(PLAIN TURNING)-Fanuc
N1; Sequence number
T0; Tool wear cancel
G40; Cancelling G41 & G42
G28 U0 W0; Home position
G54; Work coordinate
G92 S1000 ; Limiting speed
G95 F0.2 T0101; Feed & Tool
G96 S250 M04; Cutting speed & Spindle Rotation
G00 Z 3.0; Safety distance for Z axis.-Rapid
G00 X 56.0; Safety distance for X axis-Rapid
G1 X 50.0 M08; Turning operation & Coolant ON
G01 Z -40; Turning Operation.
G1 X 56.0; After turning operation tool will return to safety distance in feed.
G00 X 200 M09; Return to safety distance in Rapid & coolant OFF
T0;
G28 U0 W0; Return to home position
M01; Optional stop
M30; Program reset
Basic of CNC programming example-Siemens(Lathe)
G0 G54 G90 G94 X120 Z2; Datum setting & rapid movement of a tool to a safety distance X120 and Z2
T1 D1 ; Tool Selection
M03 S90 ; Speed and direction
G0 X60 Z2 ; Safety distance
G1 X50 Z0 F0.3; Starting point & feed
G1 X50 Z-220; Turning
G1 X80 Z-220; Turning
G1 X80 Z-565; Turning & end point
G1 X100 F0.4 ; Tool safety
G0 X120; safety distance
G0 Z2; Safety distance
M05 M30; Spindle stop & Program end
Basic of CNC programming lathe
Before learning about cnc programming for lathe machine we should know about the Cartesian Coordinate system.From which we can find out the coordinate point for any work piece.We should also learn about WORK CO-ORDINATE,TOOL GEOMETRY,TOOL WEAR.
Cnc Facing programming
Raw material size – Diamter-20,Lenght- Any. If we want facing for 2 mm.
G0 X21.0 Z0.5 ; – Safety distance(Tool will move to 21.0 point in X axis and 0.5 in z axis rapidly ).20.0 is the diameter of raw material and face of work piece is the Z0.0.Tool will stop at Z 0.5 which is the distance from face.This is the suitable safety distance for raw material.After this it will start facing.
G01 Z-1.0 F0.3; – Tool will move to Z -1.0 in feed (Feed you can change)
G01 X 0.0; – Tool will move to X0.0 in feed .This is the facing operation of tool.As the tool start removing material from Z-1.0 to X0.0.That means 1.0 mm of material remove from face of the work piece.
G01 Z0.5; Now tool will move to Z 0.5 in feed.
G00 X21.0; Tool will move rapidly move to X21.0. Next to perform another facing operation.
G01 Z-2.0; Tool will move to Z-2.0 so that it can remove another 1.0 mm material
G01 X0.0; Tool will remove 1.0 mm of material from face of the work piece in this movement.
Now we can again move the tool to Z 0.5 in feed and then X21.0 in rapid.We can use the facing cycle to perform the facing operation.There we have to set the dimension to face and feed.The facing cycle will remove the material as per your requirement.
Basic of CNC Programming-Turning.
If the Raw material having diameter 20 and lenght 30. and we want to make it of diameter 18 upto lenght 15mm.
G00 Z3.0; – This is the safety distance for Z axis i.e tool will move rapidly and stop at Z3.0.Which is the distance from face.(As face of workpiece is taken Z0.0)
G00 X22.0; – This is the safety distance for X axis.
G01 X19.0; – The tool will move to 19 diameter in X axis in feed. .(This movement is for turning of 1mm i.e upto 19 diameter)
G01 Z-15; – This is the Turning operation.Tool will move from X19.0 to Z-15 with removing material.(Here you can turn ON the coolant)
G01 X22.0; – Tool will move to safety distance of x axis.
In this way you can turn another 1mm.This is the way for turning operation.
In today’s fast-paced manufacturing world, precision and efficiency are non-negotiable. That’s where the CNC mill comes into play. Whether you’re a hobbyist, a small business owner, or part of a large industrial operation, understanding how Read more…
Discover the power of CNC routing for precision cutting in wood, plastic, aluminum & more. Learn how CNC routers work and why they’re vital in modern manufacturing. What is CNC Routing? CNC routing is a Read more…
Explore the world of CNC 5 Axis machines, their benefits, and applications. Learn how 5-axis machining enhances precision and efficiency in manufacturing. Introduction to CNC 5 Axis Machines In the world of precision engineering, CNC Read more…
Does AC Use Gas in Car? A Complete Guide to How Your Car’s AC Works. It is one of the most common questions people ask is, “Does AC use gas in car?”. The answer is Read more…
Is Diesel Oil Flammable? Everything You Need to Know About Diesel Fuel Safety.Diesel fuel, a crucial energy source for many vehicles and machinery, often raises questions about its flammability. In this blog post, we’ll dive Read more…
CNC Machine long form : A Comprehensive Guide to Understanding Its Functionality and Benefits. In the world of modern manufacturing, efficiency and precision are crucial to producing high-quality products. One technology that has revolutionized the Read more…
CNC Meaning: What Does CNC Stand For and How Does It Work? When it comes to modern manufacturing and precision engineering, one term that frequently comes up is CNC. But what exactly does CNC mean, Read more…
CNC Machine Full Form: Understanding CNC Technology. In the world of modern manufacturing, CNC machines have revolutionized the way precision and efficiency are achieved. But what exactly is CNC, and why is it crucial to Read more…
Understanding the Impact of Carbon Monoxide from Cars: A Growing Environmental and Health Concern. Carbon monoxide (CO) is a colorless, odorless gas that can have serious environmental and health implications. While it can naturally produce Read more…
Are Carbon Monoxide Detectors Required in Apartments? A Comprehensive Guide.When it comes to ensuring the safety of your home, one of the most important yet often overlooked items is a carbon monoxide detector. Carbon monoxide Read more…
Are Carbon Monoxide Detectors Reliable? A Comprehensive Guide to Safety and Accuracy.Carbon monoxide (CO) is a colorless, odorless gas that can be deadly if inhaled in large quantities. This invisible danger makes carbon monoxide detectors Read more…
How Many CO Detectors Do You Need? A Complete Guide to Protecting Your Home.When it comes to protecting your home and loved ones from the dangers of carbon monoxide (CO), one of the first steps Read more…
How Often Should CO Detectors Be Replaced? A Complete Guide to Ensuring Safety. Carbon monoxide (CO) is a silent killer. It’s essential to ensure that your home is protected with a working carbon monoxide (CO) Read more…
Learn where are CO detectors required in residential homes, businesses, schools, and more. Understand the importance of CO detectors for safety and compliance. Carbon monoxide (CO) is a colorless, odorless, and tasteless gas that can Read more…
How Long Are CO Detectors Good For? The Essential Guide to Carbon Monoxide Safety.Carbon monoxide (CO) is a colorless, odorless, and tasteless gas that can be incredibly dangerous when undetected. Every year, thousands of people Read more…
Are CO Detectors Required? A Complete Guide to Understanding Their Importance and Legal Requirements. Carbon monoxide (CO) is a colorless, odorless, and tasteless gas that can be lethal when inhaled in high concentrations. Known as Read more…
Understanding Car Emissions Sensor: How They Work and Why They Matter. Discover how car emissions sensors help reduce pollution. It improve engine efficiency, and ensure your vehicle meets environmental standards. Learn more about their role Read more…
Car Oxygen Sensor Replacement Cost: Everything You Need to Know. Learn about the cost of replacing a car oxygen sensor. Including factors that affect pricing and signs that you need a new sensor. Get expert Read more…
How to remove gas from car ? If you find yourself in a situation where you need to remove gas from your car, whether it’s due to contamination, incorrect fueling, or for maintenance purposes, it’s Read more…
How Often Should You Recharge Your Car AC . A well-functioning air conditioning (AC) system is essential for comfort during hot weather, especially when driving long distances. However, like any other component in your vehicle, Read more…
Learn everything about Air conditioner refrigerant for car. Understand the types of refrigerants, how they work, and how to maintain your car’s AC system efficiently. Introduction If you’ve ever noticed your car’s air conditioner (AC) Read more…
Car Sensor Repair Cost: What You Need to Know.When it comes to car maintenance, modern vehicles are equipped with a wide range of sensors that play a crucial role in ensuring safety, performance, and efficiency. Read more…
Air Conditioner Gas Refill for Car: Essential Guide to Keeping Your Car Cool. Is your car’s AC blowing warm air? Learn all about air conditioner gas refills for cars, why it’s necessary, how often to Read more…
Everything You Need to Know About Air con gas for car: A Comprehensive Guide. When the temperature soars during the hot summer months, having a fully functional air conditioning system in your car becomes more Read more…
How to Remove Gas Smell from Car: A Complete Guide to Eliminate the Odor. Gasoline smells in your car can be irritating and concerning. Whether it’s a lingering odor from a recent fuel spill or Read more…
Will CO Detector Detect Natural Gas? Everything You Need to Know. When it comes to home safety, many of us are aware of the importance of carbon monoxide (CO) detectors. But a common question that Read more…
Will a CO Detector Detect a Gas Leak? Understanding the Difference and Safety Measures.When it comes to home safety, having the right detectors are crucial for protecting your family and property. Carbon monoxide (CO) detectors Read more…
Comparison of Milling machine mill. The Ultimate Guide to Milling machine mill: Revolutionizing Manufacturing with Precision. Type of CNC Milling Machine Spindle Orientation Best For Applications Advantages Vertical CNC Milling Machine Vertical Small to medium-sized Read more…
In the world of precision manufacturing, CNC machine 5 axis have transformed the way industries approach complex parts and products. Whether you’re a professional machinist, engineer, or a business owner in the manufacturing sector, understanding Read more…
Discover the power of CNC milling machine metal. Learn how these advanced tools deliver precision, speed, and versatility for high-quality metal parts across various industries. Overview and Benefits of CNC Milling Machines Section Details Introduction Read more…
In this blog post, we’ll explore the importance of CNC machines, what you can expect from a CNC machine course, and how to find top-quality CNC courses and training—whether online or near you. In today’s Read more…
Discover the CNC machine goliath , a portable, compact, and affordable solution for precise cutting, milling, and engraving. Ideal for hobbyists, small businesses, and DIY projects, it offers ease of use, versatility, and enhanced productivity. Read more…
The Essential Guide to Becoming a CNC Mill Machine Operator.In the world of manufacturing, CNC (Computer Numerical Control) machines have revolutionized the way parts and products are made. A CNC mill machine operator is a Read more…
In the world of precision manufacturing, CNC machine mill play a crucial role in shaping industries that rely on accuracy, efficiency, and complex designs. Whether you’re looking to understand how a CNC mill works or Read more…
How Soundproof Room Enhance Your Home: Cost, Tips, and Solutions for Apartments. In today’s fast-paced world, noise pollution is an ever-growing concern. Whether it’s the sound of traffic, noisy neighbors, or the hum of city Read more…
The Ultimate Guide to Encoder rotary : Understanding Encoder Types and Their Role in CNC Systems. In the world of CNC (Computer Numerical Control) machining, precision is everything. Whether you’re working on a manufacturing project, Read more…
Explore will ai replace mechanical engineers. While it won’t replace engineers, AI enhances their roles by automating routine tasks, improving efficiency, and enabling innovation. Learn how AI and engineers will collaborate to shape the future Read more…
Discover the ultimate guide to choosing the perfect mechanical tools set. Learn about essential components. Select the right tools for your needs, and tips for maintaining your toolset to ensure durability and performance. What is Read more…
The CNC laser cutting machine has emerged as one of the most advanced and versatile tools in modern manufacturing. From intricate designs to large-scale industrial applications, CNC laser cutting machines offer unmatched accuracy, speed, and Read more…
Learn Is hydraulic fluid flammable, including mineral oil-based, water-based, and synthetic types. Discover key factors affecting fire risks and essential safety tips for hydraulic systems. Types of Hydraulic Fluids Fluid Type Description Flammability Mineral Oil-Based Read more…
Discover the working principle, applications, and benefits of hydraulic press. Learn how these powerful machines are transforming industries, from manufacturing to metalworking and more. What is a Hydraulic Press? A hydraulic press uses hydraulic force Read more…
Estimating the Pressure Relief Valve Replacement Cost. On average, the cost to replace a pressure relief valve can range from $300 to $3,000 or more, depending on the factors listed above. Here’s a general breakdown: Read more…
Introduction: What Is a Check Valve? How Does Check Valves Work? Operation of check valve Check valves automatically open when the fluid flows in the correct direction and close when backflow occurs, ensuring that fluid Read more…
Mechanism,function,type,application,advantages and disadvantages of Spring loaded ball valve. Mechanism Uses a spring to provide automatic operation or actuation. Function Automatically holds the valve in a specific position (usually closed) when no external force is applied. Read more…
Material of Globe valve internals is stainless steel, bronze, or cast iron. It Contains the inlet and outlet ports for fluid flow. Component Function Valve Body Provides structure and controls the fluid flow path. Bonnet Read more…
Hydraulic control valve types,diagram and symbol. Role Essential components in fluid power systems Functions – Manage the flow of hydraulic fluids– Direct the flow of hydraulic fluids Applications – Construction equipment– Manufacturing machinery– Automotive applications Read more…
Hydraulic pump selection checklist to purchase from market. Factor Description Flow Rate Calculate total flow needed (GPM or L/min). Pressure Requirements Determine maximum operating pressure (PSI or bar). Pump Type Choose from: Gear, Vane, or Read more…
Types of piston pump in hydraulic system. Type of Piston Pump Description Advantages Applications Single Acting Piston Pump Moves the piston in one direction, creating suction and discharge strokes. – Simplicity in design– Cost-effective– Suitable Read more…
In this post, we’ll explore what piston pump hydraulic are, their advantages, applications, and maintenance tips to ensure optimal performance. Hydraulic systems are integral to various industries, from construction to manufacturing, thanks to their ability Read more…
Details of Vane pump for hydraulic system. Get diagram of balanced vane pump. Details of YUKEN pump price list and spare parts. Introduction of vane pump Overview Vane pumps are essential in various industrial applications, Read more…
Screw pump manufacturer. Screw pump types and drawing. Aspect Details Definition A positive displacement pump utilizing helical screws for fluid movement. Operating Principle Rotating screws create chambers that trap and transport fluid along their length. Read more…
Gerotor pump is essential components in various industries due to their efficient and reliable fluid transfer capabilities. This guide provides a detailed look at how these pumps work, their advantages, and their common applications. Design Read more…
Gear pump internal are crucial in fluid handling across various industries. To help you understand the options available, we’ve broken down the different types of internal gear pumps, their features, and applications in an easy-to-read Read more…
Internal Gear Pump price,parts,working principle,diagram and manufacturer.Details here. Learn hydraulic system. Overview of Internal Gear Pumps Aspect Details What is an Internal Gear Pump? A positive displacement pump with an internal gear (inside) and an Read more…
External gear pumps are essential components in many hydraulic systems and fluid transfer applications. Their reliability and efficiency make them a popular choice across various industries. In this article, we’ll explore the fundamentals of external Read more…
Gear Pumps Hydraulic: An In-Depth Guide. This article explores the working principles, parts, and manufacturers of gear pumps, along with their advantages and disadvantages. Gear pumps are integral to many hydraulic systems, offering reliable and Read more…
In today’s fast-paced manufacturing world, precision and efficiency are non-negotiable. That’s where the CNC mill comes into play. Whether you’re a hobbyist, a small business owner, or part of a large industrial operation, understanding how Read more…
Discover the power of CNC routing for precision cutting in wood, plastic, aluminum & more. Learn how CNC routers work and why they’re vital in modern manufacturing. What is CNC Routing? CNC routing is a Read more…
Explore the world of CNC 5 Axis machines, their benefits, and applications. Learn how 5-axis machining enhances precision and efficiency in manufacturing. Introduction to CNC 5 Axis Machines In the world of precision engineering, CNC Read more…
0 Comments