菜单
  

     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. 酸性水汽提装置总汽提塔设计+CAD图纸

  9. 十二层带中心支撑钢结构...

  10. 杂拟谷盗体内共生菌沃尔...

  11. 电站锅炉暖风器设计任务书

  12. java+mysql车辆管理系统的设计+源代码

  13. 中考体育项目与体育教学合理结合的研究

  14. 当代大学生慈善意识研究+文献综述

  15. 河岸冲刷和泥沙淤积的监测国内外研究现状

  16. 乳业同业并购式全产业链...

  17. 大众媒体对公共政策制定的影响

  

About

751论文网手机版...

主页:http://www.751com.cn

关闭返回