Prompt User For Input in LabVIEW NXG

Updated Oct 25, 2020




Is there an equivalent to the "Prompt User for Input" Express VI in LabVIEW NXG?
How can I set a subVI to open its panel when called in LabVIEW NXG?
How can I show a subVI's front panel to the user in LabVIEW NXG?

As there are no Express VIs in LabVIEW NXG, there is no equivalent to "Prompt User for Input." You can still set a subVI to open its panel when called, and prompt your user for an input in that way.

In LabVIEW NXG, this is done by opening a reference to the panel window. Follow the steps below to do so.
  1. Create or open the subVI you want to show the user.
  2. In the configuration pane on the right side of your window, click the "Panel" tab at the top, then select "Create Panel Reference."
  1. On the Diagram, get that reference from the Unplaced Items Tray and wire it to a Property Node.
  2. In the Property Node, select the "Window" property. This gets a reference to the panel window.
  3. Wire that reference to the Open Window VI.
  4. Wire this reference through your code to a Close Window VI.


Additional Information

In the example above, the "modal" input of the Open Window VI is set to TRUE. This makes sure the window opens above all other windows, and remains open until closed. This is not necessary, but it is recommended if you require an input from your user.

Similarly, a while loop with a stop button is an easy way to make sure your user has time to enter their input. Make sure you only run Close Window once the user has sent an input.

You can also use the Canvas section in the Panel tab of the configuration pane to set the size of the window that opens when you call the subVI.