0% found this document useful (0 votes)
599 views

NC Programming Codes

The document defines various G and M codes used in NC programming. G codes specify path functions like linear interpolation, circular interpolation, and coordinate systems. M codes control functions like spindle control and tool changes. Some codes are optional and specific to features of certain CNC controls, like laser power control codes. The codes provide instructions to precisely control machining operations through computerized part programs.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
599 views

NC Programming Codes

The document defines various G and M codes used in NC programming. G codes specify path functions like linear interpolation, circular interpolation, and coordinate systems. M codes control functions like spindle control and tool changes. Some codes are optional and specific to features of certain CNC controls, like laser power control codes. The codes provide instructions to precisely control machining operations through computerized part programs.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 9

NC Programming Codes

NC Programming as per ISO (DIN 66025) and RS274 G-Codes simple definition G00 Rapid traverse G01 Linear interpolation with feedrate G02 Circular interpolation (clockwise) G03 Circular interpolation (counter clockwise) G2/G3 Helical interpolation G04 Dwell time in milliseconds G05 Spline definition G06 Spline interpolation G07 Tangential circular interpolation / Helix interpolation / Polygon interpolation / Feedrate interpolation G08 Ramping function at block transition / Look ahead "off" G09 No ramping function at block transition / Look ahead "on" G10 Stop dynamic block preprocessing G11 Stop interpolation during block preprocessing G12 Circular interpolation (cw) with radius G13 Circular interpolation (ccw) with radius G14 Polar coordinate programming, absolute G15 Polar coordinate programming, relative G16 Definition of the pole point of the polar coordinate system G17 Selection of the X, Y plane G18 Selection of the Z, X plane G19 Selection of the Y, Z plane G20 Selection of a freely definable plane G21 Parallel axes "on" G22 Parallel axes "off" G24 Safe zone programming; lower limit values G25 Safe zone programming; upper limit values G26 Safe zone programming "off" G27 Safe zone programming "on" G33 Thread cutting with constant pitch G34 Thread cutting with dynamic pitch G35 Oscillation configuration G38 Mirror imaging "on" G39 Mirror imaging "off" G40 Path compensations "off" G41 Path compensation left of the work piece contour G42 Path compensation right of the work piece contour G43 Path compensation left of the work piece contour with altered approach G44 Path compensation right of the work piece contour with altered approach G50 Scaling G51 Part rotation; programming in degrees G52 Part rotation; programming in radians G53 Zero offset off G54 Zero offset #1 G55 Zero offset #2 G56 Zero offset #3 G57 Zero offset #4 G58 Zero offset #5 G59 Zero offset #6 G63 Feed / spindle override not active G66 Feed / spindle override active G70 Inch format active G71 Metric format active G72 Interpolation with precision stop "off" G73 Interpolation with precision stop "on" G74 Move to home position

