- 1、本文档共83页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
LabVIEW 编程与虚拟仪器设计(3-程序结构)
* If you place the Feedback Node on the wire before you branch the wire that connects the data to the tunnel, the Feedback Node passes each value to the tunnel. If you place the Feedback Node on the wire after you branch the wire that connects data to the tunnel, the Feedback Node passes each value back to the input of the VI or function and then passes the last value to the tunnel. A good way to visualize this is to think of the execution as starting at the feedback node. * * * Do not immediately display this slide. Suggested questions for class participation: What structure must ALWAYS run at least once? What structures are used to repeat execution of certain functions? How can you control the speed at which the loop executes? Describe the difference between the three types of charts. Why would you want to use a shift register? Why would you want to use a feedback node? How do you retain multiple values from previous iterations? Review the slide: The purpose of Lesson Four was to introduce LabVIEW structures. Structures control the flow of data in a VI. * * Every VI we have encountered so far has executed in an order dependent on the flow of data. There are many cases when a decision must be made in a program: if a happens, do b; else if c happens, do d. In text-based programs, this can be accomplished with if-else statements, case statements, switch statements, etc. In LabVIEW, there are also many different ways of making decisions. The simplest of these methods is the Select function. The Select function, located on the FunctionsExpress Comparison palette, selects between two values dependent on a Boolean input. If the Boolean input s is True, this function returns the value wired to the t input. If the Boolean input is False, this function returns the value wired to the f input. * * * 在LabVIEW的程序设计中,如果对用户界面操作(如点击鼠标、按下键盘、改变控件的值等)的响应采用轮询的方法来检测,缺点是不够灵活,占用CPU资源较多,而且操作变化太快则可能检测不到变化。采用事件结构来响应用户操作,则不必轮询即可确定用户在前面板执行的操作,例如,用户改变一个前面板控件的值、关闭前面板、退出程序等动作,都可以及时被程序捕捉到。
文档评论(0)