computer numerical control of machine tools · 2017-06-07 · computer numerical control of machine...

49
Laboratory for Manufacturing Systems and Automation COMPUTER NUMERICAL CONTROL COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS OF MACHINE TOOLS COMPUTER NUMERICAL CONTROL COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS OF MACHINE TOOLS Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris Mourtzis Dr. Dimitris Mourtzis Department of Mechanical Engineering and Aeronautics University of Patras, Greece

Upload: others

Post on 14-Feb-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Laboratory for Manufacturing Systems and Automation

COMPUTER NUMERICAL CONTROL COMPUTER NUMERICAL CONTROL

OF MACHINE TOOLSOF MACHINE TOOLS

COMPUTER NUMERICAL CONTROL COMPUTER NUMERICAL CONTROL

OF MACHINE TOOLSOF MACHINE TOOLS

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

Laboratory for Manufacturing Systems and Automation

Department of Mechanical Engineering and Aeronautics

University of Patras, Greece

Page 2: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Chapter 6: Chapter 6:

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

Two Two –– Axis ProgrammingAxis Programming

Page 3: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Objectives of Chapter 6Objectives of Chapter 6

�� IdentifyIdentify thethe basicbasic partsparts ofof aa CNCCNC programprogram

�� DescribeDescribe thethe wordword addressaddress codecode formatformat

�� WriteWrite simplesimple twotwo--axisaxis programsprograms inin wordword addressaddress formatformat

toto performperform holehole operationsoperations

�� WriteWrite simplesimple twotwo--axisaxis millingmilling programsprograms usingusing thethe wordword

�� IdentifyIdentify thethe basicbasic partsparts ofof aa CNCCNC programprogram

�� DescribeDescribe thethe wordword addressaddress codecode formatformat

�� WriteWrite simplesimple twotwo--axisaxis programsprograms inin wordword addressaddress formatformat

toto performperform holehole operationsoperations

�� WriteWrite simplesimple twotwo--axisaxis millingmilling programsprograms usingusing thethe wordword

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

�� WriteWrite simplesimple twotwo--axisaxis millingmilling programsprograms usingusing thethe wordword

addressaddress formatformat

�� WriteWrite simplesimple twotwo--axisaxis programsprograms thatthat combinecombine millingmilling

andand holehole operationsoperations

�� WriteWrite simplesimple twotwo--axisaxis millingmilling programsprograms usingusing thethe wordword

addressaddress formatformat

�� WriteWrite simplesimple twotwo--axisaxis programsprograms thatthat combinecombine millingmilling

andand holehole operationsoperations

Page 4: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

IntroductionIntroduction

�� ThisThis chapterchapter isis concernedconcerned withwith manualmanual programmingprogramming ofof CNCCNC machinerymachinery

�� ForFor purposespurposes ofof continuitycontinuity thethe samesame machinemachine willwill bebe usedused forfor thethe nextnext

severalseveral chapterschapters

�� NoNo twotwo CNCCNC machinesmachines programprogram exactlyexactly alikealike

�� However,However, learninglearning toto programprogram thethe machinemachine usedused inin thethe examples,examples, onlyonly

minimalminimal efforteffort willwill bebe requiredrequired toto programprogram otherother CNCCNC machinesmachines

�� ProgrammingProgramming isis donedone inin aa formatformat calledcalled WordWord AddressAddress whichwhich isis thethe mostmost

commoncommon machinemachine codecode formatformat usedused todaytoday

�� TheThe machinemachine programmedprogrammed inin thisthis chapterchapter isis aa verticalvertical machiningmachining centercenter

�� ThisThis chapterchapter isis concernedconcerned withwith manualmanual programmingprogramming ofof CNCCNC machinerymachinery

�� ForFor purposespurposes ofof continuitycontinuity thethe samesame machinemachine willwill bebe usedused forfor thethe nextnext

severalseveral chapterschapters

�� NoNo twotwo CNCCNC machinesmachines programprogram exactlyexactly alikealike

�� However,However, learninglearning toto programprogram thethe machinemachine usedused inin thethe examples,examples, onlyonly

minimalminimal efforteffort willwill bebe requiredrequired toto programprogram otherother CNCCNC machinesmachines

�� ProgrammingProgramming isis donedone inin aa formatformat calledcalled WordWord AddressAddress whichwhich isis thethe mostmost

commoncommon machinemachine codecode formatformat usedused todaytoday

�� TheThe machinemachine programmedprogrammed inin thisthis chapterchapter isis aa verticalvertical machiningmachining centercenter

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

�� TheThe machinemachine programmedprogrammed inin thisthis chapterchapter isis aa verticalvertical machiningmachining centercenter

�� TheThe machiningmachining centercenter isis equippedequipped withwith aa FANUCFANUC MachineMachine ControlControl UnitUnit

(MCU)(MCU)

�� ItIt isis aa ContinuousContinuous PathPath TypeType MachineMachine

�� TheThe programprogram codescodes usedused onon FANUCFANUC MCUMCU areare similarsimilar toto thosethose usedused onon otherother

MCUsMCUs suchsuch asas GeneralGeneral NumericNumeric andand GeneralGeneral ElectricElectric

�� TwoTwo--AxisAxis millmill programmingprogramming isis notnot soso commoncommon inin realreal worldworld applicationapplication butbut

inin educationaleducational levellevel isis aa prerequisiteprerequisite forfor easiereasier understandingunderstanding ofof ThreeThree--AxisAxis

programmingprogramming

�� TheThe machinemachine programmedprogrammed inin thisthis chapterchapter isis aa verticalvertical machiningmachining centercenter

�� TheThe machiningmachining centercenter isis equippedequipped withwith aa FANUCFANUC MachineMachine ControlControl UnitUnit

(MCU)(MCU)

�� ItIt isis aa ContinuousContinuous PathPath TypeType MachineMachine

�� TheThe programprogram codescodes usedused onon FANUCFANUC MCUMCU areare similarsimilar toto thosethose usedused onon otherother

MCUsMCUs suchsuch asas GeneralGeneral NumericNumeric andand GeneralGeneral ElectricElectric

�� TwoTwo--AxisAxis millmill programmingprogramming isis notnot soso commoncommon inin realreal worldworld applicationapplication butbut

inin educationaleducational levellevel isis aa prerequisiteprerequisite forfor easiereasier understandingunderstanding ofof ThreeThree--AxisAxis

programmingprogramming

Page 5: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Parts of a CNC ProgramParts of a CNC Program

Parts of CNC ProgramParts of CNC Program

�� Regardless the MCU being programmed all CNC programs consist Regardless the MCU being programmed all CNC programs consist

of the same basic partsof the same basic parts

Parts of CNC ProgramParts of CNC Program

�� Regardless the MCU being programmed all CNC programs consist Regardless the MCU being programmed all CNC programs consist

of the same basic partsof the same basic parts

CNC ProgramCNC Program

Basic Parts Basic Parts

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

ProgramProgram

StartStart--upup

Tool SequenceTool Sequence

Safety LineSafety LineTool CancelTool CancelTool LoadTool Load Tool MotionTool Motion

End of theEnd of the

ProgramProgram

Page 6: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Parts of a CNC ProgramParts of a CNC Program

ProgramProgram StartupStartup

�� TheThe programprogram startupstartup sectionsection servesserves toto issueissue anyany commandscommands

requiredrequired atat thethe startstart ofof thethe tapetape onlyonly

�� ForFor instance,instance, settingsetting thethe programprogram toto inchinch modemode wouldwould onlyonly bebe

requiredrequired atat thethe beginningbeginning ofof thethe programprogram

ToolTool SafetySafety BlockBlock

�� TheThe tooltool sequencesequence safetysafety block(s)block(s) servesserves toto issueissue commandscommands toto

cancelcancel forfor anyany machinemachine modesmodes thatthat couldcould havehave beenbeen leftleft activeactive ifif thethe

ProgramProgram StartupStartup

�� TheThe programprogram startupstartup sectionsection servesserves toto issueissue anyany commandscommands

requiredrequired atat thethe startstart ofof thethe tapetape onlyonly

�� ForFor instance,instance, settingsetting thethe programprogram toto inchinch modemode wouldwould onlyonly bebe

requiredrequired atat thethe beginningbeginning ofof thethe programprogram

ToolTool SafetySafety BlockBlock

�� TheThe tooltool sequencesequence safetysafety block(s)block(s) servesserves toto issueissue commandscommands toto

cancelcancel forfor anyany machinemachine modesmodes thatthat couldcould havehave beenbeen leftleft activeactive ifif thethe

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

cancelcancel forfor anyany machinemachine modesmodes thatthat couldcould havehave beenbeen leftleft activeactive ifif thethe

machinemachine operatoroperator interruptedinterrupted thethe tooltool cyclecycle

�� ByBy issuingissuing aa safetysafety block,block, thethe programmerprogrammer andand operatoroperator knowknow thethe

statestate ofof thethe machinemachine atat thethe beginningbeginning ofof thethe tooltool cyclecycle

ToolTool LoadLoad BlocksBlocks

�� TheThe tooltool loadload sectionsection areare thosethose blocksblocks ofof aa tooltool sequencesequence wherewhere thethe

tooltool isis placedplaced inin thethe spindlespindle,, eithereither manuallymanually oror byby thethe machine'smachine's

automaticautomatic tooltool changingchanging mechanismmechanism

�� TheThe tooltool lengthlength compensationcompensation isis turnedturned onon

cancelcancel forfor anyany machinemachine modesmodes thatthat couldcould havehave beenbeen leftleft activeactive ifif thethe

machinemachine operatoroperator interruptedinterrupted thethe tooltool cyclecycle

�� ByBy issuingissuing aa safetysafety block,block, thethe programmerprogrammer andand operatoroperator knowknow thethe

statestate ofof thethe machinemachine atat thethe beginningbeginning ofof thethe tooltool cyclecycle

ToolTool LoadLoad BlocksBlocks

�� TheThe tooltool loadload sectionsection areare thosethose blocksblocks ofof aa tooltool sequencesequence wherewhere thethe

tooltool isis placedplaced inin thethe spindlespindle,, eithereither manuallymanually oror byby thethe machine'smachine's

automaticautomatic tooltool changingchanging mechanismmechanism

�� TheThe tooltool lengthlength compensationcompensation isis turnedturned onon

Page 7: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Parts of a CNC ProgramParts of a CNC Program

ToolTool MotionMotion BlocksBlocks

�� TheThe tooltool motionmotion sectionsection containscontains thethe codecode forfor thethe actualactual cuttingcutting tooltool

motionmotion

�� ItIt isis wherewhere allall thethe machiningmachining workwork isis actuallyactually donedone

ToolTool CancelCancel BlocksBlocks

�� TheThe tooltool cancelcancel sectionsection turnsturns offoff thethe tooltool lengthlength compensationcompensation andand

returnsreturns thethe tooltool toto thethe tooltool changechange positionposition

AllAll activeactive cyclecycle commandscommands shouldshould bebe turnedturned offoff inin thisthis sectionsection andand

ToolTool MotionMotion BlocksBlocks

�� TheThe tooltool motionmotion sectionsection containscontains thethe codecode forfor thethe actualactual cuttingcutting tooltool

motionmotion

�� ItIt isis wherewhere allall thethe machiningmachining workwork isis actuallyactually donedone

ToolTool CancelCancel BlocksBlocks

�� TheThe tooltool cancelcancel sectionsection turnsturns offoff thethe tooltool lengthlength compensationcompensation andand

returnsreturns thethe tooltool toto thethe tooltool changechange positionposition

AllAll activeactive cyclecycle commandscommands shouldshould bebe turnedturned offoff inin thisthis sectionsection andand

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

�� AllAll activeactive cyclecycle commandscommands shouldshould bebe turnedturned offoff inin thisthis sectionsection andand

thethe controlcontrol leftleft inin aa statestate readyready toto loadload thethe nextnext tooltool

EndEnd ofof TapeTape BlocksBlocks

�� TheThe endend ofof programprogram blocksblocks issueissue anyany commandscommands necessarynecessary afterafter allall

tooltool motionmotion isis completecomplete,, butbut beforebefore thethe programprogram terminatesterminates

�� OftenOften thisthis sectionsection consistsconsists simplysimply ofof thethe endend ofof programprogram codecode

�� AllAll activeactive cyclecycle commandscommands shouldshould bebe turnedturned offoff inin thisthis sectionsection andand

thethe controlcontrol leftleft inin aa statestate readyready toto loadload thethe nextnext tooltool

EndEnd ofof TapeTape BlocksBlocks

�� TheThe endend ofof programprogram blocksblocks issueissue anyany commandscommands necessarynecessary afterafter allall

tooltool motionmotion isis completecomplete,, butbut beforebefore thethe programprogram terminatesterminates

�� OftenOften thisthis sectionsection consistsconsists simplysimply ofof thethe endend ofof programprogram codecode

Page 8: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Word Address FormatWord Address Format

WordWord AddressAddress CharacteristicsCharacteristics::

�� WordWord AddressAddress waswas developeddeveloped asas aa tapetape programmingprogramming formatformat

�� WordWord AddressAddress isis alsoalso namednamed VariableVariable BlockBlock FormatFormat becausebecause thethe

programprogram lineslines (blocks)(blocks) maymay varyvary inin lengthlength accordingaccording toto thethe

informationinformation containedcontained inin themthem

�� EarlierEarlier tapetape formatsformats requiredrequired anan entryentry forfor allall possiblepossible machinemachine

registersregisters

WordWord AddressAddress CharacteristicsCharacteristics::

�� WordWord AddressAddress waswas developeddeveloped asas aa tapetape programmingprogramming formatformat

�� WordWord AddressAddress isis alsoalso namednamed VariableVariable BlockBlock FormatFormat becausebecause thethe

programprogram lineslines (blocks)(blocks) maymay varyvary inin lengthlength accordingaccording toto thethe

informationinformation containedcontained inin themthem

�� EarlierEarlier tapetape formatsformats requiredrequired anan entryentry forfor allall possiblepossible machinemachine

registersregisters

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

�� InIn thesethese earlierearlier formatsformats aa zerozero waswas programmedprogrammed asas aa nullnull inputinput ifif thethe

registerregister valuesvalues werewere toto bebe unaffectedunaffected

�� InIn WordWord AddressAddress thethe blocksblocks needneed onlyonly containcontain necessarynecessary

informationinformation

�� AlthoughAlthough WordWord AddressAddress waswas developeddeveloped asas aa TapeTape FormatFormat isis usedused asas

thethe formatformat forfor ManualManual DataData InputInput (MDI)(MDI) onon manymany CNCCNC machinesmachines