G75 Curvature function activation G76 Curvature acceleration limit G78 Normalcy function "on" (rotational axis orientation) G79 Normalcy function "off" G80 - G89 for milling applications: G80 Canned cycle "off" G81 Drilling to final depth canned cycle G82 Spot facing with dwell time canned cycle G83 Deep hole drilling canned cycle G84 Tapping or Thread cutting with balanced chuck canned cycle G85 Reaming canned cycle G86 Boring canned cycle G87 Reaming with measuring stop canned cycle G88 Boring with spindle stop canned cycle G89 Boring with intermediate stop canned cycle G81 - G88 for cylindrical grinding applications: G81 Reciprocation without plunge G82 Incremental face grinding G83 Incremental plunge grinding G84 Multi-pass face grinding G85 Multi-pass diameter grinding G86 Shoulder grinding G87 Shoulder grinding with face plunge G88 Shoulder grinding with diameter plunge G90 Absolute programming G91 Incremental programming G92 Position preset G93 Constant tool circumference velocity "on" (grinding wheel) G94 Feed in mm / min (or inch / min) G95 Feed per revolution (mm / rev or inch / rev) G96 Constant cutting speed "on" G97 Constant cutting speed "off" G98 Positioning axis signal to PLC G99 Axis offset G100 Polar transformation "off" G101 Polar transformation "on" G102 Cylinder barrel transformation "on"; cartesian coordinate system G103 Cylinder barrel transformation "on," with real-time-radius compensation (RRC) G104 Cylinder barrel transformation with center line migration (CLM) and RRC G105 Polar transformation "on" with polar axis selections G106 Cylinder barrel transformation "on" polar-/cylinder-coordinates G107 Cylinder barrel transformation "on" polar-/cylinder-coordinates with RRC G108 Cylinder barrel transformation polar-/cylinder-coordinates with CLM and RRC G109 Axis transformation programming of the tool depth G110 Power control axis selection/channel 1 G111 Power control pre-selection V1, F1, T1/channel 1 (Voltage, Frequency, Time) G112 Power control pre-selection V2, F2, T2/channel 1 G113 Power control pre-selection V3, F3, T3/channel 1 G114 Power control pre-selection T4/channel 1 G115 Power control pre-selection T5/channel 1 G116 Power control pre-selection T6/pulsing output G117 Power control pre-selection T7/pulsing output G120 Axis transformation; orientation changing of the linear interpolation rotary axis G121 Axis transformation; orientation change in a plane G125 Electronic gear box; plain teeth G126 Electronic gear box; helical gearing, axial G127 Electronic gear box; helical gearing, tangential G128 Electronic gear box; helical gearing, diagonal G130 Axis transformation; programming of the type of the orientation change G131 Axis transformation; programming of the type of the orientation change G132 Axis transformation; programming of the type of the orientation change G133 Zero lag thread cutting "on"

G134 G140 G141 G160 G161 G162 G163 G164 G165 G166 G170 G171 G172 G175 G176 G180 G181 G182 G183 G184 G186 G188 G190 G191 G192 G193 G200 G201 G202 G203 G210 G211 G212 G213 G214 G215 G216 G217 G220 G221 G222 G223 G265 G270 G271 G272 G274 G275 G276 G310 G311 G312 G313 G314 G315 G316 G317

Zero lag thread cutting "off" Axis transformation; orientation designation work piece fixed coordinates Axis transformation; orientation designation active coordinates ART activation ART learning function for velocity factors "on" ART learning function deactivation ART learning function for acceleration factors ART learning function for acceleration changing Command filter "on" Command filter "off" Digital measuring signals; block transfer with hard stop Digital measuring signals; block transfer without hard stop Digital measuring signals; block transfer with smooth stop SERCOS-identification number "write" SERCOS-identification number "read" Axis transformation "off" Axis transformation "on" with not rotated coordinate system Axis transformation "on" with rotated / displaced coordinate system Axis transformation; definition of the coordinate system Axis transformation; programming tool dimensions Look ahead; corner acceleration; circle tolerance Activation of the positioning axes Diameter programming deactivation Diameter programming "on" and display of the contact point Diameter programming; only display contact point diameter Diameter programming; only display contact point actual axes center point Corner smoothing "off" Corner smoothing "on" with defined radius Corner smoothing "on" with defined corner tolerance Corner smoothing with defined radius up to maximum tolerance Power control axis selection/Channel 2 Power control pre-selection V1, F1, T1/Channel 2 Power control pre-selection V2, F2, T2/Channel 2 Power control pre-selection V3, F3, T3/Channel 2 Power control pre-selection T4/Channel 2 Power control pre-selection T5/Channel 2 Power control pre-selection T6/pulsing output/Channel 2 Power control pre-selection T7/pulsing output/Channel 2 Angled wheel transformation "off" Angled wheel transformation "on" Angled wheel transformation "on" but angled wheel moves before others Angled wheel transformation "on" but angled wheel moves after others Distance regulation axis selection Turning finishing cycle Stock removal in turning Stock removal in facing Peck finishing cycle Outer diameter / internal diameter turning cycle Multiple pass threading cycle Power control axes selection /channel 3 Power control pre-selection V1, F1, T1/channel 3 Power control pre-selection V2, F2, T2/channel 3 Power control pre-selection V3, F3, T3/channel 3 Power control pre-selection T4/channel 3 Power control pre-selection T5/channel 3 Power control pre-selection T6/pulsing output/Channel 3 Power control pre-selection T7/pulsing output/Channel 3

