LINUXCNC源程序原理说明Word文档格式.docx
- 文档编号:16907587
- 上传时间:2022-11-27
- 格式:DOCX
- 页数:42
- 大小:40.73KB
LINUXCNC源程序原理说明Word文档格式.docx
《LINUXCNC源程序原理说明Word文档格式.docx》由会员分享,可在线阅读,更多相关《LINUXCNC源程序原理说明Word文档格式.docx(42页珍藏版)》请在冰豆网上搜索。
|||||-—rules。
d
||||`—-scripts
|||`——xdg
|||`--menus
|||`——applications—merged
||`-—usr
||`-—share
|||--applications
|||--desktop—directories
||`--pixmaps
||--extras—Ubuntu—6。
06(extrafilesforbuildingonUbuntu6。
06DapperDrake)
|||—-etc
||||——modprobe。
||||——udev
|||||——rules。
|||`—-xdg
|||`-—menus
|||`——applications—merged
||`—-usr
||`—-share
|||—-applications
|||——desktop-directories
||`—-pixmaps
||-—extras—Ubuntu—7。
10(extrafilesforbuildingonUbuntu7。
10)
|||——etc
||||--modprobe.d
||||--udev
||||`——rules.d
|||`-—xdg
|||`--menus
|||`-—applications-merged
||`—-usr
||`--share
|||—-applications
|||——desktop—directories
||`-—pixmaps
||——extras—Ubuntu—8.04(extrafilesforbuildingonUbuntu8。
04HardyHeron)
|||--etc
||||--modprobe.d
|||`——xdg
|||`-—menus
|||`——applications-merged
||`-—usr
||`——share
|||-—applications
|||—-desktop-directories
||`——pixmaps
||--extras-sim—Ubuntu-5.10(extrafilesforsimpackageforUbuntu5.10)
|||——etc
|||`—-xdg
|||`--menus
|||`—-applications-merged
||`--usr
||`-—share
|||--applications
|||—-desktop—directories
|`—-extras—sim-Ubuntu-6。
06(extrafilesforsimpackageforUbuntu6。
||——etc
||`-—xdg
||`—-menus
||`--applications-merged
|`—-usr
|`--share
||-—applications
||--desktop-directories
|`—-pixmaps
|--docs(AlltheimportantandrelevantDocs.)
||-—help
||—-html(htmlversionofdocs-somegeneratedfromlyx)
||--man(manpages)
|||—-man1
|||—-man3
||`--man9
|`—-src(APIandsourcenotesshouldbeineachsrcdir.)(sourceforthehandbooks)(toplevel.lyxfiles)
||—-code
||——common(shared.lyxfilesandimages,suchasglossary,GPLDlicense)
||—-config
||—-gcode(.lyxfiles,images,etc。
forG—Codedocumentation)
||--gui(。
lyxfiles,images,etc。
forGUIdocumentation)
||—-hal(.lyxfiles,images,etc.forHALdocumentation)
||——install
||—-ladder
||-—motion
|`--quickstart
|--include(headersinstalledhere—originalsinsrc/xxx/)
|--lib(usermodeobjectfiles)
|`-—python
||——rs274
|`—-yapps
|-—nc_files(SampleNCfiles)
|--rtlib(kernelmodeobjectfiles,onlyafterasuccessfullcompile)
|—-scripts(bashscriptslikelinuxcnc,realtime,rip-environment,etc。
)
|-—share
||-—axis
|||——images
||`——tcl
||—-emc
|`-—locale
||--de
||`--LC_MESSAGES
||--es
||`--LC_MESSAGES
||——fr
||`-—LC_MESSAGES
||-—hu
||`—-LC_MESSAGES
||--it
||`——LC_MESSAGES
||—-pt_BR
||`—-LC_MESSAGES
||-—ro
||`——LC_MESSAGES
||—-ru
||`—-LC_MESSAGES
||—-se
||`-—LC_MESSAGES
||-—sr
||`——LC_MESSAGES
|`—-zh_CN
|`--LC_MESSAGES
|-—src(sourcetree—configurescript,toplevelmakefile,Makefile.inc,etc)
||
||--depends(generateddependencytree)
||
||—-emc(actualLinuxCNCcode)
|||—-canterp(interpreterforcanonicalcommands)
|||--ini(inifilerelatedoperations)
|||-—iotask(IOinterface,lotsofHALpins)
|||-—kinematics(trajectoryplannerandkinematics)
|||-—motion(motioncontroller,talksthroughSHMtotherestofEMC)
|||——nml_intf(emcspecificNMLimplementation,allmessagessentinemc)
|||-—rs274ngc(thers274g-codeinterpreter)
|||——sai
|||--task(corecomponentinemc,dispatchesactionstootherparts)
||`--usr_intf(interfacesforsomeGUIs,andotherinterfaces:
AXIS,halui,stepconf)
|||——axis
||||—-etc
||||——extensions
|||`——scripts
||`-—stepconf
||—-hal(theHardwareAbstractionLayer,providesaunifiedinterfaceacrossallhardware)
|||—-classicladder
|||`—-projects_examples
|||-—components
|||-—drivers
||||-—m5i20
|||||--bit
||||`——hostmot5_src
||||——mesa-hostmot2
|||||-—doc
||||`—-firmware
|||||—-5i20
|||||`——SOURCE
||||`--7i43
|||||—-CPLD
|||||`——SOURCE
||||`——SOURCE
||||—-mesa7i43—firmware
|||||——gpio
|||||`-—source
|||||——hostmot2
|||||`--src
||||`-—source
||||-—mesa_5i2x
||||`--firmware
||||—-pluto_servo_firmware
|||`——pluto_step_firmware
|||--user_comps
||||--devices
|||`--vcp
||`--utils
||`--halgui
||——libnml(acleanimplementationofRCSLIB)
|||—-buffer
|||——cms
|||——inifile
|||--linklist
|||-—nml
|||--os_intf
|||-—posemath
||`—-rcs
||-—module_helper
||--objects
|||-—emc
||||-—canterp
||||--ini
||||--iotask
||||--motion
||||-—nml_intf
||||--rs274ngc
||||-—sai
||||—-task
|||`——usr_intf
|||`——axis
|||`—-extensions
|||——hal
||||--classicladder
||||--components
||||--drivers
||||-—user_comps
|||||——devices
||||`—-vcp
|||`-—utils
|||-—libnml
||||--buffer
||||—-cms
||||——inifile
||||—-linklist
||||—-nml
||||-—os_intf
||||—-posemath
|||`--rcs
|||-—rtapi
|||—-rtemc
||||—-kinematics
|||`-—motion
|||--rthal
||||-—classicladder
||||--components
|||`—-utils
|||——rtlibnml
|||`-—posemath
||`—-rtobjects
||`-—hal
||`——components
||--po(Translationfilesfori18nsupport)
||—-rtapi(*。
cand*.hforRTAPI)(unifiedRTAPI,wrapsoverRTLinux,RTAIandsim)
||`—-examples(testingexamplesfortheRTAPI)
|||-—extint
|||——fifo
|||——semaphore
|||—-shmem
||`—-timer
|`--tests
|—-tcl(tkemc.tcl,mini.tcl—thetclGUI’s)
||--bin
|`——scripts
`--tests
|—-abs.0
|——and-or-not—mux.0
|--basic
|——ccomp
||--lathe—comp
||——mill-g90g91g92
||—-mill—line-arc-entry
|`--mill—zchanges
|--counter—encoder.0
|-—flipflop。
|--interp
||--cam—nisley
|`--flowsnake
|--limit3.0
|--limit3。
1
|--limit3。
2
|--modparam.0
|——overrun
|—-oword
|`-—sub.0
|-—save.0
|——save。
|—-source。
|-—stepgen。
|——stepgen.1
|—-stepgen。
|-—threads。
`—-timedelay.0
Overviewoftheemc2installdirs:
/(filesystemroot)
|
|——-etc/
||
|\--—init。
d/
||
|\——-realtime(realtimestart/stopscript)
|
|—-—$(prefix)(default:
/usr/local)
||(allthefollowing$xxxxdirareconfigurablethroughautoconf
||—--bin/(knownas$bindir,filesfromEMC2/bin)
||——-sbin/(knownas$sbindir,)
||--—etc/(knownas$sysconfdir,configfilesandsubdirsfromconfigs/)
||---lib/(knownas$libdir,libfiles*。
sofromlibs/)
||
|\-—-share/
|\——-emc/
||
||—--docs/
|||
||\—--(AlltheimportantandrelevantDocs。
||——-handbooks/
|||
||\———(PDFversionsofhandbooks)
|\———nc_files/
|\---(SampleNCfiles)
|—-—$MAN_DIR/(default:
/usr/local/man)
||--—man1/
|||
||
|\--—man3/
|
|
\—-—$moduledir/(basedonwhere。
/configurefindstheRTOSmodules)
根据这个结构树,我们可以清楚的知道每一个文件夹,每一个子文件的作用,包括了接口,硬件抽象层,实时内核等等部分。
当然,在这里面我们需要深入研究的是linuxcnc-dev/src/emc文件夹中的各个文件,也是该数控系统的核心所在。
我们再次列出linuxcnc—dev/src/emc中的子结构树:
linuxcnc-dev/src/emc中的子结构树:
||——emc(actualLinuxCNCcode)
|||-—canterp(interpreterforcanonicalcommands)
|||—-iotask(IOinterface,lotsofHALpins)
|||—-kinematics(trajectoryplannerandkinematics)
|||--motion(motioncontroller,talksthroughSHMtotherestofEMC)
|||-—nml_intf(emcspecificNMLimplementation,allmessagessentinemc)
|||-—rs274ngc(thers274g-codeinterpreter)
|||—-sai
|||-—task(corecomponentinemc,dispatchesactionstootherparts)
||`——usr_intf(interfacesforsomeGUIs,andotherinterfaces:
AXIS,halui,stepconf)
|||—-axis
||||--etc
||||——extensions
|||`-—scripts
||`—-stepconf
根据该结构树,我们一个一个的再一次进行分析:
(1)canterp(interpreterforcanonicalcommands,即规范命令的解释器)
#include<
stdio。
h〉//FILE,fopen(),fclose()
#include〈string.h>
//strcpy()
#include<
ctype。
h>
//isspace()
#include〈limits。
h〉
algorithm>
#include"
config.h”
#include"
emc/nml_intf/interp_return。
hh"
emc/nml_intf/canon。
emc/rs274ngc/interp_base.hh"
其中包括了语法解析,读取,执行等函数,对刀具信息、主轴转速、开始、停止等信息进行判断和执行工作.
(2)ini(inifilerelatedoperations,初始化相关的文件)
同样,列出该文件夹的结构树:
||——ini(inifilerelatedoperations)
|||-—emcIniFile。
cc/hh
|||——iniaxis.cc/hh
|||—-inihal。
|||--initraj.cc/hh
|||--initool.cc/hh
(2.1)emcIniFile。
#include〈math。
h〉//M_PI。
#incl
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- LINUXCNC 源程序 原理 说明