- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
程序结构设计祥解.ppt
* This gives you more control on how your application is timed, and gives the user more control over your application. Counterexample: Data-acquisition and data-logging in the same loop. It would be difficult to increase the rate of DAQ without increasing rate of data logging. If they are separate of each other then this is easier to do The standard Master/Slave design pattern approach for this application would be to put the acquisition processes into two separate loops (slave loops), both driven by a master loop that polls the user interface (UI) controls to see if the parameters have been changed. To communicate with the slave loops, the master loop writes to local variables. This will ensure that each acquisition process will not affect the other, and that any delays caused by the user interface (for example, bringing up a dialog) will not delay any iteration of the acquisition processes. Define data dependency: Loop B is dependent upon Loop A if any of Loop B inputs require values from loop A outputs * Now that we’ve discussed the concept of having multiple loops for separate processes, lets talk about how we can bridge those loops in order to communicate without creating any data-dependency. There are a number of different mechanisms we can use depending upon the communication required. For synchronization and timing an occurance or rendezous are helpful. We’re going to focus on the use of queues Notifier Operations Functions Use the Notifier Operations functions to suspend the execution of a block diagram until you receive data from another section of the block diagram or from another VI running in the same application instance. Occurrences Functions Use the Occurrences functions to control separate, synchronous activities. Queue Operations Functions Use the Queue Operations functions to create a queue for communicating data between sections of a block diagram or from another VI. Rendezvous VIs Use the Rendezvous VIs to synchronize two or more
文档评论(0)