Note that some of the above G-codes are not standard. Specific control features, such as laser power control, enable those optional codes.

M codes simple definition M00 Unconditional stop M01 Conditional stop M02 End of program M03 Spindle clockwise M04 Spindle counterclockwise M05 Spindle stop M06 Tool change (see Note below) M19 Spindle orientation M20 Start oscillation (configured by G35) M21 End oscillation M30 End of program M40 Automatic spindle gear range selection M41 Spindle gear transmission step 1 M42 Spindle gear transmission step 2 M43 Spindle gear transmission step 3 M44 Spindle gear transmission step 4 M45 Spindle gear transmission step 5 M46 Spindle gear transmission step 6 M70 Spline definition, beginning and end curve 0 M71 Spline definition, beginning tangential, end curve 0 M72 Spline definition, beginning curve 0, end tangential M73 Spline definition, beginning and end tangential M80 Delete rest of distance using probe function, from axis measuring input M81 Drive On application block (resynchronize axis position via PLC signal during the block) M101-M108 Turn off fast output byte bit 1 (to 8) M109 Turn off all (8) bits in the fast output byte M111-M118 Turn on fast output byte bit 1 (to 8) M121-M128 Pulsate (on/off) fast output byte bit 1 (to 8) M140 Distance regulation on (configured by G265) M141 Distance regulation off M150 Delete rest of distance using probe function, for a probe input (one of 16, M151-M168) M151-M158 Digital input byte 1 bit 1 (to bit 8) is the active probe input M159 PLC cannot define the bit mask for the probe inputs M160 PLC can define the bit mask for the probe inputs (up to 16) M161-M168 Digital input byte 2 bit 1 (to bit 8) is the active probe input M170 Continue the block processing look ahead of the part program (cancel the M171) M171 Stop the block processing look ahead of the probe input part program segment (like a G10) M200 Activate the handwheel operation in the automatic mode (to introduce an offset in the program) M201-M208 Select the axis (by number from 1 to 8) for the handwheel operation M209 Activate the handwheel operation in the automatic mode, with PLC control of the axis selection M210 Deactivate the handwheel input while in the automatic mode M211 Deactivate this handwheel feature and also remove the handwheel offset (if any) M213 Spindle 2 clockwise M214 Spindle 2 counterclockwise M215 Spindle 2 stop M280 Switchable spindle/rotary axis, rotary axis on, first combination M281 Switchable spindle/rotary axis, rotary axis on, second combination M290 Switchable spindle/rotary axis, spindle enabled, first combination M291 Switchable spindle/rotary axis, spindle enabled, second combination Note: Other machine functions, like tool change (usually M06) or coolant control, have their M-code value specified by the PLC application not by the CNC software. Most of the M-code values in above list are configurable. Other M-codes (up to M699) can be handled by the PLC application based on the particular machine requirements.

Popis naredbi za Sinumerik 840D glodanje


