+ All Categories
Home > Documents > 7_Coduri_G

7_Coduri_G

Date post: 06-Apr-2018
Category:
Upload: florin-barbu
View: 213 times
Download: 0 times
Share this document with a friend

of 19

Transcript
  • 8/2/2019 7_Coduri_G

    1/19

    COMENZI NUMERICE ISO (G-code)

    Prima implementare a comenzilor numerice a fost dezvoltat la MIT (Massachusetts Instituteof Technology) - Servomecanisme de laborator, la nceputul anilor 1950.

    n ultimele decenii, deoarece, multe implementari au fost dezvoltate de ctre mai multeorganizaii (comerciale i necomerciale).

    G-code a fost adesea folosit n aceste implementri. Versiunea standard utilizat n principaln Statele Unite a fost stabilit de Aliana Electronic Industries la nceputul anilor 1960.

    O revizuire final a fost aprobat n luna februarie 1980, RS274D. n Europa, standardul ISO6983 este folosit adesea. Uneori se pot folosi alte standarde, de exemplu DIN 66025 sauPN-73m-55256, PN-93/M-55251 (n Polonia).

    Variable Description Corollary info

    A Absolute or incrementalposition of A axis (rotationalaxis around X axis)

    B Absolute or incremental

    position of B axis (rotationalaxis around Y axis)

    C Absolute or incrementalposition of C axis (rotationalaxis around Z axis)

    D Defines diameter or radial

    offset used for cuttercompensation. D is used fordepth of cut on lathes.

    E Precision feedrate for threading on lathes

    F Definesfeed rate

    G Address for preparatory G commands often tell the control what kind of motion is wanted

    http://en.wikipedia.org/wiki/Speeds_and_feeds#Feed_ratehttp://en.wikipedia.org/wiki/Speeds_and_feeds#Feed_ratehttp://en.wikipedia.org/wiki/Speeds_and_feeds#Feed_rate
  • 8/2/2019 7_Coduri_G

    2/19

    commands(e.g., rapid positioning, linear feed, circular feed, fixed cycle) orwhat offset value to use.

    H Defines tool length offset;Incremental axiscorresponding to C axis(e.g., on a turn-mill)

    I Defines arc size in X axisforG02orG03 arccommands.Also used as a parameter

    within some fixed cycles.

    J Defines arc size in Y axisforG02orG03 arccommands.Also used as a parameterwithin some fixed cycles.

    K Defines arc size in Z axisforG02orG03 arccommands.Also used as a parameterwithin some fixed cycles,equal to L address.

    L

    Fixed cycle loop count;Specification of what registerto edit using G10

    Fixed cycle loop count: Defines number of repetitions ("loops") ofa fixed cycle at each position. Assumed to be 1 unlessprogrammed with another integer. Sometimes the K address is

    used instead of L. With incremental positioning (G91), a series ofequally spaced holes can be programmed as a loop rather thanas individual positions.G10use: Specification of what register to edit (work offsets, toolradius offsets, tool length offsets, etc.).

    M

    Miscellaneous functionAction code, auxiliary command; descriptions vary. Many M-codes call for machine functions, which is why people often saythat the "M" stands for "machine", although it was not intended to.

    http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#Lhttp://en.wikipedia.org/wiki/G-code#G10http://en.wikipedia.org/wiki/G-code#Khttp://en.wikipedia.org/wiki/G-code#G91http://en.wikipedia.org/wiki/G-code#G10http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#Lhttp://en.wikipedia.org/wiki/G-code#G10http://en.wikipedia.org/wiki/G-code#Khttp://en.wikipedia.org/wiki/G-code#G91http://en.wikipedia.org/wiki/G-code#G10
  • 8/2/2019 7_Coduri_G

    3/19

    N

    Line (block) number in

    program;System parameter number tobe changed using G10

    Line (block) numbers: Optional, so often omitted. Necessary forcertain tasks, such as M99Paddress (to tell the control whichblock of the program to return to if not the default one)orGoTo statements (if the control supports those). N numbering

    need not increment by 1 (for example, it can increment by 10, 20,or 1000) and can be used on every block or only in certain spotsthroughout a program.System parameter number:G10 allows changing of systemparameters under program control.

    O Program name For example, O4501.

    P

    Serves as parameteraddress for various G and Mcodes

    WithG04, defines dwell time value.

    Also serves as a parameter in some canned cycles,

    representing dwell times or other variables.

    Also used in the calling and termination of subprograms.

    (With M98, it specifies which subprogram to call; with M99, it

    specifies which block number of the main program to return

    to.)

    Q Peck increment in canned

    cyclesFor example, G73, G83 (peck drilling cycles)

    R Defines size of arc radius or defines retract height incanned cycles

    S

    Definesspeed, either spindlespeed or surface speeddepending on mode

    Data type = integer. InG97 mode (which is usually the default),an integer after S is interpreted as a number ofrev/min (rpm).In G96 mode (CSS), an integer after S is interpreted as surfacespeedsfm (G20) or m/min (G21). See alsoSpeeds and feeds.On multifunction (turn-mill or mill-turn) machines, which spindlegets the input (main spindle or subspindles) is determined by

    other M codes.

    T

    Tool selection

    To understand how the T address works and how it interacts (ornot) with M06, one must study the various methods, such as latheturret programming, ATC fixed tool selection, ATC randommemory tool selection, the concept of "next tool waiting", andempty tools. Programming on any particular machine toolrequires knowing which method that machine uses. Ways ofobtaining this training are mentioned in the comments forM06.

    U Incremental axis

    corresponding to X axis(typically only lathe group A

    In these controls, X and U obviate G90 andG91, respectively. On

    these lathes, G90 is instead a fixed cycle address for roughing.

    http://en.wikipedia.org/wiki/G-code#G10http://en.wikipedia.org/wiki/G-code#M99http://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/Gotohttp://en.wikipedia.org/wiki/Gotohttp://en.wikipedia.org/wiki/G-code#Nhttp://en.wikipedia.org/wiki/G-code#G10http://en.wikipedia.org/wiki/G-code#G10http://en.wikipedia.org/wiki/G-code#G04http://en.wikipedia.org/wiki/G-code#G04http://en.wikipedia.org/wiki/G-code#M98http://en.wikipedia.org/wiki/G-code#M99http://en.wikipedia.org/wiki/G-code#G73http://en.wikipedia.org/wiki/G-code#G83http://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/G-code#G97http://en.wikipedia.org/wiki/G-code#G97http://en.wikipedia.org/wiki/Revolutions_per_minutehttp://en.wikipedia.org/wiki/Revolutions_per_minutehttp://en.wikipedia.org/wiki/G-code#G96http://en.wikipedia.org/wiki/Surface_feet_per_minutehttp://en.wikipedia.org/wiki/Surface_feet_per_minutehttp://en.wikipedia.org/wiki/G-code#G20http://en.wikipedia.org/wiki/G-code#G20http://en.wikipedia.org/wiki/G-code#G21http://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/G-code#M06http://en.wikipedia.org/wiki/G-code#M06http://en.wikipedia.org/wiki/G-code#G90http://en.wikipedia.org/wiki/G-code#G91http://en.wikipedia.org/wiki/G-code#G91http://en.wikipedia.org/wiki/G-code#G10http://en.wikipedia.org/wiki/G-code#M99http://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/Gotohttp://en.wikipedia.org/wiki/G-code#Nhttp://en.wikipedia.org/wiki/G-code#G10http://en.wikipedia.org/wiki/G-code#G04http://en.wikipedia.org/wiki/G-code#M98http://en.wikipedia.org/wiki/G-code#M99http://en.wikipedia.org/wiki/G-code#G73http://en.wikipedia.org/wiki/G-code#G83http://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/G-code#G97http://en.wikipedia.org/wiki/Revolutions_per_minutehttp://en.wikipedia.org/wiki/G-code#G96http://en.wikipedia.org/wiki/Surface_feet_per_minutehttp://en.wikipedia.org/wiki/Surface_feet_per_minutehttp://en.wikipedia.org/wiki/G-code#G20http://en.wikipedia.org/wiki/G-code#G21http://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/G-code#M06http://en.wikipedia.org/wiki/G-code#M06http://en.wikipedia.org/wiki/G-code#G90http://en.wikipedia.org/wiki/G-code#G91
  • 8/2/2019 7_Coduri_G

    4/19

    controls)Also defines dwell time onsome machines (instead of"P" or "X").

    V

    Incremental axiscorresponding to Y axis

    Until the 2000s, the V address was very rarely used, becausemost lathes that used U and W didn't have a Y-axis, so they didn'tuse V. (Green et al 1996[2]did not even list V in their table ofaddresses.) That is still often the case, although the proliferationof live lathe tooling and turn-mill machining has made V addressusage less rare than it used to be (Smid 2008 [1]shows anexample). See also G18.

    W Incremental axiscorresponding to Z axis(typically only lathe group A

    controls)

    In these controls, Z and W obviateG90 and G91, respectively.On these lathes, G90 is instead a fixed cycle address forroughing.

    X Absolute or incrementalposition of X axis.Also defines dwell time onsome machines (instead of"P" or "U").

    Y Absolute or incrementalposition of Y axis

    Z Absolute or incrementalposition of Z axis

    The main spindle's axis of rotation often determines which axis ofa machine tool is labeled as Z.

    Lista codurilor G

    Echipamente CNC Fanuc si similare

    Code DescriptionMilling

    ( M )

    Turning

    ( T )Corollary info

    G00 Rapid positioning M T On 2- or 3-axis moves, G00 (unlike G01)traditionally does not necessarily move in asingle straight line between start point and endpoint. It moves each axis at its max speed untilits vector is achieved. Shorter vector usuallyfinishes first (given similar axis speeds). Thismatters because it may yield a dog-leg orhockey-stick motion, which the programmerneeds to consider depending on what

    obstacles are nearby, to avoid a crash. Somemachines offer interpolated rapids as a feature

    http://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#cite_note-Greenetal1996-1http://en.wikipedia.org/wiki/G-code#cite_note-Greenetal1996-1http://en.wikipedia.org/wiki/G-code#cite_note-Smid2008-0http://en.wikipedia.org/wiki/G-code#G18http://en.wikipedia.org/wiki/G-code#G18http://en.wikipedia.org/wiki/G-code#G90http://en.wikipedia.org/wiki/G-code#G90http://en.wikipedia.org/wiki/G-code#G91http://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#G01http://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#cite_note-Greenetal1996-1http://en.wikipedia.org/wiki/G-code#cite_note-Smid2008-0http://en.wikipedia.org/wiki/G-code#G18http://en.wikipedia.org/wiki/G-code#G90http://en.wikipedia.org/wiki/G-code#G91http://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#G01
  • 8/2/2019 7_Coduri_G

    5/19

    for ease of programming (safe to assume astraight line).

    G01

    Linear interpolation M T

    The most common workhorse code for feedingduring a cut. The program specs the start andend points, and the control automaticallycalculates (interpolates) the intermediatepoints to pass through that will yield a straightline (hence "linear"). The control thencalculates the angular velocities at which toturn the axis leadscrews via their servomotorsor stepper motors. The computer performsthousands of calculations per second, and the

    motors react quickly to each input. Thus theactual toolpath of the machining takes placewith the given feedrate on a path that isaccurately linear to within very small limits.

    G02

    Circular interpolation,clockwise

    M T

    Very similar in concept to G01. Again, thecontrol interpolatesintermediate points andcommands the servo- or stepper motors torotate the amount needed for the leadscrew totranslate the motion to the correct tool tippositioning. This process repeated thousandsof times per minute generates the desiredtoolpath. In the case of G02, the interpolationgenerates a circle rather than a line. As withG01, the actual toolpath of the machining takesplace with the given feedrate on a path thataccurately matches the ideal (in G02's case, acircle) to within very small limits. In fact, theinterpolation is so precise (when all conditionsare correct) that milling an interpolated circle

    can obviate operations such as drilling, andoften even fine boring. On most controls youcannot startG41 orG42 in G02orG03modes.You must already have compensated in anearlierG01 block. Often a short linear lead-inmovement will be programmed, merely to allowcutter compensation before the main event, thecircle-cutting, begins.

    G03 Circular interpolation, M T Same corollary info as for G02.

    http://en.wikipedia.org/wiki/Linear_interpolationhttp://en.wikipedia.org/wiki/Interpolationhttp://en.wikipedia.org/wiki/Linearhttp://en.wikipedia.org/wiki/Leadscrewhttp://en.wikipedia.org/wiki/Interpolationhttp://en.wikipedia.org/wiki/Interpolationhttp://en.wikipedia.org/wiki/G-code#G41http://en.wikipedia.org/wiki/G-code#G41http://en.wikipedia.org/wiki/G-code#G42http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#G01http://en.wikipedia.org/wiki/G-code#G01http://en.wikipedia.org/wiki/Linear_interpolationhttp://en.wikipedia.org/wiki/Interpolationhttp://en.wikipedia.org/wiki/Linearhttp://en.wikipedia.org/wiki/Leadscrewhttp://en.wikipedia.org/wiki/Interpolationhttp://en.wikipedia.org/wiki/G-code#G41http://en.wikipedia.org/wiki/G-code#G42http://en.wikipedia.org/wiki/G-code#G02http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#G01
  • 8/2/2019 7_Coduri_G

    6/19

    counterclockwise

    G04

    Dwell M T

    Takes an address for dwell period (may

    be X, U, orP). The dwell period is specifiedin milliseconds.

    G05P10000High-precision contourcontrol (HPCC)

    M

    Uses a deep look-aheadbufferand simulationprocessing to provide better axis movementacceleration and deceleration during contourmilling

    G05.1 Q1.

    AiNano contour control M

    Uses a deep look-aheadbufferand simulationprocessing to provide better axis movementacceleration and deceleration during contourmilling

    G07 Imaginary axisdesignation

    M

    G09 Exact stop check M T

    G10 Programmable data input M T

    G11 Data write cancel M T

    G12Full-circle interpolation,

    clockwiseM

    Fixed cycle for ease of programming 360circular interpolation with blend-radius lead-inand lead-out. Not standard on Fanuc controls.

    G13Full-circle interpolation,counterclockwise

    MFixed cycle for ease of programming 360circular interpolation with blend-radius lead-inand lead-out. Not standard on Fanuc controls.

    G17 XY plane selection M

    G18 ZX plane selection M T On most CNC lathes (built 1960s to 2000s), ZX

    http://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/Data_bufferhttp://en.wikipedia.org/wiki/Data_bufferhttp://en.wikipedia.org/wiki/Artificial_intelligencehttp://en.wikipedia.org/wiki/Artificial_intelligencehttp://en.wikipedia.org/wiki/Data_bufferhttp://en.wikipedia.org/wiki/Data_bufferhttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/Data_bufferhttp://en.wikipedia.org/wiki/Artificial_intelligencehttp://en.wikipedia.org/wiki/Data_buffer
  • 8/2/2019 7_Coduri_G

    7/19

    is the only available plane, sono G17 toG19 codes are used. This is nowchanging as the era begins in which livetooling, multitask/multifunction, and mill-

    turn/turn-mill gradually become the "newnormal". But the simpler, traditional form factorwill probably not disappearjust move over tomake room for the newer configurations. Seealso V address.

    G19 YZ plane selection M

    G20

    Programming ininches M T

    Somewhat uncommon except in USA and (tolesser extent) Canada and UK. However, in theglobal marketplace, competence with both G20and G21 always stands some chance of beingnecessary at any time. The usual minimumincrement in G20 is one ten-thousandth of aninch (0.0001"), which is a larger distance thanthe usual minimum increment in G21 (onethousandth of a millimeter, .001 mm, that is,onemicrometre). This physical differencesometimes favors G21 programming.

    G21Programminginmillimeters (mm)

    M T

    Prevalent worldwide. However, in the globalmarketplace, competence with both G20 andG21 always stands some chance of beingnecessary at any time.

    G28Return to home position

    (machine zero, akamachine reference point)

    M T

    Takes X Y Z addresses which define theintermediate point that the tool tip will pass

    through on its way home to machine zero.They are in terms of part zero (aka programzero), NOT machine zero.

    G30 Return to secondaryhome position (machinezero, aka machinereference point)

    M T Takes a P address specifying which machinezero point is desired, ifthe machine hasseveral secondary points (P1 to P4). Takes XY Z addresses which define the intermediatepoint that the tool tip will pass through on its

    way home to machine zero. They are in termsof part zero (aka program zero), NOT machine

    http://en.wikipedia.org/wiki/G-code#G17http://en.wikipedia.org/wiki/G-code#G19http://en.wikipedia.org/wiki/G-code#G19http://en.wikipedia.org/wiki/G-code#Vhttp://en.wikipedia.org/wiki/Inchhttp://en.wikipedia.org/wiki/Micrometrehttp://en.wikipedia.org/wiki/Micrometrehttp://en.wikipedia.org/wiki/Millimeterhttp://en.wikipedia.org/wiki/G-code#G17http://en.wikipedia.org/wiki/G-code#G19http://en.wikipedia.org/wiki/G-code#Vhttp://en.wikipedia.org/wiki/Inchhttp://en.wikipedia.org/wiki/Micrometrehttp://en.wikipedia.org/wiki/Millimeter
  • 8/2/2019 7_Coduri_G

    8/19

    zero.

    G31 Skip function (used for

    probes and tool lengthmeasurement systems)

    M

    G32 Single-point threading,longhand style (if notusing a cycle, e.g.,G76)

    TSimilar to G01 linear interpolation, except withautomatic spindle synchronization forsingle-point threading.

    G33 Constant-pitchthreading M

    G33 Single-point threading,longhand style (if notusing a cycle, e.g.,G76)

    TSome lathe controls assign this mode to G33rather than G32.

    G34 Variable-pitch threading M

    G40 Tool radius compensationoff M T Cancels G41 or G42.

    G41 Tool radius compensationleft

    M T Milling: Given righthand-helix cutterandM03 spindle direction, G41 correspondstoclimb milling (down milling). Takes anaddress (DorH) that calls an offset registervalue for radius.

    Turning: Often needs no D or H address onlathes, because whatever tool is active

    automatically calls its geometry offsets with it.(Each turret station is bound to its geometryoffset register.)

    G41 and G42 for milling has become less

    frequently used since CAM programming has

    become more common. CAM systems allow

    the user to program as if with a zero-diameter

    cutter. The fundamental concept of cutter

    radius compensation is still in play (i.e., that

    http://en.wikipedia.org/wiki/G-code#G76http://en.wikipedia.org/wiki/G-code#G76http://en.wikipedia.org/wiki/G-code#G01http://en.wikipedia.org/wiki/Threading_(manufacturing)#Single-point_threadinghttp://en.wikipedia.org/wiki/Threading_(manufacturing)#Single-point_threadinghttp://en.wikipedia.org/wiki/Threading_(manufacturing)#Single-point_threadinghttp://en.wikipedia.org/wiki/Threading_(manufacturing)#Single-point_threadinghttp://en.wikipedia.org/wiki/Screw_thread#Lead.2C_pitch.2C_and_startshttp://en.wikipedia.org/wiki/G-code#G76http://en.wikipedia.org/wiki/G-code#G76http://en.wikipedia.org/wiki/G-code#M03http://en.wikipedia.org/wiki/G-code#M03http://en.wikipedia.org/wiki/Milling_cutter#Conventional_milling_versus_climb_millinghttp://en.wikipedia.org/wiki/Milling_cutter#Conventional_milling_versus_climb_millinghttp://en.wikipedia.org/wiki/G-code#Dhttp://en.wikipedia.org/wiki/G-code#Dhttp://en.wikipedia.org/wiki/G-code#Hhttp://en.wikipedia.org/wiki/G-code#G76http://en.wikipedia.org/wiki/G-code#G01http://en.wikipedia.org/wiki/Threading_(manufacturing)#Single-point_threadinghttp://en.wikipedia.org/wiki/Threading_(manufacturing)#Single-point_threadinghttp://en.wikipedia.org/wiki/Screw_thread#Lead.2C_pitch.2C_and_startshttp://en.wikipedia.org/wiki/G-code#G76http://en.wikipedia.org/wiki/G-code#M03http://en.wikipedia.org/wiki/Milling_cutter#Conventional_milling_versus_climb_millinghttp://en.wikipedia.org/wiki/G-code#Dhttp://en.wikipedia.org/wiki/G-code#H
  • 8/2/2019 7_Coduri_G

    9/19

    the surface produced will be distance R away

    from the cutter center), but the programming

    mindset is different; the human does not

    choreograph the toolpath with conscious,painstaking attention to G41, G42, and G40,

    because the CAM software takes care of it.

    G42

    Tool radius compensationright

    M T

    Similar corollary info as for G41. Givenrighthand-helix cutter and M03 spindledirection, G42 corresponds toconventionalmilling (up milling).

    See also the comments forG41.

    G43

    Tool height offsetcompensation negative

    M

    Takes an address, usually H, to call the toollength offset register value. The valueis negative because it will be addedto thegauge line position. G43 is the commonly usedversion (vs G44).

    G44

    Tool height offsetcompensation positive

    M

    Takes an address, usually H, to call the toollength offset register value. The valueispositive because it will besubtractedfrom thegauge line position. G44 is the seldom-usedversion (vs G43).

    G45 Axis offset single increase M

    G46 Axis offset singledecrease

    M

    G47 Axis offset doubleincrease

    M

    G48 Axis offset doubledecrease

    M

    G49 Tool length offsetcompensation cancel

    M Cancels G43orG44.

    G50

    Define the maximumspindle speed

    T

    Takes anS address integer which isinterpreted as rpm. Without thisfeature,G96 mode (CSS) would rev thespindle to "wide open throttle" when closelyapproaching the axis of rotation.

    G50 Scaling function cancel M

    G50 Position register (programming of vectorfrom part zero to tool tip)

    T Position register is one of the original methodsto relate the part (program) coordinate systemto the tool position, which indirectly relates it to

    the machine coordinate system, the onlyposition the control really "knows". Not

    http://en.wikipedia.org/wiki/Milling_cutter#Conventional_milling_versus_climb_millinghttp://en.wikipedia.org/wiki/Milling_cutter#Conventional_milling_versus_climb_millinghttp://en.wikipedia.org/wiki/G-code#G41http://en.wikipedia.org/wiki/G-code#G41http://en.wikipedia.org/wiki/G-code#G43http://en.wikipedia.org/wiki/G-code#G43http://en.wikipedia.org/wiki/G-code#G44http://en.wikipedia.org/wiki/G-code#G44http://en.wikipedia.org/wiki/G-code#Shttp://en.wikipedia.org/wiki/G-code#Shttp://en.wikipedia.org/wiki/G-code#G96http://en.wikipedia.org/wiki/G-code#G96http://en.wikipedia.org/wiki/Milling_cutter#Conventional_milling_versus_climb_millinghttp://en.wikipedia.org/wiki/Milling_cutter#Conventional_milling_versus_climb_millinghttp://en.wikipedia.org/wiki/G-code#G41http://en.wikipedia.org/wiki/G-code#G43http://en.wikipedia.org/wiki/G-code#G44http://en.wikipedia.org/wiki/G-code#Shttp://en.wikipedia.org/wiki/G-code#G96
  • 8/2/2019 7_Coduri_G

    10/19

    commonly programmed anymore because G54to G59 (WCSs) are a better, newer method.Called via G50 for turning, G92 for milling.Those G addresses also have alternatemeanings (which see). Position register can

    still be useful for datum shift programming.

    G52Local coordinate system(LCS)

    MTemporarily shifts program zero to a newlocation. This simplifies programming in somecases.

    G53

    Machine coordinatesystem

    M T

    Takes absolute coordinates (X,Y,Z,A,B,C) withreference to machine zero rather than programzero. Can be helpful for tool changes.Nonmodal and absolute only. Subsequentblocks are interpreted as "back toG54" even if

    it is not explicitly programmed.G54 to G59

    Work coordinate systems(WCSs)

    M T

    Have largely replaced position register(G50and G92). Each tuple of axis offsetsrelates program zero directly to machine zero.Standard is 6 tuples (G54 to G59), withoptional extensibility to 48 more via G54.1 P1to P48.

    G54.1 P1 toP48

    Extended work coordinate

    systemsM T

    Up to 48 more WCSs besides the 6 providedas standard by G54 to G59. Note floating-pointextension of G-code data type (formerly all

    integers). Other examples have also evolved(e.g.,G84.2). Modern controls havethe hardware to handle it.

    G70 Fixed cycle, multiplerepetitive cycle, forfinishing (includingcontours)

    T

    G71 Fixed cycle, multiplerepetitive cycle, forroughing (Z-axis

    emphasis)

    T

    G72 Fixed cycle, multiplerepetitive cycle, forroughing (X-axisemphasis)

    T

    G73 Fixed cycle, multiplerepetitive cycle, forroughing, with patternrepetition

    T

    G73 Peck drilling cycle for milling - high-speed (NO

    M Retracts only as far as a clearance increment(system parameter). For when chipbreaking is

    http://en.wikipedia.org/wiki/G-code#G54_to_G59http://en.wikipedia.org/wiki/G-code#G54_to_G59http://en.wikipedia.org/wiki/G-code#G92http://en.wikipedia.org/wiki/G-code#G54_to_G59http://en.wikipedia.org/wiki/G-code#G54_to_G59http://en.wikipedia.org/wiki/G-code#G50http://en.wikipedia.org/wiki/G-code#G50http://en.wikipedia.org/wiki/G-code#G92http://en.wikipedia.org/wiki/G-code#G84.2http://en.wikipedia.org/wiki/G-code#G84.2http://en.wikipedia.org/wiki/Computer_hardwarehttp://en.wikipedia.org/wiki/G-code#G54_to_G59http://en.wikipedia.org/wiki/G-code#G54_to_G59http://en.wikipedia.org/wiki/G-code#G92http://en.wikipedia.org/wiki/G-code#G54_to_G59http://en.wikipedia.org/wiki/G-code#G50http://en.wikipedia.org/wiki/G-code#G92http://en.wikipedia.org/wiki/G-code#G84.2http://en.wikipedia.org/wiki/Computer_hardware
  • 8/2/2019 7_Coduri_G

    11/19

    full retraction from pecks)the main concern, but chip clogging of flutes isnot.

    G74 Peck drilling cycle for turning

    T

    G74Tapping cycle formilling, lefthand thread,M04 spindle direction

    M

    G75 Peck grooving cycle for turning

    T

    G76 Fine boring cycle for milling

    M

    G76Threading cycle forturning, multiple repetitive

    cycle

    T

    G80

    Cancel canned cycle M T

    Milling: Cancels all cycles suchasG73, G83,G88, etc. Z-axis returns either toZ-initial level or R-level, as programmed(G98orG99, respectively).Turning: Usually not needed on lathes,because a new group-1 G address(G00to G03) cancels whatever cycle wasactive.

    G81 Simple drilling cycle M No dwell built in

    G82Drilling cycle with dwell M

    Dwells at hole bottom (Z-depth) for the numberofmilliseconds specified by theP address.Good for when hole bottom finish matters.

    G83 Peck drilling cycle (fullretraction from pecks)

    MReturns to R-level after each peck. Good forclearing flutes ofchips.

    G84 Tapping cycle,righthandthread,M03 spindledirection

    M

    G84.2 Tapping cycle, righthand

    thread,M03 spindledirection, rigid toolholder

    M

    G90 Absolute programming M T (B) Positioning defined with reference to part zero.Milling: Always as above.Turning: Sometimes as above (Fanuc grouptype B and similarly designed), but on mostlathes (Fanuc group type A and similarlydesigned), G90/G91 are not used forabsolute/incremental modes.Instead, Uand Ware the incremental

    addresses andX and Z are the absoluteaddresses. On these lathes, G90 is instead a

    http://en.wikipedia.org/wiki/Screw_thread#Handednesshttp://en.wikipedia.org/wiki/G-code#G73http://en.wikipedia.org/wiki/G-code#G73http://en.wikipedia.org/wiki/G-code#G83http://en.wikipedia.org/wiki/G-code#G83http://en.wikipedia.org/wiki/G-code#G88http://en.wikipedia.org/wiki/G-code#G88http://en.wikipedia.org/wiki/G-code#G98http://en.wikipedia.org/wiki/G-code#G98http://en.wikipedia.org/wiki/G-code#G99http://en.wikipedia.org/wiki/G-code#G99http://en.wikipedia.org/wiki/G-code#G00http://en.wikipedia.org/wiki/G-code#G00http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/Swarfhttp://en.wikipedia.org/wiki/Swarfhttp://en.wikipedia.org/wiki/Swarfhttp://en.wikipedia.org/wiki/Tap_and_diehttp://en.wikipedia.org/wiki/Screw_thread#Handednesshttp://en.wikipedia.org/wiki/Screw_thread#Handednesshttp://en.wikipedia.org/wiki/Screw_thread#Handednesshttp://en.wikipedia.org/wiki/G-code#M03http://en.wikipedia.org/wiki/G-code#M03http://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#Whttp://en.wikipedia.org/wiki/G-code#Whttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Zhttp://en.wikipedia.org/wiki/Screw_thread#Handednesshttp://en.wikipedia.org/wiki/G-code#G73http://en.wikipedia.org/wiki/G-code#G83http://en.wikipedia.org/wiki/G-code#G88http://en.wikipedia.org/wiki/G-code#G98http://en.wikipedia.org/wiki/G-code#G99http://en.wikipedia.org/wiki/G-code#G00http://en.wikipedia.org/wiki/G-code#G03http://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/Swarfhttp://en.wikipedia.org/wiki/Tap_and_diehttp://en.wikipedia.org/wiki/Screw_thread#Handednesshttp://en.wikipedia.org/wiki/Screw_thread#Handednesshttp://en.wikipedia.org/wiki/G-code#M03http://en.wikipedia.org/wiki/G-code#M03http://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#Whttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Z
  • 8/2/2019 7_Coduri_G

    12/19

    fixed cycle address for roughing.

    G90Fixed cycle, simple cycle,for roughing (Z-axisemphasis)

    T (A)When not serving for absolute programming(above)

    G91

    Incremental programming M T (B)

    Positioning defined with reference to previousposition.Milling: Always as above.Turning: Sometimes as above (Fanuc grouptype B and similarly designed), but on mostlathes (Fanuc group type A and similarlydesigned), G90/G91 are not used forabsolute/incremental modes.Instead, Uand Ware the incrementaladdresses andX and Z are the absolute

    addresses. On these lathes, G90 is a fixedcycle address for roughing.

    G92

    Position register(programming of vectorfrom part zero to tool tip)

    M T (B)

    Same corollary info as at G50 position register.Milling: Always as above.Turning: Sometimes as above (Fanuc grouptype B and similarly designed), but on mostlathes (Fanuc group type A and similarlydesigned), position register is G50.

    G92Threading cycle, simplecycle

    T (A)

    G94Feedrate per minute M T (B)

    On group type A lathes, feedrate per minuteisG98.

    G94Fixed cycle, simple cycle,for roughing (X-axisemphasis)

    T (A)When not serving for feedrate per minute(above)

    G95Feedrate per revolution M T (B)

    On group type A lathes, feedrate per revolutionisG99.

    G96

    Constant surface speed(CSS) T

    Varies spindle speed automatically to achievea constant surface speed. See speeds and

    feeds. Takes an S address integer, which isinterpreted as sfm in G20 mode or as m/minin G21mode.

    G97

    Constant spindle speed M T

    Takes an S address integer, which isinterpreted as rev/min (rpm). The default speedmode per system parameter if no mode isprogrammed.

    G98 Return to initial Z level incanned cycle

    M

    G98 Feedrate per minute(group type A) T (A) Feedrate per minute isG94 on group type B.

    http://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#Whttp://en.wikipedia.org/wiki/G-code#Whttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Zhttp://en.wikipedia.org/wiki/G-code#G50http://en.wikipedia.org/wiki/G-code#G50http://en.wikipedia.org/wiki/G-code#G50http://en.wikipedia.org/wiki/G-code#G98http://en.wikipedia.org/wiki/G-code#G98http://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#G99http://en.wikipedia.org/wiki/G-code#G99http://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/G-code#Shttp://en.wikipedia.org/wiki/Surface_feet_per_minutehttp://en.wikipedia.org/wiki/G-code#G20http://en.wikipedia.org/wiki/G-code#G21http://en.wikipedia.org/wiki/G-code#G21http://en.wikipedia.org/wiki/G-code#G94http://en.wikipedia.org/wiki/G-code#G94http://en.wikipedia.org/wiki/G-code#Uhttp://en.wikipedia.org/wiki/G-code#Whttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Zhttp://en.wikipedia.org/wiki/G-code#G50http://en.wikipedia.org/wiki/G-code#G50http://en.wikipedia.org/wiki/G-code#G98http://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#G99http://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/Speeds_and_feedshttp://en.wikipedia.org/wiki/G-code#Shttp://en.wikipedia.org/wiki/Surface_feet_per_minutehttp://en.wikipedia.org/wiki/G-code#G20http://en.wikipedia.org/wiki/G-code#G21http://en.wikipedia.org/wiki/G-code#G94
  • 8/2/2019 7_Coduri_G

    13/19

    G99 Return to R level incanned cycle

    M

    G99Feedrate per revolution(group type A)

    T (A)Feedrate per revolution isG95 on group typeB.

    Lista codurilor M

    Echipamente CNC Fanuc si similare

    Code DescriptionMilling

    ( M )

    Turning

    ( T )Corollary info

    M00 Compulsory stop M T Non-optionalmachine will always stop upon reachingM00 in the program execution.

    M01Optional stop M T

    Machine will only stop at M01 if operator has pushedthe optional stop button.

    M02End of program M T

    No return to program top; may or may not reset registervalues.

    M03

    Spindle on (clockwiserotation)

    M T

    The speed of the spindle is determined by theaddress S, in eitherrevolutions per minute(G97 mode;default) orsurface feet per minute or [surface] metersper minute (G96mode [CSS] undereitherG20orG21). Theright-hand rule can be used todetermine which direction is clockwise and whichdirection is counter-clockwise.

    Right-hand-helix screws moving in the tightening

    direction (and right-hand-helix flutes spinning in the

    cutting direction) are defined as moving in the M03

    direction, and are labeled "clockwise" by convention.

    The M03 direction is always M03 regardless of local

    vantage point and local CW/CCW distinction.

    M04 Spindle on(counterclockwiserotation)

    M T See comment above at M03.

    M05 Spindle stop M T

    http://en.wikipedia.org/wiki/G-code#G95http://en.wikipedia.org/wiki/G-code#G95http://en.wikipedia.org/wiki/G-code#Shttp://en.wikipedia.org/wiki/Revolutions_per_minutehttp://en.wikipedia.org/wiki/Revolutions_per_minutehttp://en.wikipedia.org/wiki/G-code#G97http://en.wikipedia.org/wiki/Surface_feet_per_minutehttp://en.wikipedia.org/wiki/Surface_feet_per_minutehttp://en.wikipedia.org/wiki/G-code#G96http://en.wikipedia.org/wiki/G-code#G96http://en.wikipedia.org/wiki/G-code#G20http://en.wikipedia.org/wiki/G-code#G20http://en.wikipedia.org/wiki/G-code#G21http://en.wikipedia.org/wiki/G-code#G21http://en.wikipedia.org/wiki/Right-hand_rulehttp://en.wikipedia.org/wiki/Right-hand_rulehttp://en.wikipedia.org/wiki/G-code#G95http://en.wikipedia.org/wiki/G-code#Shttp://en.wikipedia.org/wiki/Revolutions_per_minutehttp://en.wikipedia.org/wiki/G-code#G97http://en.wikipedia.org/wiki/Surface_feet_per_minutehttp://en.wikipedia.org/wiki/G-code#G96http://en.wikipedia.org/wiki/G-code#G20http://en.wikipedia.org/wiki/G-code#G21http://en.wikipedia.org/wiki/Right-hand_rule
  • 8/2/2019 7_Coduri_G

    14/19

    M06

    Automatic tool change(ATC)

    MT (some-times)

    Many lathes do not use M06 because theTaddressitself indexes the turret.Programming on any particular machine tool requiresknowing which method that machine uses. Tounderstand how the T address works and how it

    interacts (or not) with M06, one must study the variousmethods, such as lathe turret programming, ATC fixedtool selection, ATC random memory tool selection, theconcept of "next tool waiting", and empty tools. Theseconcepts are taught in textbooks such as Smid,[1]andonline multimedia (videos, simulators, etc); all of theseteaching resources are usually paywalled to pay backthe costs of their development. They are used intraining classes for operators, both on-site andremotely (e.g., Tooling University).

    M07 Coolant on (mist) M T

    M08 Coolant on (flood) M T

    M09 Coolant off M T

    M10 Pallet clamp on M For machining centers with pallet changers

    M11 Pallet clamp off M For machining centers with pallet changers

    M13Spindle on (clockwiserotation) and coolanton (flood)

    M

    This one M-code does the work of both M03 andM08.It is not unusual for specific machine models to havesuch combined commands, which make for shorter,

    more quickly written programs.M19 Spindle orientation M T Spindle orientation is more often called within cycles

    (automatically) or during setup (manually), but it is alsoavailable under program control via M19. Theabbreviation OSS (oriented spindle stop) may be seenin reference to an oriented stop within cycles.

    The relevance of spindle orientation has increased as

    technology has advanced. Although 4- and 5-axis

    contour milling and CNCsingle-pointing have

    depended on spindle position encoders for decades,before the advent of widespread live tooling and mill-

    turn/turn-mill systems, it was seldom relevant in

    "regular" (non-"special") machining for the operator (as

    opposed to the machine) to know the angular

    orientation of a spindle except for within a few

    restricted contexts (such astool change, orG76 fine

    boring cycles with choreographed tool retraction). Most

    milling of features indexed around a turned workpiecewas accomplished with separate operations

    http://en.wikipedia.org/wiki/G-code#Thttp://en.wikipedia.org/wiki/G-code#Thttp://en.wikipedia.org/wiki/G-code#Thttp://en.wikipedia.org/wiki/G-code#cite_note-Smid2008-0http://en.wikipedia.org/wiki/G-code#cite_note-Smid2008-0http://en.wikipedia.org/wiki/Paywallhttp://en.wikipedia.org/wiki/Tooling_Universityhttp://en.wikipedia.org/wiki/Cutting_fluidhttp://en.wikipedia.org/wiki/G-code#M03http://en.wikipedia.org/wiki/G-code#M08http://en.wikipedia.org/wiki/G-code#M08http://en.wikipedia.org/wiki/Threading_(manufacturing)#Single-point_threadinghttp://en.wikipedia.org/wiki/Threading_(manufacturing)#Single-point_threadinghttp://en.wikipedia.org/wiki/G-code#Thttp://en.wikipedia.org/wiki/G-code#Thttp://en.wikipedia.org/wiki/G-code#Thttp://en.wikipedia.org/wiki/G-code#G76http://en.wikipedia.org/wiki/G-code#Thttp://en.wikipedia.org/wiki/G-code#cite_note-Smid2008-0http://en.wikipedia.org/wiki/Paywallhttp://en.wikipedia.org/wiki/Tooling_Universityhttp://en.wikipedia.org/wiki/Cutting_fluidhttp://en.wikipedia.org/wiki/G-code#M03http://en.wikipedia.org/wiki/G-code#M08http://en.wikipedia.org/wiki/Threading_(manufacturing)#Single-point_threadinghttp://en.wikipedia.org/wiki/G-code#Thttp://en.wikipedia.org/wiki/G-code#G76
  • 8/2/2019 7_Coduri_G

    15/19

    on indexing headsetups; in a sense, indexing heads

    were invented as separate pieces of equipment, to be

    used in separate operations, which could provide

    precise spindle orientation in a world where it otherwisemostly didn't exist (and didn't need to). But as

    CAD/CAM and multiaxis CNC machining with multiple

    rotary-cutter axes becomes the norm, even for

    "regular" (non-"special") applications, machinists now

    frequently care about stepping just about anyspindle

    through its 360 with precision.

    M21 Mirror,X-axis M

    M21 Tailstock forward T

    M22 Mirror,Y-axis M

    M22 Tailstock backward T

    M23 Mirror OFF M

    M23Thread gradual pulloutON

    T

    M24 Thread gradual pulloutOFF

    T

    M30 End of program withreturn to program top

    M T

    M41 Gear select - gear 1 T

    M42 Gear select - gear 2 T

    M43 Gear select - gear 3 T

    M44 Gear select - gear 4 T

    M48 Feedrate overrideallowed

    M T

    M49 Feedrate overrideNOT allowed

    M TThis rule is also called (automatically) within tappingcycles or single-point threading cycles, where feed isprecisely correlated to speed. Same with spindle speedoverride and feed hold button.

    M52 Unload Last tool fromspindle

    M T Also empty spindle.

    M60 Automatic palletchange (APC)

    M For machining centers with pallet changers

    M98Subprogram call M T

    Takes an address P to specify which subprogram tocall, for example, "M98 P8979" calls subprogram

    O8979.

    http://en.wikipedia.org/wiki/Indexing_headhttp://en.wikipedia.org/wiki/Indexing_headhttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Yhttp://en.wikipedia.org/wiki/G-code#Yhttp://en.wikipedia.org/wiki/G-code#Phttp://en.wikipedia.org/wiki/Indexing_headhttp://en.wikipedia.org/wiki/G-code#Xhttp://en.wikipedia.org/wiki/G-code#Yhttp://en.wikipedia.org/wiki/G-code#P
  • 8/2/2019 7_Coduri_G

    16/19

    M99

    Subprogram end M T

    Usually placed at end of subprogram, where it returnsexecution control to the main program. The default isthat control returns to the block following the M98 callin the main program. Return to a different block numbercan be specified by a P address. M99 can also be used

    in main program with block skip for endless loop ofmain program on bar work on lathes (until operatortoggles block skip).

    Exemplu de program

    This is a generic program that demonstrates the use of G-Code to turn a 1" diameter X 1" long part.Assume that a bar of material is in the machine and that the bar is slightly oversized in length anddiameter and that the bar protrudes by more than 1" from the face of the chuck. (Caution: This isgeneric, it might not work on any real machine! Pay particular attention to point 5 below.)

    Sample

    Line Code Description

    %

    O4968 (Sample face and turn program)

    N01 M216 (Turn on load monitor)

    N02G20 G90G54 D200G40

    (Inch units. Absolute mode. Call work offset values. Moving coordinate system tothe location specified in the register D200. Cancel any existing tool radius offset.)

    http://en.wikipedia.org/wiki/File:ToolPath.svg
  • 8/2/2019 7_Coduri_G

    17/19

    N03 G50 S2000 (Set maximum spindle speed rev/min - preparing for G96 CSS coming soon)

    N04 M01 (Optional stop)

    N05 T0300 (Index turret to tool 3. Clear wear offset (00).)

    N06G96 S854M42 M03M08

    (Constant surface speed [automatically varies the spindle speed], 854 sfm, selectspindle gear, start spindle CW rotation, turn on the coolant flood)

    N07G41 G00X1.1 Z1.1T0303

    (Call tool radius offset. Call tool wear offset. Rapid feed to a point about0.100" fromthe end of the bar [not counting 0.005" or 0.006" that the bar-pull-and-stopsequence is set up to leave as a stock allowance for facing off] and 0.050" from theside)

    N08G01 Z1.0F.05

    (Feed in horizontally until the tool is standing 1" from the datum i.e. program Z-zero)

    N09 X-0.002 (Feed down until the tool is slightly past center, thus facing the end of the bar)

    N10 G00 Z1.1 (Rapid feed 0.1" away from the end of the bar - clear the part)

    N11 X1.0 (Rapid feed up until the tool is standing at the finished OD)

    N12G01 Z0.0F.05

    (Feed in horizontally cutting the bar to 1" diameter all the way to the datum, feedingat 0.050" per revolution)

    N13G00 X1.1M05 M09

    (Clear the part, stop the spindle, turn off the coolant)

    N14 G91 G28 X0(Home X axis - return to machine X-zero passing through no intermediate X point[incremental X0])

    N15 G91 G28 Z0 (Home Z axis - return to machine Z-zero passing through no intermediate Z point

  • 8/2/2019 7_Coduri_G

    18/19

    [incremental Z0])

    N16 G90 M215 (Return to absolute mode. Turn off load monitor)

    N17 M30 (Program stop, rewind to beginning of program)

    %

    Several points to note:

    1. There is room for some programming style, even in this short program. The grouping of

    codes in line N06 could have been put on multiple lines. Doing so may have made it easier tofollow program execution.

    2. Many codes are "modal", meaning that they stay in effect until they are cancelled orreplaced by a contradictory code. For example, once variable speed cutting (CSS) had beenselected (G96), it stayed in effect until the end of the program. In operation, the spindle speedwould increase as the tool neared the center of the work in order to maintain a constant surfacespeed. Similarly, once rapid feed was selected (G00), all tool movements would be rapid until afeed rate code (G01, G02, G03) was selected.

    3. It is common practice to use a load monitor with CNC machinery. The load monitor willstop the machine if the spindle or feed loads exceed a preset value that is set during the set-up

    operation. The jobs of the load monitor are various:1. Prevent machine damage in the event of tool breakage or a programming

    mistake.

    1. This is especially important because it allows safe "lights-out

    machining", in which the operators set up the job and start it running during

    the day, then go home for the night, leaving the machines running and cutting

    parts during the night. Because no human is around to hear, see, or smell a

    problem such as a broken tool, the load monitor serves an important sentry

    duty. When it senses overload condition, which semantically suggests a dullor broken tool, it commands a stop to the machining. Technology is available

    nowadays to send an alert to someone remotely (e.g., the sleeping owner,

    operator, or owner-operator) if desired, which can allow them to come

    intercede and get production going again, then leave once more. This can be

    the difference between profitability or loss on some jobs, because lights-out

    machining reduces labor hours per part.

    2. Warn of a tool that is becoming dull and needs to be replaced or sharpened.

    Thus an operator who is busy tending multiple machines will be told by a machine,

  • 8/2/2019 7_Coduri_G

    19/19

    essentially, "Hey, pause what you're doing over there, and come attend to a need over

    here."

    4. It is common practice to bring the tool in rapidly to a "safe" point that is close to the part- in this case 0.1" away - and then start feeding the tool. How close that "safe" distance is,

    depends on the skill of the programmer and maximum material condition for the raw stock.5. If the program is wrong, there is a high probability that the machine will crash, or ram

    the tool into the part under high power. This can be costly, especially in newer machiningcenters. It is possible to intersperse the program with optional stops (M01 code) which allow theprogram to be run piecemeal for testing purposes. The optional stops remain in the program butthey are skipped during the normal running of the machine. Fortunately, most CAD/CAMsoftware ships with CNC simulators that will display the movement of the tool as the programexecutes. Many modern CNC machines also allow programmers to execute the program in asimulation mode and observe the operating parameters of the machine at a particular executionpoint. This enables programmers to discover semantic errors (as opposed to syntax errors)before losing material or tools to an incorrect program. Depending on the size of the part, waxblocks may be used for testing purposes as well.

    6. For pedagogical purposes, line numbers have been included in the program above.They are usually not necessary for operation of a machine, so they are seldom used in industry.However, if branching or looping statements are used in the code, then line numbers may wellbe included as the target of those statements (e.g. GOTO N99).

    7. Some machines do not allow multiple M codes in the same line.