Summary: Our goal is to set keyboard shortcuts for front panel controls and display a subVI front panel when a VI runs. Complete the following steps to build a temperature monitoring system you can use to view three different tests on request.
EXERCISE 1
1.A) Front Panel
- Open the
Temperature System
VI located in theC:\Exercises\ LabVIEW Basics I
directory. The following front panel is already built.The front panel contains four Boolean buttons. The mechanical action of the first three buttons isFigure 1 Latch When Pressed
. This setting changes the control value when you click it and retains the new value until the VI reads it once. At this point the control reverts to its default value, even if you keep pressing the mouse button. This action is similar to a circuit breaker and is useful for stoppingWhile Loops
or for getting the VI to perform an action only once each time you set the control. The mechanical action of theStop
button isLatch When Released
. This setting changes the control value only after you release the mouse button within the graphical boundary of the control. When the VI reads it once, the control reverts to the old value. This action guarantees at least one new value. This action is similar to dialog box buttons and system buttons. - Right-click a control and select
Advanced>>Key Navigation
from the shortcut menu to display theKey Navigation
dialog box. - In the
Key Assignment
section, assign the shortcut key shown in the Figure 1. - Repeat Item 2 and Item 3 for each control.
1.B) Block Diagram
- Examine the block diagram which is already built.
Figure 2 - The
Display Temp
VI simulates a temperature measurement every 500 ms and plots it on a strip chart. - The
Display and Log Temp
VI simulates a temperature measurement every 500 ms, plots it on a strip chart, and logs it to a file. - The
Display Logged Temp
VI opens a file that you select, reads the logged data, and displays them on a graph.
- The
- Configure each subVI to display its front panel when called.
- Save the VI. Display the front panel and run the VI.
- Click each button and press the corresponding keyboard shortcuts. The three subVIs return to the
Temperature System
VI front panel when you press the<Enter>
key. Try pressing the<Enter>
key to do so. - Stop the VI.
- Configure the
Temperature System
VI to run automatically when you open the VI.- Select
File>>VI Properties
. - Select
Execution
from theCategory
pull-down menu. - Place a checkmark in the
Run When Opened
checkbox.
- Select
- Configure the VI so the menu bar and toolbar are not visible while the VI runs.
- Select
Window Appearance
from theCategory
pull-down menu. - Click the
Customize
button. - Remove the checkmarks from the
Show Menu Bar
andShow Toolbar When Running
checkboxes. - Click the
OK
button twice.
- Select
- Save and close all VIs.
- Open the
Temperature System
VI again. The VI runs automatically when you open it. Click the buttons on the front panel or use the keyboard shortcuts. - Stop and close all VIs.
No comments:
Post a Comment