菜单
  

     FIGURE 1.2

    to run. Elements can be primitive operators such as addition, or more complex such as a subVI. If LabVIEW successfully constructs all the wire tables, you are presented a solid arrow indicating that the VIs can be executed. If the wire table cannot be created, then a broken arrow is presented for the VIs with a problem, and also for each VI loaded in memory that requires that VI for execution. LabVIEW runs in several subsystems, which will be described throughout this book. All that we need to understand now is that the main execution subsystem compiles diagrams while you write them. This allows programmers to write code and test it without needing to wait for a compiling process, and programmers do not need to worry about execution speed because the language is not interpreted.

    The wire diagrams that are constructed do not define an order in which elements are executed. This is an important concept for advanced programmers to understand. LabVIEW is a dataflow-based language, which means that elements will be executed in a somewhat arbitrary order. LabVIEW does not guarantee which order a series of elements is executed in if they are not dependent on each other. A process called arbitrary interleaving is used to determine the order elements are executed in. You may force an order of execution by requiring that elements require output from another element before execution. This is a fairly common practice, and most programmers do not recognize that they are forcing the order of execution. When programming, it will become obvious that some operations must take place before others can. It is the programmer’s responsibility to provide a mechanism to force the order of execution in the code design.

    1.1.3 EXECUTING VIS

    A LabVIEW program is executed by pressing the arrow or the Run button located in the palette along the top of the window. While the VI is executing, the Run button changes to a black color as depicted in Figure 1.3. Note that not all of the items in the palette are displayed during execution of a VI. As you proceed to the right along

     FIGURE 1.3

    the palette, you will find the Continuous Run, Stop, and Pause buttons. If you compare Figures 1.1 and 1.3, the last three buttons in Figure 1.1 disappear in Figure 1.3. These buttons are used for alignment of objects on the panel or diagram, and are not available while a program is running. VIs are normally run from the front panel; however, they can also be executed from the block diagram. This allows the programmer to run the program and utilize some of the other tools that are available for debugging purposes.

    If the Run button appears as a broken arrow, this indicates that the LabVIEW program or VI cannot compile because of programming errors. When all of the errors are fixed, the broken Run button will be substituted by the regular Run button. LabVIEW has successfully compiled the diagram. While editing or creating a VI, you may notice that the palette displays the broken Run button. If you continue to see this after editing is completed, press the button to determine the cause of the errors. An Error List window will appear displaying all of the errors that must be fixed before the VI can compile. Debugging techniques are discussed further in Chapter 6, which covers exception handling.

    The palette contains four additional buttons on the block diagram that are not available from the front panel. These are typically used for debugging an application.

    The button with the lightbulb is for Execution Highlighting and the three following it are used for stepping through the code. Figure 1.4 shows the code diagram with Execution Highlighting activated. You can see bubbles that represent the data flowing along the wire, from one block to the next. You can step through the code as needed when the Pause button is used in conjunction with Execution Highlighting. As stated earlier, debugging techniques will be covered in Chapter 6.

  1. 上一篇:ADAMS起落架系统英文文献和中文翻译
  2. 下一篇:LED前照灯的设计英文文献和中文翻译
  1. 汽车内燃机连杆载荷和应...

  2. 机械手系统英文文献和中文翻译

  3. 固体氧化物燃料电池英文文献和中文翻译

  4. 船舶运动仿真系统英文文献和中文翻译

  5. 新能源空调系统设计英文文献和中文翻译

  6. 正交试验回归法和响应曲...

  7. 机械设计制造及其自动化英文文献和中文翻译

  8. NFC协议物理层的软件实现+文献综述

  9. 巴金《激流三部曲》高觉新的悲剧命运

  10. 中国传统元素在游戏角色...

  11. C++最短路径算法研究和程序设计

  12. g-C3N4光催化剂的制备和光催化性能研究

  13. 上市公司股权结构对经营绩效的影响研究

  14. 江苏省某高中学生体质现状的调查研究

  15. 现代简约美式风格在室内家装中的运用

  16. 高警觉工作人群的元情绪...

  17. 浅析中国古代宗法制度

  

About

优尔论文网手机版...

主页:http://www.youerw.com

关闭返回