Adrese ANG Kut A A-os (os rotacije) AP Polarni kut AR Kruni kut irenja CR Polumjer kruga D Izbor ili ponitenje kompenzacije alata / Broj ruba alata F Posmak u sekundama G G-kod (uvjeti kretanja) H Pomone funkcije I Kruna interpolacija, mora se odrediti sredite kruga I1 Kruna interpolacija CIP, mora se odrediti posredna toka J Kruna interpolacija, mora se odrediti sredite kruga J1 Kruna interpolacija CIP, mora se odrediti posredna toka K Kruna interpolacija, mora se odrediti sredite kruga K1 Kruna interpolacija CIP, mora se odrediti posredna toka L Pozivanje potprograma M M-funkcije (dodatne funkcije) N Broj bloka P Broj ponavljanja potprograma Q Rotiranje osi razvodne glave u desno R Aritmetiki parametri RP Polarni radijus S Brzina vrtnje radnog vretena SPOS Poloaj radnog vretena T Broj alata X Linearna os paralelna s prednjim rubom stola Y Linearna os Z Linearna vertikalna os (glava za glodanje) : Glavni blok / Obustava bloka G - kodovi G0 Gibanje u brzom hodu G1 Linearno gibanje u radnom hodu G2 Kruno gibanje u smjeru kazaljke na satu G3 Kruno gibanje u suprotnom smjeru od kazaljke na satu CIP Kruno gibanje kroz toke G4 Vrijeme ekanja G17-19 Izbor ravnine G25 Min. ogranienje radnog prostora / brzine vrtnje vretena G26 Max. ogranienje radnog prostora / brzine vrtnje vretena G33 Narezivanje s konstantnim ulazom G40-42 Kompenzacija radijusa alata G54-57, Odreena nul-toka G53 Ponitenje izbora nul toke G60 Smanjenje brzine, precizno pozicioniranje G601/G602 Promjena bloka pri preciznom pozicioniranju (precizna / gruba) G603 Promjena bloka na kraju interpolacijskog bloka G63 Unutarnje narezivanje bez sinkronizacije G64 Mod kontinuirane putanje G641 Mod kontinuirane putanje s opcijom programiranja krune udaljenosti G70 Sustav unosa u inch-ima G71 Metriki sustav unosa G90 Apsolutni mjerni sustav G91 Inkrementni mjerni sustav G94 Linearni posmak u mm/min, inch/min G97 Iskljuena konstantna brzina rezanja G110-112 Programiranje polarnih koordinata G331/332 Narezivanje / urezivanje G450/ G451 Prijelaz / Sjecite jednakih udaljenosti G247/G248 Mekani start / kraj kretanja osi M - naredbe M0 Programirano zaustavljanje M1 Zaustavljanje po izboru M2 Kraj programa (glavni program) M3 Ukljueno radno vreteno, u smjeru kazaljki na satu M4 Ukljueno radno vreteno, u smjeru suprotnom od kazaljki na satu M5 Zaustavljeno vreteno M6 Izmjena alata

M8 Ukljuen ureaj za hlaenje M9 Iskljuen ureaj za hlaenje M17 Kraj potprograma M25 Otvorena stezna naprava M26 Zatvorena stezna naprava M27 Okretna razvodna glava M30 Kraj programa M71 Ukljueno ispuhivanje M72 Iskljueno ispuhivanje

Popis naredbi za Fanuc 21 glodanje


Adrese O Broj programa (glavni program i potprogram) P Poziv potprograma (npr. M98 P3000) N Broj bloka /N Preskoiti blok G G-kodovi X, Y, Z Koordinate programa u mm/inch X, P Vrijeme ekanja (X u s, P u ms) C Oluk u mm/inch R Polumjer u mm/inch ili kruni polumjer u mm/inch I, J, K Kruni parametri u mm/inch F Posmak u mm/m ili inch/min S Brzina vrtnje vretena u o/min T Pozivanje alata H Korekcija alata M Razne funkcije K, P, Q, R Parametar ciklusa ( Poetak primjedbe ) Kraj primjedbe ; Kraj bloka G-kodovi G0 Pravocrtno gibanje u brzom hodu G1 Pravocrtno gibanje u radnom hodu G2/G3 Kruno gibanje u smjeru/obrnuto od kazaljke na satu G4 Vrijeme ekanja G9 Tono zaustavljanje G10/G11 Unos programibilnih podataka ukljuen/iskljuen G15/G16 Interpolacija po polarnim koordinatama G17/G18/G19 Odabir povrine G20/G21 Mjere u inch-ima/metrikom sustavu G28 Povratak u referentnu toku G40...G42 Kompenzacija polumjera noa G43/G44 Kompenzacija duljine alata G49 Iskljuivanje kompenzacije duljine alata G50, G51 Selektiranje/deselektiranje promjene mjerila i funkcije zrcaljenja G52 Postavljanje lokalnog koordinatnog sustava G53 Selektiranje strojnog koordinatnog sustava G54 .. G59 Radne nul-toke G61 Mod tonog zaustavljanja G63 Ukljuen mod za izradu navoja G90, G91 Apsolutni/inkrementni mjerni sustav G92 Podeavanje kordinatnog sustava G94 Posmak u mm/min ili inch/min G95 Posmak u mm/okretaju G97 Konstantan broj okretaja G98 Povratak na startnu povrinu (ciklus buenja) G99 Povratak na povrinu odstupanja (ciklus buenja) M-kodovi M0 Zaustavljanje programa M1 Zaustavljanje programa, uvjetno M3 Ukljueno glavno vreteno, vrtnja u smjeru kazaljke na satu M4 Ukljueno glavno vreteno, vrtnja suprotno od smjera kazaljke na satu M5 Iskljueno glavno vreteno M6 Promjena alata M8 Ukljuen rashladni sustav M9 Iskljuen rashladni sustav M27 Okretanje razvodne glave M30 Kraj programa i povratak na poetak programa M71 Ispuhivanje ukljueno M72 Ispuhivanje iskljueno

