Cncprogrammingbasics 100101063548 Phpapp02
Cncprogrammingbasics 100101063548 Phpapp02
Program structure
Every program consists of:
1. Program Start
The program start is the program number. The
program number begins with character/letter O.
2. Program Contents
NC blocks
3. Program End
M30 for a main program
M17 for a sub-program
Program Numbers
O6999
.
.
.
O0256
O0255
.
.
.
O0000
CNC Prg. Basics 2
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
Example:
P0 N… …
P0 P1 N… G01 X40. Z25. F…
P1 P2 N… G01 X60. Z-40. F…
P2 N… …
Absolute coordinate
system
Example:
P0 N… …
P0 P1 N… G01 U5. W-25. F…
P1 P2 N… G01 X10. Z-15. F…
P2 N… …
Incremental coordinate
system
CNC Prg. Basics 7
Mixed Programming
Example:
P0 N… …
P0 P1 N… G01 U5. W-25. F…
P1 P2 N… G01 X60. Z-15. F…
P2 N… …
Mixed coordinate
system
CNC Prg. Basics 8
Self-holding Functions (1)
Incremental dimensions of
the target point
coordinates:
N030 G91
N040 G00 X-10,5 Z-31
CNC Prg. Basics 15
G01, Linear Interpolation
G01 X… Z… 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
P0: tool position N060 G01 X4.5 Z-37
G90
G01 X+140 Z-90
G91
G01 X+40 Z-60
Target point incr.
PO: Start Point
P1: Target Point