From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Open and Run a VI on a Second Monitor using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

If you have a desire to open the front panel of a VI on a second monitor and want to be able to run that VI from a different VI on your first monitor, this example is for you. For example, if you have a second monitor (wired to the same computer) in a lab or test facility where data needs to be viewed, but is not near your control station. Or if you simply want the VI to open and run exclusively on your second monitor but have control from your first monitor at your desk or test station.

 

Description

This example opens the front panel of a reference VI on a second monitor and sets the properties of that front panel to be maximized, no menu bars, etc. Then you are able to press a button to acquire 'data' and display it on that second monitor from the first monitor. After acquiring the data you are able to stop and close the vi running on the second monitor.

Requirements

Software

  1. LabVIEW 2014(or compatible)

Hardware

  1. A second computer monitor.

 

Steps to Implement or Execute Code

  1. Download the 'Open Front Panel on Second Monitor.zip'
  2. UNZIP the folder.
  3. Open 'Open Front Panel on 2nd Monitor.lvproj'
  4. In the Project Explorer, double click to open the 'Open Front Panel on 2nd Monitor.vi'.
  5. Run the 'Open Front Panel on 2nd Monitor.vi'
    1. Press the 'Open Reference.vi' button and watch the front panel of your reference vi open on your second monitor.
    2. Press the 'Acquire Data' button and watch the sine wave display on the graph on your second monitor.
    3. Press the 'STOP AND CLOSE REFERENCE.VI' button to stop the 'Open Reference.vi' and close its front panel.
  6. Push the 'STOP MAIN VI' to stop the 'Open Front Panel on 2nd Monitor vi'.

 

 Additional Information or References

Front Panel

front panel-main.JPG

Block Diagram

block diagram.JPG

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.