SlideShare a Scribd company logo
3
Most read
14
Most read
17
Most read
CNC Programming Basics Program structure Every program consists of: Program Start The program start is the program number. The program number begins with character/letter  O . Program Contents NC blocks Program End M30 for a main program M17 for a sub-program
CNC Program Numbers Program Numbers O 6999 . . . O 0256 O 0255 . . . O 0000
CNC Program Blocks (1) N is the address Block numbers from N0000 to N9999 A block consists of number and words Words are contents of a block Block numbers are selected in the jumps of ten for the purpose of insertion
CNC Program Blocks (2) A block consists of one or more blocks A Word consists of a character (address) and a number. Every address has a certain meaning, on which the corresponding number depends
CNC Prg. Syntax Regulations The maximum block length must not exceeded four lines. If max. length exceeded alarm 650 occurs. Every block starts with a block number. After the block numbers follows the  G  command. Words consists of coordinates  X(U) ,  Z(W) . For  G02 ,  G03  program interpolation parameter  I  and  K  are placed after X(U), Z(W). The  F  word (feed, thread pitch). The  S  word (cutting speed). The  T  word (tool address). The  M  word (additional functions).
Absolute Value Programming    P0 N… … P0   P1 N… G01 X40. Z25.  F… P1   P2 N… G01 X60. Z-40. F… P2  N… … Absolute coordinate system Example:
Incremental Value Programming Incremental coordinate system Example:     P0 N… … P0   P1 N… G01 U5. W-25.  F… P1   P2 N… G01 X10. Z-15. F… P2  N… …
Mixed Programming Mixed coordinate system Example:     P0 N… … P0   P1 N… G01 U5. W-25.  F… P1   P2 N… G01 X60. Z-15. F… P2  N… …
Self-holding Functions (1) The majority of G and M commands and other words are self-holding, remain active until overwritten or deactivated/deselected. Aimed to simplify and to reduce programming tasks.   Example:  G41 can be deactivated by issuing G40 command .
Self-holding Functions (2) Take-over of G00 commands in block N0110 In block N0120 G00 is deactivated by G01. G01 is active. N0050 M03 N0060 … … N0120 M04 Example 1: Example 2: M03 activated at N0050 and effective from N0050 through N120. M03 deactivated at N0120 by M04 command N0100 G00 X50. Z+10. N0110  X36. Z+2. N0120 G01 X40. Z-10.  F…
Reference Points M  = Machine zero point. (unchangeable ref. Point determined by machine manufacturer) N  = Tool mounting reference point W  = Work piece zero point. (can be freely determined by the programmer and can be moved within program
Work piece (1)
Work piece (2)
G  & M Commands G00: Rapid traverse G01: Linear interpolation G02: Circular interpolation clockwise G03: Circular interpolation counter clockwise G70: Measuring in Inch (USA) G71: Measuring in mm (Other countries) M03: Spindle ON clockwise M04: Spindle ON counter clockwise M20: Tailstock back M21: Tailstock forward
G 00, Rapid Traverse Absolute dimensions  of the target point coordinates: N030 G90 N040 G00 X48 Z-26 An absolute X coordinate related to the diameter. Incremental dimensions  of the target point coordinates: N030 G91 N040 G00 X-10,5 Z-31 Tool position  X69 Z5
G 01, Linear Interpolation P0: tool position G90: N030 G00 X39 Z2 N040 G01 X39 Z0 N050 G90 N060 G01 X48 Z-37 G91: N030 G00 X39 Z2 N040 G01 X39 Z0 N050 G91 N060 G01 X4.5 Z-37 G01 X… Z…
G 90 & G91 Commands G90 G01 X+140 Z-90  Target point abs. G91 G01 X+40 Z-60 Target point incr. PO: Start Point P1: Target Point

More Related Content

What's hot (20)

PPT
4 basic cnc programming milling
Mahesh Namdev
 
PPT
CNC Turning.ppt
HimanshuPathak368871
 
PPTX
CNC Turning and Milling centres
Achyuth Padmanabh
 
PPT
CNC Milling (fanuc system)
NavinBurnwal1
 
PPT
Cnc part programming 4 unit
palanivendhan
 
PPT
Cnc turning(Fanuc system)
NavinBurnwal1
 
PPT
Cnc lathe
kailashgavare
 
PPT
Cnc lathe ppt
99759067
 
PPTX
Unit V CNC Machining
laxtwinsme
 
PDF
CNC Milling
endika55
 
PDF
Chapter 4 cnc part programming
RAHUL THAKER
 
PPTX
CNC Milling
Manpreet Singh
 
PDF
CNC PROGRAMMING.pdf
AbhiKarn2
 
PPT
NC pogramming
illpa
 
PPT
5 g-code
sundar sivam
 
PDF
Turning
endika55
 
PDF
Milling
endika55
 
PPTX
Cnc milling turning
Salman Jailani
 
PDF
Cnc tooling for cnc machine(130670119596)
Kushal Shah
 
4 basic cnc programming milling
Mahesh Namdev
 
CNC Turning.ppt
HimanshuPathak368871
 
CNC Turning and Milling centres
Achyuth Padmanabh
 
CNC Milling (fanuc system)
NavinBurnwal1
 
Cnc part programming 4 unit
palanivendhan
 
Cnc turning(Fanuc system)
NavinBurnwal1
 
Cnc lathe
kailashgavare
 
Cnc lathe ppt
99759067
 
Unit V CNC Machining
laxtwinsme
 
CNC Milling
endika55
 
Chapter 4 cnc part programming
RAHUL THAKER
 
CNC Milling
Manpreet Singh
 
CNC PROGRAMMING.pdf
AbhiKarn2
 
NC pogramming
illpa
 
5 g-code
sundar sivam
 
Turning
endika55
 
Milling
endika55
 
Cnc milling turning
Salman Jailani
 
Cnc tooling for cnc machine(130670119596)
Kushal Shah
 

Similar to Cnc Programming Basics (20)

PPTX
CNC(computerized Numeric Coding) Lecture.pptx
Husnain181
 
PPT
CNC-LATHE MPP1.ppt
dharma raja`
 
PPT
5 g-code
Sanjeeb Mohapatra
 
PPT
cadcampart11.ppt
Tarun Maruvada
 
PPSX
3 CNC Programming R2CNCCNCCNCCNCCNCCNC.ppsx
karanSingh727650
 
PPTX
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptx
sahils237192101
 
PDF
Lecture 25.pdf
kprudhviraj5
 
PDF
CNC Programming.pptx.pdf
EngineeringTamilan
 
PPTX
CNC(COMPUTER NUMERICAL CONTROL MACHINE) By-Er. VED PRAKASH
Ved Prakash
 
PDF
7-CNC_Programming_For_Lathe_na_eng.pdf
ssuser46f1ac
 
PPTX
CNC part programming
jntuhcej
 
PPT
CNC Basics
Konal Singh
 
PPTX
CNC PART PROGRAMMING.pptx
AtharvaJagtap15
 
PDF
Mach4 mill-g code-manual
Eng-Ibrahim Tamimi
 
PPTX
Navjot Singh Thakur.pptx
ThakurNavjotSingh
 
PPT
ABOUT CNC.ppt123456789 vergood useful knowledgeable namaste
ssuser572590
 
PPTX
LATHE - TRAINING.pptx
ssuser2b6e89
 
PPTX
MILL - TRAINING.pptx
ssuser2b6e89
 
PPTX
Cnc pgrming seminar-
abhipawar123
 
CNC(computerized Numeric Coding) Lecture.pptx
Husnain181
 
CNC-LATHE MPP1.ppt
dharma raja`
 
cadcampart11.ppt
Tarun Maruvada
 
3 CNC Programming R2CNCCNCCNCCNCCNCCNC.ppsx
karanSingh727650
 
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptx
sahils237192101
 
Lecture 25.pdf
kprudhviraj5
 
CNC Programming.pptx.pdf
EngineeringTamilan
 
CNC(COMPUTER NUMERICAL CONTROL MACHINE) By-Er. VED PRAKASH
Ved Prakash
 
7-CNC_Programming_For_Lathe_na_eng.pdf
ssuser46f1ac
 
CNC part programming
jntuhcej
 
CNC Basics
Konal Singh
 
CNC PART PROGRAMMING.pptx
AtharvaJagtap15
 
Mach4 mill-g code-manual
Eng-Ibrahim Tamimi
 
Navjot Singh Thakur.pptx
ThakurNavjotSingh
 
ABOUT CNC.ppt123456789 vergood useful knowledgeable namaste
ssuser572590
 
LATHE - TRAINING.pptx
ssuser2b6e89
 
MILL - TRAINING.pptx
ssuser2b6e89
 
Cnc pgrming seminar-
abhipawar123
 
Ad

Recently uploaded (20)

PPTX
Customer Service vs Customer Support | Quick Comparison (2025)
Apps 365
 
PDF
REPORT WRITING for Internal Auditors (considering IIA's Global Internal Audit...
Abdullah Mohammed
 
PPTX
Essar at IEW 2025, Leading the Way to India’s Green Energy Transition.
essarcase
 
PDF
Cannabis Microbusiness Pitch Deck Sample (New York)
CannaBusinessPlans
 
PDF
Joel Freedman - Leads A Dedicated Team
Joel Freedman
 
PPTX
Jessica Garza: At the Intersection of Technology and Humanity
Jessica Garza
 
PPTX
Real Options Analysis in an Era of Market Volatility and Technological Disrup...
abakahmbeahvincent
 
PDF
SACRS_Spring Mag 2025 Graceada Article.pdf
matthieu81
 
PDF
Haiti Educational System Le Floridien.pdf
LE FLORIDIEN
 
PDF
Mastering Healthcare Brand Building & Revenue Optimization: The Shaynly Method
Shaynly
 
PDF
A Brief Introduction About Dorian Fenwick
Dorian Fenwick
 
PPT
SixSigma Training Course homework in 2016
Tokyo Security Community
 
PDF
Netflix Social Watchlists Business Proposal
lexarofficial222
 
PDF
Books on Display in the Library June 2025 - Matariki
NZSG
 
PPTX
The Strategic Landscape of Essar’s CSR Initiatives in 2024
essarupdate
 
PPTX
"An Inspirational Journey of Peyush Bansal: From Microsoft to Lenskart
Krishna Raval
 
PDF
Rasha Morad, MD Career Overview
Rasha Morad MD
 
PPTX
5 Smart Ways to Build a Highly Productive Team
RUPAL AGARWAL
 
PPTX
Appreciations - June 25.pptxggggggghhhhhh
anushavnayak
 
PDF
Adnan Imam - A Dynamic Freelance Writer
Adnan Imam
 
Customer Service vs Customer Support | Quick Comparison (2025)
Apps 365
 
REPORT WRITING for Internal Auditors (considering IIA's Global Internal Audit...
Abdullah Mohammed
 
Essar at IEW 2025, Leading the Way to India’s Green Energy Transition.
essarcase
 
Cannabis Microbusiness Pitch Deck Sample (New York)
CannaBusinessPlans
 
Joel Freedman - Leads A Dedicated Team
Joel Freedman
 
Jessica Garza: At the Intersection of Technology and Humanity
Jessica Garza
 
Real Options Analysis in an Era of Market Volatility and Technological Disrup...
abakahmbeahvincent
 
SACRS_Spring Mag 2025 Graceada Article.pdf
matthieu81
 
Haiti Educational System Le Floridien.pdf
LE FLORIDIEN
 
Mastering Healthcare Brand Building & Revenue Optimization: The Shaynly Method
Shaynly
 
A Brief Introduction About Dorian Fenwick
Dorian Fenwick
 
SixSigma Training Course homework in 2016
Tokyo Security Community
 
Netflix Social Watchlists Business Proposal
lexarofficial222
 
Books on Display in the Library June 2025 - Matariki
NZSG
 
The Strategic Landscape of Essar’s CSR Initiatives in 2024
essarupdate
 
"An Inspirational Journey of Peyush Bansal: From Microsoft to Lenskart
Krishna Raval
 
Rasha Morad, MD Career Overview
Rasha Morad MD
 
5 Smart Ways to Build a Highly Productive Team
RUPAL AGARWAL
 
Appreciations - June 25.pptxggggggghhhhhh
anushavnayak
 
Adnan Imam - A Dynamic Freelance Writer
Adnan Imam
 
Ad

Cnc Programming Basics

  • 1. CNC Programming Basics Program structure Every program consists of: Program Start The program start is the program number. The program number begins with character/letter O . Program Contents NC blocks Program End M30 for a main program M17 for a sub-program
  • 2. CNC Program Numbers Program Numbers O 6999 . . . O 0256 O 0255 . . . O 0000
  • 3. CNC Program Blocks (1) N is the address Block numbers from N0000 to N9999 A block consists of number and words Words are contents of a block Block numbers are selected in the jumps of ten for the purpose of insertion
  • 4. CNC Program Blocks (2) A block consists of one or more blocks A Word consists of a character (address) and a number. Every address has a certain meaning, on which the corresponding number depends
  • 5. CNC Prg. Syntax Regulations The maximum block length must not exceeded four lines. If max. length exceeded alarm 650 occurs. Every block starts with a block number. After the block numbers follows the G command. Words consists of coordinates X(U) , Z(W) . For G02 , G03 program interpolation parameter I and K are placed after X(U), Z(W). The F word (feed, thread pitch). The S word (cutting speed). The T word (tool address). The M word (additional functions).
  • 6. Absolute Value Programming  P0 N… … P0  P1 N… G01 X40. Z25. F… P1  P2 N… G01 X60. Z-40. F… P2  N… … Absolute coordinate system Example:
  • 7. Incremental Value Programming Incremental coordinate system Example:  P0 N… … P0  P1 N… G01 U5. W-25. F… P1  P2 N… G01 X10. Z-15. F… P2  N… …
  • 8. Mixed Programming Mixed coordinate system Example:  P0 N… … P0  P1 N… G01 U5. W-25. F… P1  P2 N… G01 X60. Z-15. F… P2  N… …
  • 9. Self-holding Functions (1) The majority of G and M commands and other words are self-holding, remain active until overwritten or deactivated/deselected. Aimed to simplify and to reduce programming tasks. Example: G41 can be deactivated by issuing G40 command .
  • 10. Self-holding Functions (2) Take-over of G00 commands in block N0110 In block N0120 G00 is deactivated by G01. G01 is active. N0050 M03 N0060 … … N0120 M04 Example 1: Example 2: M03 activated at N0050 and effective from N0050 through N120. M03 deactivated at N0120 by M04 command N0100 G00 X50. Z+10. N0110 X36. Z+2. N0120 G01 X40. Z-10. F…
  • 11. Reference Points M = Machine zero point. (unchangeable ref. Point determined by machine manufacturer) N = Tool mounting reference point W = Work piece zero point. (can be freely determined by the programmer and can be moved within program
  • 14. G & M Commands G00: Rapid traverse G01: Linear interpolation G02: Circular interpolation clockwise G03: Circular interpolation counter clockwise G70: Measuring in Inch (USA) G71: Measuring in mm (Other countries) M03: Spindle ON clockwise M04: Spindle ON counter clockwise M20: Tailstock back M21: Tailstock forward
  • 15. G 00, Rapid Traverse Absolute dimensions of the target point coordinates: N030 G90 N040 G00 X48 Z-26 An absolute X coordinate related to the diameter. Incremental dimensions of the target point coordinates: N030 G91 N040 G00 X-10,5 Z-31 Tool position X69 Z5
  • 16. G 01, Linear Interpolation P0: tool position G90: N030 G00 X39 Z2 N040 G01 X39 Z0 N050 G90 N060 G01 X48 Z-37 G91: N030 G00 X39 Z2 N040 G01 X39 Z0 N050 G91 N060 G01 X4.5 Z-37 G01 X… Z…
  • 17. G 90 & G91 Commands G90 G01 X+140 Z-90 Target point abs. G91 G01 X+40 Z-60 Target point incr. PO: Start Point P1: Target Point

Editor's Notes

  • #2: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #3: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #4: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #5: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #6: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #7: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #8: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #9: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #10: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #11: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #12: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #13: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #14: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #15: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #16: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #17: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002
  • #18: Computer Numeric Control @ UPH By Jonny Latuny, M.Eng © August 2002