�� InIn thesethese earlierearlier formatsformats aa zerozero waswas programmedprogrammed asas aa nullnull inputinput ifif thethe

registerregister valuesvalues werewere toto bebe unaffectedunaffected

�� InIn WordWord AddressAddress thethe blocksblocks needneed onlyonly containcontain necessarynecessary

informationinformation

�� AlthoughAlthough WordWord AddressAddress waswas developeddeveloped asas aa TapeTape FormatFormat isis usedused asas

thethe formatformat forfor ManualManual DataData InputInput (MDI)(MDI) onon manymany CNCCNC machinesmachines

Page 9: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Word Address FormatWord Address Format

AddressesAddresses::

The block format for word address is as follows:The block format for word address is as follows:

N...G9X...Y...Z....I...J...K...F...H9S...T9M9N...G9X...Y...Z....I...J...K...F...H9S...T9M9

�� OnlyOnly thethe informationinformation neededneeded onon aa lineline needneed bebe givengiven

�� EachEach ofof thethe lettersletters isis calledcalled anan addressaddress (or(or word)word)

AddressesAddresses::

The block format for word address is as follows:The block format for word address is as follows:

N...G9X...Y...Z....I...J...K...F...H9S...T9M9N...G9X...Y...Z....I...J...K...F...H9S...T9M9

�� OnlyOnly thethe informationinformation neededneeded onon aa lineline needneed bebe givengiven

�� EachEach ofof thethe lettersletters isis calledcalled anan addressaddress (or(or word)word)

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

NN -- TheThe blockblock sequencesequence numbernumber

�� AnAn NN numbernumber isis usedused toto numbernumber thethe lineslines ofof NCNC codecode forfor operatoroperator and/orand/or

programmerprogrammer referencereference

�� NN numbersnumbers areare ignoredignored byby thethe controllercontroller duringduring programprogram executionexecution

�� MostMost NCNC controlscontrols allowallow aa blockblock toto bebe searchedsearched forfor byby thethe sequencesequence

numbernumber forfor editingediting oror viewingviewing purposespurposes..

NN -- TheThe blockblock sequencesequence numbernumber

�� AnAn NN numbernumber isis usedused toto numbernumber thethe lineslines ofof NCNC codecode forfor operatoroperator and/orand/or

programmerprogrammer referencereference

�� NN numbersnumbers areare ignoredignored byby thethe controllercontroller duringduring programprogram executionexecution

�� MostMost NCNC controlscontrols allowallow aa blockblock toto bebe searchedsearched forfor byby thethe sequencesequence

numbernumber forfor editingediting oror viewingviewing purposespurposes..

Page 10: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Word Address FormatWord Address Format

AddressesAddresses::

The block format for word address is as follows:The block format for word address is as follows:

N...G..X...Y...Z....I...J...K...F...H9S...T9M9N...G..X...Y...Z....I...J...K...F...H9S...T9M9

�� OnlyOnly thethe informationinformation neededneeded onon aa lineline needneed bebe givengiven

�� EachEach ofof thethe lettersletters isis calledcalled anan addressaddress (or(or word)word)

AddressesAddresses::

The block format for word address is as follows:The block format for word address is as follows:

N...G..X...Y...Z....I...J...K...F...H9S...T9M9N...G..X...Y...Z....I...J...K...F...H9S...T9M9

�� OnlyOnly thethe informationinformation neededneeded onon aa lineline needneed bebe givengiven

�� EachEach ofof thethe lettersletters isis calledcalled anan addressaddress (or(or word)word)

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

GG -- InitiatesInitiates aa preparatorypreparatory functionfunction

�� PreparatoryPreparatory functionsfunctions changechange thethe controlcontrol modemode ofof thethe machinemachine

�� ExamplesExamples ofof preparatorypreparatory functionsfunctions areare rapidrapid // feedratefeedrate mode,mode, drilldrill mode,mode,

tappingtapping mode,mode, boringboring mode,mode, andand circularcircular interpolationinterpolation

�� PreparatoryPreparatory functionsfunctions areare calledcalled prepprep functionsfunctions oror moremore commonlycommonly GG

CodesCodes

GG -- InitiatesInitiates aa preparatorypreparatory functionfunction

�� PreparatoryPreparatory functionsfunctions changechange thethe controlcontrol modemode ofof thethe machinemachine

�� ExamplesExamples ofof preparatorypreparatory functionsfunctions areare rapidrapid // feedratefeedrate mode,mode, drilldrill mode,mode,

tappingtapping mode,mode, boringboring mode,mode, andand circularcircular interpolationinterpolation

�� PreparatoryPreparatory functionsfunctions areare calledcalled prepprep functionsfunctions oror moremore commonlycommonly GG

CodesCodes

Page 11: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Word Address FormatWord Address Format

XX —— DesignatesDesignates anan XX--axisaxis coordinatecoordinate.. XX alsoalso isis usedused toto enterenter aa timetime

intervalinterval onon FANUCFANUC andand FANUCFANUC stylestyle controllerscontrollers

YY —— DesignatesDesignates aa YY--axisaxis coordinatecoordinate

ZZ —— DesignatesDesignates aa ZZ--axisaxis coordinatecoordinate

II —— IdentifiesIdentifies thethe XX--axisaxis arcarc vectorvector (the(the XX--axisaxis centercenter pointpoint ofof anan arc)arc)

JJ —— IdentifiesIdentifies thethe YY--axisaxis arcarc vectorvector (the(the YY--axisaxis centercenter pointpoint ofof anan arc)arc)

KK —— IdentifiesIdentifies thethe ZZ--axisaxis arcarc vectorvector (the(the ZZ--axisaxis centercenter pointpoint ofof anan arc)arc)

SS —— SetsSets thethe spindlespindle rpmrpm

XX —— DesignatesDesignates anan XX--axisaxis coordinatecoordinate.. XX alsoalso isis usedused toto enterenter aa timetime

intervalinterval onon FANUCFANUC andand FANUCFANUC stylestyle controllerscontrollers

YY —— DesignatesDesignates aa YY--axisaxis coordinatecoordinate

ZZ —— DesignatesDesignates aa ZZ--axisaxis coordinatecoordinate

II —— IdentifiesIdentifies thethe XX--axisaxis arcarc vectorvector (the(the XX--axisaxis centercenter pointpoint ofof anan arc)arc)

JJ —— IdentifiesIdentifies thethe YY--axisaxis arcarc vectorvector (the(the YY--axisaxis centercenter pointpoint ofof anan arc)arc)

KK —— IdentifiesIdentifies thethe ZZ--axisaxis arcarc vectorvector (the(the ZZ--axisaxis centercenter pointpoint ofof anan arc)arc)

SS —— SetsSets thethe spindlespindle rpmrpm

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

SS —— SetsSets thethe spindlespindle rpmrpm

HH —— SpecifiesSpecifies thethe tooltool lengthlength compensationcompensation registerregister

FF —— AssignsAssigns aa feedratefeedrate

TT —— SpecifiesSpecifies thethe standbystandby tooltool (to(to bebe usedused inin thethe nextnext tooltool change)change)

MM—— InitiatesInitiates miscellaneousmiscellaneous functionsfunctions (M(M functions)functions)

�� MM functionsfunctions controlcontrol auxiliaryauxiliary functionsfunctions suchsuch asas thethe turningturning onon andand offoff

ofof thethe spindlespindle andand coolant,coolant, initiatinginitiating tooltool changes,changes, andand signalingsignaling thethe

endend ofof aa programprogram

SS —— SetsSets thethe spindlespindle rpmrpm

HH —— SpecifiesSpecifies thethe tooltool lengthlength compensationcompensation registerregister

FF —— AssignsAssigns aa feedratefeedrate

TT —— SpecifiesSpecifies thethe standbystandby tooltool (to(to bebe usedused inin thethe nextnext tooltool change)change)

MM—— InitiatesInitiates miscellaneousmiscellaneous functionsfunctions (M(M functions)functions)

�� MM functionsfunctions controlcontrol auxiliaryauxiliary functionsfunctions suchsuch asas thethe turningturning onon andand offoff

ofof thethe spindlespindle andand coolant,coolant, initiatinginitiating tooltool changes,changes, andand signalingsignaling thethe

endend ofof aa programprogram

Page 12: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Drilling Example Drilling Example –– Absolute PositioningAbsolute Positioning

PartsParts ofof thethe CNCCNC ProgramProgram

11.. ProgramProgram andand toolstools startupstartup::

sequencesequence blockblock NN010010

22.. ToolTool motionmotion blocksblocks:: NN020020

throughthrough NN070070

33.. ToolTool cancellationcancellation blockblock:: NN080080

44.. EndEnd ofof programprogram blocksblocks:: NN090090

PartsParts ofof thethe CNCCNC ProgramProgram

11.. ProgramProgram andand toolstools startupstartup::

sequencesequence blockblock NN010010

22.. ToolTool motionmotion blocksblocks:: NN020020

throughthrough NN070070

33.. ToolTool cancellationcancellation blockblock:: NN080080

44.. EndEnd ofof programprogram blocksblocks:: NN090090

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--1 Hole operations part drawing, 1 Hole operations part drawing, inchinchFIGURE 6FIGURE 6--1 Hole operations part drawing, 1 Hole operations part drawing, inchinch

44.. EndEnd ofof programprogram blocksblocks:: NN09009044.. EndEnd ofof programprogram blocksblocks:: NN090090

Page 13: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Drilling Example Drilling Example –– Absolute PositioningAbsolute Positioning

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--2 Hole operations part drawing, 2 Hole operations part drawing, metricmetricFIGURE 6FIGURE 6--2 Hole operations part drawing, 2 Hole operations part drawing, metricmetric

Page 14: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Drilling Example Drilling Example –– Absolute PositioningAbsolute Positioning

%%

O6003O6003

(**************************************)(**************************************)

(* PROGRAM X0/Y0 = TOOL CHANGE)(* PROGRAM X0/Y0 = TOOL CHANGE)

(* SET TOOL CHANGE X(* SET TOOL CHANGE X--2.0 Y2.0 Y--1.5 PRIOR TO)1.5 PRIOR TO)

(* STARTING FIRST CYCLE.)(* STARTING FIRST CYCLE.)

(* ************************************)(* ************************************)

(TOOL 1 (TOOL 1 -- 3/8 DRILL)3/8 DRILL)

(SPINDLE SPEED 2500 RPM)(SPINDLE SPEED 2500 RPM)

N010 G00 G70 G90 M06N010 G00 G70 G90 M06

N020 X.5 Y2. N020 X.5 Y2.

%%

O6003O6003

(**************************************)(**************************************)

(* PROGRAM X0/Y0 = TOOL CHANGE)(* PROGRAM X0/Y0 = TOOL CHANGE)

(* SET TOOL CHANGE X(* SET TOOL CHANGE X--2.0 Y2.0 Y--1.5 PRIOR TO)1.5 PRIOR TO)

(* STARTING FIRST CYCLE.)(* STARTING FIRST CYCLE.)

(* ************************************)(* ************************************)

(TOOL 1 (TOOL 1 -- 3/8 DRILL)3/8 DRILL)

(SPINDLE SPEED 2500 RPM)(SPINDLE SPEED 2500 RPM)

N010 G00 G70 G90 M06N010 G00 G70 G90 M06

N020 X.5 Y2. N020 X.5 Y2.

%%

O6004O6004

(* ************************************)(* ************************************)

(* PROGRAM X0/Y0 = TOOL CHANGE)(* PROGRAM X0/Y0 = TOOL CHANGE)

(* SET TOOL CHANGE X(* SET TOOL CHANGE X--50. Y50. Y--35. PRIOR TO)35. PRIOR TO)

(* STARTING FIRST CYCLE.)(* STARTING FIRST CYCLE.)

(* ************************************)(* ************************************)

(TOOL 1 (TOOL 1 -- 3/8 DRILL)3/8 DRILL)

(SPINDLE SPEED 2500 RPM)(SPINDLE SPEED 2500 RPM)

N010 G00 G71 G90 M06N010 G00 G71 G90 M06

N020 X12. Y55.N020 X12. Y55.

%%

O6004O6004

(* ************************************)(* ************************************)

(* PROGRAM X0/Y0 = TOOL CHANGE)(* PROGRAM X0/Y0 = TOOL CHANGE)

(* SET TOOL CHANGE X(* SET TOOL CHANGE X--50. Y50. Y--35. PRIOR TO)35. PRIOR TO)

(* STARTING FIRST CYCLE.)(* STARTING FIRST CYCLE.)

(* ************************************)(* ************************************)

(TOOL 1 (TOOL 1 -- 3/8 DRILL)3/8 DRILL)

(SPINDLE SPEED 2500 RPM)(SPINDLE SPEED 2500 RPM)

N010 G00 G71 G90 M06N010 G00 G71 G90 M06

N020 X12. Y55.N020 X12. Y55.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

N020 X.5 Y2. N020 X.5 Y2.

N030 M00N030 M00

N040 X1.25 Y1.5N040 X1.25 Y1.5

N050 M00N050 M00

N060 X2. Y.5 N060 X2. Y.5

N070 M00N070 M00

N080 XN080 X--2. Y2. Y--1.51.5

N090 M30N090 M30

%%

N020 X.5 Y2. N020 X.5 Y2.

N030 M00N030 M00

N040 X1.25 Y1.5N040 X1.25 Y1.5

N050 M00N050 M00

N060 X2. Y.5 N060 X2. Y.5

N070 M00N070 M00

N080 XN080 X--2. Y2. Y--1.51.5

N090 M30N090 M30

%%

FIGUREFIGURE 66--33 DrillingDrilling program,program, inchinch absoluteabsolute

positioningpositioning forfor thethe partpart inin FigureFigure 66--11

FIGUREFIGURE 66--33 DrillingDrilling program,program, inchinch absoluteabsolute

positioningpositioning forfor thethe partpart inin FigureFigure 66--11

N020 X12. Y55.N020 X12. Y55.

N030 M00N030 M00

N040 X30. Y35.N040 X30. Y35.

N050 M00N050 M00

N060 X50. Y12.N060 X50. Y12.

N070 M00N070 M00

N080 XN080 X--50. Y50. Y--35.35.

N090 M30N090 M30

%%

N020 X12. Y55.N020 X12. Y55.

N030 M00N030 M00

N040 X30. Y35.N040 X30. Y35.

N050 M00N050 M00

N060 X50. Y12.N060 X50. Y12.

N070 M00N070 M00

N080 XN080 X--50. Y50. Y--35.35.

N090 M30N090 M30

%%

FIGUREFIGURE 66--44 DrillingDrilling program,program, metricmetric absoluteabsolute

positioningpositioning,, forfor thethe partpart inin FigureFigure 66--11

