1、|- stepper-gantry|- stepper-xyza|- stg(sample servo using STG ISA)|- univpwm(sample PICO servo generator)|- univstep(sample PICO stepper generator)、-vtidebian(files needed to build deb packages)| |- extras-Ubuntu-5.10 (extra files for Ubuntu 5.10)| | |- etc| | | |- modprobe.d| | | |- udev| | | | |-
2、rules.d| | | | 、- scriptsI I I - xdg| 、- menus| | | - applicati on s-merged| | 、- usr| | 、- shareI I I- applicationsI I I- desktop-directories| | 、- pixmapsI I- extras-Ubuntu-6.06 (extra files for building on Ubuntu 6.06 Dapper Drake)I I I- etcI I I I- modprobe.dI I I I- udevI I I I I- rules.d| | |
3、、- menusI I 、- usrI I 、- shareI I 、- pixmapsI I- extras-Ubuntu-7.10 (extra files for building on Ubuntu 7.10)II- etcI I- modprobe.dI I- udevI I - rules.dI I 、- menus-usr、-shareI- applicationsI- desktop-directories、-pixmapsI- extras-Ubuntu-8.04 (extra files for building on Ubuntu 8.04 Hardy Heron)I I
4、 I 、- menus| |- extras-sim-Ubuntu-5.10 (extra files for sim package for Ubuntu 5.10)| - extras-sim-Ub un tu-6.06 (extra files for sim package for Ubuntu 6.06 Dapper Drake)I I- etc| I 、- menus- usrI 、- shareI I- applicationsI I- desktop-directoriesI 、- pixmapsI- docs (All the important and relevant D
5、ocs.)I I- helpI I- html (html version of docs - some generated from lyx)I I- man (man pages)I I I- man1I I I- man3I I 、- man9- src (API and source notes should be in each src dir.) (source for the handbooks) (top levelyx files)I I- codeI I- common (shared .lyx files and images, such as glossary, GPL
6、D license)I I- configI I- gcode (.lyx files, images, etc. for G-Code documentation)I I- gui (.lyx files, images, etc. for GUI documentation)I I- hal (.lyx files, images, etc. for HAL documentation)I I- installI I- ladderI I- motion- quickstartI- include (headers installed here - originals in src/xxx
7、/)I- lib (user mode object files)I 、- pyth onI I- rs274- yapps|- nc_files (Sample NC files)|- rtlib (kernel mode object files, only after a successfull compile)|- scripts(bash scripts like linuxcnc, realtime, rip-environment, etc.) |- share|- axis| |- images- tel|- emc-locale|- de- LC_MESSAGES|- es|
8、- fr|- hu|- it|- pt_BR|- ro|- ru|- se|- sr-zh_CN-LC_MESSAGES|- src (source tree - configure script, top level makefile, Makefile.inc, etc)|- depends (generated dependency tree)|- emc (actual LinuxCNC code)| |- canterp| |- ini| |- iotask| |- kinematics| |- motion| |- nml_intf| |- rs274ngc| |- sai| |-
9、 task(interpreter for canonical commands)(inifile related operations) (IO interface, lots of HAL pins) (trajectory planner and kinematics)(motion controller, talks through SHM to the rest of EMC)(emc specific NML implementation, all messages sent in emc) (the rs274 g-code interpreter)(core component
10、 in emc, dispatches actions to other parts)| | 、- usr_i ntf(interfaces for some GUIs, and other interfaces: AXIS, halui, stepconf)| | |- axis| | | |- etc| |- extensions| 、- scripts-stepc onf| |- hal(the Hardware Abstraction Layer, provides a unified interface across allhardware)|- classicladder- pro
11、jects_examples|- components|- drivers| |- bit- hostmot5_src|- mesa-hostmot2|- doc-firmware|- 5i20- SOURCE-7i43|- CPLD-SOURCE|- mesa7i43-firmware|-|- gpio- source|- hostmot2| 、- src-sourcemesa_5i2x|- pluto_servo_firmware-pluto_step_firmware|- user_comps| |- devices| 、- vcp-utils-halgui|- libnml (a cl
12、ean implementation of RCSLIB)| | |- buffer| | |- cms| | |- inifile| | |- linklist| | |- nml| | |- os_intf| | |- posemath- res| |- module_helperI I- objeetsI I I- emeI I I I- eanterpI I I I- iniI I I I- iotaskI I I I- motionI I I I- nml_intfI I I I- rs274ngeI I I I- saiI I I I- task- usr_i ntf| | | 、
13、- axis- exte nsionsI I I- halI I I I- elassieladderI I I I- eomponentsI I I I- driversI I I I- user_eompsI I I I I- deviees|- vep III- utilsI I I- libnmlI I I I- bufferI I I I- emsI I I I- inifileI I I I- linklistI I I I- nmlI I I I- os_intfI I I I- posemathI I I- rtapiI I I- rtemeI I I I- kinematie
14、s- motionI I I- rthalI I I- rtlibnml- posemath- rtobjeets| | - hal- comp onents| |- po (Translation files for i18n support)| |- rtapi (*.c and *.h for RTAPI) (unified RT API, wraps over RTLinux, RTAI and sim)- examples (test ing examples for the RTAPI)| | |- extint| | |- fifo| | |- semaphore| | |- s
15、hmem| | 、- timer- tests|- tcl (tkemc.tcl, mini.tcl - the tcl GUIs)| |- bin-tests|- abs.0|- and-or-not-mux.0|- basic|- ccomp| |- lathe-comp| |- mill-g90g91g92| |- mill-line-arc-entry- mill-zcha nges|- counter-encoder.0|- flipflop.0|- interp| |- cam-nisley- flows nake|- limit3.0|- limit3.1|- limit3.2|
16、- modparam.0|- overrun|- oword- sub.O|- save.0|- save.1|- source.0|- stepgen.0|- stepgen.1|- stepgen.2|- threads.0-timedelay.0Overview of the emc2 install dirs:/ (file system root)|- etc/| | - init.d/| - realtime (realtime start/stop script)|- $(prefix) (default: /usr/local)| | (all the following $x
17、xxxdir are configurable through autoconf| |- bin/ (known as $bindir, files from EMC2/bin)| |- sbin/ (known as $sbindir, )| |- etc/ (known as $sysconfdir, config files and subdirs from configs/)| |- lib/ (known as $libdir, lib files *.so from libs/)| - share/| - emc/| |- docs/| | | | - (All the impor
18、tant and relevant Docs.)| |- handbooks/| - (PDF versions of handbooks) - nc_files/- (Sample NC files)|- $MAN_DIR/ (default: /usr/local/man)| |- man1/| - man3/|- canterp|- ini|- iotask|- kinematics|- motion|- nml_intf|- rs274ngc|- sai|- task-usr_i ntf(interpreter for canonical commands) (inifile rela
19、ted operations) (IO interface, lots of HAL pins) (trajectory planner and kinematics)(motion controller, talks through SHM to the rest of EMC) (emc specific NML implementation, all messages sent in emc) (the rs274 g-code interpreter)(core component in emc, dispatches actions to other parts) (interfac
20、es for some GUIs, and other interfaces:|- etc|- extensions-scripts- $moduledir/ (based on where ./configure finds the RTOS modules) 根据这个结构树,我们可以清楚的知道每一个文件夹,每一个子文件的作用,包括了接口,硬件抽 象层,实时内核等等部分。当然, 在这里面我们需要深入研究的是 linuxcnc-dev/src/emc 文件夹中的 各个文件,也是该数控系统的核心所在。我们再次列出 linuxcnc-dev/src/emc 中的子结构树: linuxcnc-dev
21、/src/emc 中的子结构树:根据该结构树,我们一个一个的再一次进行分析:(1)can terp (i nterpreter for canoni cal comma nds,即规范命令的解释器 )/ FILE, fopen(), fclose()/ strcpy()/ isspace()#include string.hctype.hlimits.h #include #include config.hemc/nml_intf/interp_return.hhemc/nml_intf/canon.hhemc/rs274ngc/interp_base.hh其中包括了语法解析,读取,执行等函数,对刀具信息、主轴转速、开始、停止等信息进行判断和 执行工作。( 2) ini (inifile related operations ,初始化相关的文件 )同样,列出该文件夹的结构树:| |- ini (inifile related operations)| | |- emcIniFile.cc/hh| | |- iniaxis.cc/hh| | |- inihal.cc/hh| | |- initraj.cc/hh| |
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1