M98 Poziv potprograma M99 Kraj potprograma, Kod skoka Ciklusi G73/G83 Ciklus za buenje dubokih provrta s lomljenjem strugotine G80 Iskljuivanje ciklusa buenja G81 Ciklus buenja G82 Ciklus buenja s vremenom ekanja G85 Ciklus razvrtanja G86 Ciklus buenja sa zaustavljanjem vretena G87 Ciklus povratka svrdla G88 Ciklus buenja s zaustavljanjem programa G89 Ciklus razvrtanja s vremenom ekanja

Za poetak G funkcije (Mill):


Naredba - Grupa - Opis G00 - 01 - Brzi hod G01* - 01 - Radni hod G02 - 01 - Kruna interpolacija CW G03 - 01 - Kruna interpolacija CCW G04 - 00 - Zastoj 1/1000 Sekunda G09 - 00 - Tono zaustavljanje G10 - 00 - Programirani pomak G12 - 00 - Ciklus glodanje kru. depa CW G13 - 00 - Ciklus glodanje kru. depa CCW G17* - 02 - Radna XY-Ravnina G18 - 02 - Radna XZ- Ravnina G19 - 02 - Radna YZ- Ravnina G20 - 06 - Mjerni sistem u colima G21* - 06 - Mjerni sistem u milimetrima G28 - 00 - Povratak u Referentnu toku G29 - 00 - Referentna toka G31# - 00 - Linearna interpolacija s probom G35# - 00 - Autom. Mjerenje promjera alata G36# - 00 - Autom. Mjerenje nulte toke obradka G37# - 00 - Autom. Mjerenje duine alata G40* - 07 - Ponitenje kompezacije promjera alata G41 - 07 - Korekcija promjera alata u lijevo G42 - 07 - Korekcija promjera alata u desno G43 - 08 - Korekcija duine alata u + G44 - 08 - Korekcija duine alata u G47 - 00 - Graviranje teksta G49* - 08 - Ponitenje kompezacije duine alata G50*# - 11 - Prekid skaliranja G51# - 11 - Skaliranje G52 - 00 - Lokalni koordinatni sistem YASNAC G53 - 00 - Referentna toka stroja G54* - 12 - Nulta toka radnog komada. 1 G55 - 12 - Nulta toka radnog komada. 2 G56 - 12 - Nulta toka radnog komada. 3 G57 - 12 - Nulta toka radnog komada. 4 G58 - 12 - Nulta toka radnog komada. 5 G59 - 12 - Nulta toka radnog komada. 6 G60 - 00 - Pozicioniranje u jednom smjeru G61 - 13 - Tono zaustavljanje ( modal ) G64* - 13 - Tono zaustavljanje (G61) ponitenje G65# - 00 - Makro-Podprogram G68# - 16 - Rotacija koordinatnog sistema G69* - 16 - Ponitavanje rotacije koordinatnog sis G70 - 00 - Geometrijski uzorak rupe po krunici G71 - 00 - Geometrijski uzorak rupe po luku G72 - 00 - Geometrijski uzorak rupe po liniji G73 - 09 - Ciklus buenja s lomom strugotine G74 - 09 - Ciklus rezanja nareza lijevi G76 - 09 - Ciklus finog istokarivanja G77 - 09 - Ciklus natranog istokarivanja G80* - 09 - Prekid ciklusa tokaste obrade G81 - 09 - Ciklus buenja G82 - 09 - Ciklus zabuivanja G83 - 09 - Ciklus dubokog buenja(Standard) G84 - 09 - Ciklus rezanja nareza desni G85 - 09 - Ciklus razvrtavanja