FIGUREFIGURE 66--44 DrillingDrilling program,program, metricmetric absoluteabsolute

positioningpositioning,, forfor thethe partpart inin FigureFigure 66--11

Page 15: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Drilling Example Drilling Example –– Absolute PositioningAbsolute Positioning

OO60036003

ThisThis isis thethe programprogram numbernumber.. AllAll FANUCFANUC--stylestyle controllerscontrollers (and(and manymany otherother controls)controls) useuse

thethe letterletter "O""O" toto designatedesignate thethe startstart ofof aa programprogram inin controllercontroller memorymemory

NN010010

NN010010 -- ThisThis isis thethe sequencesequence numbernumber

�� EachEach blockblock (line)(line) ofof thethe programprogram beginsbegins withwith aa uniqueunique number,number, prefacedprefaced withwith thethe NN

addressaddress

�� ThisThis programprogram followsfollows thethe practicepractice ofof numberingnumbering thethe blocksblocks byby tenstens

�� ThisThis particularparticular controlcontrol doesdoes notnot carecare ifif thethe numbersnumbers areare notnot inin orderorder

�� NumberingNumbering thethe programprogram byby tenstens allowsallows anyany blocksblocks insertedinserted byby wayway ofof inin--shopshop

OO60036003

ThisThis isis thethe programprogram numbernumber.. AllAll FANUCFANUC--stylestyle controllerscontrollers (and(and manymany otherother controls)controls) useuse

thethe letterletter "O""O" toto designatedesignate thethe startstart ofof aa programprogram inin controllercontroller memorymemory

NN010010

NN010010 -- ThisThis isis thethe sequencesequence numbernumber

�� EachEach blockblock (line)(line) ofof thethe programprogram beginsbegins withwith aa uniqueunique number,number, prefacedprefaced withwith thethe NN

addressaddress

�� ThisThis programprogram followsfollows thethe practicepractice ofof numberingnumbering thethe blocksblocks byby tenstens

�� ThisThis particularparticular controlcontrol doesdoes notnot carecare ifif thethe numbersnumbers areare notnot inin orderorder

�� NumberingNumbering thethe programprogram byby tenstens allowsallows anyany blocksblocks insertedinserted byby wayway ofof inin--shopshop

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

�� NumberingNumbering thethe programprogram byby tenstens allowsallows anyany blocksblocks insertedinserted byby wayway ofof inin--shopshop

editingediting toto bebe numberednumbered consecutivelyconsecutively

GG0000 -- PutsPuts thethe machinemachine inin rapidrapid traversetraverse modemode

�� AllAll machinemachine movesmoves mademade whilewhile GOOGOO isis activeactive willwill bebe mademade atat maximummaximum speedspeed

GG7070 -- PutsPuts thethe machinemachine inin inchinch inputinput modemode

�� AllAll programprogram coordinatescoordinates willwill bebe readread inin decimaldecimal inchesinches

GG9090 -- PutsPuts thethe machinemachine inin absoluteabsolute positioningpositioning modemode

MM0606 -- issuesissues thethe tooltool changechange commandcommand

�� InIn thisthis twotwo--axisaxis millingmilling programprogram itit causescauses thethe controlcontrol toto stopstop andand waitwait forfor thethe

operatoroperator toto installinstall aa tooltool--holderholder inin thethe spindlespindle

�� NumberingNumbering thethe programprogram byby tenstens allowsallows anyany blocksblocks insertedinserted byby wayway ofof inin--shopshop

editingediting toto bebe numberednumbered consecutivelyconsecutively

GG0000 -- PutsPuts thethe machinemachine inin rapidrapid traversetraverse modemode

�� AllAll machinemachine movesmoves mademade whilewhile GOOGOO isis activeactive willwill bebe mademade atat maximummaximum speedspeed

GG7070 -- PutsPuts thethe machinemachine inin inchinch inputinput modemode

�� AllAll programprogram coordinatescoordinates willwill bebe readread inin decimaldecimal inchesinches

GG9090 -- PutsPuts thethe machinemachine inin absoluteabsolute positioningpositioning modemode

MM0606 -- issuesissues thethe tooltool changechange commandcommand

�� InIn thisthis twotwo--axisaxis millingmilling programprogram itit causescauses thethe controlcontrol toto stopstop andand waitwait forfor thethe

operatoroperator toto installinstall aa tooltool--holderholder inin thethe spindlespindle

Page 16: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Drilling Example Drilling Example –– Absolute PositioningAbsolute Positioning

NN020020

NN020020 -- TheThe blockblock sequencesequence numbernumber

�� X/YX/Y coordinatescoordinates

�� CauseCause thethe machinemachine toto positionposition thethe tooltool fromfrom thethe tooltool changechange positionposition toto holehole ##11

N030N030

N030 N030 -- Block sequence numberBlock sequence number

��M00 M00 -- Program stop commandProgram stop command

��This halts the program execution allowing the operator to drill the holesThis halts the program execution allowing the operator to drill the holes

NN020020

NN020020 -- TheThe blockblock sequencesequence numbernumber

�� X/YX/Y coordinatescoordinates

�� CauseCause thethe machinemachine toto positionposition thethe tooltool fromfrom thethe tooltool changechange positionposition toto holehole ##11

N030N030

N030 N030 -- Block sequence numberBlock sequence number

��M00 M00 -- Program stop commandProgram stop command

��This halts the program execution allowing the operator to drill the holesThis halts the program execution allowing the operator to drill the holes

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

Page 17: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Drilling Example Drilling Example –– Absolute PositioningAbsolute Positioning

N040N040

N040 N040 -- Block sequence numberBlock sequence number

�� X/Y coordinates X/Y coordinates -- to move from hole #1 to hole #2.to move from hole #1 to hole #2.

N050N050

N050 N050 -- Block sequence numberBlock sequence number

�� M00 M00 -- Program stop command Program stop command -- This halts the program so that hole #2 can be drilledThis halts the program so that hole #2 can be drilled

N060N060

N060 N060 -- Block sequence numberBlock sequence number

�� X/Y coordinates X/Y coordinates -- To move from hole #2 to hole #3To move from hole #2 to hole #3

N070N070

N070 N070 -- Block sequence numberBlock sequence number

N040N040

N040 N040 -- Block sequence numberBlock sequence number

�� X/Y coordinates X/Y coordinates -- to move from hole #1 to hole #2.to move from hole #1 to hole #2.

N050N050

N050 N050 -- Block sequence numberBlock sequence number

�� M00 M00 -- Program stop command Program stop command -- This halts the program so that hole #2 can be drilledThis halts the program so that hole #2 can be drilled

N060N060

N060 N060 -- Block sequence numberBlock sequence number

�� X/Y coordinates X/Y coordinates -- To move from hole #2 to hole #3To move from hole #2 to hole #3

N070N070

N070 N070 -- Block sequence numberBlock sequence number

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

N070 N070 -- Block sequence numberBlock sequence number

�� M00 M00 -- Program stop command Program stop command -- Hole #3 is drilled.Hole #3 is drilled.

N080N080

N080 N080 -- Block sequence numberBlock sequence number

�� X/Y coordinates X/Y coordinates -- to move from hole #3 to tool changeto move from hole #3 to tool change

N090N090

N090 N090 -- Block sequence numberBlock sequence number

�� M30 M30 -- Signals that the program has ended and resets the computer's memory to the start of the Signals that the program has ended and resets the computer's memory to the start of the

programprogram

%%

(%) is used on FANUC(%) is used on FANUC--style controllers as an end of program marker. This second percent sign style controllers as an end of program marker. This second percent sign

signals the program read port on the MCU to stop reading characters from the input device.signals the program read port on the MCU to stop reading characters from the input device.

N070 N070 -- Block sequence numberBlock sequence number

�� M00 M00 -- Program stop command Program stop command -- Hole #3 is drilled.Hole #3 is drilled.

N080N080

N080 N080 -- Block sequence numberBlock sequence number

�� X/Y coordinates X/Y coordinates -- to move from hole #3 to tool changeto move from hole #3 to tool change

N090N090

N090 N090 -- Block sequence numberBlock sequence number

�� M30 M30 -- Signals that the program has ended and resets the computer's memory to the start of the Signals that the program has ended and resets the computer's memory to the start of the

programprogram

%%

(%) is used on FANUC(%) is used on FANUC--style controllers as an end of program marker. This second percent sign style controllers as an end of program marker. This second percent sign

signals the program read port on the MCU to stop reading characters from the input device.signals the program read port on the MCU to stop reading characters from the input device.

Page 18: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Drilling Example Drilling Example –– Incremental PositioningIncremental Positioning

%%

O6005O6005

(* ************************************)(* ************************************)

(* PROGRAM X0/Y0 = TOOL CHANGE)(* PROGRAM X0/Y0 = TOOL CHANGE)

(* SET TOOL CHANGE X(* SET TOOL CHANGE X--2.0 Y2.0 Y--1.5 PRIOR TO)1.5 PRIOR TO)

(* STARTING FIRST CYCLE.)(* STARTING FIRST CYCLE.)

(* ************************************)(* ************************************)

(TOOL 1 (TOOL 1 -- 3/8 DRILL)3/8 DRILL)

(SPINDLE SPEED 2500 RPM)(SPINDLE SPEED 2500 RPM)

N010 G00 G70 G91 M06N010 G00 G70 G91 M06

N020 X2.5 Y3.5N020 X2.5 Y3.5

%%

O6005O6005

(* ************************************)(* ************************************)

(* PROGRAM X0/Y0 = TOOL CHANGE)(* PROGRAM X0/Y0 = TOOL CHANGE)

(* SET TOOL CHANGE X(* SET TOOL CHANGE X--2.0 Y2.0 Y--1.5 PRIOR TO)1.5 PRIOR TO)

(* STARTING FIRST CYCLE.)(* STARTING FIRST CYCLE.)

(* ************************************)(* ************************************)

(TOOL 1 (TOOL 1 -- 3/8 DRILL)3/8 DRILL)

(SPINDLE SPEED 2500 RPM)(SPINDLE SPEED 2500 RPM)

N010 G00 G70 G91 M06N010 G00 G70 G91 M06

N020 X2.5 Y3.5N020 X2.5 Y3.5

%%

O6006O6006

(* ************************************)(* ************************************)

(* PROGRAM X0/Y0 = TOOL CHANGE)(* PROGRAM X0/Y0 = TOOL CHANGE)

(* SET TOOL CHANGE X(* SET TOOL CHANGE X--50. Y50. Y--35. PRIOR TO)35. PRIOR TO)

(* STARTING FIRST CYCLE.)(* STARTING FIRST CYCLE.)

(* ************************************)(* ************************************)

(TOOL 1 (TOOL 1 -- 3/8 DRILL)3/8 DRILL)

(SPINDLE SPEED 2500 RPM)(SPINDLE SPEED 2500 RPM)

N010 G00 G71 G91 M06N010 G00 G71 G91 M06

N020 X62. Y90.N020 X62. Y90.

%%

O6006O6006

(* ************************************)(* ************************************)

(* PROGRAM X0/Y0 = TOOL CHANGE)(* PROGRAM X0/Y0 = TOOL CHANGE)

(* SET TOOL CHANGE X(* SET TOOL CHANGE X--50. Y50. Y--35. PRIOR TO)35. PRIOR TO)

(* STARTING FIRST CYCLE.)(* STARTING FIRST CYCLE.)

(* ************************************)(* ************************************)

(TOOL 1 (TOOL 1 -- 3/8 DRILL)3/8 DRILL)

(SPINDLE SPEED 2500 RPM)(SPINDLE SPEED 2500 RPM)

N010 G00 G71 G91 M06N010 G00 G71 G91 M06

N020 X62. Y90.N020 X62. Y90.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

N020 X2.5 Y3.5N020 X2.5 Y3.5

N030 M00N030 M00

N040 X.75 YN040 X.75 Y--.5.5

N050 M00N050 M00

N060 X.75 YN060 X.75 Y--1.1.

N070 M00N070 M00

N080 XN080 X--4. Y4. Y--2.2.

N090 M30N090 M30

%%

N020 X2.5 Y3.5N020 X2.5 Y3.5

N030 M00N030 M00

N040 X.75 YN040 X.75 Y--.5.5

N050 M00N050 M00

N060 X.75 YN060 X.75 Y--1.1.

N070 M00N070 M00

N080 XN080 X--4. Y4. Y--2.2.

N090 M30N090 M30

%%

FIGUREFIGURE 66--55 DrillingDrilling program,program, inchinch incrementalincremental

positioning,positioning, forfor thethe partpart inin FigureFigure 66--11

FIGUREFIGURE 66--55 DrillingDrilling program,program, inchinch incrementalincremental

positioning,positioning, forfor thethe partpart inin FigureFigure 66--11

N020 X62. Y90.N020 X62. Y90.

N030 M00N030 M00

N040 X18. YN040 X18. Y--20.20.

N050 M00N050 M00

N060 X20. YN060 X20. Y--23.23.

N070 M00N070 M00

N080 XN080 X--100. Y100. Y--47.47.

N090 M30N090 M30

%%

N020 X62. Y90.N020 X62. Y90.

N030 M00N030 M00

N040 X18. YN040 X18. Y--20.20.

N050 M00N050 M00

N060 X20. YN060 X20. Y--23.23.

N070 M00N070 M00

N080 XN080 X--100. Y100. Y--47.47.

N090 M30N090 M30

%%

FIGUREFIGURE 66--66 DrillingDrilling program,program, metricmetric incrementalincremental

positioning,positioning, forfor thethe partpart inin FigureFigure 66--11

FIGUREFIGURE 66--66 DrillingDrilling program,program, metricmetric incrementalincremental

positioning,positioning, forfor thethe partpart inin FigureFigure 66--11

Page 19: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Drilling Example Drilling Example –– Incremental PositioningIncremental Positioning

%%

Percent sign (%) Percent sign (%) -- program start code.program start code.

O6005O6005

This is the program number {the "0" number).This is the program number {the "0" number).

N010N010

N010 N010 -- The block sequence number.The block sequence number.

G00 G00 -- Puts the machine in rapid traverse mode. All machine moves made while G00 is active will be Puts the machine in rapid traverse mode. All machine moves made while G00 is active will be

made at maximum speed.made at maximum speed.

G70 G70 -- Puts the machine in inch input mode. All program coordinates will be read in decimal inches.Puts the machine in inch input mode. All program coordinates will be read in decimal inches.

G91 G91 -- Puts the machine in incremental positioning mode. In the absolute positioning example, the G90 Puts the machine in incremental positioning mode. In the absolute positioning example, the G90

code was used.code was used.

%%

