




已阅读5页,还剩99页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
开源数控emc2入门手册(5) emc2_getting_started_翻译10章11 (0/29)2011-10-09 09:08 emc2_getting_started_翻译89章 (0/29)2011-10-08 09:12 emc2_getting_started_翻译7章 (0/29)2011-09-28 08:28 emc2_getting_started_翻译456章 (0/49)2011-09-21 21:11 emc2_getting_started_学习心得123 如果您转载,请包括原作者声明,谢谢!作者:dennis丁雷 qq:1160577904 e-mail:disclaimer- the authors of this library accept absolutely no liability for any harm or loss resulting from its use. it is _extremely_ unwise to rely on software alone for safety. any machinery capable of harming persons must have provisions for completely removing power from all motors, etc, before persons enter any danger area. all machinery must be designed to comply with local and national safety codes, and the authors of this software can not, and do not, take any responsibility for such compliance.免责声明- 本文作者坚决不对任何读者因使用本文而导致的任何财产损失或者身体伤害承担任何责任。仅仅指望计算机软件或技术文件来确保和解决安全问题也是极不明智的表现。任何机器,只要它有伤人的可能,就必须制定严格的制度来管理它。比如可以规定“在人体进入危险区域之前,必须确保所有电机断电”等条款。事实上,设计任何一种机器设备都需要遵循所在国家或地区的各种不同级别的安全标准,本文的作者显然无法了解和满足如此多的标准要求,所以也就不能承担相关的责任。mission statement-emc2 is an offshoot of the original nist enhanced machinecontroller. the new version is (primarily) a gpld project.the major goals are:1) make the project more friendly to new developers. this means a simpler build process, as well as other changes listed below. (done)2) reduce complexity by eliminating support for platforms other than linux on x86, with either rtai or rtlinux for realtime. (done)3) incorporate a hardware abstraction layer that makes the realtime code more modular and allows pins and i/o devices to be reconfigured easily. (done)4) add some of the features that were discussed at the 2003 names show on emc monday - these include rigid tapping and single point threading, improved contouring, a built- in plc using classicladder, and others. (mostly done, yet new features will constantly be added)任务描述- emc2最初是 nist enhanced machine controller 项目的一个分支,现在它是一个gpl的项目,emc2目前致力于以下四个目标:1)使emc2项目对新手来说更加易于使用,且易于编译与安装。2)为了减少复杂度,决定:除了x86-linux平台以外,emc2都不提供支持。在实时性方面,也只提供rtai或者rtlinux的支持。3)emc2包括了一个硬件抽象层(hardware abstraction layer),hal使得硬件相关的实时代码更加模块化,从而让外部接口(pins and i/o devices)更易于配置,这样就提高了软件的灵活性以及适应能力。4)增加了一些功能,包括刚性攻丝和单点线程、增强的轮廓功能、用classladder实现的内置plc功能(rigid tapping and single point threading、improvedcontouring、built-in plc using classicladder) 等等。-以上节选自源码包根目录的readme文件目录第 1 章 计算机配置1.1 最小配置the minimum system to run emc2 and ubuntu may vary depending on the exactusage. stepper systems in general require faster threads to generate steppulses than servo systems. using the live-cd you can test the softwarebefore committing a computer. keep in mind that the latency test numbersare more important than the processor speed for software step generation.more information on the latency test is in section (7.2.1).additional information is on the emc wiki site:/cgi-bin/emcinfo.pl?hardware_requirements 事实上,最小配置是什么样的并不确定,这取决于具体的应用。总的来说,分管线程切换的时间片分配系统(stepper systems)要足够快,起码要能产生比伺服系统还要快的步进脉冲才行。要注意, cpu的速度肯定是越快越好,但不是最终决定因素,相对而言,live-cd里面提供的latency test功能反而更加重要,latency test可以最终判断目标机器是否适合运行emc2系统。关于latency test的详细信息参见(7.2.1)。要了解更多信息,您还可以去下面的网址去看看:/cgi-bin/emcinfo.pl?hardware_requirementsemc2 and ubuntu should run reasonably well on a computer with the followingminimum hardware specification. these numbers are not the absolute minimumbut will give reasonable performance for most stepper systems.700 mhz x86 processor (1.2 ghz x86 processor recommended).384 mb of ram (512 mb up to 1 gb recommended).4 gb hard disk.graphics card capable of at least 800x600 resolution, which is not usingthe nvidia or ati fglrx proprietary drivers, and which is not an onboardvideo chipset that shares main memory with the cpu.a network or internet connection (not strictly needed, but very usefulfor updates and for communicating with the emc community).当然,这里还是给出了一个推荐的配置。虽然这不一定是最合适的,但它在大多数情况下可以获得相当不错的性能。700 mhz x86 处理器 (1.2 ghz x86 更佳).384 mb 内存 (512 mb - 1 gb 更佳).4 gb 硬盘空间.显卡分辨率最低800*600,不要使用 nvidia 或者 ati fglrx 这样专有的驱动程序,也不要使用集成显卡,因为它们会和cpu抢内存用。有网络,能上internet最好,这样可以方便升级,也利于及时从社区里面查找相关的技术信息。1.2 不推荐的配置1.2.1 laptopslaptops are not generally suited to real time software step generation.again a latency test run for an extended time will give you the info youneed to determine suitability.1.2.2 video cardsif your installation pops up with 800 x 600 screen resolution then mostlikely ubuntu does not recognize your video card or monitor. onboard videomany times causes bad real time performance.笔记本一般不适于运行emc2,当然具体能不能用还是取决于latency test。如果系统安装后,显示器分辨率是800*600,那多半是ubuntu没能识别你的显卡或显示器。再说一遍,集成显卡通常不适合用于emc2这样的实时系统。第 2 章 关于emc2.1 是什么和不是什么emc (the enhanced machine control) is a software system for computercontrol of machine tools such as milling machines and lathes.emc is free software with open source code. current versions of emc areentirely licensed under the gnu general public license and lesser gnugeneral public license (gpl and lgpl)emc provides: a graphical user interface (actually several interfaces to chose from) an interpreter for g-code (the rs-274 machine tool programming language) a realtime motion planning system with look-ahead operation of low-level machine electronics such as sensors and motor drives an easy to use breadboard layer for quickly creating a uniqueconfiguration for your machine a software plc programmable with ladder diagrams easy installation with a live-cdit does not provide drawing (cad - computer aided design) or g-codegeneration from the drawing (cam - computer automated manufacturing) functions.it can simultaneously move up to 9 axes and supports a variety of interfaces.the control can operate true servos (analog or pwm) with the feedback loopclosed by the emc software at the computer, or open loop with step-servosor stepper motors.motion control features include: cutter radius and length compensation, pathdeviation limited to a specified tolerance, lathe threading, synchronized axismotion, adaptive feedrate, operator feed override, and constant velocity control.support for non-cartesian motion systems is provided via custom kinematicsmodules. available architectures include hexapods (stewart platforms and similarconcepts) and systems with rotary joints to provide motion such as puma orscara robots.emc runs on linux using real time extensions.emc(增强机器控制)是一款用来控制机床(铣床、车床等)的计算机软件系统。emc是一款开源的自由软件。当前版本的许可是gpl 和 lgpl。emc特点: - 提供几种不同的用户界面供选择使用 - g代码解释器(基于rs-274机床编程语言) - 带预处理功能的实时运动规划系统 - 可直接操作底层的机床电器如传感器、电机驱动器等 - 易于使用的“面包板层”(breadboard layer),使您像使用“面包板”做 电路实验一样很容易的创建适合您机器的独有配置文件 - 可用梯形图编程操作的plc软件(指classicladder) - 所有这些都集成到一张live-cd上面,易于安装。不提供cad和cam功能,不能画图,也不能从图直接导出g-code。9轴联动,支持不同接口。可以实现闭环运动控制,也可以使用开环控制。能够控制模拟或pwm接口的伺服电机。运动控制特点:刀具半径和长度补偿、路径偏差可限制在给定的误差范围内、车床车 螺纹、多轴联动、自适应进给速度、手动进给覆盖(operator feed override)、恒 速控制。通过调整运动学模块的参数,可以提供对非笛卡尔运动系统的支持。emc2支持的其他 架构包括:六足系统(stewart或类似的机器人平台)、带旋转关节的系统(通常为 puma或scara机器人提供运动支持)。emc运行在使用实时扩展模块(rtai或者rtlinux)的linux操作系统中。2.2 为什么是ubuntu?ubuntu has been chosen, because it fits perfectly into the open source viewsof emc2:ubuntu will always be free of charge, and there is no extra fee for theenterprise edition, we make our very best work available to everyone on thesame free terms.emc is paired with the lts versions of ubuntu which provide support andsecurity fixes from the ubuntu team for 3 - 5 years.ubuntu uses the very best in translations and accessibility infrastructurethat the free software community has to offer, to make ubuntu usable for asmany people as possible.the ubuntu community is entirely committed to the principles of freesoftware development; we encourage people to use open source software,improve it and pass it on.选择ubuntu,是因为它和emc2的开源观点最为契合。ubuntu永远不会收费,也没有所谓的“企业版”费用。而我们也同样尽最大努力把最好的成果免费展示给每一个人。emc2与ubuntu配套已经3-5年了,ubuntu一直积极提供技术支持和安全支持。ubuntu尽最大努力致力于推广工作,做到了免费软件社区所能做到的一切,这些都使得越来越多的人使用ubuntu。ubuntu是遵守自由软件开发原则的典范,我们鼓励人们使用、提高、传承开源软件。第 3 章 如何获得帮助3.1 ircirc stands for internet relay chat. it is a live connection to other emcusers. the emc irc channel is #emc on freenode.the simplest way to get on the irc is to use the embedded java client onthis page /content/view/4/8/lang,en/.some irc etiquette:ask specific questions. avoid can someone help me?, it wont runtype of questions.if youre really new to all this, think a bit about your question beforetyping it. make sure you give enough information so someone can solve yourquestion.have some patience when waiting for an answer, sometimes it takes a whileto formulate an answer or everyone might be busy working or something.set up your irc account with your unique name so people will know who youare. if you use the java client, use the same name every time you log in.this helps people remember who you are and if you have been on before manywill remember the past discussions which saves time on both ends.3.1.1 sharing filesthe most common way to share files on the irc is to upload the file to oneof the following or a similar service and paste the link:http:/pastebin.ca = for texthttp:/imagebin.ca = for pictureshttp:/filebin.ca = for files and pdfsirc,代表“互联网接力聊天”的意思,它是一个和其它emc用户实时连接的工具。(译者注:事实上这个工具对大部分中国读者没什么帮助,就不翻译了。)3.2 邮件列表an internet mailing list is a way to put questions out for everyone on thatlist to see and answer at their convenience. you get better exposure to yourquestions on a mailing list than on the irc but answers take longer. in anutshell you e-mail a message to the list and either get daily digests orindividual replies back depending on how you set up your account.information about the emc users mailing list at:/lists/listinfo/emc-users(和irc差不多,也不翻译了。)3.3 emc wiki网站a wiki site is a user maintained web site that anyone can add to or edit.the user maintained emc wiki site contains a wealth of information and tips at:/cgi-bin/emcinfo.pl emc wiki网站是一个由用户维护的网站,任何人都可以添加和编辑网站的内容。下面这个网站里就有大量的技术信息(值得看一看)。 /cgi-bin/emcinfo.pl作者:dennis丁雷 qq:1160577904 e-mail:(译者注:未完待续)第 1 章 前言 forewordemc2 is modular and flexible. these attributes lead many to see it as a confusing jumble of littlethings and wonder why it is the way it is. this page attempts to answer that question before youget into the thick of things. emc2是模块化设计的,柔性很强。很多人都觉得它是由一些令人迷惑的小东西堆叠而成,很奇怪它是怎样做到的。那么在进入实质内容以前,让我们首先试图回答这个问题。emc started at the national institute of standards and technology in the usa. it grew up usingunix as its operating system. unix made it different. among early unix developers there grew a setof code writing ideas that some call the unix way. these early emc authors followed those ways. emc项目起源于nist(美国国家标准与技术研究院)。它起初是在unix操作系统下运行的,这使它与众不同。早期unix开发者规定了一些代码编写的原则或方法,称为unix编程方法(unix way),emc项目的作者们遵循了这些方法。eric s. raymond, in his book the art of unix programming, summarizes the unix philosophyas the widely-used engineering philosophy, keep it simple, stupid (kiss principle).he then describes how he believes this overall philosophy is applied as a cultural unixnorm, although unsurprisingly it is not difficult to find severe violations of most of thefollowing in actual unix practice:* rule of modularity: write simple parts connected by clean interfaces.* rule of clarity: clarity is better than cleverness.* rule of composition: design programs to be connected to other programs.* rule of separation: separate policy from mechanism; separate interfaces from engines. eric s. raymond在他的著作the art of unix programming中把unix的哲学上升为普遍适用的工程哲学,即“kiss原则”(keep it simple, stupid)(保持简单化、傻瓜化)。然后他描述了这个kiss原则和unix规范之间的文化纽带,尽管他也明明知道在unix的编程实践中找到违反这些规则的例子代码也是不困难和不令人惊奇的。 模块化原则:写出具有清晰接口的简单模块。 简洁性原则:简洁比聪明更重要。 组合性原则:设计程序是为了和其它程序对接。 分离性原则:把策略从机制中分离出来,把接口从上分离出来。(译者注:这句太难懂了,个人理解:从面向对象的角度说,就是把解决问题的方法和问题本身分离,也就是方法和数据分离;然后把接口从方法中分离出来。)mr raymond offered several more rules but these four describe essential characteristics of the emc2motion control system. raymond先生还提出了一些其它的原则,但这四个原则就是emc2运动控制系统最重要的特征。the modularity rule is critical. throughout these handbooks you will find talk of the interpreter ortask planner or motion or hal. each of these is a module or collection of modules. its modularitythat allows you to connect together just the parts you need to run your machine. 模块化原则是最关键的原则。纵观emc2系列手册,你会发现无论是g代码解释器、任务规划器、运动控制器,还是硬件抽象层(hal),它们都是模块或模块的集合。模块化使你能把需要的功能集成起来构成一个系统,而不需要的部分则可以去掉。the clarity rule is essential. emc2 is a work in progress it is not finished nor will it ever be. it iscomplete enough to run most of the machines we want it to run. much of that progress is achievedbecause many users and code developers are able to look at the work of others and build on whatthey have done. 简洁性原则是最重要的原则。emc2项目已经可以在很多机器系统上运行,但它仍然是一个正在进行的项目,它永远也不会停止。emc2的成功归功于许多用户以及代码开发人员。由于遵守了简洁性编程的原则,人们才能够互相看到彼此的工作,并很容易的理解代码以及为其添加新的内容。the composition rule allows us to build a predictable control system from the many modulesavailable by making them connectable. we achieve connectability by setting up standard interfacesto sets of modules and following those standards. 组合性原则促使开发人员为模块提供可连接性,这样使用人员就可以从许多模块中只选择他们需要的模块来构成目标系统。emc2的组合性是通过标准的接口以及符合该接口标准的模块实现的。the separation rule requires that we make distinct parts that do little things. by separating functionsdebugging is much easier and replacement modules can be dropped into the system andcomparisons easily made. 分离性原则要求开发人员尽量分解系统功能,并用不同的部件实现它们。这么做的好处一是便于调试,二是可以方便的比较同一功能的不同实现(因为它们有相同的接口,可以很容易的组合进系统中进行测试)。what does the unix way mean for you as a user of emc2. it means that you are able to make choicesabout how you will use the system. many of these choices are a part of machine integration, but manyalso affect the way you will use your machine. as you read you will find many places whereyou will need to make comparisons. eventually you will make choices, ill use this interface ratherthan that” or, “ill write part offsets this way rather than that way. throughout these handbookswe describe the range of abilities currently available. 那么unix规范对于使用者又意味着什么呢?它意味着你可以选择怎样配置emc2系统的功能以适应你的数控系统,也就是说配置emc2系统是设计数控机床工作的一部分。同时emc2的某些功能或配置又反过来影响你设计数控机床的方法和过程。在阅读系列手册的过程中,你会一边看一边比较,最后你可能说:“我将使用这个接口而不使用那个接口”,或者“我将这样使用部件偏移而不会那样使用”。继续看下去吧,在系列手册中,我们将讨论所有这些功能和配置。as you begin your journey into using emc2 we offer two cautionary notes:2praphrasing the words of doug gwyn on unix: emc2 was not designed to stop its users fromdoing stupid things, as that would also stop them from doing clever things.likewise the words of steven king: emc2 is user-friendly. it just isnt promiscuous aboutwhich users its friendly with. 在你继续阅读之前,我们提供两条注意事项:emc2不会防止它的使用者干傻事,因为那会同样防止它的使用者干聪明的事。emc2肯定是用户友好的,只不过它在对哪个用户友好的问题上,用情比较专一而已。作者:dennis丁雷 qq:1160577904 e-mail:第 2 章 emc2 the enhanced machine control 2.1 关于本手册the focus of this manual is on using emc. it is intended to be used once emc is installed andconfigured. for standard installations see the getting started guide for step by step instructionsto get you up and going. for detailed information on installation and configuration of emc see theintegrator manual. 本手册的焦点是如何使用emc2 。当emc2安装并配置完毕后应当阅读本手册。关于简易安装emc2的问题,请参见入门手册“getting started guide”。关于安装和配置的详细信息,请参见综合手册“integrator manual”。 2.2 emc2如何工作the enhanced machine controller (emc2) is a lot more than just another cnc mill program. itcan control machine tools, robots, or other automated devices. it can control servo motors, steppermotors, relays, and other devices related to machine tools.there are four main components to the emc2 software: a motion controller, a discrete i/o controller,a task executor which coordinates them, and graphical user interfaces. in addition there isa layer called hal (hardware abstraction layer) which allows configuration of emc2 without theneed of recompiling. 可不敢把emc2想象成另外一个cnc数控加工程序,它能做的可多了。它可以控制机床、机器人、自动化设备,还能控制伺服电机、步进电机、继电器以及其它机床电器。 emc2由四个主要部分:运动控制器、离散io控制器、任务执行器(用来协调这四个部件)、图形用户界面。另外还有一个硬件抽象层hal(hardware abstraction layer),有了hal,无需重新编译emc2,就可以按照实际需要配置emc2的硬件。figure 2.1 shows a simple block diagram showing what a typical 3-axis emc2 system might looklike. this diagram shows a stepper motor system. the pc, running linux as its operating system,is actually controlling the stepper motor drives by sending signals through the printer port. thesesignals (pulses) make the stepper drives move the stepper motors. the emc2 can also run servomotors via servo interface cards or by using an extended parallel port to connect with externalcontrol boards. as we examine each of the components that make up an emc2 system we willremind the reader of this typical machine. 图2.1(参见英文原版图片)的方框图展示了一个典型的3轴数控系统看起来的样子。这是一个步进电机系统。pc机上运行着linux操作系统和emc2程序,控制信号则从打印口(并口)传送到电机驱动器上,电机驱动器根据控制信号驱动步进电机(当然emc2也可以通过伺服接口卡或使用与扩展并口相连的外部控制卡来控制伺服电机)。我们接下来会介绍emc2系统的每一个组成部分,在介绍的过程中可能会反复提到这幅图片。 2.3 用户接口a user interface is the part of the emc2 that the machine tool operator interacts with. the emc2comes with several types of user interfaces:axis an opengl-based gui (graphical user interface), with an interactive g-code previewer.this interface is one of the few that are still under active
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 高一哈姆雷特课文课件
- 大数据应用股权转移及数据安全保护合同范本
- 住宅租赁经营权及社区服务设施租赁及管理合同
- 离婚协议书范本(适用于名人隐私保护条款)
- 离职员工经济补偿金及原公司企业创新发展协议
- 果园中的病虫害识别与防治
- 盆栽养护误区解析与矫正
- 大学课件检验及评价规程
- 企业内部交流手册
- 梦幻剧场:舞台上的精彩演出
- 第3课 团团圆圆过中秋 第1课时(课件)2025-2026学年道德与法治二年级上册统编版
- 2025年铁路建设工程质量安全监督管理人员考试试题及答案
- 2025年度事业单位公开招聘考试《综合应用能力(E类)药剂专业》新版真题卷(附解析)
- 成都麓湖生态城规划建筑产品线
- 中医院医院感染知识考试题
- 顶管施工方案(泥水平衡法)
- 儿童康复病历模板
- 重症监护室环境清洁消毒PPT
- 二年级看图写话指导《美丽的秋天》课件
- 检伤分类-课件
- TCECS 720-2020 钢板桩支护技术规程
评论
0/150
提交评论