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 SystemVI located in theC:\Exercises\ LabVIEW Basics Idirectory. 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 Loopsor for getting the VI to perform an action only once each time you set the control. The mechanical action of theStopbutton 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 Navigationfrom the shortcut menu to display theKey Navigationdialog box. - In the
Key Assignmentsection, 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 TempVI simulates a temperature measurement every 500 ms and plots it on a strip chart.The
Display and Log TempVI simulates a temperature measurement every 500 ms, plots it on a strip chart, and logs it to a file.The
Display Logged TempVI opens a file that you select, reads the logged data, and displays them on a graph.
- 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 SystemVI front panel when you press the<Enter>key. Try pressing the<Enter>key to do so. - Stop the VI.
- Configure the
Temperature SystemVI to run automatically when you open the VI.- Select
File>>VI Properties. - Select
Executionfrom theCategorypull-down menu. - Place a checkmark in the
Run When Openedcheckbox.
- Select
- Configure the VI so the menu bar and toolbar are not visible while the VI runs.
- Select
Window Appearancefrom theCategorypull-down menu. - Click the
Customizebutton. - Remove the checkmarks from the
Show Menu BarandShow Toolbar When Runningcheckboxes. - Click the
OKbutton twice.
- Select
- Save and close all VIs.
- Open the
Temperature SystemVI 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