Percent sign (%) Percent sign (%) -- program start code.program start code.

O6005O6005

This is the program number {the "0" number).This is the program number {the "0" number).

N010N010

N010 N010 -- The block sequence number.The block sequence number.

G00 G00 -- Puts the machine in rapid traverse mode. All machine moves made while G00 is active will be Puts the machine in rapid traverse mode. All machine moves made while G00 is active will be

made at maximum speed.made at maximum speed.

G70 G70 -- Puts the machine in inch input mode. All program coordinates will be read in decimal inches.Puts the machine in inch input mode. All program coordinates will be read in decimal inches.

G91 G91 -- Puts the machine in incremental positioning mode. In the absolute positioning example, the G90 Puts the machine in incremental positioning mode. In the absolute positioning example, the G90

code was used.code was used.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

code was used.code was used.

M06 M06 -- Issues the tool change command. In this twoIssues the tool change command. In this two--axis milling pro-gram, it causes the control to stop axis milling pro-gram, it causes the control to stop

and wait for the operator to install a tooland wait for the operator to install a tool--holder in the spindle.holder in the spindle.

N020N020

N020 N020 -- The block sequence number.The block sequence number.

X/Y coordinates X/Y coordinates -- Causes the machine to position the tool from the tool change position to hole #1.Causes the machine to position the tool from the tool change position to hole #1.

N030N030

N030 N030 -- Block sequence number.Block sequence number.

M00 M00 -- Program stop command. This halls the program execution, allowing the operator to drill the holes.Program stop command. This halls the program execution, allowing the operator to drill the holes.

N040N040

N040 N040 -- Block sequence number.Block sequence number.

X/Y coordinatesX/Y coordinates--to move from hole #1 to hole #2.to move from hole #1 to hole #2.

code was used.code was used.

M06 M06 -- Issues the tool change command. In this twoIssues the tool change command. In this two--axis milling pro-gram, it causes the control to stop axis milling pro-gram, it causes the control to stop

and wait for the operator to install a tooland wait for the operator to install a tool--holder in the spindle.holder in the spindle.

N020N020

N020 N020 -- The block sequence number.The block sequence number.

X/Y coordinates X/Y coordinates -- Causes the machine to position the tool from the tool change position to hole #1.Causes the machine to position the tool from the tool change position to hole #1.

N030N030

N030 N030 -- Block sequence number.Block sequence number.

M00 M00 -- Program stop command. This halls the program execution, allowing the operator to drill the holes.Program stop command. This halls the program execution, allowing the operator to drill the holes.

N040N040

N040 N040 -- Block sequence number.Block sequence number.

X/Y coordinatesX/Y coordinates--to move from hole #1 to hole #2.to move from hole #1 to hole #2.

Page 20: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Drilling Example Drilling Example –– Incremental PositioningIncremental PositioningN050N050

N050 N050 -- Block sequence number.Block sequence number.

M00 M00 -- Program stop command. This halts the program so that hole #2 can be drilled.Program stop command. This halts the program so that hole #2 can be drilled.

N060N060

N060 N060 -- Block sequence number.Block sequence number.

X/Y coordinates X/Y coordinates -- To move from hole #2 to hole #3.To move from hole #2 to hole #3.

N070N070

N070 N070 -- Block sequence number.Block sequence number.

M00 M00 -- Program stop command. Hole #3 is drilled.Program stop command. Hole #3 is drilled.

N080N080

N080 N080 -- Block sequence number.Block sequence number.

N050N050

N050 N050 -- Block sequence number.Block sequence number.

M00 M00 -- Program stop command. This halts the program so that hole #2 can be drilled.Program stop command. This halts the program so that hole #2 can be drilled.

N060N060

N060 N060 -- Block sequence number.Block sequence number.

X/Y coordinates X/Y coordinates -- To move from hole #2 to hole #3.To move from hole #2 to hole #3.

N070N070

N070 N070 -- Block sequence number.Block sequence number.

M00 M00 -- Program stop command. Hole #3 is drilled.Program stop command. Hole #3 is drilled.

N080N080

N080 N080 -- Block sequence number.Block sequence number.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

N080 N080 -- Block sequence number.Block sequence number.

X/Y coordinates X/Y coordinates -- to move from hole #3 to tool change.to move from hole #3 to tool change.

N090N090

N090 N090 -- Block sequence number.Block sequence number.

M30 M30 -- Signals that the program has ended and resets the computer's memory to the start of the program.Signals that the program has ended and resets the computer's memory to the start of the program.

Percent sign (%) Program stop code.Percent sign (%) Program stop code.

N080 N080 -- Block sequence number.Block sequence number.

X/Y coordinates X/Y coordinates -- to move from hole #3 to tool change.to move from hole #3 to tool change.

N090N090

N090 N090 -- Block sequence number.Block sequence number.

M30 M30 -- Signals that the program has ended and resets the computer's memory to the start of the program.Signals that the program has ended and resets the computer's memory to the start of the program.

Percent sign (%) Program stop code.Percent sign (%) Program stop code.

Page 21: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling Example 1Milling Example 1

�� TheThe partpart ofof FigFig.. 66--77 toto bebe milledmilled

�� TheThe partpart isis anan aluminiumaluminium castcast

�� TheThe lengthlength andand widthwidth toto bebe milledmilled

onlyonly

�� ClampingClamping willwill bebe donedone throughthrough thethe

centercenter holehole

�� TheThe partpart ofof FigFig.. 66--77 toto bebe milledmilled

�� TheThe partpart isis anan aluminiumaluminium castcast

�� TheThe lengthlength andand widthwidth toto bebe milledmilled

onlyonly

�� ClampingClamping willwill bebe donedone throughthrough thethe

centercenter holehole

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--7 Milling part drawing, 7 Milling part drawing, inchinchFIGURE 6FIGURE 6--7 Milling part drawing, 7 Milling part drawing, inchinch

�� TwoTwo passespasses aroundaround thethe partpart willwill bebe

mademade::

�� AA roughingroughing passpass andand aa finishingfinishing

passpass

�� OO..1010 inchinch willwill bebe leftleft forfor thethe

finishingfinishing passpass

�� TwoTwo passespasses aroundaround thethe partpart willwill bebe

mademade::

�� AA roughingroughing passpass andand aa finishingfinishing

passpass

�� OO..1010 inchinch willwill bebe leftleft forfor thethe

finishingfinishing passpass

Page 22: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling Example 1Milling Example 1

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--8 Milling part drawing, 8 Milling part drawing, metricmetricFIGURE 6FIGURE 6--8 Milling part drawing, 8 Milling part drawing, metricmetric

Page 23: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling Example 1Milling Example 1

FIGUREFIGURE 66--99 SetupSetup drawingdrawing

forfor thethe partpart inin FiguresFigures 66--77

FIGUREFIGURE 66--99 SetupSetup drawingdrawing

forfor thethe partpart inin FiguresFigures 66--77

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

forfor thethe partpart inin FiguresFigures 66--77

andand 66--88

forfor thethe partpart inin FiguresFigures 66--77

andand 66--88

Page 24: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling Example 1Milling Example 1

UpUp MillingMilling (Conventional)(Conventional)

�� CuttingCutting forcesforces actingacting onon thethe partpart trytry toto

liftlift partpart upup ofof thethe tabletable

�� CuttingCutting ofof ferrousferrous materials,materials, brassbrass andand

bronzebronze

DownDown MillingMilling (Climb(Climb Cutting)Cutting)

�� CuttingCutting forcesforces trytry toto pushpush thethe partpart onon

thethe tabletable

UpUp MillingMilling (Conventional)(Conventional)

�� CuttingCutting forcesforces actingacting onon thethe partpart trytry toto

liftlift partpart upup ofof thethe tabletable

�� CuttingCutting ofof ferrousferrous materials,materials, brassbrass andand

bronzebronze

DownDown MillingMilling (Climb(Climb Cutting)Cutting)

�� CuttingCutting forcesforces trytry toto pushpush thethe partpart onon

thethe tabletable

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--10 Up milling and down milling10 Up milling and down millingFIGURE 6FIGURE 6--10 Up milling and down milling10 Up milling and down milling

thethe tabletable

�� FinishingFinishing cutscuts onon AluminiumAluminium andand

AluminiumAluminium alloysalloys

�� NotNot suitablesuitable forfor hardenedhardened materialsmaterials

�� LessLess powerpower requiredrequired

�� MoreMore stressstress onon thethe machinemachine slidesslides andand

ballball screwsscrews

thethe tabletable

�� FinishingFinishing cutscuts onon AluminiumAluminium andand

AluminiumAluminium alloysalloys

�� NotNot suitablesuitable forfor hardenedhardened materialsmaterials

�� LessLess powerpower requiredrequired

�� MoreMore stressstress onon thethe machinemachine slidesslides andand

ballball screwsscrews

Page 25: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling Example 2Milling Example 2

%%

O6011O6011

(****************************************************)(****************************************************)

(* THIS PROGRAM USES ABSOLUTE (* THIS PROGRAM USES ABSOLUTE

POSITIONING)POSITIONING)

(* X/Y ORIGIN IS LOWER LEFT CORNER OF (* X/Y ORIGIN IS LOWER LEFT CORNER OF

PART)PART)

(* PLACE 1/2 END MILL IN SPINDLE PRIOR TO (* PLACE 1/2 END MILL IN SPINDLE PRIOR TO

CYCLE START)CYCLE START)

(****************************************************)(****************************************************)

