<< Chapter < Page Chapter >> Page >
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.

Front panel

  • Open the Temperature System VI located in the C:\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 is Latch When Pressed . This setting changes the control value when you click it and retains the new value until the VIreads it once. At this point the control reverts to its default value, even if you keep pressing the mousebutton. This action is similar to a circuit breaker and is useful for stopping While Loops or for getting the VI to perform an action only once each timeyou set the control.The mechanical action of the Stop button is Latch When Released . This setting changes the control value only after you release the mousebutton within the graphical boundary of the control. When the VI reads it once, the control revertsto the old value. This action guarantees at least one new value. This action is similar to dialog box buttonsand system buttons.
  • Right-click a control and select Advanced>>Key Navigation from the shortcut menu to display the Key Navigation dialog box.
  • In the Key Assignment section, assign the shortcut key shown in the .
  • Repeat and for each control.

Block diagram

  • Examine the block diagram which is already built.
    • 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 astrip chart, and logs it to a file.
    • The Display Logged Temp VI opens a file that you select, reads the logged data, and displaysthem on a graph.
  • Configure each subVI to display its front panel when called.
    • Right-click the subVI and select SubVI Node Setup from the shortcut menu.
    • Place checkmarks in the Show Front Panel when called and Close afterwards if originally closed checkboxes.
    • Click OK to close the SubVI Node Setup dialog box.
    • Repeat through for the remaining two subVIs.
  • 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 the Category pull-down menu.
    • Place a checkmark in the Run When Opened checkbox.
  • Configure the VI so the menu bar and toolbar are not visible while the VI runs.
    • Select Window Appearance from the Category pull-down menu.
    • Click the Customize button.
    • Remove the checkmarks from the Show Menu Bar and Show Toolbar When Running checkboxes.
    • Click the OK button twice.
  • Save and close all VIs.
  • Open the Temperature System VI again. The VI runs automatically when you open it. Click thebuttons on the front panel or use the keyboard shortcuts.
  • Stop and close all VIs.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Labview graphical programming. OpenStax CNX. Apr 09, 2015 Download for free at https://legacy.cnx.org/content/col11408/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Labview graphical programming' conversation and receive update notifications?

Ask