第四课 子VI设计与文档精要.ppt

  1. 1、本文档共54页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
第四课 子VI设计与文档精要

* 好 较好 最佳 F.重构典型问题 程序框图使用了不正确的对象名称和不合适的图标 * F.重构典型问题 程序框图使用了不必要的逻辑 * F.重构典型问题 程序框图使用了重复逻辑 为重复逻辑部分创建子VI,实现VI的重构 * F.重构典型问题 程序框图未使用数据流编程 如有需要,用状态机替换顺序结构 删除局部变量,直接连线输入控件或显示控件 * F.重构典型问题 程序框图包含复杂算法 简化: F.重构典型问题 程序框图太大(大于屏幕尺寸) 重构VI缩小程序框图 为程序框图内的部分代码创建子VI * 概念练习: 重构VI 改进现有的设计不佳的VI。 练习位置:Exercise/Exercise 4.2 F.重构---比较VI 工具比较 比较VI… 比较VI层次结构… 通过上述工具,确定内存中的两个VI间的差异 F.重构--比较VI 使用比较VI工具,比较原始Determine Warnings VI和重构后的VI。 * 总结-重构检查表 使用下列复选项确定是否需要重构VI: 程序框图过于混乱 程序框图包含不正确的对象名称和不恰当的图标 程序框图包含不必要的逻辑 程序框图包含重复的逻辑 程序框图未使用数据流编程 程序框图包含复杂算法 程序框图太大 * 总结-测验 在子VI中,未完成下列哪些接线端连线将导致错误? 必要接线端 推荐接线端 可选接线端 * 总结-测验答案 在子VI中,未完成下列哪些接线端连线将导致错误? 必要接线端 推荐接线端 可选接线端 * 总结-测验 VI被用作子VI时,必须先创建自定义图标。 对 错 * 总结-测验答案 VI被用作子VI时,必须先创建自定义图标。 对 错 将VI用作子VI时,无需先创建自定义图标。但最好创建自定义图标,以增强代码的可读性。 This is an excellent place to discuss owned labels versus free labels. Too many font styles can make your front panel look busy and disorganized; instead, use two or three different sizes of the same font. If you are using more than one size or type of font, make sure that they are noticeably different Design your front panels with larger fonts and more contrast for industrial operator stations. Demonstrate tips strips, descriptions and VI Properties, and how they appear in a VI. For example, VI Properties and descriptions show up in Context Help, and tips strips show up when hovering over item. Use the following guidelines when commenting your VIs: Comments: Use to document algorithms that you use and add reference information Label structures to specify the main functionality Label long wires to identify their use/contents Label constants to specify the nature of the constant Do not show labels on functions and subVIs - a developer can find information about a function or subVI by using the Context Help window Point out that this code implements the same functionality as the previous slide, but is much easier to understand and maintain. Remind students that they can use the Clean Up Diagram tool to help

文档评论(0)

shuwkb + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档