The Toolbar, located at the top of LabVIEW windows, contains buttons you will use to control the execution of your VI, as well as text configuration options and commands to control the alignment and distribution of objects (see Figure 59). You'll notice that the Toolbar has a few more options in the block diagram than in the front panel, and that a few editing-related options disappear when you run your VI. If you're not sure what a button does, hold the cursor over it until a tip strip appears, describing its function.
Figure 59. Toolbar
Run Button
Run Button (Active)
Run Button (Broken)
The Run button, which looks like an arrow, starts VI execution when you click on it. It changes appearance to active when a VI is actually running. When a VI won't compile, the run button appears broken.
Continuous Run Button
The Continuous Run button causes the VI to execute over and over until you hit the stop button. It's kind of like a GOTO statement (sort of a "programming no-no"), so use it sparingly.
Abort Button
The Abort button, easily recognizable because it looks like a tiny stop sign, becomes active when a VI begins to execute; otherwise, the Abort button is grayed out. You can click on this button to halt the VI.
Using the Abort button is like pulling the power cord on your computer. Your program will stop immediately rather than coming to a graceful end, and data integrity can be lost this way. You should always code a more appropriate stopping mechanism into your program, as we will demonstrate later.
Pause Button
The Pause button pauses the VI so that you can use single-step debugging options such as step into, step over, and step out. Hit the Pause button again to continue execution.
Step Into Button
Step Over Button
Step Out Button
The single-step buttonsStep Into, Step Over, and Step Outforce your VI to execute one step at a time so you can troubleshoot.
Execution Highlight Button
The Execution Highlight button causes the VI to highlight the flow of data as it passes through the diagram. When execution highlight is on, you can see intermediate data values in your block diagram that would not otherwise appear.
Retain Wire Values
The Retain Wire Values button causes the VI's wires to store the value that flowed through them the last time the VI executed. This is very useful for debugging. You can view the value stored in a wire by placing a probe on the wire. The probe value will be set to the value stored in the wire.
Warning Button
The Warning button appears if you have configured your VI to show warnings and you have any warnings outstanding. You can list the warnings by clicking on the button. A warning is not an error; it just alerts you that you are doing something you may not have intended (for example, if there are objects on the block diagram that are hidden behind other objects and cannot be seen).
Saturday, June 20, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment