Showing posts with label CNC simulator. Show all posts
Showing posts with label CNC simulator. Show all posts

Friday 12 December 2014

TO WRITE CNC PART PROGRAM USING G00 AND G01 CODES.

G Codes:
G-Code or preparatory code or function, are functions in the Numerical control programming language. The G-codes are the codes that position the tool and do the actual work, as opposed to M-codes, that manages the machine.
T for tool-related codes
S and F are tool-Speed and tool-Feed,
D-codes for tool compensation
M codes:
M codes control the overall machine, causing it to stop, start, and turn on coolant, etc. whereas other codes pertain to the path traversed by cutting tools. Different machine tools may use the same code to perform different functions; even machines that use the same CNC control.
Partial list of M-Codes:
M00=Program Stop (non-optional)
M01=Optional Stop, machine will only stop if operator selects this option
M02=End of Program
M03=Spindle on (CW rotation)
M04=Spindle on (CCW rotation)
M05=Spindle Stop
M06=Tool Change
M07=Coolant on (flood)
M08=Coolant on (mist)
M09=Coolant off
M10=Pallet clamp on
M11=Pallet clamp off
M19=Spindle orientation
M30=End of program/rewind tape (may still be required for older CNC machines)

G00 Code:
G00 code is a rapid tool move that is used when moving tool in a linear motion from position to position without cutting any material.
G01 code:
The G01 code is a straight line feed move in a combination of X, Y or Z axis. It’s used specifically for the linear removal of material from a work piece. 

PROGRAM:
The following example is done by using G00 and G01 codes

Program:
         N01 G90 G20
         N02 M06 T05 M03 S1200
         N03 G00 X0 Y0 Z2
         N04 G00 X10 Y10
         N05 G01 Z-2.5 F200
         N06 G01 X30 Y10
         N07 G01 X30 Y30
         N08 G01 X25 Y30
         N09 G01 X25 Y15
         N10 G01 X15 Y15
         N11 G01 X15 Y30
         N12 G01 X10 Y30
         N13 G01 X10 Y10
         N14 G00 Z2
         N15 G00X0 Y0
         N16 M05 M30

Tuesday 9 December 2014

code for writing name in CNC simulator

G & M codes:
$AddRegPart 1 
G92z50
T1 M06
G00x40 y40 z2
G01z-5 F400 S 3000 M03
G01x45 y60
G01x50 y40
G01X47.5 y45 
G01x42.5
G01z2
G00x55 y40 z2
G01z-5 F400 S 3000 M03
G01y60
G01x57
G02y50 R5 
G01x55
G01x65 y40
G01z2
G00x70 y40 z2
G01z-5 F400 S 3000 M03
G03y50 R5
G02y60 R5
G01z2
G00x80 y40 z2
G01z-5 F400 S 3000 M03
G01x85 y60
G01x90 y40
G01X87.5 y45 
G01x82.5
G01z2
G00x95 y60 z2
G01z-5 F400 S 3000 M03
G01y40 
G01x105
G01z2
G00x110 y40 z2
G01z-5 F400 S 3000 M03
G01x115 y60 
G01x120 y40
G01X117.5 y45 
G01x113.5
G01z2
G00x125 y40 z2
G01z-5 F400 S 3000 M03
G01y60 
G01x135 y40
G01y60
G01z2
G00x40 y80 z2
G01z-5 F400 S 3000 M03
G01y100
G01x45 y90
G01X50 y100
G01y80
G01z2
G00x55 y85 z2
G01z-5 F400 S 3000 M03
G02I3 J0
G00x55 y85 z2
G01z-5 F400 S 3000 M03
G02I5 J0
G01z2
G00x30 y70 z2
G01z-5 F400 S 3000 M03
G01x150
G03y80 R5
G02y90 R5
G03y100 R5
G02y110 R5
G03y120 R5
G01x30
G03y110 R5
G02y100 R5
G03y90 R5
G02y80 R5
G03y70 R5
G02y60 R5
G03y50 R5
G02y40 R5
G03y30 R5
G01x150 R5
G03y40 R5
G02y50 R5
G03y60 R5
G02y70 R5
G01z40
M30