Archive for the ‘labview_tip’ Category

In most LabVIEW applications, the front panel of a subVI is displayed in order to retrieve inputs from the user, or to simply display information. By following these steps, brought to you by Darren Nattinger, you can make your subVI panels easy to develop and debug.

1. Handle the opening and closing of the subVI panel programmatically. Many LabVIEW users choose to use the SubVI Node Setup right-click option to display the subVI panel. But the downside to this option is that your subVI won’t run any initialization codes before displaying its panel. To bypass this problem use the FP.Open method to display the subVI panel once you have initialized it, and use the FP.Close method to close it once the user dismisses the subVI dialog.



2. Configure the VI Properties of the subVI properly. Set the Window Appearance in VI Properties to "Custom” and customize your settings to match the image below. As you can see there are various setting changes, in particular the “Show Abort Button” option is disabled to prevent users from closing your entire application by pressing Ctrl-. while your subVI dialog is active.




3. Call your modal dialog subVI dynamically. Whenever you run a VI, all of its subVIs are reserved for running, which means none of the subVIs are in edit mode. Any reserved subVI that has a modal window appearance will immediately be displayed if its front panel is already open. Since it is a modal window, you cannot dismiss it because it's reserved for running. The best way to avoid this problem is to call the modal dialog subVI dynamically by changing the subVI to “Load and retain on first call.”



>> Get more LabVIEW tips from Darren.

By default, intensity graphs and intensity charts have a blue color map for the Z scale, but did you know there are other color maps to choose from? To reconfigure the blue color map, right-click any of the numbers in the Z scale and choose “Marker Color.”


You can also programmatically manipulate the scale with the color table property of the intensity graph and chart. By following the link below, you can download a VI that will allow you to select between several pre-defined color maps for your intensity graphs and charts.


Thanks to Darren Nattinger for this LabVIEW tip!



>> Download the VI here.