(SET PARAMETERS TO RAPID (SET PARAMETERS TO RAPID -- INCH INPUT INCH INPUT --

%%

O6011O6011

(****************************************************)(****************************************************)

(* THIS PROGRAM USES ABSOLUTE (* THIS PROGRAM USES ABSOLUTE

POSITIONING)POSITIONING)

(* X/Y ORIGIN IS LOWER LEFT CORNER OF (* X/Y ORIGIN IS LOWER LEFT CORNER OF

PART)PART)

(* PLACE 1/2 END MILL IN SPINDLE PRIOR TO (* PLACE 1/2 END MILL IN SPINDLE PRIOR TO

CYCLE START)CYCLE START)

(****************************************************)(****************************************************)

(SET PARAMETERS TO RAPID (SET PARAMETERS TO RAPID -- INCH INPUT INCH INPUT --

( “Program Continue”) ( “Program Continue”)

(BEGIN FINISH MILL CUT)(BEGIN FINISH MILL CUT)

N080 XN080 X--.25 Y.25 Y--.25.25

N090 Y2.75N090 Y2.75

N100 X4.25N100 X4.25

N110 YN110 Y--.25.25

N120 XN120 X--.25.25

( “Program Continue”) ( “Program Continue”)

(BEGIN FINISH MILL CUT)(BEGIN FINISH MILL CUT)

N080 XN080 X--.25 Y.25 Y--.25.25

N090 Y2.75N090 Y2.75

N100 X4.25N100 X4.25

N110 YN110 Y--.25.25

N120 XN120 X--.25.25

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

(SET PARAMETERS TO RAPID (SET PARAMETERS TO RAPID -- INCH INPUT INCH INPUT --

ABS. POS.)ABS. POS.)

N010 G00 G70 G90N010 G00 G70 G90

(AT PROG. STOP (AT PROG. STOP -- LOWER SPINDLE AND LOWER SPINDLE AND

CLAMP)CLAMP)

N020 XN020 X--.26 Y.26 Y--.26.26

N030 M00N030 M00

(BEGIN ROUGH MILL CUT AT FEEDRATE)(BEGIN ROUGH MILL CUT AT FEEDRATE)

N040 G01 X4.26 F20N040 G01 X4.26 F20

N050 Y2.76N050 Y2.76

N060 XN060 X--.26.26

N070 YN070 Y--.26.26

(SET PARAMETERS TO RAPID (SET PARAMETERS TO RAPID -- INCH INPUT INCH INPUT --

ABS. POS.)ABS. POS.)

N010 G00 G70 G90N010 G00 G70 G90

(AT PROG. STOP (AT PROG. STOP -- LOWER SPINDLE AND LOWER SPINDLE AND

CLAMP)CLAMP)

N020 XN020 X--.26 Y.26 Y--.26.26

N030 M00N030 M00

(BEGIN ROUGH MILL CUT AT FEEDRATE)(BEGIN ROUGH MILL CUT AT FEEDRATE)

N040 G01 X4.26 F20N040 G01 X4.26 F20

N050 Y2.76N050 Y2.76

N060 XN060 X--.26.26

N070 YN070 Y--.26.26FIGUREFIGURE 66--1111 MillingMilling programprogram:: inchinch absoluteabsolute

positioningpositioning forfor thethe partpart inin FigureFigure 66--77

FIGUREFIGURE 66--1111 MillingMilling programprogram:: inchinch absoluteabsolute

positioningpositioning forfor thethe partpart inin FigureFigure 66--77

(AT PROG. STOP UNCLAMP AND RAISE SPINDLE)(AT PROG. STOP UNCLAMP AND RAISE SPINDLE)

N130 M00N130 M00

(RETURN TO TOOL CHANGE LOCATION AND END (RETURN TO TOOL CHANGE LOCATION AND END

CYCLE)CYCLE)

N140 G00 XN140 G00 X--2. Y2. Y--1.51.5

N150 M30N150 M30

%%

(AT PROG. STOP UNCLAMP AND RAISE SPINDLE)(AT PROG. STOP UNCLAMP AND RAISE SPINDLE)

N130 M00N130 M00

(RETURN TO TOOL CHANGE LOCATION AND END (RETURN TO TOOL CHANGE LOCATION AND END

CYCLE)CYCLE)

N140 G00 XN140 G00 X--2. Y2. Y--1.51.5

N150 M30N150 M30

%%

Page 26: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling Example 2Milling Example 2

%%

O6012O6012

(**************************************************)(**************************************************)

(* THIS PROGRAM USES ABSOLUTE POSITIONING)(* THIS PROGRAM USES ABSOLUTE POSITIONING)

(* X/Y ORIGIN IS LOWER LEFT CORNER OF PART)(* X/Y ORIGIN IS LOWER LEFT CORNER OF PART)

(* PLACE 1/2 END MILL IN SPINDLE PRIOR TO CYCLE (* PLACE 1/2 END MILL IN SPINDLE PRIOR TO CYCLE

START)START)

(**************************************************)(**************************************************)

(SET PARAMETERS TO RAPID (SET PARAMETERS TO RAPID -- INCH INPUT INCH INPUT --ABS. POS.)ABS. POS.)

N010 G00 G71 G90N010 G00 G71 G90

(AT PROG. STOP (AT PROG. STOP -- LOWER SPINDLE AND CLAMP)LOWER SPINDLE AND CLAMP)

N020 XN020 X--2.75 Y2.75 Y--2.752.75

N030 M00N030 M00

(BEGIN ROUGH MILL CUT AT FEEDRATE)(BEGIN ROUGH MILL CUT AT FEEDRATE)

N040 G01 X102.75 F500.N040 G01 X102.75 F500.

%%

O6012O6012

(**************************************************)(**************************************************)

(* THIS PROGRAM USES ABSOLUTE POSITIONING)(* THIS PROGRAM USES ABSOLUTE POSITIONING)

(* X/Y ORIGIN IS LOWER LEFT CORNER OF PART)(* X/Y ORIGIN IS LOWER LEFT CORNER OF PART)

(* PLACE 1/2 END MILL IN SPINDLE PRIOR TO CYCLE (* PLACE 1/2 END MILL IN SPINDLE PRIOR TO CYCLE

START)START)

(**************************************************)(**************************************************)

(SET PARAMETERS TO RAPID (SET PARAMETERS TO RAPID -- INCH INPUT INCH INPUT --ABS. POS.)ABS. POS.)

N010 G00 G71 G90N010 G00 G71 G90

(AT PROG. STOP (AT PROG. STOP -- LOWER SPINDLE AND CLAMP)LOWER SPINDLE AND CLAMP)

N020 XN020 X--2.75 Y2.75 Y--2.752.75

N030 M00N030 M00

(BEGIN ROUGH MILL CUT AT FEEDRATE)(BEGIN ROUGH MILL CUT AT FEEDRATE)

N040 G01 X102.75 F500.N040 G01 X102.75 F500.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

N040 G01 X102.75 F500.N040 G01 X102.75 F500.

N050 Y67.75N050 Y67.75

N060 XN060 X--2.752.75

N070 YN070 Y--2.752.75

(BEGIN FINISH MILL CUT)(BEGIN FINISH MILL CUT)

N080 XN080 X--2.5 Y2.5 Y--2.52.5

N090 Y67.5N090 Y67.5

N100 X102.5N100 X102.5

N110 YN110 Y--2.52.5

N120 XN120 X--2.52.5

(AT PROG. STOP UNCLAMP AND RAISE SPINDLE)(AT PROG. STOP UNCLAMP AND RAISE SPINDLE)

N130 M00N130 M00

(RETURN TO TOOL CHANGE LOCATION AND END CYCLE)(RETURN TO TOOL CHANGE LOCATION AND END CYCLE)

N140 G00 XN140 G00 X--50. Y50. Y--35.35.

N150 M30N150 M30

% %

N040 G01 X102.75 F500.N040 G01 X102.75 F500.

N050 Y67.75N050 Y67.75

N060 XN060 X--2.752.75

N070 YN070 Y--2.752.75

(BEGIN FINISH MILL CUT)(BEGIN FINISH MILL CUT)

N080 XN080 X--2.5 Y2.5 Y--2.52.5

N090 Y67.5N090 Y67.5

N100 X102.5N100 X102.5

N110 YN110 Y--2.52.5

N120 XN120 X--2.52.5

(AT PROG. STOP UNCLAMP AND RAISE SPINDLE)(AT PROG. STOP UNCLAMP AND RAISE SPINDLE)

N130 M00N130 M00

(RETURN TO TOOL CHANGE LOCATION AND END CYCLE)(RETURN TO TOOL CHANGE LOCATION AND END CYCLE)

N140 G00 XN140 G00 X--50. Y50. Y--35.35.

N150 M30N150 M30

% %

FIGUREFIGURE 66--1212 MillingMilling program,program, metricmetric absoluteabsolute

positioningpositioning forfor thethe partpart inin FigureFigure 66--88

FIGUREFIGURE 66--1212 MillingMilling program,program, metricmetric absoluteabsolute

positioningpositioning forfor thethe partpart inin FigureFigure 66--88

Page 27: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling Example 2Milling Example 2

0601106011

The program numberThe program number

N010N010

N010N010--The block sequence number. GOOThe block sequence number. GOO--Puts the machine in rapid traverse mode. G70/G71Puts the machine in rapid traverse mode. G70/G71--Puts Puts

the machine in inch or metric mode. G90the machine in inch or metric mode. G90--Selects absolute positioningSelects absolute positioning

N020N020

N020N020--Block sequence numberBlock sequence number

X/Y coordinatesX/Y coordinates--To move to location #1To move to location #1

N030N030

N030N030--Sequence numberSequence number

M00M00--Program stop. This command halts the program execution to allow the machine operator to Program stop. This command halts the program execution to allow the machine operator to

0601106011

The program numberThe program number

N010N010

N010N010--The block sequence number. GOOThe block sequence number. GOO--Puts the machine in rapid traverse mode. G70/G71Puts the machine in rapid traverse mode. G70/G71--Puts Puts

the machine in inch or metric mode. G90the machine in inch or metric mode. G90--Selects absolute positioningSelects absolute positioning

N020N020

N020N020--Block sequence numberBlock sequence number

X/Y coordinatesX/Y coordinates--To move to location #1To move to location #1

N030N030

N030N030--Sequence numberSequence number

M00M00--Program stop. This command halts the program execution to allow the machine operator to Program stop. This command halts the program execution to allow the machine operator to

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

M00M00--Program stop. This command halts the program execution to allow the machine operator to Program stop. This command halts the program execution to allow the machine operator to

lower and clamp the spindlelower and clamp the spindle

N040N040

N040N040--Sequence numberSequence number

G01G01--Puts the machine in feedrate mode (also called linear interpolation mode)Puts the machine in feedrate mode (also called linear interpolation mode)

X coordinateX coordinate--Moves spindle from position #1 to #4Moves spindle from position #1 to #4

F20.F20.--Specifies a feedrate of 20 inches per minute is to be used during feedrate movesSpecifies a feedrate of 20 inches per minute is to be used during feedrate moves

N050N050

N050N050--Sequence numberSequence number

Y coordinateY coordinate--Moves spindle from position #4 to #3Moves spindle from position #4 to #3

M00M00--Program stop. This command halts the program execution to allow the machine operator to Program stop. This command halts the program execution to allow the machine operator to

lower and clamp the spindlelower and clamp the spindle

N040N040

N040N040--Sequence numberSequence number

G01G01--Puts the machine in feedrate mode (also called linear interpolation mode)Puts the machine in feedrate mode (also called linear interpolation mode)

X coordinateX coordinate--Moves spindle from position #1 to #4Moves spindle from position #1 to #4

F20.F20.--Specifies a feedrate of 20 inches per minute is to be used during feedrate movesSpecifies a feedrate of 20 inches per minute is to be used during feedrate moves

N050N050

N050N050--Sequence numberSequence number

Y coordinateY coordinate--Moves spindle from position #4 to #3Moves spindle from position #4 to #3

Page 28: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling Example 2Milling Example 2N060N060

N060N060--Sequence numberSequence number

X coordinateX coordinate--Moves spindle from position #3 to #2Moves spindle from position #3 to #2

N070N070

N070N070--Sequence numberSequence number

Y coordinateY coordinate--Moves spindle from position #2 to #1Moves spindle from position #2 to #1

N080N080

N080N080--Sequence numberSequence number

X/Y coordinatesX/Y coordinates--Move spindle from position #1 to #5Move spindle from position #1 to #5

N090N090

N090N090--Sequence numberSequence number

N060N060

N060N060--Sequence numberSequence number

X coordinateX coordinate--Moves spindle from position #3 to #2Moves spindle from position #3 to #2

N070N070

N070N070--Sequence numberSequence number

Y coordinateY coordinate--Moves spindle from position #2 to #1Moves spindle from position #2 to #1

N080N080

N080N080--Sequence numberSequence number

X/Y coordinatesX/Y coordinates--Move spindle from position #1 to #5Move spindle from position #1 to #5

N090N090

N090N090--Sequence numberSequence number

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

N090N090--Sequence numberSequence number

Y coordinateY coordinate--Moves spindle from position #5 to #6Moves spindle from position #5 to #6

N100N100

N100 N100 -- Sequence numberSequence number

X coordinate X coordinate -- Moves spindle from position #6 to #7Moves spindle from position #6 to #7

N110N110

N110 N110 -- Sequence numberSequence number

Y coordinate Y coordinate -- Moves spindle from position #7 to #8Moves spindle from position #7 to #8

N120N120

N120 N120 -- Sequence numberSequence number

X coordinate X coordinate -- Moves spindle from position #8 to #5Moves spindle from position #8 to #5

N090N090--Sequence numberSequence number

Y coordinateY coordinate--Moves spindle from position #5 to #6Moves spindle from position #5 to #6

N100N100

N100 N100 -- Sequence numberSequence number

X coordinate X coordinate -- Moves spindle from position #6 to #7Moves spindle from position #6 to #7

N110N110

N110 N110 -- Sequence numberSequence number

Y coordinate Y coordinate -- Moves spindle from position #7 to #8Moves spindle from position #7 to #8

N120N120

N120 N120 -- Sequence numberSequence number

X coordinate X coordinate -- Moves spindle from position #8 to #5Moves spindle from position #8 to #5

Page 29: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling Example 2Milling Example 2

N130N130

N130 N130 -- Sequence numberSequence number

M00 M00 -- Program stop code Program stop code -- This command halts the program execution, allowing the machine This command halts the program execution, allowing the machine

operator to unclamp and raise the spindle.operator to unclamp and raise the spindle.

N140N140

N140 N140 -- Sequence number. G00 Sequence number. G00 -- Places the machine in rapid traverse mode. X/Y coordinates Places the machine in rapid traverse mode. X/Y coordinates

Move the spindle from position #5 to the tool change locationMove the spindle from position #5 to the tool change location

N150N150

N150 N150 -- Sequence numberSequence number

M30 M30 -- Signals end of programSignals end of program

N130N130

N130 N130 -- Sequence numberSequence number

M00 M00 -- Program stop code Program stop code -- This command halts the program execution, allowing the machine This command halts the program execution, allowing the machine

operator to unclamp and raise the spindle.operator to unclamp and raise the spindle.

N140N140

N140 N140 -- Sequence number. G00 Sequence number. G00 -- Places the machine in rapid traverse mode. X/Y coordinates Places the machine in rapid traverse mode. X/Y coordinates

Move the spindle from position #5 to the tool change locationMove the spindle from position #5 to the tool change location

N150N150

N150 N150 -- Sequence numberSequence number

M30 M30 -- Signals end of programSignals end of program

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

%%

Percent sign Percent sign -- ProgramProgram

%%

Percent sign Percent sign -- ProgramProgram

Page 30: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling and Drilling ExampleMilling and Drilling Example

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--13 Milling and drilling part drawing13 Milling and drilling part drawingFIGURE 6FIGURE 6--13 Milling and drilling part drawing13 Milling and drilling part drawing

Page 31: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling and Drilling ExampleMilling and Drilling Example

Program ExplanationProgram Explanation%% Percent sign Percent sign –– Program start codeProgram start code

O6018O6018

Program ‘’O’’ numberProgram ‘’O’’ number

N001N001

N001 N001 –– Block sequence number, used as a separator lineBlock sequence number, used as a separator line

N100N100

N100 N100 –– Sequence numberSequence number

G00 G00 –– Selects rapid traverse modeSelects rapid traverse mode

G90 G90 –– Selects absolute positioning modeSelects absolute positioning mode

G70 G70 –– Selects inch input modeSelects inch input mode

Program ExplanationProgram Explanation%% Percent sign Percent sign –– Program start codeProgram start code

O6018O6018

Program ‘’O’’ numberProgram ‘’O’’ number

N001N001

N001 N001 –– Block sequence number, used as a separator lineBlock sequence number, used as a separator line

N100N100

N100 N100 –– Sequence numberSequence number

G00 G00 –– Selects rapid traverse modeSelects rapid traverse mode

G90 G90 –– Selects absolute positioning modeSelects absolute positioning mode

G70 G70 –– Selects inch input modeSelects inch input mode

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

G70 G70 –– Selects inch input modeSelects inch input mode

N101 N101

N101N101--Sequence number. Sequence number.

X/Y coordinatesX/Y coordinates--Positions spindle at location #1. Positions spindle at location #1.

S1200S1200--Selects a spindle speed of 1200 to be used for milling the part. M03Selects a spindle speed of 1200 to be used for milling the part. M03-- Turns spindle on clockwise. Turns spindle on clockwise.

N102 N102

N 102N 102--Sequence number. Sequence number.

M00M00--Program stop command. Halts program execution so operator can lower and clamp the spindle. Program stop command. Halts program execution so operator can lower and clamp the spindle.

N103 N103

N103N103--Sequence number. G01Sequence number. G01--Selects feedrate mode. Selects feedrate mode.

Y coordinateY coordinate--Moves spindle from position #1 to #2. F7.2Moves spindle from position #1 to #2. F7.2--Sets the feed rate to 7.2 inches per minute. Sets the feed rate to 7.2 inches per minute.

G70 G70 –– Selects inch input modeSelects inch input mode

N101 N101

N101N101--Sequence number. Sequence number.

X/Y coordinatesX/Y coordinates--Positions spindle at location #1. Positions spindle at location #1.

S1200S1200--Selects a spindle speed of 1200 to be used for milling the part. M03Selects a spindle speed of 1200 to be used for milling the part. M03-- Turns spindle on clockwise. Turns spindle on clockwise.

N102 N102

N 102N 102--Sequence number. Sequence number.

M00M00--Program stop command. Halts program execution so operator can lower and clamp the spindle. Program stop command. Halts program execution so operator can lower and clamp the spindle.

N103 N103

N103N103--Sequence number. G01Sequence number. G01--Selects feedrate mode. Selects feedrate mode.

Y coordinateY coordinate--Moves spindle from position #1 to #2. F7.2Moves spindle from position #1 to #2. F7.2--Sets the feed rate to 7.2 inches per minute. Sets the feed rate to 7.2 inches per minute.

Page 32: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling and Drilling ExampleMilling and Drilling Example

N104 N104

N 104N 104--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #2 to #3. Moves spindle from position #2 to #3.

N105 N105

N105N105--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from position #3 to #4. Moves spindle from position #3 to #4.

N106 N106

N 106N 106--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #4 to #5. Moves spindle from position #4 to #5.

N107 N107

N107N107--Sequence number. Sequence number.

N104 N104

N 104N 104--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #2 to #3. Moves spindle from position #2 to #3.

N105 N105

N105N105--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from position #3 to #4. Moves spindle from position #3 to #4.

N106 N106

N 106N 106--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #4 to #5. Moves spindle from position #4 to #5.

N107 N107

N107N107--Sequence number. Sequence number.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

N107N107--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from position #5 to #6. Moves spindle from position #5 to #6.

N108 N108

N108N108--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #6 back to #1. Moves spindle from position #6 back to #1.

N109 N109

N109N109--Sequence number. Sequence number.

XIY coordinatesXIY coordinates--Moves spindle from position #1 to #7. Moves spindle from position #1 to #7.

N110 N110

N110N110--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from position #7 to #8. Moves spindle from position #7 to #8.

N107N107--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from position #5 to #6. Moves spindle from position #5 to #6.

N108 N108

N108N108--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #6 back to #1. Moves spindle from position #6 back to #1.

N109 N109

N109N109--Sequence number. Sequence number.

XIY coordinatesXIY coordinates--Moves spindle from position #1 to #7. Moves spindle from position #1 to #7.

N110 N110

N110N110--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from position #7 to #8. Moves spindle from position #7 to #8.

Page 33: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling and Drilling ExampleMilling and Drilling Example

N111 N111

N111N111--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #8 to #9. Moves spindle from position #8 to #9.

N112 N112

N112N112--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from position #9 to #10. Moves spindle from position #9 to #10.

N113 N113

N113N113--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #10 to #11. Moves spindle from position #10 to #11.

N114 N114

N114N114--Sequence number. Sequence number.

N111 N111

N111N111--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #8 to #9. Moves spindle from position #8 to #9.

N112 N112

N112N112--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from position #9 to #10. Moves spindle from position #9 to #10.

N113 N113

N113N113--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #10 to #11. Moves spindle from position #10 to #11.

N114 N114

N114N114--Sequence number. Sequence number.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

N114N114--Sequence number. Sequence number.

y coordinatey coordinate--Moves spindle from position #11 to #12. Moves spindle from position #11 to #12.

N115 N115

N115N115--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #12 back to #7. Moves spindle from position #12 back to #7.

N116 N116

N116N116--Sequence number. Sequence number.

M00 program stop codeM00 program stop code--Halts program execution so operator can unclamp and raise the spindle. Halts program execution so operator can unclamp and raise the spindle.

N117 N117

N117N117--Sequence number. Sequence number.

XIY XIY coordinatescoordinates--Move the spindle from position #7 back to the tool change location. Move the spindle from position #7 back to the tool change location.

N114N114--Sequence number. Sequence number.

y coordinatey coordinate--Moves spindle from position #11 to #12. Moves spindle from position #11 to #12.

N115 N115

N115N115--Sequence number. Sequence number.

X coordinateX coordinate--Moves spindle from position #12 back to #7. Moves spindle from position #12 back to #7.

N116 N116

N116N116--Sequence number. Sequence number.

M00 program stop codeM00 program stop code--Halts program execution so operator can unclamp and raise the spindle. Halts program execution so operator can unclamp and raise the spindle.

N117 N117

N117N117--Sequence number. Sequence number.

XIY XIY coordinatescoordinates--Move the spindle from position #7 back to the tool change location. Move the spindle from position #7 back to the tool change location.

Page 34: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling and Drilling ExampleMilling and Drilling Example

N118 N118

N118N118--Sequence number. Sequence number.

M00M00--Halts program for a tool change. Halts program for a tool change.

N002 N002

N002N002--Block sequence number used as a separator line for tool 2. Block sequence number used as a separator line for tool 2.

N200 N200

N200N200--Sequence number. Sequence number.

G00G00--Selects rapid traverse mode. G90Selects rapid traverse mode. G90--Selects absolute positioning mode. G70Selects absolute positioning mode. G70--Selects inch input mode. Selects inch input mode.

N201 N201

N201N201--Sequence number. Sequence number.

XIY XIY coordinatescoordinates--Position spindle at location #13. Position spindle at location #13.

N118 N118

N118N118--Sequence number. Sequence number.

M00M00--Halts program for a tool change. Halts program for a tool change.

N002 N002

N002N002--Block sequence number used as a separator line for tool 2. Block sequence number used as a separator line for tool 2.

N200 N200

N200N200--Sequence number. Sequence number.

G00G00--Selects rapid traverse mode. G90Selects rapid traverse mode. G90--Selects absolute positioning mode. G70Selects absolute positioning mode. G70--Selects inch input mode. Selects inch input mode.

N201 N201

N201N201--Sequence number. Sequence number.

XIY XIY coordinatescoordinates--Position spindle at location #13. Position spindle at location #13.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

XIY XIY coordinatescoordinates--Position spindle at location #13. Position spindle at location #13.

S1500S1500--Selects a spindle speed of 1500 rpm to be used for drilling the holes. Selects a spindle speed of 1500 rpm to be used for drilling the holes.

N202 N202

N202N202--Sequence number. Sequence number.

M00M00--Program stop command. Halts program execution so operator can drill the hole. Program stop command. Halts program execution so operator can drill the hole.

N203 N203

N203N203--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from hole #13 to #14. Moves spindle from hole #13 to #14.

N204 N204

N204N204--Sequence number. Sequence number.

M00M00--Program stop command. Halts program execution so operator can drill the holeProgram stop command. Halts program execution so operator can drill the hole

XIY XIY coordinatescoordinates--Position spindle at location #13. Position spindle at location #13.

S1500S1500--Selects a spindle speed of 1500 rpm to be used for drilling the holes. Selects a spindle speed of 1500 rpm to be used for drilling the holes.

N202 N202

N202N202--Sequence number. Sequence number.

M00M00--Program stop command. Halts program execution so operator can drill the hole. Program stop command. Halts program execution so operator can drill the hole.

N203 N203

N203N203--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from hole #13 to #14. Moves spindle from hole #13 to #14.

N204 N204

N204N204--Sequence number. Sequence number.

M00M00--Program stop command. Halts program execution so operator can drill the holeProgram stop command. Halts program execution so operator can drill the hole

Page 35: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling and Drilling ExampleMilling and Drilling Example

N205 N205

N205N205--Sequence number. Sequence number.

XJY coordinatesXJY coordinates--Move spindle back to the tool change position. Move spindle back to the tool change position.

N206 N206

N206N206--Sequence number. Sequence number.

M00M00--Halts program for a tool change. Halts program for a tool change.

N003 N003

N003N003--Block sequence number used as a separator line for tool 3. Block sequence number used as a separator line for tool 3.

N300 N300

N300N300--Sequence number. Sequence number.

G00G00--Selects rapid traverse mode. G90Selects rapid traverse mode. G90--Selects absolute positioning mode. G70Selects absolute positioning mode. G70--Selects inch input mode. Selects inch input mode.

N205 N205

N205N205--Sequence number. Sequence number.

XJY coordinatesXJY coordinates--Move spindle back to the tool change position. Move spindle back to the tool change position.

N206 N206

N206N206--Sequence number. Sequence number.

M00M00--Halts program for a tool change. Halts program for a tool change.

N003 N003

N003N003--Block sequence number used as a separator line for tool 3. Block sequence number used as a separator line for tool 3.

N300 N300

N300N300--Sequence number. Sequence number.

G00G00--Selects rapid traverse mode. G90Selects rapid traverse mode. G90--Selects absolute positioning mode. G70Selects absolute positioning mode. G70--Selects inch input mode. Selects inch input mode.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

G00G00--Selects rapid traverse mode. G90Selects rapid traverse mode. G90--Selects absolute positioning mode. G70Selects absolute positioning mode. G70--Selects inch input mode. Selects inch input mode.

N301 N301

N301N301--Sequence number. Sequence number.

XJY coordinatesXJY coordinates--Position spindle at location #15. Position spindle at location #15.

S2000S2000--Selects a spindle speed of 2000 rpm to be used for drilling the holes. Selects a spindle speed of 2000 rpm to be used for drilling the holes.

M03M03-- Turns spindle on clockwise. Turns spindle on clockwise.

N302 N302

N302N302--Sequence number. Sequence number.

M00M00--Program stop command. Halts program execution so operator can drill the hole. Program stop command. Halts program execution so operator can drill the hole.

G00G00--Selects rapid traverse mode. G90Selects rapid traverse mode. G90--Selects absolute positioning mode. G70Selects absolute positioning mode. G70--Selects inch input mode. Selects inch input mode.

N301 N301

N301N301--Sequence number. Sequence number.

XJY coordinatesXJY coordinates--Position spindle at location #15. Position spindle at location #15.

S2000S2000--Selects a spindle speed of 2000 rpm to be used for drilling the holes. Selects a spindle speed of 2000 rpm to be used for drilling the holes.

M03M03-- Turns spindle on clockwise. Turns spindle on clockwise.

N302 N302

N302N302--Sequence number. Sequence number.

M00M00--Program stop command. Halts program execution so operator can drill the hole. Program stop command. Halts program execution so operator can drill the hole.

Page 36: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling and Drilling ExampleMilling and Drilling Example

N303 N303

N303N303--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from hole #15 to #16. Moves spindle from hole #15 to #16.

N304 N304

N304N304--Sequence number. Sequence number.

M00M00--Program stop command. Halts program execution so operator can drill the hole. Program stop command. Halts program execution so operator can drill the hole.

N305 N305

N305N305--Sequence number. Sequence number.

XJY coordinatesXJY coordinates--Move spindle back to the tool change position. Move spindle back to the tool change position.

N306 N306

N306N306--Sequence number. M30Sequence number. M30--Signals end of program. Signals end of program.

N303 N303

N303N303--Sequence number. Sequence number.

Y coordinateY coordinate--Moves spindle from hole #15 to #16. Moves spindle from hole #15 to #16.

N304 N304

N304N304--Sequence number. Sequence number.

M00M00--Program stop command. Halts program execution so operator can drill the hole. Program stop command. Halts program execution so operator can drill the hole.

N305 N305

N305N305--Sequence number. Sequence number.

XJY coordinatesXJY coordinates--Move spindle back to the tool change position. Move spindle back to the tool change position.

N306 N306

N306N306--Sequence number. M30Sequence number. M30--Signals end of program. Signals end of program.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

N306N306--Sequence number. M30Sequence number. M30--Signals end of program. Signals end of program.

% %

Percent signPercent sign--Program stop code. Program stop code.

N306N306--Sequence number. M30Sequence number. M30--Signals end of program. Signals end of program.

% %

Percent signPercent sign--Program stop code. Program stop code.

Page 37: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling and Drilling ExampleMilling and Drilling Example

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--14 Cutter path for milling the part in Figure 614 Cutter path for milling the part in Figure 6--1313FIGURE 6FIGURE 6--14 Cutter path for milling the part in Figure 614 Cutter path for milling the part in Figure 6--1313

Page 38: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling and Drilling ExampleMilling and Drilling Example

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--15 Cutter path for drilling the part in Figure 615 Cutter path for drilling the part in Figure 6--1313FIGURE 6FIGURE 6--15 Cutter path for drilling the part in Figure 615 Cutter path for drilling the part in Figure 6--1313

Page 39: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Milling and Drilling ExampleMilling and Drilling Example%%

0601606016

(* ******************)(* ******************)

(* L(* L--BRACKET 06/09/93)BRACKET 06/09/93)

(* ******************)(* ******************)

N001N001

(* ************)(* ************)

(* TOOL NO. 1)(* TOOL NO. 1)

(* .500 DIA. END MILL)(* .500 DIA. END MILL)

(* ROUGH/FINISH PART PERIPHERY)(* ROUGH/FINISH PART PERIPHERY)

(* ************)(* ************)

N100 G00 G90 G70N100 G00 G90 G70

N101 X.26 Y.26 S1200 M03N101 X.26 Y.26 S1200 M03

N102 M00N102 M00

(LOWER AND CLAMP SPINDLE)(LOWER AND CLAMP SPINDLE)

(BEGIN ROUGH MILL PASS (BEGIN ROUGH MILL PASS -- LEAVE .01 STK/SIDE)LEAVE .01 STK/SIDE)

N103 G01 Y3.26 F7.2N103 G01 Y3.26 F7.2

N104 X1.635N104 X1.635

N105 Y1.76N105 Y1.76

%%

0601606016

(* ******************)(* ******************)

(* L(* L--BRACKET 06/09/93)BRACKET 06/09/93)

(* ******************)(* ******************)

N001N001

(* ************)(* ************)

(* TOOL NO. 1)(* TOOL NO. 1)

(* .500 DIA. END MILL)(* .500 DIA. END MILL)

(* ROUGH/FINISH PART PERIPHERY)(* ROUGH/FINISH PART PERIPHERY)

(* ************)(* ************)

N100 G00 G90 G70N100 G00 G90 G70

N101 X.26 Y.26 S1200 M03N101 X.26 Y.26 S1200 M03

N102 M00N102 M00

(LOWER AND CLAMP SPINDLE)(LOWER AND CLAMP SPINDLE)

(BEGIN ROUGH MILL PASS (BEGIN ROUGH MILL PASS -- LEAVE .01 STK/SIDE)LEAVE .01 STK/SIDE)

N103 G01 Y3.26 F7.2N103 G01 Y3.26 F7.2

N104 X1.635N104 X1.635

N105 Y1.76N105 Y1.76

N002N002

(* ************)(* ************)

(* TOOL NO. 2)(* TOOL NO. 2)

(* 5/16 STUB DRILL)(* 5/16 STUB DRILL)

(* DRILL THE .312 DIA. HOLES)(* DRILL THE .312 DIA. HOLES)

(* ************)(* ************)

N200 G00 G90 G70N200 G00 G90 G70

N201 X.688 Y1.25 S1500 M03N201 X.688 Y1.25 S1500 M03

N202 M00N202 M00

(DRILL HOLE)(DRILL HOLE)

N203 Y2.5N203 Y2.5

N204 M00N204 M00

(DRILL HOLE)(DRILL HOLE)

N205 XN205 X--10. Y.010. Y.0

N206 M00N206 M00

N002N002

(* ************)(* ************)

(* TOOL NO. 2)(* TOOL NO. 2)

(* 5/16 STUB DRILL)(* 5/16 STUB DRILL)

(* DRILL THE .312 DIA. HOLES)(* DRILL THE .312 DIA. HOLES)

(* ************)(* ************)

N200 G00 G90 G70N200 G00 G90 G70

N201 X.688 Y1.25 S1500 M03N201 X.688 Y1.25 S1500 M03

N202 M00N202 M00

(DRILL HOLE)(DRILL HOLE)

N203 Y2.5N203 Y2.5

N204 M00N204 M00

(DRILL HOLE)(DRILL HOLE)

N205 XN205 X--10. Y.010. Y.0

N206 M00N206 M00

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

N105 Y1.76N105 Y1.76

N106 X4.26N106 X4.26

N107 YN107 Y--.26.26

N108 XN108 X--.26.26

(BEGIN FINISH MILL PASS)(BEGIN FINISH MILL PASS)

N109 XN109 X--.25 Y.25 Y--.25.25

N110 Y3.25N110 Y3.25

N111 X1.625N111 X1.625

N112 Y1.75N112 Y1.75

N113 X4.25N113 X4.25

N114 YN114 Y--.25.25

N115 XN115 X--.25.25

N116 M00N116 M00

(UNCLAMP AND RAISE SPINDLE)(UNCLAMP AND RAISE SPINDLE)

(AT CYCLE START RETURNS TO TOOL CHANGE)(AT CYCLE START RETURNS TO TOOL CHANGE)

N117 G00 XN117 G00 X--10. Y0.10. Y0.

N118 M00N118 M00

N105 Y1.76N105 Y1.76

N106 X4.26N106 X4.26

N107 YN107 Y--.26.26

N108 XN108 X--.26.26

(BEGIN FINISH MILL PASS)(BEGIN FINISH MILL PASS)

N109 XN109 X--.25 Y.25 Y--.25.25

N110 Y3.25N110 Y3.25

N111 X1.625N111 X1.625

N112 Y1.75N112 Y1.75

N113 X4.25N113 X4.25

N114 YN114 Y--.25.25

N115 XN115 X--.25.25

N116 M00N116 M00

(UNCLAMP AND RAISE SPINDLE)(UNCLAMP AND RAISE SPINDLE)

(AT CYCLE START RETURNS TO TOOL CHANGE)(AT CYCLE START RETURNS TO TOOL CHANGE)

N117 G00 XN117 G00 X--10. Y0.10. Y0.

N118 M00N118 M00

N003N003

(* ************)(* ************)

(* TOOL NO. 3)(* TOOL NO. 3)

(* 3/16 STUB DRILL(* 3/16 STUB DRILL

(* DRILL .188 DIA. HOLES)(* DRILL .188 DIA. HOLES)

(* ************)(* ************)

N300 G00 G90 G70N300 G00 G90 G70

N301G00 X3.563 Y.375 S2000 M03N301G00 X3.563 Y.375 S2000 M03

N302 M00N302 M00

(DRILL HOLE)(DRILL HOLE)

N303 Y1.125N303 Y1.125

N304 M00N304 M00

(DRILL HOLE)(DRILL HOLE)

N305 G00 XN305 G00 X--10. Y.010. Y.0

N306 M30N306 M30

%%

N003N003

(* ************)(* ************)

(* TOOL NO. 3)(* TOOL NO. 3)

(* 3/16 STUB DRILL(* 3/16 STUB DRILL

(* DRILL .188 DIA. HOLES)(* DRILL .188 DIA. HOLES)

(* ************)(* ************)

N300 G00 G90 G70N300 G00 G90 G70

N301G00 X3.563 Y.375 S2000 M03N301G00 X3.563 Y.375 S2000 M03

N302 M00N302 M00

(DRILL HOLE)(DRILL HOLE)

N303 Y1.125N303 Y1.125

N304 M00N304 M00

(DRILL HOLE)(DRILL HOLE)

N305 G00 XN305 G00 X--10. Y.010. Y.0

N306 M30N306 M30

%%

FIGURE 6FIGURE 6--16 Program to mill and drill the part in Figure 616 Program to mill and drill the part in Figure 6--1313FIGURE 6FIGURE 6--16 Program to mill and drill the part in Figure 616 Program to mill and drill the part in Figure 6--1313

Page 40: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

SummarySummary

TheThe importantimportant conceptsconcepts presentedpresented inin thisthis chapterchapter areare::

�� AnAn NCNC oror CNCCNC programprogram consistsconsists ofof sixsix basicbasic partsparts

1.1. ProgramProgram startupstartup sectionsection

2.2. ToolTool sequencesequence safetysafety lineline

3.3. ToolTool loadload (or(or tooltool change)change) sectionsection

4.4. ToolTool motionmotion sequencesequence

ToolTool cancelcancel sectionsection

TheThe importantimportant conceptsconcepts presentedpresented inin thisthis chapterchapter areare::

�� AnAn NCNC oror CNCCNC programprogram consistsconsists ofof sixsix basicbasic partsparts

1.1. ProgramProgram startupstartup sectionsection

2.2. ToolTool sequencesequence safetysafety lineline

3.3. ToolTool loadload (or(or tooltool change)change) sectionsection

4.4. ToolTool motionmotion sequencesequence

ToolTool cancelcancel sectionsection

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

5.5. ToolTool cancelcancel sectionsection

6.6. EndEnd ofof programprogram sectionsection

�� InIn wordword addressaddress format,format, eacheach CNCCNC commandcommand isis calledcalled aa wordword..

EachEach wordword beginsbegins withwith anan alphaalpha addressaddress whichwhich identifiesidentifies thethe

command'scommand's functionfunction.. TheThe addressaddress isis followedfollowed byby aa numericnumeric

valuevalue.. SomeSome valuesvalues areare usedused toto setset machinemachine modesmodes.. OthersOthers areare

usedused toto specifyspecify positioningpositioning coordinatescoordinates

5.5. ToolTool cancelcancel sectionsection

6.6. EndEnd ofof programprogram sectionsection

�� InIn wordword addressaddress format,format, eacheach CNCCNC commandcommand isis calledcalled aa wordword..

EachEach wordword beginsbegins withwith anan alphaalpha addressaddress whichwhich identifiesidentifies thethe

command'scommand's functionfunction.. TheThe addressaddress isis followedfollowed byby aa numericnumeric

valuevalue.. SomeSome valuesvalues areare usedused toto setset machinemachine modesmodes.. OthersOthers areare

usedused toto specifyspecify positioningpositioning coordinatescoordinates

Page 41: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

SummarySummary�� TheThe spindlespindle mustmust bebe positionedpositioned safelysafely outout ofof thethe wayway atat thethe endend ofof thethe

pro-gram,pro-gram, toto allowallow safesafe loadingloading andand unloadingunloading ofof thethe workpieceworkpiece.. ThisThis isis

accomplishedaccomplished inin bothboth thethe millingmilling andand drillingdrilling examplesexamples byby sendingsending thethe

spindlespindle backback toto itsits tooltool changechange locationlocation atat thethe endend ofof thethe programprogram

�� IncrementalIncremental programsprograms differdiffer fromfrom absoluteabsolute programsprograms onlyonly inin thethe

coordi-natescoordi-nates usedused.. ProgramsPrograms inin absoluteabsolute andand incrementalincremental positioningpositioning useuse

thethe samesame programmingprogramming logiclogic.. InIn incrementalincremental positioning,positioning, itit isis imperativeimperative thatthat

thethe machinemachine startstart andand stopstop inin thethe samesame locationlocation.. FailureFailure toto programprogram forfor thisthis

willwill resultresult inin incorrectincorrect positioningpositioning forfor thethe secondsecond cyclecycle

�� TheThe spindlespindle mustmust bebe positionedpositioned safelysafely outout ofof thethe wayway atat thethe endend ofof thethe

pro-gram,pro-gram, toto allowallow safesafe loadingloading andand unloadingunloading ofof thethe workpieceworkpiece.. ThisThis isis

accomplishedaccomplished inin bothboth thethe millingmilling andand drillingdrilling examplesexamples byby sendingsending thethe

spindlespindle backback toto itsits tooltool changechange locationlocation atat thethe endend ofof thethe programprogram

�� IncrementalIncremental programsprograms differdiffer fromfrom absoluteabsolute programsprograms onlyonly inin thethe

coordi-natescoordi-nates usedused.. ProgramsPrograms inin absoluteabsolute andand incrementalincremental positioningpositioning useuse

thethe samesame programmingprogramming logiclogic.. InIn incrementalincremental positioning,positioning, itit isis imperativeimperative thatthat

thethe machinemachine startstart andand stopstop inin thethe samesame locationlocation.. FailureFailure toto programprogram forfor thisthis

willwill resultresult inin incorrectincorrect positioningpositioning forfor thethe secondsecond cyclecycle

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

willwill resultresult inin incorrectincorrect positioningpositioning forfor thethe secondsecond cyclecycle

�� ToTo performperform holehole operations,operations, itit isis necessarynecessary toto positionposition thethe spindlespindle overover thethe

centerlinecenterline ofof thethe holehole

�� AA programprogram stopstop commandcommand isis usedused atat holehole locationslocations toto halthalt thethe programprogram andand

enableenable thethe operatoroperator toto drilldrill thethe holehole

�� WhenWhen programmingprogramming coordinatescoordinates forfor milling,milling, anan allowanceallowance mustmust bebe mademade forfor

thethe sizesize ofof thethe cuttercutter

willwill resultresult inin incorrectincorrect positioningpositioning forfor thethe secondsecond cyclecycle

�� ToTo performperform holehole operations,operations, itit isis necessarynecessary toto positionposition thethe spindlespindle overover thethe

centerlinecenterline ofof thethe holehole

�� AA programprogram stopstop commandcommand isis usedused atat holehole locationslocations toto halthalt thethe programprogram andand

enableenable thethe operatoroperator toto drilldrill thethe holehole

�� WhenWhen programmingprogramming coordinatescoordinates forfor milling,milling, anan allowanceallowance mustmust bebe mademade forfor

thethe sizesize ofof thethe cuttercutter

Page 42: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Vocabulary Introduced in this chapterVocabulary Introduced in this chapter

�� AddressesAddresses

�� EndEnd ofof tapetape blocksblocks

�� LeadingLeading zerozero

�� ProgramProgram startupstartup blocksblocks

�� ToolTool cancelcancel blocksblocks

�� ToolTool loadload blocksblocks

�� ToolTool motionmotion blocksblocks

�� AddressesAddresses

�� EndEnd ofof tapetape blocksblocks

�� LeadingLeading zerozero

�� ProgramProgram startupstartup blocksblocks

�� ToolTool cancelcancel blocksblocks

�� ToolTool loadload blocksblocks

�� ToolTool motionmotion blocksblocks

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

�� ToolTool motionmotion blocksblocks

�� ToolTool safetysafety blocksblocks

�� TrailingTrailing zerozero

�� TwoTwo--axisaxis programmingprogramming

�� ToolTool motionmotion blocksblocks

�� ToolTool safetysafety blocksblocks

�� TrailingTrailing zerozero

�� TwoTwo--axisaxis programmingprogramming

Page 43: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Review QuestionsReview Questions

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--17 Part drawing for Review Questions 5 and 617 Part drawing for Review Questions 5 and 6FIGURE 6FIGURE 6--17 Part drawing for Review Questions 5 and 617 Part drawing for Review Questions 5 and 6

Page 44: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Review QuestionsReview Questions

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--18 Cutter path for Figure 618 Cutter path for Figure 6--1717FIGURE 6FIGURE 6--18 Cutter path for Figure 618 Cutter path for Figure 6--1717

Page 45: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Review QuestionsReview Questions

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--19 Part drawing for Review Questions 719 Part drawing for Review Questions 7FIGURE 6FIGURE 6--19 Part drawing for Review Questions 719 Part drawing for Review Questions 7

Page 46: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

Review QuestionsReview Questions

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

FIGURE 6FIGURE 6--20 Cutter path for Figure 620 Cutter path for Figure 6--1919FIGURE 6FIGURE 6--20 Cutter path for Figure 620 Cutter path for Figure 6--1919

Page 47: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

�� FollowingFollowing isis aa listlist ofof preparatorypreparatory functionsfunctions usedused inin CNCCNC millingmilling examplesexamples inin thisthis texttext.. OtherOther codescodes

commonlycommonly usedused onon GeneralGeneral NumericNumeric controllerscontrollers areare alsoalso listedlisted..

�� FollowingFollowing isis aa listlist ofof preparatorypreparatory functionsfunctions usedused inin CNCCNC millingmilling examplesexamples inin thisthis texttext.. OtherOther codescodes

commonlycommonly usedused onon GeneralGeneral NumericNumeric controllerscontrollers areare alsoalso listedlisted..

PREPARATORY FUNCTIONS (G CODES) USED IN MILLINGPREPARATORY FUNCTIONS (G CODES) USED IN MILLING

GG0000--RapidRapid traversetraverse positioningpositioning..

GG0101--LinearLinear interpolationinterpolation (feed(feed raterate movement)movement)..

GG0202--CircularCircular interpolationinterpolation clockwiseclockwise..

GG0303--CircularCircular interpolationinterpolation counterclockwisecounterclockwise..

GG0404--DwellDwell..

G10-Toollength offsetoffset valuevalue..

GG1717--SpecifiesSpecifies X/YX/Y planeplane..

GG1818--SpecifiesSpecifies X/ZX/Z planeplane..

GG1919--SpecifiesSpecifies Y/ZY/Z planeplane..

GG2020--lnchlnch datadata inputinput (on(on somesome systems)systems)..

GG2121--MetricMetric datadata inputinput (on(on somesome systems)systems)..

GG0000--RapidRapid traversetraverse positioningpositioning..

GG0101--LinearLinear interpolationinterpolation (feed(feed raterate movement)movement)..

GG0202--CircularCircular interpolationinterpolation clockwiseclockwise..

GG0303--CircularCircular interpolationinterpolation counterclockwisecounterclockwise..

GG0404--DwellDwell..

G10-Toollength offsetoffset valuevalue..

GG1717--SpecifiesSpecifies X/YX/Y planeplane..

GG1818--SpecifiesSpecifies X/ZX/Z planeplane..

GG1919--SpecifiesSpecifies Y/ZY/Z planeplane..

GG2020--lnchlnch datadata inputinput (on(on somesome systems)systems)..

GG2121--MetricMetric datadata inputinput (on(on somesome systems)systems)..

G47G47--Tool offset double increase.Tool offset double increase.

G48G48--Tool offset double decrease. Tool offset double decrease.

G49G49--Tool length compensation cancel. Tool length compensation cancel.

G50G50--Scaling off. Scaling off.

G51G51--Scaling on. Scaling on.

G73G73--Peck drilling cycle. Peck drilling cycle.

G74G74--Counter tapping cycle. Counter tapping cycle.

G76G76--Fine boring cycle. Fine boring cycle.

G80G80--Canned cycle cancel. Canned cycle cancel.

G81G81--Drilling cycle. Drilling cycle.

G82G82--Counter boring cycle. Counter boring cycle.

G47G47--Tool offset double increase.Tool offset double increase.

G48G48--Tool offset double decrease. Tool offset double decrease.

G49G49--Tool length compensation cancel. Tool length compensation cancel.

G50G50--Scaling off. Scaling off.

G51G51--Scaling on. Scaling on.

G73G73--Peck drilling cycle. Peck drilling cycle.

G74G74--Counter tapping cycle. Counter tapping cycle.

G76G76--Fine boring cycle. Fine boring cycle.

G80G80--Canned cycle cancel. Canned cycle cancel.

G81G81--Drilling cycle. Drilling cycle.

G82G82--Counter boring cycle. Counter boring cycle.

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

GG2121--MetricMetric datadata inputinput (on(on somesome systems)systems)..

GG2222--SafetySafety zonezone programmingprogramming..

GG2323--CrossCross throughthrough safetysafety zonezone..

GG2727--ReferenceReference pointpoint returnreturn checkcheck..

GG2828--ReturnReturn toto referencereference pointpoint..

GG2929--ReturnReturn fromfrom referencereference pointpoint..

GG3030--ReturnReturn toto secondsecond referencereference pointpoint..

G40G40--Cutter diameter compensation cancel. Cutter diameter compensation cancel.

G41G41--Cutter diameter compensation left.Cutter diameter compensation left.

G42G42--Cutter diameter compensation right.Cutter diameter compensation right.

G43G43--Toollength compensation positive direction. Toollength compensation positive direction.

G44G44--Toollength compensation negative direction. Toollength compensation negative direction.

G45G45--Tool offset increase. Tool offset increase.

G46G46--Tool offset decrease.Tool offset decrease.

GG2121--MetricMetric datadata inputinput (on(on somesome systems)systems)..

GG2222--SafetySafety zonezone programmingprogramming..

GG2323--CrossCross throughthrough safetysafety zonezone..

GG2727--ReferenceReference pointpoint returnreturn checkcheck..

GG2828--ReturnReturn toto referencereference pointpoint..

GG2929--ReturnReturn fromfrom referencereference pointpoint..

GG3030--ReturnReturn toto secondsecond referencereference pointpoint..

G40G40--Cutter diameter compensation cancel. Cutter diameter compensation cancel.

G41G41--Cutter diameter compensation left.Cutter diameter compensation left.

G42G42--Cutter diameter compensation right.Cutter diameter compensation right.

G43G43--Toollength compensation positive direction. Toollength compensation positive direction.

G44G44--Toollength compensation negative direction. Toollength compensation negative direction.

G45G45--Tool offset increase. Tool offset increase.

G46G46--Tool offset decrease.Tool offset decrease.

G82G82--Counter boring cycle. Counter boring cycle.

G83G83--Peck drilling cycle. Peck drilling cycle.

G84G84--Tapping cycle. Tapping cycle.

G85G85--Boring cycle (feed return to reference level). Boring cycle (feed return to reference level).

G86G86--Boring cycle (rapid return to reference level). Boring cycle (rapid return to reference level).

G87G87--Back boring cycle. Back boring cycle.

G88G88--Boring cycle (manual return). Boring cycle (manual return).

G89G89--Boring cycle (dwell before feed return). Boring cycle (dwell before feed return).

G90G90--Specifies absolute positioning. Specifies absolute positioning.

G91G91--Specifies incremental positioning. Specifies incremental positioning.

G92G92--Program absolute zero point. Program absolute zero point.

G98G98--Return to initial level. Return to initial level.

G99G99--Return to reference (R) level. Return to reference (R) level.

G82G82--Counter boring cycle. Counter boring cycle.

G83G83--Peck drilling cycle. Peck drilling cycle.

G84G84--Tapping cycle. Tapping cycle.

G85G85--Boring cycle (feed return to reference level). Boring cycle (feed return to reference level).

G86G86--Boring cycle (rapid return to reference level). Boring cycle (rapid return to reference level).

G87G87--Back boring cycle. Back boring cycle.

G88G88--Boring cycle (manual return). Boring cycle (manual return).

G89G89--Boring cycle (dwell before feed return). Boring cycle (dwell before feed return).

G90G90--Specifies absolute positioning. Specifies absolute positioning.

G91G91--Specifies incremental positioning. Specifies incremental positioning.

G92G92--Program absolute zero point. Program absolute zero point.

G98G98--Return to initial level. Return to initial level.

G99G99--Return to reference (R) level. Return to reference (R) level.

Page 48: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

PREPARATORY FUNCTIONS (G CODES) USED IN TURNINGPREPARATORY FUNCTIONS (G CODES) USED IN TURNING

�� FollowingFollowing isis aa listlist ofof preparatorypreparatory functionsfunctions usedused inin CNCCNC millingmilling examplesexamples inin thisthis texttext.. OtherOther codescodes

commonlycommonly usedused onon FANUCFANUC controllerscontrollers areare alsoalso listedlisted..

�� FollowingFollowing isis aa listlist ofof preparatorypreparatory functionsfunctions usedused inin CNCCNC millingmilling examplesexamples inin thisthis texttext.. OtherOther codescodes

commonlycommonly usedused onon FANUCFANUC controllerscontrollers areare alsoalso listedlisted..

GOOGOO--RapidRapid traversetraverse positioningpositioning..

GG0101--LinearLinear interpolationinterpolation (feedrate(feedrate movement)movement)..

GG0202--CircularCircular interpolationinterpolation clockwiseclockwise..

GG0303--CircularCircular interpolationinterpolation counterclockwisecounterclockwise..

GG0404--DwellDwell..

GG1010--ToollengthToollength offsetoffset valuevalue settingsetting..

GG1717--SpecifiesSpecifies X/YX/Y planeplane..

GG1818--SpecifiesSpecifies X/ZX/Z planeplane..

GG1919--SpecifiesSpecifies Y/ZY/Z planeplane..

GG2020--lnchlnch datadata inputinput (on(on somesome systems)systems)..

GG2121--MetricMetric datadata inputinput (on(on somesome systems)systems)..

GOOGOO--RapidRapid traversetraverse positioningpositioning..

GG0101--LinearLinear interpolationinterpolation (feedrate(feedrate movement)movement)..

GG0202--CircularCircular interpolationinterpolation clockwiseclockwise..

GG0303--CircularCircular interpolationinterpolation counterclockwisecounterclockwise..

GG0404--DwellDwell..

GG1010--ToollengthToollength offsetoffset valuevalue settingsetting..

GG1717--SpecifiesSpecifies X/YX/Y planeplane..

GG1818--SpecifiesSpecifies X/ZX/Z planeplane..

GG1919--SpecifiesSpecifies Y/ZY/Z planeplane..

GG2020--lnchlnch datadata inputinput (on(on somesome systems)systems)..

GG2121--MetricMetric datadata inputinput (on(on somesome systems)systems)..

G69G69--Mirror image for double turrets off. Mirror image for double turrets off.

G70G70--lnch programming (some systems) or finish cycle. lnch programming (some systems) or finish cycle.

G71G71--Metric programming (some systems) or stock removal In turning code. Metric programming (some systems) or stock removal In turning code.

G72G72--Stock removal in facing code. Stock removal in facing code.

G73G73--Pattern repeat. Pattern repeat.

G74G74--Z axis peck drilling. Z axis peck drilling.

G75G75--Groove cutting cycle, X axis. Groove cutting cycle, X axis.

G76G76--Multipass thread cutting. Multipass thread cutting.

G90G90--Absolute positioning. Absolute positioning.

G91G91--lncremental positioning. lncremental positioning.

G94G94--Per minute feed (some systems). Per minute feed (some systems).

G69G69--Mirror image for double turrets off. Mirror image for double turrets off.

G70G70--lnch programming (some systems) or finish cycle. lnch programming (some systems) or finish cycle.

G71G71--Metric programming (some systems) or stock removal In turning code. Metric programming (some systems) or stock removal In turning code.

G72G72--Stock removal in facing code. Stock removal in facing code.

G73G73--Pattern repeat. Pattern repeat.

G74G74--Z axis peck drilling. Z axis peck drilling.

G75G75--Groove cutting cycle, X axis. Groove cutting cycle, X axis.

G76G76--Multipass thread cutting. Multipass thread cutting.

G90G90--Absolute positioning. Absolute positioning.

G91G91--lncremental positioning. lncremental positioning.

G94G94--Per minute feed (some systems). Per minute feed (some systems).

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

GG2121--MetricMetric datadata inputinput (on(on somesome systems)systems)..

GG2222--StoredStored strokestroke limitlimit onon..

GG2323--StoredStored strokestroke limitlimit offoff..

GG2727--ReferenceReference pointpoint returnreturn checkcheck..

GG2828--ReturnReturn toto referencereference pointpoint..

GG2929--ReturnReturn fromfrom referencereference pointpoint..

GG3030--ReturnReturn toto secondsecond referencereference pointpoint..

GG4040--ToolTool nosenose radiusradius compensationcompensation cancelcancel..

GG4141--ToolTool nosenose radiusradius compensationcompensation leftleft..

GG4242--ToolTool nosenose radiusradius compensationcompensation rightright..

GG5050--ProgrammingProgramming ofof workwork coordinatecoordinate systemsystem..

GG6868--MirrorMirror imageimage forfor doubledouble turretsturrets onon..

GG2121--MetricMetric datadata inputinput (on(on somesome systems)systems)..

GG2222--StoredStored strokestroke limitlimit onon..

GG2323--StoredStored strokestroke limitlimit offoff..

GG2727--ReferenceReference pointpoint returnreturn checkcheck..

GG2828--ReturnReturn toto referencereference pointpoint..

GG2929--ReturnReturn fromfrom referencereference pointpoint..

GG3030--ReturnReturn toto secondsecond referencereference pointpoint..

GG4040--ToolTool nosenose radiusradius compensationcompensation cancelcancel..

GG4141--ToolTool nosenose radiusradius compensationcompensation leftleft..

GG4242--ToolTool nosenose radiusradius compensationcompensation rightright..

GG5050--ProgrammingProgramming ofof workwork coordinatecoordinate systemsystem..

GG6868--MirrorMirror imageimage forfor doubledouble turretsturrets onon..

G94G94--Per minute feed (some systems). Per minute feed (some systems).

G95G95--Per revolution feed (some systems). Per revolution feed (some systems).

G98G98--Per minute feed (some systems). Per minute feed (some systems).

G99G99--Per revolution feed (some systems). Per revolution feed (some systems).

G94G94--Per minute feed (some systems). Per minute feed (some systems).

G95G95--Per revolution feed (some systems). Per revolution feed (some systems).

G98G98--Per minute feed (some systems). Per minute feed (some systems).

G99G99--Per revolution feed (some systems). Per revolution feed (some systems).

Page 49: COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS · 2017-06-07 · COMPUTER NUMERICAL CONTROL OF MACHINE TOOLS ... is used on FANUC(%) is used on FANUC--style controllers as an end o style

MISCELLANEOUS (M) FUNCTIONS USED IN MILLING AND TURNINGMISCELLANEOUS (M) FUNCTIONS USED IN MILLING AND TURNING

�� FollowingFollowing isis aa listlist ofof miscellaneousmiscellaneous functionsfunctions usedused inin thethe millingmilling andand turn-ingturn-ing examplesexamples inin thisthis texttext..

OtherOther MM functionsfunctions commoncommon toto GeneralGeneral NumericNumeric andand FANUCFANUC controllerscontrollers areare alsoalso listedlisted..

�� FollowingFollowing isis aa listlist ofof miscellaneousmiscellaneous functionsfunctions usedused inin thethe millingmilling andand turn-ingturn-ing examplesexamples inin thisthis texttext..

OtherOther MM functionsfunctions commoncommon toto GeneralGeneral NumericNumeric andand FANUCFANUC controllerscontrollers areare alsoalso listedlisted..

MM0000--ProgramProgram stopstop..

MM0101--00ptionalptional stopstop..

MM0202--EndEnd ofof programprogram (rewind(rewind tape)tape)..

MM0303--SpindleSpindle startstart clockwiseclockwise..

MM0404--SpindleSpindle startstart counterclockwisecounterclockwise..

MM0505--SpindleSpindle stopstop..

MM0606--ToolTool changechange..

MM0808--CoolantCoolant onon..

MM0909--CoolantCoolant offoff..

MM1313--SpindleSpindle onon clockwise,clockwise, coolantcoolant onon (on(on somesome systems)systems)..

MM1414--SpindleSpindle onon counterclockwise,counterclockwise, coolantcoolant onon..

MM0000--ProgramProgram stopstop..

MM0101--00ptionalptional stopstop..

MM0202--EndEnd ofof programprogram (rewind(rewind tape)tape)..

MM0303--SpindleSpindle startstart clockwiseclockwise..

MM0404--SpindleSpindle startstart counterclockwisecounterclockwise..

MM0505--SpindleSpindle stopstop..

MM0606--ToolTool changechange..

MM0808--CoolantCoolant onon..

MM0909--CoolantCoolant offoff..

MM1313--SpindleSpindle onon clockwise,clockwise, coolantcoolant onon (on(on somesome systems)systems)..

MM1414--SpindleSpindle onon counterclockwise,counterclockwise, coolantcoolant onon..

Laboratory for Manufacturing Systems and Automation Laboratory for Manufacturing Systems and Automation Dr. Dimitris MourtzisDr. Dimitris Mourtzis

MM1414--SpindleSpindle onon counterclockwise,counterclockwise, coolantcoolant onon..

MM1717--SpindleSpindle andand coolantcoolant offoff (on(on somesome systems)systems)..

MM1919--SpindleSpindle orientorient andand stopstop..

MM2121--MirrorMirror imageimage XX axisaxis..

MM2222--MirrorMirror imageimage YY axisaxis..

MM2323--MirrorMirror imageimage offoff..

MM3030--EndEnd ofof program,program, memorymemory resetreset..

MM4141--LowLow rangerange..

MM4242--HighHigh rangerange..

MM4848--00verrideverride cancelcancel offoff..

MM4949--00verrideverride cancelcancel onon..

MM9898--JumpJump toto subroutinesubroutine..

MM9999--ReturnReturn fromfrom subroutinesubroutine..

MM1414--SpindleSpindle onon counterclockwise,counterclockwise, coolantcoolant onon..

MM1717--SpindleSpindle andand coolantcoolant offoff (on(on somesome systems)systems)..

MM1919--SpindleSpindle orientorient andand stopstop..

MM2121--MirrorMirror imageimage XX axisaxis..

MM2222--MirrorMirror imageimage YY axisaxis..

MM2323--MirrorMirror imageimage offoff..

MM3030--EndEnd ofof program,program, memorymemory resetreset..

MM4141--LowLow rangerange..

MM4242--HighHigh rangerange..

MM4848--00verrideverride cancelcancel offoff..

MM4949--00verrideverride cancelcancel onon..

MM9898--JumpJump toto subroutinesubroutine..

MM9999--ReturnReturn fromfrom subroutinesubroutine..