G86 - 09 - Ciklus razvrtavanja (Vreteno stop ) G87 - 09 - Ciklus istokarivanja, runo G88 - 09 - Ciklus istokarivanja, runo G89 - 09 - Ciklus istokarivanja, runo G90* - 03 - Apsolutno programiranje G91 - 03 - Inkrementalno programiranje G92 - 00 - Promjena koordinatnog sistema G93 - 05 - Obodna posmina brzina G94* - 05 - Posmak u mm/min G98* - 10 - Vraanje na prvi Z iznad ciklusa G99 - 10 - Vraanje na sigurnosnu ravninu G100 - 00 - Prekid zrcaljenja G101 - 00 - Zrcaljenje G102 - 00 - Slanje vrijednosti koordinata kroz RS-232C G103 - 00 - Maximalni broj blokova za look ahead G107 - 00 - Cilindrino mapiranje(za 4. Os) G110 - 12 - Nulta toka radnog komada. 7 G111 - 12 - Nulta toka radnog komada. 8 G112 - 12 - Nulta toka radnog komada. 9 G113 - 12 - Nulta toka radnog komada. 10 G114 - 12 - Nulta toka radnog komada. 11 G115 - 12 - Nulta toka radnog komada. 12 G116 - 12 - Nulta toka radnog komada. 13 G117 - 12 - Nulta toka radnog komada. 14 G118 - 12 - Nulta toka radnog komada. 15 G119 - 12 - Nulta toka radnog komada. 16 G120 - 12 - Nulta toka radnog komada. 17 G121 - 12 - Nulta toka radnog komada. 18 G122 - 12 - Nulta toka radnog komada. 19 G123 - 12 - Nulta toka radnog komada. 20 G124 - 12 - Nulta toka radnog komada. 21 G125 - 12 - Nulta toka radnog komada. 22 G126 - 12 - Nulta toka radnog komada. 23 G127 - 12 - Nulta toka radnog komada. 24 G128 - 12 - Nulta toka radnog komada. 25 G129 - 12 - Nulta toka radnog komada. 26 G136# - 00 - Autom. Mjerenje nulte toke G141 - 07 - 3D+ kompezacija alata G150 - 00 - Ciklus glodanja depa * poetne pri startanju stroja # opcije koje se moraju dodatno nadoplatiti

Za poetak M funkcije (Mill):


Naredba - Opis M00 - Obavezni programski stop M01 - Uvjetni programski stop M02 - Kraj programa M03 - Okretanje vretena u desno M04 - Okretanje vretena u lijevo M05 - Zaustavljanje vretena M06 - Promjena alata M08 - Ukjuivanje hlaenja M09 - Iskjuivanje hlaenja M10 - Blokiranje 4 osi M11 - Deblokiranje 4 osi M12 - Blokiranje 5 osi M13 - Deblokiranje 5 osi M16 - Promjene alata isto kao M06 M19 - Orijentacija vretena M19 P..# - Orijentacija vretena pod nekim kutem M21-M28 - Korisnike M funkcije ( Option ) M30 - Kraj programa s vraanjem na poetak programa M31 - Konvejer strugotine naprijed M32 - Konvejer strugotine natrag M33 - Konvejer strugotine stop M34 - Pomak cijevi za hlaenje prema gore M35 - Pomak cijevi za hlaenje prema dolje M36 - Odgoda promjena palete M39 - Rotacija magazina alata bez promjene alata M41 - Brzina 1 M42 - Brzina 2 M50 - Promjena palete M51-M58 - Korisnike M funkcije ( Opcija )

M61-M68 - Korisnike M funkcije ( Opcija ) M76 - Monitor iskljuen M77 - Monitor ukljuen M78 - Generira alarm M79 - Generira alarm M82 - Otputa alat M86 - Stee alat M88 - Hlaenje kroz vreteno ukljueno M89 - Hlaenje kroz vreteno iskljueno M95 - Slip model M96 - Preskoi ako nema signala M97 - Pozivanje lokalnog podprograma M97 P.. M98 - Pozivanje podprograma M98 P.. M99 - Kraj podprograma

You might also like