LINUXCNC源程序原理说明.docx
opLINUXCNC源程序学习源程序的树构造如下:Overviewoftheemc2directory(generatedbytree-I.git-d):-app-defaults|bin(usermodebinaries)-configsI-5axisI-bossI-commonI-dallur-thcI-demo_mazakI-demo_sim_clI-demo_step_clI-etch-servoI-halui_halvcpI-hexapod-simI-lathe-plutoI-m5i20I-maxI-motencI-nist-latheI-plasma-thc(samplemazakconfigfiles)(samplesimwithladderIO)(samplestepperwithladderIO)(sampleservousingMesaPCI)(sampleservousingVitalPCI)-plasma-thc-sim-ppmcpumaI-scaraI-simI-stepperI-stepper-gantryI-stepper-xyzaII-stgI-univpwmI-univstepIvti-debian(simulatedmotionand10)(parportstepperdriver)(sampleservousingSTGISA)(samplePICOservogenerator)(samplePICOsteppergenerator)(filesneededtobuilddebpackages)extras-Ubuntu-5.10(extrafilesforUbuntu5.10)|etcI-modprobe.dI|udevII-rules.dII'-scriptsI'-Xdg'-menusapplications-mergedUSshare|applications|desktop-directories'-pixmaps-extras-Ubuntu-6.06(extrafilesforbuildingonUbuntu6.06DapperDrake)|etcI-modprobe.dI-udevII|rules.dII'-scriptsIxdgI、一menusI'-applications-mergedUSshare|applications|desktop-directories'-pixmapsextras-Ubntu-7.10(extrafilesforbuildingonUbuntu7.10)-etcI-modprobe.dI-udevIIrules.dI'-XdgI、一menusI'-applications-mergedusrshare|applications|desktop-directories'-pixmaps-extras-Ubuntu-8.04(extrafilesforbuildingonUbuntu8.04HardyHeron)-etcI-modprobe.dI'-xdgI、一menusI'-applications-mergedusrshare|applications|desktop-directories'-pixmaps-extras-sim-Ubuntu-5.10(extrafilesforsimpackageforUbuntu5.10)-etcI'-XdgI、一menusIapplications-mergedusrI'-shareI|applicationsI|desktop-directoriesI'-pixmaps'-extras-sim-Ubuntu-6.06(extrafilesforsimpackageforUbuntu6.06DapperDrake)|etcI'-xdgI、一menusIapplications-merged、-usrshare|applications|desktop-directories、-pixmapsdocs(AlltheimportantandrelevantDocs.)-help-html(htmlversionofdocs-somegeneratedfromlyx)|man(manpages)I|manlI-man3Iman9src(APIandsourcenotesshouldbeineachsrcdir.)(sourceforthehandbooks)(toplevel.lyxfiles)-code|common(shared.lyxfilesandimages,suchasglossary,GPLDlicense)|config|geode(.lyxfiles,images,etc.forG-Codedocumentation)|gui(.lyxfiles,images,etc.forGUIdocumentation)|hal(.lyxfiles,images,etc.forHALdocumentation)|install|ladder|motion'-quickstartinclude(headersinstalledhere-originalsinsrcxxx)lib(usermodeobjectfiles)python-rs274、一yappsnc_files(SampleNCfiles)rtlib(kernelmodeobjectfiles,onlyafterasuccessfullcompile)scripts(bashscriptslikeIinuxcnc,realtime,rip-environment,etc.)share|axisI-imagesI'-tcl-emclocale|deI'-LC_MESSAGES-esI、-LC_MESSAGES-frI'-LC_MESSAGES|huI、-LC_MESSAGES-itI'-LC_MESSAGES|pt_BRI、-LC_MESSAGES|roI'-LC_MESSAGES|ruI、-LC_MESSAGES-seI'-LC_MESSAGES-srI、-LC_MESSAGES、一zh_CN'-LC_MESSAGESsrc(sourcetree-configurescript,toplevelmakefile,Makefile.inc,etc)I-depends(generateddependencytree)I|emc(actualLinuxCNCcode)-canterp(interpreterforcanonicalcommands)-ini(inifilerelatedoperations)|iotask(10interface,lotsofHALpins)-kinematics(trajectoryplannerandkinematics)|motion(motioncontroller,talksthroughSHMtotherestofEMC)-nml_intf(emcspecificNMLimplementation,allmessagessentinemc)|rs274ngc(thers274g-codeinterpreter)-sai|task(corecomponentinemc,dispatchesactionstootherparts)usr_intf(interfacesforsomeGUIs,andotherinterfaces:AXIS,halui,stepconf)|axisII-etcI|extensionsI'-scripts'-stepconfhal(theHardwareAbstractionLayer,providesaunifiedinterfaceacrossallhardware)-classicladderIprojects-examples|components-driversII-m5i20III-bitIIhostmot5_srcI-mesa-hostmot2II|docII'-firmwareII-5i20III'-SOURCEII、一7i43II-CPLDIII、-SOURCEII'-SOURCEI-mesa7i43-firmwareIII-gpioIII'-sourceII|hostmot2III'-srcII'-sourceI-mesa_5i2xIIfirmwareI-pluto_servo_firmwareIpluto_step_firmware-user_compsI-devicesI'-vcputils'-halgui-Iibnml(acleanimplementationofRCSLIB)-buffer|cms-inifile|linklist-nml|os_intf-posemathres-module_helperobjects-emcI-canterpI-iniI-iotaskI-motionI-nml_intfI-rs274ngcI-saiI-taskIll'usr_intfIII'-axisIII'-extensionsII-halIlll-classicladderIlll-componentsIII-driversIII-user_compsIllll-devicesIlll'-vcp'-utilsII|IibnmlIII-bufferIlll-cmsIII-inifileIlll-linklistIII-nmlIII-os_intfIII-posemath'-resII-rtapiII|rtemcIII-kinematics'-motionII-rthalIlll-classicladderIII-components'-utilsII-