- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Unit 10 Program Flow 第10单元 程序流程 Reading Target After reading this unit, you should be able to understand the program flow of subroutine. Text Program flow deals with the arrangement of the program—the logic path that the control follows as it progresses through the program. Programs need not go directly from the beginning command directly to the end. This is called linear logic. Within a CNC program, you may use branching logic and logic statements that shorten and simplify the program. 程序流程处理程序的组织问题——即控制器处理程序的时候所遵循的逻辑路径。程序不必从开始的指令直接执行到最后,这即所谓的线性逻辑。在CNC程序中,可以通过分支逻辑和逻辑语句缩短并简化程序。 Text There are different kinds of program flow statements — Loops and subroutines. Both loops and subroutines can be contained within other logic statements—called nesting logic. Now subroutine logic will be mainly introduced in this text. 程序中存在不同的程序流程语句-即循环和子程序。循环和子程序都可以包含在其他的逻辑语句之中,称为嵌套。这一节中我们主要学习子程序逻辑。 Text 10.1 Subroutine Example The easiest logic statement to understand is the subroutine, a mini-program sometimes called a subprogram. Subroutines are called up within the body of the main program, but are actually a separate group of commands that are usually outside the main program. 10.1子程序语句 最容易理解的逻辑语句就是子程序,它是一个小程序,有时也称作subprogram。子程序是在主程序体内被调用的,但实际上却是存在于主程序外的单独的一组指令。 Text Refer to Fig. 10-1. One example of the application of a subroutine would be drilling twenty-four deep holes in the part shown .To save time, the drill need not peck until it has drilled a certain depth. The group of commands repeated at each hole are written once and called a subroutine. After locating the tool each time, the drilling subroutine is called up by the main program. 如图10-1,这是一个用子程序在所示零件上加工24个一定深度孔的例子。为了节省时间直到钻头钻到一定深度才会停止钻孔。加工每一个孔都要重复的那些指令只需要编写一次,叫做子程序。每一次当刀具定位完后,主程序就会调用钻孔子程序。 Text Fig. 10-1 Programming the drilling of this plate is simplified using subroutine logic. (通过使用子程序逻辑,对该盘的钻孔编程得到了简化。) Text 1
您可能关注的文档
- 数控机床及其维护 教学课件 孙小捞 第1章.ppt
- 数控机床及其维护 教学课件 孙小捞 第4章.ppt
- 数控机床及其维护 教学课件 孙小捞习题答案 第1章练习题答案.doc
- 数控机床及其维护 教学课件 孙小捞习题答案 第2章练习题答案.doc
- 数控机床及其维护 教学课件 孙小捞习题答案 第3章练习题答案.doc
- 数控机床及其维护 教学课件 孙小捞习题答案 第4章练习题答案.doc
- 数控机床及其维护 教学课件 孙小捞习题答案 第5章练习题答案.doc
- 数控机床及其维护 教学课件 作者 刘战术 窦凯 第1章.ppt
- 数控机床及其维护 教学课件 作者 刘战术 窦凯 第2章.ppt
- 数控机床及其维护 教学课件 作者 刘战术 窦凯 第3章.ppt
最近下载
- 浅析企业员工流失的原因及对策——以福州永辉超市为例.docx VIP
- XK3190-C8技术手册.pdf VIP
- 广州市历年中考(2025-2026)化学试题(含答案).doc VIP
- 办公设备维护方案.docx VIP
- 浙江省杭州市学军中学四校区2022-2023学年高二上学期期末物理试题(含答案解析).docx
- 《金瓶梅》中潘金莲“绣鞋”之物象探析.doc VIP
- 14s501-1P35-37页球磨铸铁踏步施工检验标准.pdf VIP
- 2026年上海市松江区中考一模化学试卷含详解.docx VIP
- 2025研读新课标,探寻数学教育新方向——读《小学数学新课程标准》有感.docx
- 如何通过手机号码查询行动轨迹.docx VIP
原创力文档


文档评论(0)